summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-07-17 19:46:58 +0200
committerEric Miao <eric.y.miao@gmail.com>2009-09-10 18:49:35 +0800
commitd7c307cfe76ae0c0493fbdac417ef6e30221f61b (patch)
tree3d0a384e161aff93d4718a626aca655599e31947 /arch/arm/mach-pxa
parent9845b6b15cf03ae3f473c39a13f2454abad50e09 (diff)
downloadkernel-crypto-d7c307cfe76ae0c0493fbdac417ef6e30221f61b.tar.gz
kernel-crypto-d7c307cfe76ae0c0493fbdac417ef6e30221f61b.tar.xz
kernel-crypto-d7c307cfe76ae0c0493fbdac417ef6e30221f61b.zip
[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>
Diffstat (limited to 'arch/arm/mach-pxa')
-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 08c599b49d8..b3ae8b958ad 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -25,6 +25,9 @@
#include <linux/wm97xx_batt.h>
#include <linux/power_supply.h>
#include <linux/sysdev.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -141,6 +144,42 @@ static unsigned long palmld_pin_config[] __initdata = {
};
/******************************************************************************
+ * NOR Flash
+ ******************************************************************************/
+static struct mtd_partition palmld_partitions[] = {
+ {
+ .name = "Flash",
+ .offset = 0x00000000,
+ .size = MTDPART_SIZ_FULL,
+ .mask_flags = 0
+ }
+};
+
+static struct physmap_flash_data palmld_flash_data[] = {
+ {
+ .width = 2, /* bankwidth in bytes */
+ .parts = palmld_partitions,
+ .nr_parts = ARRAY_SIZE(palmld_partitions)
+ }
+};
+
+static struct resource palmld_flash_resource = {
+ .start = PXA_CS0_PHYS,
+ .end = PXA_CS0_PHYS + SZ_4M - 1,
+ .flags = IORESOURCE_MEM,
+};
+
+static struct platform_device palmld_flash = {
+ .name = "physmap-flash",
+ .id = 0,
+ .resource = &palmld_flash_resource,
+ .num_resources = 1,
+ .dev = {
+ .platform_data = palmld_flash_data,
+ },
+};
+
+/******************************************************************************
* SD/MMC card controller
******************************************************************************/
static struct pxamci_platform_data palmld_mci_platform_data = {
@@ -489,6 +528,7 @@ static struct platform_device *devices[] __initdata = {
&power_supply,
&palmld_asoc,
&palmld_hdd,
+ &palmld_flash,
};
static struct map_desc palmld_io_desc[] __initdata = {