diff options
author | Alberto Panizzo <maramaopercheseimorto@gmail.com> | 2009-06-17 09:06:30 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-06-23 08:25:26 -0400 |
commit | 0c8bad6a26aefbcb7b3d8d1e5d97c53076ac99af (patch) | |
tree | a6335a40ce585a352349d3832158f28452aa1fbf /arch/arm/mach-mx3 | |
parent | c3a9c7f53a0eb1ec687ecf131f9cfb41bbdc26b5 (diff) |
Armadillo 500 add NAND flash device support (resend).
Since recent mxc_nand driver fixes from linux-mtd this patch
add support for ST NAND02GW3B2CN6 (2k pages flash) placed on the armadillo 500
motherboard.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/armadillo5x0.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c index 38d99e6c9d00..ee331fd6b1bd 100644 --- a/arch/arm/mach-mx3/armadillo5x0.c +++ b/arch/arm/mach-mx3/armadillo5x0.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
34 | #include <linux/mtd/physmap.h> | 34 | #include <linux/mtd/physmap.h> |
35 | #include <linux/io.h> | ||
35 | 36 | ||
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
@@ -47,8 +48,10 @@ | |||
47 | #include <mach/mmc.h> | 48 | #include <mach/mmc.h> |
48 | #include <mach/ipu.h> | 49 | #include <mach/ipu.h> |
49 | #include <mach/mx3fb.h> | 50 | #include <mach/mx3fb.h> |
51 | #include <mach/mxc_nand.h> | ||
50 | 52 | ||
51 | #include "devices.h" | 53 | #include "devices.h" |
54 | #include "crm_regs.h" | ||
52 | 55 | ||
53 | static int armadillo5x0_pins[] = { | 56 | static int armadillo5x0_pins[] = { |
54 | /* UART1 */ | 57 | /* UART1 */ |
@@ -94,7 +97,14 @@ static int armadillo5x0_pins[] = { | |||
94 | MX31_PIN_FPSHIFT__FPSHIFT, | 97 | MX31_PIN_FPSHIFT__FPSHIFT, |
95 | MX31_PIN_DRDY0__DRDY0, | 98 | MX31_PIN_DRDY0__DRDY0, |
96 | IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ | 99 | IOMUX_MODE(MX31_PIN_LCS1, IOMUX_CONFIG_GPIO), /*ADV7125_PSAVE*/ |
100 | }; | ||
97 | 101 | ||
102 | /* | ||
103 | * NAND Flash | ||
104 | */ | ||
105 | static struct mxc_nand_platform_data armadillo5x0_nand_flash_pdata = { | ||
106 | .width = 1, | ||
107 | .hw_ecc = 1, | ||
98 | }; | 108 | }; |
99 | 109 | ||
100 | /* | 110 | /* |
@@ -319,6 +329,12 @@ static void __init armadillo5x0_init(void) | |||
319 | /* Register NOR Flash */ | 329 | /* Register NOR Flash */ |
320 | mxc_register_device(&armadillo5x0_nor_flash, | 330 | mxc_register_device(&armadillo5x0_nor_flash, |
321 | &armadillo5x0_nor_flash_pdata); | 331 | &armadillo5x0_nor_flash_pdata); |
332 | |||
333 | /* Register NAND Flash */ | ||
334 | mxc_register_device(&mxc_nand_device, &armadillo5x0_nand_flash_pdata); | ||
335 | |||
336 | /* set NAND page size to 2k if not configured via boot mode pins */ | ||
337 | __raw_writel(__raw_readl(MXC_CCM_RCSR) | (1 << 30), MXC_CCM_RCSR); | ||
322 | } | 338 | } |
323 | 339 | ||
324 | static void __init armadillo5x0_timer_init(void) | 340 | static void __init armadillo5x0_timer_init(void) |