diff options
author | Mike Frysinger <michael.frysinger@analog.com> | 2008-01-24 04:14:04 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2008-01-24 04:14:04 -0500 |
commit | de8c43f2fca9bb06f3ee87b38a61d5d9966ce221 (patch) | |
tree | c39c995e31e29703056cd547f5aa4e3a967ba9ab /arch/blackfin/mach-bf537/boards | |
parent | 96a5c6f9bef027e1187b2f168bb3e08ef21d0b6f (diff) |
[Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf537/boards')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 37759ac7df2a..772541548b76 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/mtd/mtd.h> | 33 | #include <linux/mtd/mtd.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/mtd/physmap.h> | ||
35 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 37 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 38 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
@@ -339,6 +340,49 @@ static struct platform_device net2272_bfin_device = { | |||
339 | }; | 340 | }; |
340 | #endif | 341 | #endif |
341 | 342 | ||
343 | static struct mtd_partition stamp_partitions[] = { | ||
344 | { | ||
345 | .name = "Bootloader", | ||
346 | .size = 0x20000, | ||
347 | .offset = 0, | ||
348 | }, { | ||
349 | .name = "Kernel", | ||
350 | .size = 0xE0000, | ||
351 | .offset = MTDPART_OFS_APPEND, | ||
352 | }, { | ||
353 | .name = "RootFS", | ||
354 | .size = 0x400000 - 0x20000 - 0xE0000 - 0x10000, | ||
355 | .offset = MTDPART_OFS_APPEND, | ||
356 | }, { | ||
357 | .name = "MAC Address", | ||
358 | .size = MTDPART_SIZ_FULL, | ||
359 | .offset = 0x3F0000, | ||
360 | .mask_flags = MTD_WRITEABLE, | ||
361 | } | ||
362 | }; | ||
363 | |||
364 | static struct physmap_flash_data stamp_flash_data = { | ||
365 | .width = 2, | ||
366 | .parts = stamp_partitions, | ||
367 | .nr_parts = ARRAY_SIZE(stamp_partitions), | ||
368 | }; | ||
369 | |||
370 | static struct resource stamp_flash_resource = { | ||
371 | .start = 0x20000000, | ||
372 | .end = 0x203fffff, | ||
373 | .flags = IORESOURCE_MEM, | ||
374 | }; | ||
375 | |||
376 | static struct platform_device stamp_flash_device = { | ||
377 | .name = "physmap-flash", | ||
378 | .id = 0, | ||
379 | .dev = { | ||
380 | .platform_data = &stamp_flash_data, | ||
381 | }, | ||
382 | .num_resources = 1, | ||
383 | .resource = &stamp_flash_resource, | ||
384 | }; | ||
385 | |||
342 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 386 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
343 | /* all SPI peripherals info goes here */ | 387 | /* all SPI peripherals info goes here */ |
344 | 388 | ||
@@ -761,6 +805,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
761 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 805 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
762 | &bfin_device_gpiokeys, | 806 | &bfin_device_gpiokeys, |
763 | #endif | 807 | #endif |
808 | &stamp_flash_device, | ||
764 | }; | 809 | }; |
765 | 810 | ||
766 | static int __init stamp_init(void) | 811 | static int __init stamp_init(void) |