Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166085
b: refs/heads/master
c: d7c307c
h: refs/heads/master
i:
  166083: bea425a
v: v3
  • Loading branch information
Marek Vasut authored and Eric Miao committed Sep 10, 2009
1 parent b12f391 commit 1134e64
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9845b6b15cf03ae3f473c39a13f2454abad50e09
refs/heads/master: d7c307cfe76ae0c0493fbdac417ef6e30221f61b
40 changes: 40 additions & 0 deletions trunk/arch/arm/mach-pxa/palmld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -140,6 +143,42 @@ static unsigned long palmld_pin_config[] __initdata = {
GPIO13_GPIO, /* earphone detect */
};

/******************************************************************************
* 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
******************************************************************************/
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 1134e64

Please sign in to comment.