From 7036c61fe043af6b701e10d6426ec22259bd1e3b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 22 Sep 2009 22:23:04 -0400 Subject: Blackfin: bf533-ezkit: convert to physmap/jedec_probe Now that the common jedec_probe supports the ST PSD4256G6V, no need to use the custom stm_flash driver. Signed-off-by: Mike Frysinger --- arch/blackfin/mach-bf533/boards/ezkit.c | 66 ++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 25 deletions(-) (limited to 'arch') diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 9ffcd63442f1..986fcdcf82d2 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) @@ -71,54 +72,69 @@ static struct platform_device smc91x_device = { }; #endif -#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE) -static const char *map_probes[] = { - "stm_flash", - NULL, +#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) +static struct mtd_partition ezkit_partitions_a[] = { + { + .name = "bootloader(nor a)", + .size = 0x40000, + .offset = 0, + }, { + .name = "linux kernel(nor a)", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, + }, }; -static struct platdata_mtd_ram stm_pri_data_a = { - .mapname = "Flash A Primary", - .map_probes = map_probes, - .bankwidth = 2, +static struct physmap_flash_data ezkit_flash_data_a = { + .width = 2, + .parts = ezkit_partitions_a, + .nr_parts = ARRAY_SIZE(ezkit_partitions_a), }; -static struct resource stm_pri_resource_a = { +static struct resource ezkit_flash_resource_a = { .start = 0x20000000, .end = 0x200fffff, .flags = IORESOURCE_MEM, }; -static struct platform_device stm_pri_device_a = { - .name = "mtd-ram", +static struct platform_device ezkit_flash_device_a = { + .name = "physmap-flash", .id = 0, .dev = { - .platform_data = &stm_pri_data_a, + .platform_data = &ezkit_flash_data_a, }, .num_resources = 1, - .resource = &stm_pri_resource_a, + .resource = &ezkit_flash_resource_a, +}; + +static struct mtd_partition ezkit_partitions_b[] = { + { + .name = "file system(nor b)", + .size = MTDPART_SIZ_FULL, + .offset = MTDPART_OFS_APPEND, + }, }; -static struct platdata_mtd_ram stm_pri_data_b = { - .mapname = "Flash B Primary", - .map_probes = map_probes, - .bankwidth = 2, +static struct physmap_flash_data ezkit_flash_data_b = { + .width = 2, + .parts = ezkit_partitions_b, + .nr_parts = ARRAY_SIZE(ezkit_partitions_b), }; -static struct resource stm_pri_resource_b = { +static struct resource ezkit_flash_resource_b = { .start = 0x20100000, .end = 0x201fffff, .flags = IORESOURCE_MEM, }; -static struct platform_device stm_pri_device_b = { - .name = "mtd-ram", +static struct platform_device ezkit_flash_device_b = { + .name = "physmap-flash", .id = 4, .dev = { - .platform_data = &stm_pri_data_b, + .platform_data = &ezkit_flash_data_b, }, .num_resources = 1, - .resource = &stm_pri_resource_b, + .resource = &ezkit_flash_resource_b, }; #endif @@ -445,9 +461,9 @@ static struct platform_device *ezkit_devices[] __initdata = { &bfin_dpmc, -#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE) - &stm_pri_device_a, - &stm_pri_device_b, +#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) + &ezkit_flash_device_a, + &ezkit_flash_device_b, #endif #if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE) -- cgit v1.2.1