diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-01-12 05:49:05 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-01-12 05:49:05 +0100 |
commit | 1c1744cc7cee83b96e3a89c1b9853fc033bafb9c (patch) | |
tree | f599ad8e447f80c2483c497372c28f9e099d0218 /arch/sh/boards/board-magicpanelr2.c | |
parent | sh: mach-rsk: Update for parse_mtd_partitions() fallout. (diff) | |
download | linux-1c1744cc7cee83b96e3a89c1b9853fc033bafb9c.tar.xz linux-1c1744cc7cee83b96e3a89c1b9853fc033bafb9c.zip |
sh: magicpanelr2: Update for parse_mtd_partitions() fallout.
Follows the RSK+ change for the same rationale.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to '')
-rw-r--r-- | arch/sh/boards/board-magicpanelr2.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/arch/sh/boards/board-magicpanelr2.c b/arch/sh/boards/board-magicpanelr2.c index 93f5039099b7..b2ca1d9948fb 100644 --- a/arch/sh/boards/board-magicpanelr2.c +++ b/arch/sh/boards/board-magicpanelr2.c @@ -25,9 +25,6 @@ #define LAN9115_READY (__raw_readl(0xA8000084UL) & 0x00000001UL) -/* Prefer cmdline over RedBoot */ -static const char *probes[] = { "cmdlinepart", "RedBoot", NULL }; - /* Wait until reset finished. Timeout is 100ms. */ static int __init ethernet_reset_finished(void) { @@ -293,8 +290,6 @@ static struct platform_device heartbeat_device = { .resource = heartbeat_resources, }; -static struct mtd_partition *parsed_partitions; - static struct mtd_partition mpr2_partitions[] = { /* Reserved for bootloader, read-only */ { @@ -318,6 +313,8 @@ static struct mtd_partition mpr2_partitions[] = { }; static struct physmap_flash_data flash_data = { + .parts = mpr2_partitions, + .nr_parts = ARRAY_SIZE(mpr2_partitions), .width = 2, }; @@ -337,32 +334,6 @@ static struct platform_device flash_device = { }, }; -static struct mtd_info *flash_mtd; - -static struct map_info mpr2_flash_map = { - .name = "Magic Panel R2 Flash", - .size = 0x2000000UL, - .bankwidth = 2, -}; - -static void __init set_mtd_partitions(void) -{ - int nr_parts = 0; - - simple_map_init(&mpr2_flash_map); - flash_mtd = do_map_probe("cfi_probe", &mpr2_flash_map); - nr_parts = parse_mtd_partitions(flash_mtd, probes, - &parsed_partitions, 0); - /* If there is no partition table, used the hard coded table */ - if (nr_parts <= 0) { - flash_data.parts = mpr2_partitions; - flash_data.nr_parts = ARRAY_SIZE(mpr2_partitions); - } else { - flash_data.nr_parts = nr_parts; - flash_data.parts = parsed_partitions; - } -} - /* * Add all resources to the platform_device */ @@ -376,7 +347,6 @@ static struct platform_device *mpr2_devices[] __initdata = { static int __init mpr2_devices_setup(void) { - set_mtd_partitions(); return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices)); } device_initcall(mpr2_devices_setup); |