diff options
Diffstat (limited to 'arch/sh/boards/mach-highlander/setup.c')
-rw-r--r-- | arch/sh/boards/mach-highlander/setup.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-highlander/setup.c b/arch/sh/boards/mach-highlander/setup.c index 20fe72c515d5..df054e54bab3 100644 --- a/arch/sh/boards/mach-highlander/setup.c +++ b/arch/sh/boards/mach-highlander/setup.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/ata_platform.h> | 18 | #include <linux/ata_platform.h> |
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
21 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
22 | #include <net/ax88796.h> | 23 | #include <net/ax88796.h> |
@@ -178,6 +179,53 @@ static struct platform_device ax88796_device = { | |||
178 | .resource = ax88796_resources, | 179 | .resource = ax88796_resources, |
179 | }; | 180 | }; |
180 | 181 | ||
182 | static struct mtd_partition nor_flash_partitions[] = { | ||
183 | { | ||
184 | .name = "loader", | ||
185 | .offset = 0x00000000, | ||
186 | .size = 512 * 1024, | ||
187 | }, | ||
188 | { | ||
189 | .name = "bootenv", | ||
190 | .offset = MTDPART_OFS_APPEND, | ||
191 | .size = 512 * 1024, | ||
192 | }, | ||
193 | { | ||
194 | .name = "kernel", | ||
195 | .offset = MTDPART_OFS_APPEND, | ||
196 | .size = 4 * 1024 * 1024, | ||
197 | }, | ||
198 | { | ||
199 | .name = "data", | ||
200 | .offset = MTDPART_OFS_APPEND, | ||
201 | .size = MTDPART_SIZ_FULL, | ||
202 | }, | ||
203 | }; | ||
204 | |||
205 | static struct physmap_flash_data nor_flash_data = { | ||
206 | .width = 4, | ||
207 | .parts = nor_flash_partitions, | ||
208 | .nr_parts = ARRAY_SIZE(nor_flash_partitions), | ||
209 | }; | ||
210 | |||
211 | /* This config is flash board for mass production. */ | ||
212 | static struct resource nor_flash_resources[] = { | ||
213 | [0] = { | ||
214 | .start = PA_NORFLASH_ADDR, | ||
215 | .end = PA_NORFLASH_ADDR + PA_NORFLASH_SIZE - 1, | ||
216 | .flags = IORESOURCE_MEM, | ||
217 | } | ||
218 | }; | ||
219 | |||
220 | static struct platform_device nor_flash_device = { | ||
221 | .name = "physmap-flash", | ||
222 | .dev = { | ||
223 | .platform_data = &nor_flash_data, | ||
224 | }, | ||
225 | .num_resources = ARRAY_SIZE(nor_flash_resources), | ||
226 | .resource = nor_flash_resources, | ||
227 | }; | ||
228 | |||
181 | static struct resource smbus_resources[] = { | 229 | static struct resource smbus_resources[] = { |
182 | [0] = { | 230 | [0] = { |
183 | .start = PA_SMCR, | 231 | .start = PA_SMCR, |
@@ -209,6 +257,7 @@ static struct platform_device *r7780rp_devices[] __initdata = { | |||
209 | &m66592_usb_peripheral_device, | 257 | &m66592_usb_peripheral_device, |
210 | &heartbeat_device, | 258 | &heartbeat_device, |
211 | &smbus_device, | 259 | &smbus_device, |
260 | &nor_flash_device, | ||
212 | #ifndef CONFIG_SH_R7780RP | 261 | #ifndef CONFIG_SH_R7780RP |
213 | &ax88796_device, | 262 | &ax88796_device, |
214 | #endif | 263 | #endif |