aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorBarry Song <barry.song@analog.com>2009-08-03 00:40:36 -0400
committerMike Frysinger <vapier@gentoo.org>2009-09-16 22:10:15 -0400
commitf1cb64625c4f5309747b8067a309e0bcc630b303 (patch)
tree8b4ce9dfbd973311bceee532ae179303b13212bc /arch/blackfin
parentac860751eb2cb1bdf8bb341d849b38c483f5d83b (diff)
Blackfin: bf538-ezkit: add resources for parallel flash
The board has some parallel flash hooked up to the async banks, so add appropriate physmap resources for it. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c49
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)
566static 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
582static struct physmap_flash_data ezkit_flash_data = {
583 .width = 2,
584 .parts = ezkit_partitions,
585 .nr_parts = ARRAY_SIZE(ezkit_partitions),
586};
587
588static 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
598static 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
564static struct platform_device *cm_bf538_devices[] __initdata = { 609static 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
614static int __init ezkit_init(void) 663static int __init ezkit_init(void)