aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-3630sdp.c
diff options
context:
space:
mode:
authorSukumar Ghorai <s-ghorai@ti.com>2010-07-09 10:27:50 -0400
committerTony Lindgren <tony@atomide.com>2010-08-02 08:46:29 -0400
commit7875eea5caf641e36cd9b5755c1d84810469fe30 (patch)
treec087ac3ce156e2ce67639c92f6fe561f23a8ae3b /arch/arm/mach-omap2/board-3630sdp.c
parente08b105ecdec0bfc8b9bb4d98bc2fc6cc7526938 (diff)
omap-3630-sdp : Add support for Flash
add support for NAND, OneNAND, NOR on omap 3630-sdp board. Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-3630sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c120
1 files changed, 120 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index f267dc04d866..2eb3f94b478e 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -21,6 +21,7 @@
21#include <plat/usb.h> 21#include <plat/usb.h>
22 22
23#include <mach/board-zoom.h> 23#include <mach/board-zoom.h>
24#include <mach/board-flash.h>
24 25
25#include "mux.h" 26#include "mux.h"
26#include "sdram-hynix-h8mbx00u0mer-0em.h" 27#include "sdram-hynix-h8mbx00u0mer-0em.h"
@@ -92,12 +93,131 @@ static struct omap_board_mux board_mux[] __initdata = {
92#define board_mux NULL 93#define board_mux NULL
93#endif 94#endif
94 95
96/*
97 * SDP3630 CS organization
98 * See also the Switch S8 settings in the comments.
99 */
100static char chip_sel_sdp[][GPMC_CS_NUM] = {
101 {PDC_NOR, PDC_NAND, PDC_ONENAND, DBG_MPDB, 0, 0, 0, 0}, /* S8:1111 */
102 {PDC_ONENAND, PDC_NAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1110 */
103 {PDC_NAND, PDC_ONENAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1101 */
104};
105
106static struct mtd_partition sdp_nor_partitions[] = {
107 /* bootloader (U-Boot, etc) in first sector */
108 {
109 .name = "Bootloader-NOR",
110 .offset = 0,
111 .size = SZ_256K,
112 .mask_flags = MTD_WRITEABLE, /* force read-only */
113 },
114 /* bootloader params in the next sector */
115 {
116 .name = "Params-NOR",
117 .offset = MTDPART_OFS_APPEND,
118 .size = SZ_256K,
119 .mask_flags = 0,
120 },
121 /* kernel */
122 {
123 .name = "Kernel-NOR",
124 .offset = MTDPART_OFS_APPEND,
125 .size = SZ_2M,
126 .mask_flags = 0
127 },
128 /* file system */
129 {
130 .name = "Filesystem-NOR",
131 .offset = MTDPART_OFS_APPEND,
132 .size = MTDPART_SIZ_FULL,
133 .mask_flags = 0
134 }
135};
136
137static struct mtd_partition sdp_onenand_partitions[] = {
138 {
139 .name = "X-Loader-OneNAND",
140 .offset = 0,
141 .size = 4 * (64 * 2048),
142 .mask_flags = MTD_WRITEABLE /* force read-only */
143 },
144 {
145 .name = "U-Boot-OneNAND",
146 .offset = MTDPART_OFS_APPEND,
147 .size = 2 * (64 * 2048),
148 .mask_flags = MTD_WRITEABLE /* force read-only */
149 },
150 {
151 .name = "U-Boot Environment-OneNAND",
152 .offset = MTDPART_OFS_APPEND,
153 .size = 1 * (64 * 2048),
154 },
155 {
156 .name = "Kernel-OneNAND",
157 .offset = MTDPART_OFS_APPEND,
158 .size = 16 * (64 * 2048),
159 },
160 {
161 .name = "File System-OneNAND",
162 .offset = MTDPART_OFS_APPEND,
163 .size = MTDPART_SIZ_FULL,
164 },
165};
166
167static struct mtd_partition sdp_nand_partitions[] = {
168 /* All the partition sizes are listed in terms of NAND block size */
169 {
170 .name = "X-Loader-NAND",
171 .offset = 0,
172 .size = 4 * (64 * 2048),
173 .mask_flags = MTD_WRITEABLE, /* force read-only */
174 },
175 {
176 .name = "U-Boot-NAND",
177 .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
178 .size = 10 * (64 * 2048),
179 .mask_flags = MTD_WRITEABLE, /* force read-only */
180 },
181 {
182 .name = "Boot Env-NAND",
183
184 .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */
185 .size = 6 * (64 * 2048),
186 },
187 {
188 .name = "Kernel-NAND",
189 .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
190 .size = 40 * (64 * 2048),
191 },
192 {
193 .name = "File System - NAND",
194 .size = MTDPART_SIZ_FULL,
195 .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */
196 },
197};
198
199static struct flash_partitions sdp_flash_partitions[] = {
200 {
201 .parts = sdp_nor_partitions,
202 .nr_parts = ARRAY_SIZE(sdp_nor_partitions),
203 },
204 {
205 .parts = sdp_onenand_partitions,
206 .nr_parts = ARRAY_SIZE(sdp_onenand_partitions),
207 },
208 {
209 .parts = sdp_nand_partitions,
210 .nr_parts = ARRAY_SIZE(sdp_nand_partitions),
211 },
212};
213
95static void __init omap_sdp_init(void) 214static void __init omap_sdp_init(void)
96{ 215{
97 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); 216 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
98 omap_serial_init(); 217 omap_serial_init();
99 zoom_peripherals_init(); 218 zoom_peripherals_init();
100 board_smc91x_init(); 219 board_smc91x_init();
220 board_flash_init(sdp_flash_partitions, chip_sel_sdp);
101 enable_board_wakeup_source(); 221 enable_board_wakeup_source();
102 usb_ehci_init(&ehci_pdata); 222 usb_ehci_init(&ehci_pdata);
103} 223}