diff options
Diffstat (limited to 'arch/blackfin/mach-bf537/boards/cm_bf537.c')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537.c | 62 |
1 files changed, 58 insertions, 4 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index 73f2142875e..dde14720b0e 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/platform_device.h> | 33 | #include <linux/platform_device.h> |
34 | #include <linux/mtd/mtd.h> | 34 | #include <linux/mtd/mtd.h> |
35 | #include <linux/mtd/partitions.h> | 35 | #include <linux/mtd/partitions.h> |
36 | #include <linux/mtd/physmap.h> | ||
36 | #include <linux/spi/spi.h> | 37 | #include <linux/spi/spi.h> |
37 | #include <linux/spi/flash.h> | 38 | #include <linux/spi/flash.h> |
38 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 39 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
@@ -56,16 +57,16 @@ const char bfin_board_name[] = "Bluetechnix CM BF537"; | |||
56 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 57 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
57 | static struct mtd_partition bfin_spi_flash_partitions[] = { | 58 | static struct mtd_partition bfin_spi_flash_partitions[] = { |
58 | { | 59 | { |
59 | .name = "bootloader", | 60 | .name = "bootloader(spi)", |
60 | .size = 0x00020000, | 61 | .size = 0x00020000, |
61 | .offset = 0, | 62 | .offset = 0, |
62 | .mask_flags = MTD_CAP_ROM | 63 | .mask_flags = MTD_CAP_ROM |
63 | }, { | 64 | }, { |
64 | .name = "kernel", | 65 | .name = "linux kernel(spi)", |
65 | .size = 0xe0000, | 66 | .size = 0xe0000, |
66 | .offset = 0x20000 | 67 | .offset = 0x20000 |
67 | }, { | 68 | }, { |
68 | .name = "file system", | 69 | .name = "file system(spi)", |
69 | .size = 0x700000, | 70 | .size = 0x700000, |
70 | .offset = 0x00100000, | 71 | .offset = 0x00100000, |
71 | } | 72 | } |
@@ -307,6 +308,55 @@ static struct platform_device net2272_bfin_device = { | |||
307 | }; | 308 | }; |
308 | #endif | 309 | #endif |
309 | 310 | ||
311 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) | ||
312 | static struct mtd_partition cm_partitions[] = { | ||
313 | { | ||
314 | .name = "bootloader(nor)", | ||
315 | .size = 0x40000, | ||
316 | .offset = 0, | ||
317 | }, { | ||
318 | .name = "linux kernel(nor)", | ||
319 | .size = 0xE0000, | ||
320 | .offset = MTDPART_OFS_APPEND, | ||
321 | }, { | ||
322 | .name = "file system(nor)", | ||
323 | .size = MTDPART_SIZ_FULL, | ||
324 | .offset = MTDPART_OFS_APPEND, | ||
325 | } | ||
326 | }; | ||
327 | |||
328 | static struct physmap_flash_data cm_flash_data = { | ||
329 | .width = 2, | ||
330 | .parts = cm_partitions, | ||
331 | .nr_parts = ARRAY_SIZE(cm_partitions), | ||
332 | }; | ||
333 | |||
334 | static unsigned cm_flash_gpios[] = { GPIO_PF4 }; | ||
335 | |||
336 | static struct resource cm_flash_resource[] = { | ||
337 | { | ||
338 | .name = "cfi_probe", | ||
339 | .start = 0x20000000, | ||
340 | .end = 0x201fffff, | ||
341 | .flags = IORESOURCE_MEM, | ||
342 | }, { | ||
343 | .start = (unsigned long)cm_flash_gpios, | ||
344 | .end = ARRAY_SIZE(cm_flash_gpios), | ||
345 | .flags = IORESOURCE_IRQ, | ||
346 | } | ||
347 | }; | ||
348 | |||
349 | static struct platform_device cm_flash_device = { | ||
350 | .name = "gpio-addr-flash", | ||
351 | .id = 0, | ||
352 | .dev = { | ||
353 | .platform_data = &cm_flash_data, | ||
354 | }, | ||
355 | .num_resources = ARRAY_SIZE(cm_flash_resource), | ||
356 | .resource = cm_flash_resource, | ||
357 | }; | ||
358 | #endif | ||
359 | |||
310 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 360 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
311 | static struct resource bfin_uart_resources[] = { | 361 | static struct resource bfin_uart_resources[] = { |
312 | { | 362 | { |
@@ -395,7 +445,7 @@ static struct platform_device bfin_mac_device = { | |||
395 | #endif | 445 | #endif |
396 | 446 | ||
397 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 447 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
398 | #define PATA_INT 64 | 448 | #define PATA_INT IRQ_PF14 |
399 | 449 | ||
400 | static struct pata_platform_info bfin_pata_platform_data = { | 450 | static struct pata_platform_info bfin_pata_platform_data = { |
401 | .ioport_shift = 2, | 451 | .ioport_shift = 2, |
@@ -510,6 +560,10 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
510 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 560 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
511 | &bfin_pata_device, | 561 | &bfin_pata_device, |
512 | #endif | 562 | #endif |
563 | |||
564 | #if defined(CONFIG_MTD_GPIO_ADDR) || defined(CONFIG_MTD_GPIO_ADDR_MODULE) | ||
565 | &cm_flash_device, | ||
566 | #endif | ||
513 | }; | 567 | }; |
514 | 568 | ||
515 | static int __init cm_bf537_init(void) | 569 | static int __init cm_bf537_init(void) |