Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166087
b: refs/heads/master
c: 91cf6a9
h: refs/heads/master
i:
  166085: 1134e64
  166083: bea425a
  166079: aec2c2d
v: v3
  • Loading branch information
Marek Vasut authored and Eric Miao committed Sep 10, 2009
1 parent 04cf2e3 commit fc2bd13
Show file tree
Hide file tree
Showing 2 changed files with 40 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: 3eb37ff06ba189ce386d582179fc9abd37a92405
refs/heads/master: 91cf6a97b9a155081c455bd453b7ab889d31da03
39 changes: 39 additions & 0 deletions trunk/arch/arm/mach-pxa/palmtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <linux/usb/gpio_vbus.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/physmap.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -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
******************************************************************************/
Expand Down Expand Up @@ -515,6 +553,7 @@ static struct platform_device *devices[] __initdata = {
&power_supply,
&palmtx_asoc,
&palmtx_gpio_vbus,
&palmtx_flash,
&palmtx_nand,
};

Expand Down

0 comments on commit fc2bd13

Please sign in to comment.