aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorAlberto Panizzo <maramaopercheseimorto@gmail.com>2009-06-17 09:05:21 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2009-06-23 08:25:25 -0400
commitc3a9c7f53a0eb1ec687ecf131f9cfb41bbdc26b5 (patch)
treee0d20a0a4ce84b3d609a6d749b12c18537a69fe7 /arch/arm
parentbc33dc5ae7ed7a422ab1141d3bf81c6cee2a5050 (diff)
ARM MXC: Armadillo 500 add NOR flash device support (resend).
This patch add support for NOR flash mapping through the physmap driver. The purpose is to maintain the original Atmark partition model. Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-mx3/armadillo5x0.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c
index 541181090b37..38d99e6c9d00 100644
--- a/arch/arm/mach-mx3/armadillo5x0.c
+++ b/arch/arm/mach-mx3/armadillo5x0.c
@@ -31,6 +31,7 @@
31#include <linux/smsc911x.h> 31#include <linux/smsc911x.h>
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 35
35#include <mach/hardware.h> 36#include <mach/hardware.h>
36#include <asm/mach-types.h> 37#include <asm/mach-types.h>
@@ -97,6 +98,48 @@ static int armadillo5x0_pins[] = {
97}; 98};
98 99
99/* 100/*
101 * MTD NOR Flash
102 */
103static struct mtd_partition armadillo5x0_nor_flash_partitions[] = {
104 {
105 .name = "nor.bootloader",
106 .offset = 0x00000000,
107 .size = 4*32*1024,
108 }, {
109 .name = "nor.kernel",
110 .offset = MTDPART_OFS_APPEND,
111 .size = 16*128*1024,
112 }, {
113 .name = "nor.userland",
114 .offset = MTDPART_OFS_APPEND,
115 .size = 110*128*1024,
116 }, {
117 .name = "nor.config",
118 .offset = MTDPART_OFS_APPEND,
119 .size = 1*128*1024,
120 },
121};
122
123static struct physmap_flash_data armadillo5x0_nor_flash_pdata = {
124 .width = 2,
125 .parts = armadillo5x0_nor_flash_partitions,
126 .nr_parts = ARRAY_SIZE(armadillo5x0_nor_flash_partitions),
127};
128
129static struct resource armadillo5x0_nor_flash_resource = {
130 .flags = IORESOURCE_MEM,
131 .start = CS0_BASE_ADDR,
132 .end = CS0_BASE_ADDR + SZ_64M - 1,
133};
134
135static struct platform_device armadillo5x0_nor_flash = {
136 .name = "physmap-flash",
137 .id = -1,
138 .num_resources = 1,
139 .resource = &armadillo5x0_nor_flash_resource,
140};
141
142/*
100 * FB support 143 * FB support
101 */ 144 */
102static const struct fb_videomode fb_modedb[] = { 145static const struct fb_videomode fb_modedb[] = {
@@ -272,6 +315,10 @@ static void __init armadillo5x0_init(void)
272 /* Register FB */ 315 /* Register FB */
273 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 316 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
274 mxc_register_device(&mx3_fb, &mx3fb_pdata); 317 mxc_register_device(&mx3_fb, &mx3fb_pdata);
318
319 /* Register NOR Flash */
320 mxc_register_device(&armadillo5x0_nor_flash,
321 &armadillo5x0_nor_flash_pdata);
275} 322}
276 323
277static void __init armadillo5x0_timer_init(void) 324static void __init armadillo5x0_timer_init(void)