diff options
author | Kim Milo <Milo.Kim@ti.com> | 2013-02-01 13:18:59 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-02-01 17:59:34 -0500 |
commit | d58eb6b59f8e3ca99fe16bdb3e784012126a3bb6 (patch) | |
tree | 603419f77db80456a4c7ded8a0a5c7bdec61e728 /arch | |
parent | ff95793a084b1375b6fb02c45750406aac9a26fa (diff) |
ARM: OMAP2+: craneboard: support NAND device
This patch enables the NAND device on the AM3517 Craneboard.
MTD partitions are created as below.
0x000000000000-0x000000080000 : "X-Loader"
0x000000080000-0x000000240000 : "U-Boot"
0x000000240000-0x000000280000 : "U-Boot Env"
0x000000280000-0x000000780000 : "Kernel"
0x000000780000-0x000010000000 : "File System"
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-am3517crane.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 51b96a1206d1..37646e557d69 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
@@ -20,12 +20,17 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/mtd/mtd.h> | ||
24 | #include <linux/mtd/nand.h> | ||
25 | #include <linux/mtd/partitions.h> | ||
23 | 26 | ||
24 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
27 | 30 | ||
28 | #include "common.h" | 31 | #include "common.h" |
32 | #include "common-board-devices.h" | ||
33 | #include "board-flash.h" | ||
29 | 34 | ||
30 | #include "am35xx-emac.h" | 35 | #include "am35xx-emac.h" |
31 | #include "mux.h" | 36 | #include "mux.h" |
@@ -51,6 +56,36 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = { | |||
51 | .reset_gpio_port[2] = -EINVAL | 56 | .reset_gpio_port[2] = -EINVAL |
52 | }; | 57 | }; |
53 | 58 | ||
59 | static struct mtd_partition crane_nand_partitions[] = { | ||
60 | { | ||
61 | .name = "X-Loader", | ||
62 | .offset = 0, | ||
63 | .size = 4 * NAND_BLOCK_SIZE, | ||
64 | .mask_flags = MTD_WRITEABLE, | ||
65 | }, | ||
66 | { | ||
67 | .name = "U-Boot", | ||
68 | .offset = MTDPART_OFS_APPEND, | ||
69 | .size = 14 * NAND_BLOCK_SIZE, | ||
70 | .mask_flags = MTD_WRITEABLE, | ||
71 | }, | ||
72 | { | ||
73 | .name = "U-Boot Env", | ||
74 | .offset = MTDPART_OFS_APPEND, | ||
75 | .size = 2 * NAND_BLOCK_SIZE, | ||
76 | }, | ||
77 | { | ||
78 | .name = "Kernel", | ||
79 | .offset = MTDPART_OFS_APPEND, | ||
80 | .size = 40 * NAND_BLOCK_SIZE, | ||
81 | }, | ||
82 | { | ||
83 | .name = "File System", | ||
84 | .offset = MTDPART_OFS_APPEND, | ||
85 | .size = MTDPART_SIZ_FULL, | ||
86 | }, | ||
87 | }; | ||
88 | |||
54 | static void __init am3517_crane_init(void) | 89 | static void __init am3517_crane_init(void) |
55 | { | 90 | { |
56 | int ret; | 91 | int ret; |
@@ -58,6 +93,9 @@ static void __init am3517_crane_init(void) | |||
58 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 93 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
59 | omap_serial_init(); | 94 | omap_serial_init(); |
60 | omap_sdrc_init(NULL, NULL); | 95 | omap_sdrc_init(NULL, NULL); |
96 | board_nand_init(crane_nand_partitions, | ||
97 | ARRAY_SIZE(crane_nand_partitions), 0, | ||
98 | NAND_BUSWIDTH_16, NULL); | ||
61 | 99 | ||
62 | /* Configure GPIO for EHCI port */ | 100 | /* Configure GPIO for EHCI port */ |
63 | if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { | 101 | if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) { |