diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-3630sdp.c')
-rw-r--r-- | arch/arm/mach-omap2/board-3630sdp.c | 129 |
1 files changed, 121 insertions, 8 deletions
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 57290fb3fcd7..b359c3f7bb39 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -18,10 +18,10 @@ | |||
18 | #include <plat/common.h> | 18 | #include <plat/common.h> |
19 | #include <plat/board.h> | 19 | #include <plat/board.h> |
20 | #include <plat/gpmc-smc91x.h> | 20 | #include <plat/gpmc-smc91x.h> |
21 | #include <plat/mux.h> | ||
22 | #include <plat/usb.h> | 21 | #include <plat/usb.h> |
23 | 22 | ||
24 | #include <mach/board-zoom.h> | 23 | #include <mach/board-zoom.h> |
24 | #include <mach/board-flash.h> | ||
25 | 25 | ||
26 | #include "mux.h" | 26 | #include "mux.h" |
27 | #include "sdram-hynix-h8mbx00u0mer-0em.h" | 27 | #include "sdram-hynix-h8mbx00u0mer-0em.h" |
@@ -66,12 +66,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | |||
66 | .reset_gpio_port[2] = -EINVAL | 66 | .reset_gpio_port[2] = -EINVAL |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static void __init omap_sdp_map_io(void) | ||
70 | { | ||
71 | omap2_set_globals_36xx(); | ||
72 | omap34xx_map_common_io(); | ||
73 | } | ||
74 | |||
75 | static struct omap_board_config_kernel sdp_config[] __initdata = { | 69 | static struct omap_board_config_kernel sdp_config[] __initdata = { |
76 | }; | 70 | }; |
77 | 71 | ||
@@ -93,12 +87,131 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
93 | #define board_mux NULL | 87 | #define board_mux NULL |
94 | #endif | 88 | #endif |
95 | 89 | ||
90 | /* | ||
91 | * SDP3630 CS organization | ||
92 | * See also the Switch S8 settings in the comments. | ||
93 | */ | ||
94 | static char chip_sel_sdp[][GPMC_CS_NUM] = { | ||
95 | {PDC_NOR, PDC_NAND, PDC_ONENAND, DBG_MPDB, 0, 0, 0, 0}, /* S8:1111 */ | ||
96 | {PDC_ONENAND, PDC_NAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1110 */ | ||
97 | {PDC_NAND, PDC_ONENAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1101 */ | ||
98 | }; | ||
99 | |||
100 | static struct mtd_partition sdp_nor_partitions[] = { | ||
101 | /* bootloader (U-Boot, etc) in first sector */ | ||
102 | { | ||
103 | .name = "Bootloader-NOR", | ||
104 | .offset = 0, | ||
105 | .size = SZ_256K, | ||
106 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
107 | }, | ||
108 | /* bootloader params in the next sector */ | ||
109 | { | ||
110 | .name = "Params-NOR", | ||
111 | .offset = MTDPART_OFS_APPEND, | ||
112 | .size = SZ_256K, | ||
113 | .mask_flags = 0, | ||
114 | }, | ||
115 | /* kernel */ | ||
116 | { | ||
117 | .name = "Kernel-NOR", | ||
118 | .offset = MTDPART_OFS_APPEND, | ||
119 | .size = SZ_2M, | ||
120 | .mask_flags = 0 | ||
121 | }, | ||
122 | /* file system */ | ||
123 | { | ||
124 | .name = "Filesystem-NOR", | ||
125 | .offset = MTDPART_OFS_APPEND, | ||
126 | .size = MTDPART_SIZ_FULL, | ||
127 | .mask_flags = 0 | ||
128 | } | ||
129 | }; | ||
130 | |||
131 | static struct mtd_partition sdp_onenand_partitions[] = { | ||
132 | { | ||
133 | .name = "X-Loader-OneNAND", | ||
134 | .offset = 0, | ||
135 | .size = 4 * (64 * 2048), | ||
136 | .mask_flags = MTD_WRITEABLE /* force read-only */ | ||
137 | }, | ||
138 | { | ||
139 | .name = "U-Boot-OneNAND", | ||
140 | .offset = MTDPART_OFS_APPEND, | ||
141 | .size = 2 * (64 * 2048), | ||
142 | .mask_flags = MTD_WRITEABLE /* force read-only */ | ||
143 | }, | ||
144 | { | ||
145 | .name = "U-Boot Environment-OneNAND", | ||
146 | .offset = MTDPART_OFS_APPEND, | ||
147 | .size = 1 * (64 * 2048), | ||
148 | }, | ||
149 | { | ||
150 | .name = "Kernel-OneNAND", | ||
151 | .offset = MTDPART_OFS_APPEND, | ||
152 | .size = 16 * (64 * 2048), | ||
153 | }, | ||
154 | { | ||
155 | .name = "File System-OneNAND", | ||
156 | .offset = MTDPART_OFS_APPEND, | ||
157 | .size = MTDPART_SIZ_FULL, | ||
158 | }, | ||
159 | }; | ||
160 | |||
161 | static struct mtd_partition sdp_nand_partitions[] = { | ||
162 | /* All the partition sizes are listed in terms of NAND block size */ | ||
163 | { | ||
164 | .name = "X-Loader-NAND", | ||
165 | .offset = 0, | ||
166 | .size = 4 * (64 * 2048), | ||
167 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
168 | }, | ||
169 | { | ||
170 | .name = "U-Boot-NAND", | ||
171 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ | ||
172 | .size = 10 * (64 * 2048), | ||
173 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
174 | }, | ||
175 | { | ||
176 | .name = "Boot Env-NAND", | ||
177 | |||
178 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */ | ||
179 | .size = 6 * (64 * 2048), | ||
180 | }, | ||
181 | { | ||
182 | .name = "Kernel-NAND", | ||
183 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ | ||
184 | .size = 40 * (64 * 2048), | ||
185 | }, | ||
186 | { | ||
187 | .name = "File System - NAND", | ||
188 | .size = MTDPART_SIZ_FULL, | ||
189 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */ | ||
190 | }, | ||
191 | }; | ||
192 | |||
193 | static struct flash_partitions sdp_flash_partitions[] = { | ||
194 | { | ||
195 | .parts = sdp_nor_partitions, | ||
196 | .nr_parts = ARRAY_SIZE(sdp_nor_partitions), | ||
197 | }, | ||
198 | { | ||
199 | .parts = sdp_onenand_partitions, | ||
200 | .nr_parts = ARRAY_SIZE(sdp_onenand_partitions), | ||
201 | }, | ||
202 | { | ||
203 | .parts = sdp_nand_partitions, | ||
204 | .nr_parts = ARRAY_SIZE(sdp_nand_partitions), | ||
205 | }, | ||
206 | }; | ||
207 | |||
96 | static void __init omap_sdp_init(void) | 208 | static void __init omap_sdp_init(void) |
97 | { | 209 | { |
98 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | 210 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); |
99 | omap_serial_init(); | 211 | omap_serial_init(); |
100 | zoom_peripherals_init(); | 212 | zoom_peripherals_init(); |
101 | board_smc91x_init(); | 213 | board_smc91x_init(); |
214 | board_flash_init(sdp_flash_partitions, chip_sel_sdp); | ||
102 | enable_board_wakeup_source(); | 215 | enable_board_wakeup_source(); |
103 | usb_ehci_init(&ehci_pdata); | 216 | usb_ehci_init(&ehci_pdata); |
104 | } | 217 | } |
@@ -107,7 +220,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | |||
107 | .phys_io = 0x48000000, | 220 | .phys_io = 0x48000000, |
108 | .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, | 221 | .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, |
109 | .boot_params = 0x80000100, | 222 | .boot_params = 0x80000100, |
110 | .map_io = omap_sdp_map_io, | 223 | .map_io = omap3_map_io, |
111 | .reserve = omap_reserve, | 224 | .reserve = omap_reserve, |
112 | .init_irq = omap_sdp_init_irq, | 225 | .init_irq = omap_sdp_init_irq, |
113 | .init_machine = omap_sdp_init, | 226 | .init_machine = omap_sdp_init, |