From fc2bd13905799d20b45f1dd5ea5d7d3fd55235fe Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Mon, 27 Jul 2009 02:07:41 +0200 Subject: [PATCH] --- yaml --- r: 166087 b: refs/heads/master c: 91cf6a97b9a155081c455bd453b7ab889d31da03 h: refs/heads/master i: 166085: 1134e644fdda79ef36ec1e4878d0a23a2b000607 166083: bea425aa108aea4aacefa26f4f1251add7678706 166079: aec2c2d144e38d5206fa2d885986cd651cf6ac83 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-pxa/palmtx.c | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f9ee8247b738..fca605088681 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3eb37ff06ba189ce386d582179fc9abd37a92405 +refs/heads/master: 91cf6a97b9a155081c455bd453b7ab889d31da03 diff --git a/trunk/arch/arm/mach-pxa/palmtx.c b/trunk/arch/arm/mach-pxa/palmtx.c index 052f99863dab..c0aca18b71bb 100644 --- a/trunk/arch/arm/mach-pxa/palmtx.c +++ b/trunk/arch/arm/mach-pxa/palmtx.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include #include @@ -143,6 +145,42 @@ static unsigned long palmtx_pin_config[] __initdata = { GPIO107_GPIO, /* earphone detect */ }; +/****************************************************************************** + * NOR Flash + ******************************************************************************/ +static struct mtd_partition palmtx_partitions[] = { + { + .name = "Flash", + .offset = 0x00000000, + .size = MTDPART_SIZ_FULL, + .mask_flags = 0 + } +}; + +static struct physmap_flash_data palmtx_flash_data[] = { + { + .width = 2, /* bankwidth in bytes */ + .parts = palmtx_partitions, + .nr_parts = ARRAY_SIZE(palmtx_partitions) + } +}; + +static struct resource palmtx_flash_resource = { + .start = PXA_CS0_PHYS, + .end = PXA_CS0_PHYS + SZ_8M - 1, + .flags = IORESOURCE_MEM, +}; + +static struct platform_device palmtx_flash = { + .name = "physmap-flash", + .id = 0, + .resource = &palmtx_flash_resource, + .num_resources = 1, + .dev = { + .platform_data = palmtx_flash_data, + }, +}; + /****************************************************************************** * SD/MMC card controller ******************************************************************************/ @@ -515,6 +553,7 @@ static struct platform_device *devices[] __initdata = { &power_supply, &palmtx_asoc, &palmtx_gpio_vbus, + &palmtx_flash, &palmtx_nand, };