aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-csb637.c
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2007-02-08 04:44:46 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-02-08 09:55:28 -0500
commit127a7ec69c9ce17a5add2e3c8c2f1a2733fb88d8 (patch)
tree567a4afea8e41ab8e8f97bc0e919a2cd9ede5903 /arch/arm/mach-at91/board-csb637.c
parentc177a1e75a07237efe1f68fbf430892fdf2bb868 (diff)
[ARM] 4148/1: AT91: Physically mapped flash on CSB337 and CSB637 boards.
Define the physically mapped flash on the Cogent CSB337 and CSB637 boards. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/board-csb637.c')
-rw-r--r--arch/arm/mach-at91/board-csb637.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index 774609479c74..77f04b935b3a 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -23,6 +23,7 @@
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/mtd/physmap.h>
26 27
27#include <asm/hardware.h> 28#include <asm/hardware.h>
28#include <asm/setup.h> 29#include <asm/setup.h>
@@ -81,6 +82,42 @@ static struct at91_udc_data __initdata csb637_udc_data = {
81 .pullup_pin = AT91_PIN_PB1, 82 .pullup_pin = AT91_PIN_PB1,
82}; 83};
83 84
85#define CSB_FLASH_BASE AT91_CHIPSELECT_0
86#define CSB_FLASH_SIZE 0x1000000
87
88static struct mtd_partition csb_flash_partitions[] = {
89 {
90 .name = "uMON flash",
91 .offset = 0,
92 .size = MTDPART_SIZ_FULL,
93 .mask_flags = MTD_WRITEABLE, /* read only */
94 }
95};
96
97static struct physmap_flash_data csb_flash_data = {
98 .width = 2,
99 .parts = csb_flash_partitions,
100 .nr_parts = ARRAY_SIZE(csb_flash_partitions),
101};
102
103static struct resource csb_flash_resources[] = {
104 {
105 .start = CSB_FLASH_BASE,
106 .end = CSB_FLASH_BASE + CSB_FLASH_SIZE - 1,
107 .flags = IORESOURCE_MEM,
108 }
109};
110
111static struct platform_device csb_flash = {
112 .name = "physmap-flash",
113 .id = 0,
114 .dev = {
115 .platform_data = &csb_flash_data,
116 },
117 .resource = csb_flash_resources,
118 .num_resources = ARRAY_SIZE(csb_flash_resources),
119};
120
84static void __init csb637_board_init(void) 121static void __init csb637_board_init(void)
85{ 122{
86 /* Serial */ 123 /* Serial */
@@ -95,6 +132,8 @@ static void __init csb637_board_init(void)
95 at91_add_device_i2c(); 132 at91_add_device_i2c();
96 /* SPI */ 133 /* SPI */
97 at91_add_device_spi(NULL, 0); 134 at91_add_device_spi(NULL, 0);
135 /* NOR flash */
136 platform_device_register(&csb_flash);
98} 137}
99 138
100MACHINE_START(CSB637, "Cogent CSB637") 139MACHINE_START(CSB637, "Cogent CSB637")