diff options
-rw-r--r-- | arch/blackfin/mach-bf538/boards/ezkit.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c index 42297fad46b9..9113f60d65f6 100644 --- a/arch/blackfin/mach-bf538/boards/ezkit.c +++ b/arch/blackfin/mach-bf538/boards/ezkit.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/device.h> | 31 | #include <linux/device.h> |
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/physmap.h> | ||
34 | #include <linux/mtd/partitions.h> | 35 | #include <linux/mtd/partitions.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> |
@@ -561,6 +562,50 @@ static struct platform_device bfin_dpmc = { | |||
561 | }, | 562 | }, |
562 | }; | 563 | }; |
563 | 564 | ||
565 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
566 | static struct mtd_partition ezkit_partitions[] = { | ||
567 | { | ||
568 | .name = "bootloader(nor)", | ||
569 | .size = 0x40000, | ||
570 | .offset = 0, | ||
571 | }, { | ||
572 | .name = "linux kernel(nor)", | ||
573 | .size = 0x180000, | ||
574 | .offset = MTDPART_OFS_APPEND, | ||
575 | }, { | ||
576 | .name = "file system(nor)", | ||
577 | .size = MTDPART_SIZ_FULL, | ||
578 | .offset = MTDPART_OFS_APPEND, | ||
579 | } | ||
580 | }; | ||
581 | |||
582 | static struct physmap_flash_data ezkit_flash_data = { | ||
583 | .width = 2, | ||
584 | .parts = ezkit_partitions, | ||
585 | .nr_parts = ARRAY_SIZE(ezkit_partitions), | ||
586 | }; | ||
587 | |||
588 | static struct resource ezkit_flash_resource = { | ||
589 | .start = 0x20000000, | ||
590 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
591 | .end = 0x202fffff, | ||
592 | #else | ||
593 | .end = 0x203fffff, | ||
594 | #endif | ||
595 | .flags = IORESOURCE_MEM, | ||
596 | }; | ||
597 | |||
598 | static struct platform_device ezkit_flash_device = { | ||
599 | .name = "physmap-flash", | ||
600 | .id = 0, | ||
601 | .dev = { | ||
602 | .platform_data = &ezkit_flash_data, | ||
603 | }, | ||
604 | .num_resources = 1, | ||
605 | .resource = &ezkit_flash_resource, | ||
606 | }; | ||
607 | #endif | ||
608 | |||
564 | static struct platform_device *cm_bf538_devices[] __initdata = { | 609 | static struct platform_device *cm_bf538_devices[] __initdata = { |
565 | 610 | ||
566 | &bfin_dpmc, | 611 | &bfin_dpmc, |
@@ -609,6 +654,10 @@ static struct platform_device *cm_bf538_devices[] __initdata = { | |||
609 | #endif | 654 | #endif |
610 | 655 | ||
611 | &bfin_gpios_device, | 656 | &bfin_gpios_device, |
657 | |||
658 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | ||
659 | &ezkit_flash_device, | ||
660 | #endif | ||
612 | }; | 661 | }; |
613 | 662 | ||
614 | static int __init ezkit_init(void) | 663 | static int __init ezkit_init(void) |