diff options
| author | Sukumar Ghorai <s-ghorai@ti.com> | 2010-07-09 10:27:50 -0400 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2010-08-02 08:46:29 -0400 |
| commit | 7875eea5caf641e36cd9b5755c1d84810469fe30 (patch) | |
| tree | c087ac3ce156e2ce67639c92f6fe561f23a8ae3b | |
| parent | e08b105ecdec0bfc8b9bb4d98bc2fc6cc7526938 (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>
| -rw-r--r-- | arch/arm/mach-omap2/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-3630sdp.c | 120 |
2 files changed, 121 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index f8d536fc244e..3988441c0484 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
| @@ -140,6 +140,7 @@ obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom3.o \ | |||
| 140 | board-zoom-debugboard.o | 140 | board-zoom-debugboard.o |
| 141 | obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \ | 141 | obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \ |
| 142 | board-zoom-peripherals.o \ | 142 | board-zoom-peripherals.o \ |
| 143 | board-flash.o \ | ||
| 143 | hsmmc.o | 144 | hsmmc.o |
| 144 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ | 145 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ |
| 145 | hsmmc.o | 146 | hsmmc.o |
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 | */ | ||
| 100 | static 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 | |||
| 106 | static 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 | |||
| 137 | static 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 | |||
| 167 | static 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 | |||
| 199 | static 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 | |||
| 95 | static void __init omap_sdp_init(void) | 214 | static 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 | } |
