diff options
Diffstat (limited to 'arch/arm/mach-mmp/ttc_dkb.c')
-rw-r--r-- | arch/arm/mach-mmp/ttc_dkb.c | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c index 08cfef6c92a2..8f49b2b12608 100644 --- a/arch/arm/mach-mmp/ttc_dkb.c +++ b/arch/arm/mach-mmp/ttc_dkb.c | |||
@@ -11,9 +11,13 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/mtd/mtd.h> | ||
15 | #include <linux/mtd/partitions.h> | ||
16 | #include <linux/mtd/onenand.h> | ||
14 | 17 | ||
15 | #include <asm/mach-types.h> | 18 | #include <asm/mach-types.h> |
16 | #include <asm/mach/arch.h> | 19 | #include <asm/mach/arch.h> |
20 | #include <asm/mach/flash.h> | ||
17 | #include <mach/addr-map.h> | 21 | #include <mach/addr-map.h> |
18 | #include <mach/mfp-pxa910.h> | 22 | #include <mach/mfp-pxa910.h> |
19 | #include <mach/pxa910.h> | 23 | #include <mach/pxa910.h> |
@@ -26,6 +30,86 @@ static unsigned long ttc_dkb_pin_config[] __initdata = { | |||
26 | /* UART2 */ | 30 | /* UART2 */ |
27 | GPIO47_UART2_RXD, | 31 | GPIO47_UART2_RXD, |
28 | GPIO48_UART2_TXD, | 32 | GPIO48_UART2_TXD, |
33 | |||
34 | /* DFI */ | ||
35 | DF_IO0_ND_IO0, | ||
36 | DF_IO1_ND_IO1, | ||
37 | DF_IO2_ND_IO2, | ||
38 | DF_IO3_ND_IO3, | ||
39 | DF_IO4_ND_IO4, | ||
40 | DF_IO5_ND_IO5, | ||
41 | DF_IO6_ND_IO6, | ||
42 | DF_IO7_ND_IO7, | ||
43 | DF_IO8_ND_IO8, | ||
44 | DF_IO9_ND_IO9, | ||
45 | DF_IO10_ND_IO10, | ||
46 | DF_IO11_ND_IO11, | ||
47 | DF_IO12_ND_IO12, | ||
48 | DF_IO13_ND_IO13, | ||
49 | DF_IO14_ND_IO14, | ||
50 | DF_IO15_ND_IO15, | ||
51 | DF_nCS0_SM_nCS2_nCS0, | ||
52 | DF_ALE_SM_WEn_ND_ALE, | ||
53 | DF_CLE_SM_OEn_ND_CLE, | ||
54 | DF_WEn_DF_WEn, | ||
55 | DF_REn_DF_REn, | ||
56 | DF_RDY0_DF_RDY0, | ||
57 | }; | ||
58 | |||
59 | static struct mtd_partition ttc_dkb_onenand_partitions[] = { | ||
60 | { | ||
61 | .name = "bootloader", | ||
62 | .offset = 0, | ||
63 | .size = SZ_1M, | ||
64 | .mask_flags = MTD_WRITEABLE, | ||
65 | }, { | ||
66 | .name = "reserved", | ||
67 | .offset = MTDPART_OFS_APPEND, | ||
68 | .size = SZ_128K, | ||
69 | .mask_flags = MTD_WRITEABLE, | ||
70 | }, { | ||
71 | .name = "reserved", | ||
72 | .offset = MTDPART_OFS_APPEND, | ||
73 | .size = SZ_8M, | ||
74 | .mask_flags = MTD_WRITEABLE, | ||
75 | }, { | ||
76 | .name = "kernel", | ||
77 | .offset = MTDPART_OFS_APPEND, | ||
78 | .size = (SZ_2M + SZ_1M), | ||
79 | .mask_flags = 0, | ||
80 | }, { | ||
81 | .name = "filesystem", | ||
82 | .offset = MTDPART_OFS_APPEND, | ||
83 | .size = SZ_48M, | ||
84 | .mask_flags = 0, | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | static struct onenand_platform_data ttc_dkb_onenand_info = { | ||
89 | .parts = ttc_dkb_onenand_partitions, | ||
90 | .nr_parts = ARRAY_SIZE(ttc_dkb_onenand_partitions), | ||
91 | }; | ||
92 | |||
93 | static struct resource ttc_dkb_resource_onenand[] = { | ||
94 | [0] = { | ||
95 | .start = SMC_CS0_PHYS_BASE, | ||
96 | .end = SMC_CS0_PHYS_BASE + SZ_1M, | ||
97 | .flags = IORESOURCE_MEM, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | static struct platform_device ttc_dkb_device_onenand = { | ||
102 | .name = "onenand-flash", | ||
103 | .id = -1, | ||
104 | .resource = ttc_dkb_resource_onenand, | ||
105 | .num_resources = ARRAY_SIZE(ttc_dkb_resource_onenand), | ||
106 | .dev = { | ||
107 | .platform_data = &ttc_dkb_onenand_info, | ||
108 | }, | ||
109 | }; | ||
110 | |||
111 | static struct platform_device *ttc_dkb_devices[] = { | ||
112 | &ttc_dkb_device_onenand, | ||
29 | }; | 113 | }; |
30 | 114 | ||
31 | static void __init ttc_dkb_init(void) | 115 | static void __init ttc_dkb_init(void) |
@@ -34,6 +118,9 @@ static void __init ttc_dkb_init(void) | |||
34 | 118 | ||
35 | /* on-chip devices */ | 119 | /* on-chip devices */ |
36 | pxa910_add_uart(1); | 120 | pxa910_add_uart(1); |
121 | |||
122 | /* off-chip devices */ | ||
123 | platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices)); | ||
37 | } | 124 | } |
38 | 125 | ||
39 | MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform") | 126 | MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform") |