aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorwanzongshun <mcuos.com@gmail.com>2009-02-11 20:57:21 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-12 06:10:24 -0500
commita12370f12fdc6a35463842e41eaf04299167eb12 (patch)
tree005fd1266a9c79ea41f0b688ff15ae713e11e083 /arch
parent9ee8c9f0124dd70779c400459d57bdbbed60fcfe (diff)
[ARM] 5393/1: Add W90P910 EVB NOR flash driver
Add W90P910 Evaluate Board NOR flash driver support, The EV Board default support W19B320ABT7H of Winbond inc. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-w90x900/mach-w90p910evb.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c
index 542527019b65..726ff6798a56 100644
--- a/arch/arm/mach-w90x900/mach-w90p910evb.c
+++ b/arch/arm/mach-w90x900/mach-w90p910evb.c
@@ -22,6 +22,7 @@
22#include <linux/timer.h> 22#include <linux/timer.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/mtd/physmap.h>
25 26
26#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
@@ -32,6 +33,52 @@
32#include <mach/map.h> 33#include <mach/map.h>
33 34
34#include "cpu.h" 35#include "cpu.h"
36/*w90p910 evb norflash driver data */
37
38#define W90P910_FLASH_BASE 0xA0000000
39#define W90P910_FLASH_SIZE 0x400000
40
41static struct mtd_partition w90p910_flash_partitions[] = {
42 {
43 .name = "NOR Partition 1 for kernel (960K)",
44 .size = 0xF0000,
45 .offset = 0x10000,
46 },
47 {
48 .name = "NOR Partition 2 for image (1M)",
49 .size = 0x100000,
50 .offset = 0x100000,
51 },
52 {
53 .name = "NOR Partition 3 for user (2M)",
54 .size = 0x200000,
55 .offset = 0x00200000,
56 }
57};
58
59static struct physmap_flash_data w90p910_flash_data = {
60 .width = 2,
61 .parts = w90p910_flash_partitions,
62 .nr_parts = ARRAY_SIZE(w90p910_flash_partitions),
63};
64
65static struct resource w90p910_flash_resources[] = {
66 {
67 .start = W90P910_FLASH_BASE,
68 .end = W90P910_FLASH_BASE + W90P910_FLASH_SIZE - 1,
69 .flags = IORESOURCE_MEM,
70 }
71};
72
73static struct platform_device w90p910_flash_device = {
74 .name = "physmap-flash",
75 .id = 0,
76 .dev = {
77 .platform_data = &w90p910_flash_data,
78 },
79 .resource = w90p910_flash_resources,
80 .num_resources = ARRAY_SIZE(w90p910_flash_resources),
81};
35 82
36static struct map_desc w90p910_iodesc[] __initdata = { 83static struct map_desc w90p910_iodesc[] __initdata = {
37}; 84};
@@ -40,6 +87,7 @@ static struct map_desc w90p910_iodesc[] __initdata = {
40 87
41static struct platform_device *w90p910evb_dev[] __initdata = { 88static struct platform_device *w90p910evb_dev[] __initdata = {
42 &w90p910_serial_device, 89 &w90p910_serial_device,
90 &w90p910_flash_device,
43}; 91};
44 92
45static void __init w90p910evb_map_io(void) 93static void __init w90p910evb_map_io(void)