Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137143
b: refs/heads/master
c: a12370f
h: refs/heads/master
i:
  137141: 4983af4
  137139: e356797
  137135: 814e5a0
v: v3
  • Loading branch information
wanzongshun authored and Russell King committed Feb 12, 2009
1 parent fe49870 commit 337279d
Show file tree
Hide file tree
Showing 2 changed files with 49 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: 9ee8c9f0124dd70779c400459d57bdbbed60fcfe
refs/heads/master: a12370f12fdc6a35463842e41eaf04299167eb12
48 changes: 48 additions & 0 deletions trunk/arch/arm/mach-w90x900/mach-w90p910evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>

#include <asm/mach/arch.h>
#include <asm/mach/map.h>
Expand All @@ -32,6 +33,52 @@
#include <mach/map.h>

#include "cpu.h"
/*w90p910 evb norflash driver data */

#define W90P910_FLASH_BASE 0xA0000000
#define W90P910_FLASH_SIZE 0x400000

static struct mtd_partition w90p910_flash_partitions[] = {
{
.name = "NOR Partition 1 for kernel (960K)",
.size = 0xF0000,
.offset = 0x10000,
},
{
.name = "NOR Partition 2 for image (1M)",
.size = 0x100000,
.offset = 0x100000,
},
{
.name = "NOR Partition 3 for user (2M)",
.size = 0x200000,
.offset = 0x00200000,
}
};

static struct physmap_flash_data w90p910_flash_data = {
.width = 2,
.parts = w90p910_flash_partitions,
.nr_parts = ARRAY_SIZE(w90p910_flash_partitions),
};

static struct resource w90p910_flash_resources[] = {
{
.start = W90P910_FLASH_BASE,
.end = W90P910_FLASH_BASE + W90P910_FLASH_SIZE - 1,
.flags = IORESOURCE_MEM,
}
};

static struct platform_device w90p910_flash_device = {
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &w90p910_flash_data,
},
.resource = w90p910_flash_resources,
.num_resources = ARRAY_SIZE(w90p910_flash_resources),
};

static struct map_desc w90p910_iodesc[] __initdata = {
};
Expand All @@ -40,6 +87,7 @@ static struct map_desc w90p910_iodesc[] __initdata = {

static struct platform_device *w90p910evb_dev[] __initdata = {
&w90p910_serial_device,
&w90p910_flash_device,
};

static void __init w90p910evb_map_io(void)
Expand Down

0 comments on commit 337279d

Please sign in to comment.