aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-07-17 13:46:58 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 06:49:35 -0400
commitd7c307cfe76ae0c0493fbdac417ef6e30221f61b (patch)
tree3d0a384e161aff93d4718a626aca655599e31947
parent9845b6b15cf03ae3f473c39a13f2454abad50e09 (diff)
[ARM] pxa/palm: Add NOR flash support for PalmLD
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r--arch/arm/mach-pxa/palmld.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 08c599b49d89..b3ae8b958ad6 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -25,6 +25,9 @@
25#include <linux/wm97xx_batt.h> 25#include <linux/wm97xx_batt.h>
26#include <linux/power_supply.h> 26#include <linux/power_supply.h>
27#include <linux/sysdev.h> 27#include <linux/sysdev.h>
28#include <linux/mtd/mtd.h>
29#include <linux/mtd/partitions.h>
30#include <linux/mtd/physmap.h>
28 31
29#include <asm/mach-types.h> 32#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
@@ -141,6 +144,42 @@ static unsigned long palmld_pin_config[] __initdata = {
141}; 144};
142 145
143/****************************************************************************** 146/******************************************************************************
147 * NOR Flash
148 ******************************************************************************/
149static struct mtd_partition palmld_partitions[] = {
150 {
151 .name = "Flash",
152 .offset = 0x00000000,
153 .size = MTDPART_SIZ_FULL,
154 .mask_flags = 0
155 }
156};
157
158static struct physmap_flash_data palmld_flash_data[] = {
159 {
160 .width = 2, /* bankwidth in bytes */
161 .parts = palmld_partitions,
162 .nr_parts = ARRAY_SIZE(palmld_partitions)
163 }
164};
165
166static struct resource palmld_flash_resource = {
167 .start = PXA_CS0_PHYS,
168 .end = PXA_CS0_PHYS + SZ_4M - 1,
169 .flags = IORESOURCE_MEM,
170};
171
172static struct platform_device palmld_flash = {
173 .name = "physmap-flash",
174 .id = 0,
175 .resource = &palmld_flash_resource,
176 .num_resources = 1,
177 .dev = {
178 .platform_data = palmld_flash_data,
179 },
180};
181
182/******************************************************************************
144 * SD/MMC card controller 183 * SD/MMC card controller
145 ******************************************************************************/ 184 ******************************************************************************/
146static struct pxamci_platform_data palmld_mci_platform_data = { 185static struct pxamci_platform_data palmld_mci_platform_data = {
@@ -489,6 +528,7 @@ static struct platform_device *devices[] __initdata = {
489 &power_supply, 528 &power_supply,
490 &palmld_asoc, 529 &palmld_asoc,
491 &palmld_hdd, 530 &palmld_hdd,
531 &palmld_flash,
492}; 532};
493 533
494static struct map_desc palmld_io_desc[] __initdata = { 534static struct map_desc palmld_io_desc[] __initdata = {