diff options
author | Andrew Victor <andrew@sanpeople.com> | 2007-02-08 04:44:46 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-02-08 09:55:28 -0500 |
commit | 127a7ec69c9ce17a5add2e3c8c2f1a2733fb88d8 (patch) | |
tree | 567a4afea8e41ab8e8f97bc0e919a2cd9ede5903 /arch/arm/mach-at91/board-csb337.c | |
parent | c177a1e75a07237efe1f68fbf430892fdf2bb868 (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-csb337.c')
-rw-r--r-- | arch/arm/mach-at91/board-csb337.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index 871c6609d6ec..e18a41e61f0c 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c | |||
@@ -24,6 +24,7 @@ | |||
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/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
27 | #include <linux/mtd/physmap.h> | ||
27 | 28 | ||
28 | #include <asm/hardware.h> | 29 | #include <asm/hardware.h> |
29 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
@@ -112,6 +113,42 @@ static struct spi_board_info csb337_spi_devices[] = { | |||
112 | }, | 113 | }, |
113 | }; | 114 | }; |
114 | 115 | ||
116 | #define CSB_FLASH_BASE AT91_CHIPSELECT_0 | ||
117 | #define CSB_FLASH_SIZE 0x800000 | ||
118 | |||
119 | static struct mtd_partition csb_flash_partitions[] = { | ||
120 | { | ||
121 | .name = "uMON flash", | ||
122 | .offset = 0, | ||
123 | .size = MTDPART_SIZ_FULL, | ||
124 | .mask_flags = MTD_WRITEABLE, /* read only */ | ||
125 | } | ||
126 | }; | ||
127 | |||
128 | static struct physmap_flash_data csb_flash_data = { | ||
129 | .width = 2, | ||
130 | .parts = csb_flash_partitions, | ||
131 | .nr_parts = ARRAY_SIZE(csb_flash_partitions), | ||
132 | }; | ||
133 | |||
134 | static struct resource csb_flash_resources[] = { | ||
135 | { | ||
136 | .start = CSB_FLASH_BASE, | ||
137 | .end = CSB_FLASH_BASE + CSB_FLASH_SIZE - 1, | ||
138 | .flags = IORESOURCE_MEM, | ||
139 | } | ||
140 | }; | ||
141 | |||
142 | static struct platform_device csb_flash = { | ||
143 | .name = "physmap-flash", | ||
144 | .id = 0, | ||
145 | .dev = { | ||
146 | .platform_data = &csb_flash_data, | ||
147 | }, | ||
148 | .resource = csb_flash_resources, | ||
149 | .num_resources = ARRAY_SIZE(csb_flash_resources), | ||
150 | }; | ||
151 | |||
115 | static void __init csb337_board_init(void) | 152 | static void __init csb337_board_init(void) |
116 | { | 153 | { |
117 | /* Serial */ | 154 | /* Serial */ |
@@ -131,6 +168,8 @@ static void __init csb337_board_init(void) | |||
131 | at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices)); | 168 | at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices)); |
132 | /* MMC */ | 169 | /* MMC */ |
133 | at91_add_device_mmc(0, &csb337_mmc_data); | 170 | at91_add_device_mmc(0, &csb337_mmc_data); |
171 | /* NOR flash */ | ||
172 | platform_device_register(&csb_flash); | ||
134 | } | 173 | } |
135 | 174 | ||
136 | MACHINE_START(CSB337, "Cogent CSB337") | 175 | MACHINE_START(CSB337, "Cogent CSB337") |