diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-06-17 04:32:54 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 06:49:31 -0400 |
commit | 53740df16f42163255031d24d99ba207a9ac81a9 (patch) | |
tree | 8763226e1186404359b3d047fcd320b1a04fb554 /arch/arm/mach-pxa | |
parent | 0d95c1fa5661b11cf7777af2613563cc3c683d8d (diff) |
[ARM] pxa/colibri: add NAND config for Colibri PXA3xx boards
NAND feature will be enabled when the appropriate config option is set.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/colibri-pxa300.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/colibri-pxa320.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/colibri-pxa3xx.c | 41 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/colibri.h | 6 |
4 files changed, 49 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c index 7c9c34c19ae2..37c239c56568 100644 --- a/arch/arm/mach-pxa/colibri-pxa300.c +++ b/arch/arm/mach-pxa/colibri-pxa300.c | |||
@@ -172,6 +172,7 @@ void __init colibri_pxa300_init(void) | |||
172 | { | 172 | { |
173 | colibri_pxa300_init_eth(); | 173 | colibri_pxa300_init_eth(); |
174 | colibri_pxa300_init_ohci(); | 174 | colibri_pxa300_init_ohci(); |
175 | colibri_pxa3xx_init_nand(); | ||
175 | colibri_pxa300_init_lcd(); | 176 | colibri_pxa300_init_lcd(); |
176 | colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO)); | 177 | colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO39_GPIO)); |
177 | colibri_pxa310_init_ac97(); | 178 | colibri_pxa310_init_ac97(); |
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c index a18d37b3c5e6..458c1a147b6c 100644 --- a/arch/arm/mach-pxa/colibri-pxa320.c +++ b/arch/arm/mach-pxa/colibri-pxa320.c | |||
@@ -168,6 +168,7 @@ void __init colibri_pxa320_init(void) | |||
168 | { | 168 | { |
169 | colibri_pxa320_init_eth(); | 169 | colibri_pxa320_init_eth(); |
170 | colibri_pxa320_init_ohci(); | 170 | colibri_pxa320_init_ohci(); |
171 | colibri_pxa3xx_init_nand(); | ||
171 | colibri_pxa320_init_lcd(); | 172 | colibri_pxa320_init_lcd(); |
172 | colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO)); | 173 | colibri_pxa3xx_init_lcd(mfp_to_gpio(GPIO49_GPIO)); |
173 | colibri_pxa320_init_ac97(); | 174 | colibri_pxa320_init_ac97(); |
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index 2c846bbfc435..efebaf4d734d 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <mach/colibri.h> | 25 | #include <mach/colibri.h> |
26 | #include <mach/mmc.h> | 26 | #include <mach/mmc.h> |
27 | #include <mach/pxafb.h> | 27 | #include <mach/pxafb.h> |
28 | #include <mach/pxa3xx_nand.h> | ||
28 | 29 | ||
29 | #include "generic.h" | 30 | #include "generic.h" |
30 | #include "devices.h" | 31 | #include "devices.h" |
@@ -157,3 +158,43 @@ void __init colibri_pxa3xx_init_lcd(int bl_pin) | |||
157 | } | 158 | } |
158 | #endif | 159 | #endif |
159 | 160 | ||
161 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) | ||
162 | static struct mtd_partition colibri_nand_partitions[] = { | ||
163 | { | ||
164 | .name = "bootloader", | ||
165 | .offset = 0, | ||
166 | .size = SZ_512K, | ||
167 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
168 | }, | ||
169 | { | ||
170 | .name = "kernel", | ||
171 | .offset = MTDPART_OFS_APPEND, | ||
172 | .size = SZ_4M, | ||
173 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
174 | }, | ||
175 | { | ||
176 | .name = "reserved", | ||
177 | .offset = MTDPART_OFS_APPEND, | ||
178 | .size = SZ_1M, | ||
179 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
180 | }, | ||
181 | { | ||
182 | .name = "fs", | ||
183 | .offset = MTDPART_OFS_APPEND, | ||
184 | .size = MTDPART_SIZ_FULL, | ||
185 | }, | ||
186 | }; | ||
187 | |||
188 | static struct pxa3xx_nand_platform_data colibri_nand_info = { | ||
189 | .enable_arbiter = 1, | ||
190 | .keep_config = 1, | ||
191 | .parts = colibri_nand_partitions, | ||
192 | .nr_parts = ARRAY_SIZE(colibri_nand_partitions), | ||
193 | }; | ||
194 | |||
195 | void __init colibri_pxa3xx_init_nand(void) | ||
196 | { | ||
197 | pxa3xx_set_nand_info(&colibri_nand_info); | ||
198 | } | ||
199 | #endif | ||
200 | |||
diff --git a/arch/arm/mach-pxa/include/mach/colibri.h b/arch/arm/mach-pxa/include/mach/colibri.h index a88d7caff0d1..811743c56147 100644 --- a/arch/arm/mach-pxa/include/mach/colibri.h +++ b/arch/arm/mach-pxa/include/mach/colibri.h | |||
@@ -23,6 +23,12 @@ static inline void colibri_pxa3xx_init_lcd(int bl_pin) {} | |||
23 | extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data); | 23 | extern void colibri_pxa3xx_init_eth(struct ax_plat_data *plat_data); |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | #if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE) | ||
27 | extern void colibri_pxa3xx_init_nand(void); | ||
28 | #else | ||
29 | static inline void colibri_pxa3xx_init_nand(void) {} | ||
30 | #endif | ||
31 | |||
26 | /* physical memory regions */ | 32 | /* physical memory regions */ |
27 | #define COLIBRI_SDRAM_BASE 0xa0000000 /* SDRAM region */ | 33 | #define COLIBRI_SDRAM_BASE 0xa0000000 /* SDRAM region */ |
28 | 34 | ||