|
@@ -118,3 +118,85 @@ static struct platform_device db88f5281_nor_flash = {
|
|
|
|
|
|
/*****************************************************************************
|
|
|
* 32M NAND Flash on Device bus CS2
|
|
|
+ ****************************************************************************/
|
|
|
+
|
|
|
+static struct mtd_partition db88f5281_nand_parts[] = {
|
|
|
+ {
|
|
|
+ .name = "kernel",
|
|
|
+ .offset = 0,
|
|
|
+ .size = SZ_2M,
|
|
|
+ }, {
|
|
|
+ .name = "root",
|
|
|
+ .offset = SZ_2M,
|
|
|
+ .size = (SZ_16M - SZ_2M),
|
|
|
+ }, {
|
|
|
+ .name = "user",
|
|
|
+ .offset = SZ_16M,
|
|
|
+ .size = SZ_8M,
|
|
|
+ }, {
|
|
|
+ .name = "recovery",
|
|
|
+ .offset = (SZ_16M + SZ_8M),
|
|
|
+ .size = SZ_8M,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct resource db88f5281_nand_resource = {
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ .start = DB88F5281_NAND_BASE,
|
|
|
+ .end = DB88F5281_NAND_BASE + DB88F5281_NAND_SIZE - 1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct orion_nand_data db88f5281_nand_data = {
|
|
|
+ .parts = db88f5281_nand_parts,
|
|
|
+ .nr_parts = ARRAY_SIZE(db88f5281_nand_parts),
|
|
|
+ .cle = 0,
|
|
|
+ .ale = 1,
|
|
|
+ .width = 8,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device db88f5281_nand_flash = {
|
|
|
+ .name = "orion_nand",
|
|
|
+ .id = -1,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &db88f5281_nand_data,
|
|
|
+ },
|
|
|
+ .resource = &db88f5281_nand_resource,
|
|
|
+ .num_resources = 1,
|
|
|
+};
|
|
|
+
|
|
|
+/*****************************************************************************
|
|
|
+ * 7-Segment on Device bus CS0
|
|
|
+ * Dummy counter every 2 sec
|
|
|
+ ****************************************************************************/
|
|
|
+
|
|
|
+static void __iomem *db88f5281_7seg;
|
|
|
+static struct timer_list db88f5281_timer;
|
|
|
+
|
|
|
+static void db88f5281_7seg_event(unsigned long data)
|
|
|
+{
|
|
|
+ static int count = 0;
|
|
|
+ writel(0, db88f5281_7seg + (count << 4));
|
|
|
+ count = (count + 1) & 7;
|
|
|
+ mod_timer(&db88f5281_timer, jiffies + 2 * HZ);
|
|
|
+}
|
|
|
+
|
|
|
+static int __init db88f5281_7seg_init(void)
|
|
|
+{
|
|
|
+ if (machine_is_db88f5281()) {
|
|
|
+ db88f5281_7seg = ioremap(DB88F5281_7SEG_BASE,
|
|
|
+ DB88F5281_7SEG_SIZE);
|
|
|
+ if (!db88f5281_7seg) {
|
|
|
+ printk(KERN_ERR "Failed to ioremap db88f5281_7seg\n");
|
|
|
+ return -EIO;
|
|
|
+ }
|
|
|
+ setup_timer(&db88f5281_timer, db88f5281_7seg_event, 0);
|
|
|
+ mod_timer(&db88f5281_timer, jiffies + 2 * HZ);
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+__initcall(db88f5281_7seg_init);
|
|
|
+
|
|
|
+/*****************************************************************************
|
|
|
+ * PCI
|