mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 21:57:43 +00:00
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 <vapier@gentoo.org>
This commit is contained in:
parent
50c4c0861a
commit
7036c61fe0
1 changed files with 41 additions and 25 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/mtd/plat-ram.h>
|
#include <linux/mtd/plat-ram.h>
|
||||||
|
#include <linux/mtd/physmap.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/spi/flash.h>
|
#include <linux/spi/flash.h>
|
||||||
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
|
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
|
||||||
|
@ -71,54 +72,69 @@ static struct platform_device smc91x_device = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE)
|
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
|
||||||
static const char *map_probes[] = {
|
static struct mtd_partition ezkit_partitions_a[] = {
|
||||||
"stm_flash",
|
{
|
||||||
NULL,
|
.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 = {
|
static struct physmap_flash_data ezkit_flash_data_a = {
|
||||||
.mapname = "Flash A Primary",
|
.width = 2,
|
||||||
.map_probes = map_probes,
|
.parts = ezkit_partitions_a,
|
||||||
.bankwidth = 2,
|
.nr_parts = ARRAY_SIZE(ezkit_partitions_a),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource stm_pri_resource_a = {
|
static struct resource ezkit_flash_resource_a = {
|
||||||
.start = 0x20000000,
|
.start = 0x20000000,
|
||||||
.end = 0x200fffff,
|
.end = 0x200fffff,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device stm_pri_device_a = {
|
static struct platform_device ezkit_flash_device_a = {
|
||||||
.name = "mtd-ram",
|
.name = "physmap-flash",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &stm_pri_data_a,
|
.platform_data = &ezkit_flash_data_a,
|
||||||
},
|
},
|
||||||
.num_resources = 1,
|
.num_resources = 1,
|
||||||
.resource = &stm_pri_resource_a,
|
.resource = &ezkit_flash_resource_a,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platdata_mtd_ram stm_pri_data_b = {
|
static struct mtd_partition ezkit_partitions_b[] = {
|
||||||
.mapname = "Flash B Primary",
|
{
|
||||||
.map_probes = map_probes,
|
.name = "file system(nor b)",
|
||||||
.bankwidth = 2,
|
.size = MTDPART_SIZ_FULL,
|
||||||
|
.offset = MTDPART_OFS_APPEND,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource stm_pri_resource_b = {
|
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 ezkit_flash_resource_b = {
|
||||||
.start = 0x20100000,
|
.start = 0x20100000,
|
||||||
.end = 0x201fffff,
|
.end = 0x201fffff,
|
||||||
.flags = IORESOURCE_MEM,
|
.flags = IORESOURCE_MEM,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device stm_pri_device_b = {
|
static struct platform_device ezkit_flash_device_b = {
|
||||||
.name = "mtd-ram",
|
.name = "physmap-flash",
|
||||||
.id = 4,
|
.id = 4,
|
||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &stm_pri_data_b,
|
.platform_data = &ezkit_flash_data_b,
|
||||||
},
|
},
|
||||||
.num_resources = 1,
|
.num_resources = 1,
|
||||||
.resource = &stm_pri_resource_b,
|
.resource = &ezkit_flash_resource_b,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -445,9 +461,9 @@ static struct platform_device *ezkit_devices[] __initdata = {
|
||||||
|
|
||||||
&bfin_dpmc,
|
&bfin_dpmc,
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE)
|
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
|
||||||
&stm_pri_device_a,
|
&ezkit_flash_device_a,
|
||||||
&stm_pri_device_b,
|
&ezkit_flash_device_b,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE)
|
#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE)
|
||||||
|
|
Loading…
Reference in a new issue