diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-01-11 23:49:05 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-01-11 23:49:05 -0500 |
commit | 1c1744cc7cee83b96e3a89c1b9853fc033bafb9c (patch) | |
tree | f599ad8e447f80c2483c497372c28f9e099d0218 /arch/sh/boards | |
parent | 603129afe6f8174c6305498dd5903304c41cd00d (diff) |
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 'arch/sh/boards')
-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 @@ | |||
25 | 25 | ||
26 | #define LAN9115_READY (__raw_readl(0xA8000084UL) & 0x00000001UL) | 26 | #define LAN9115_READY (__raw_readl(0xA8000084UL) & 0x00000001UL) |
27 | 27 | ||
28 | /* Prefer cmdline over RedBoot */ | ||
29 | static const char *probes[] = { "cmdlinepart", "RedBoot", NULL }; | ||
30 | |||
31 | /* Wait until reset finished. Timeout is 100ms. */ | 28 | /* Wait until reset finished. Timeout is 100ms. */ |
32 | static int __init ethernet_reset_finished(void) | 29 | static int __init ethernet_reset_finished(void) |
33 | { | 30 | { |
@@ -293,8 +290,6 @@ static struct platform_device heartbeat_device = { | |||
293 | .resource = heartbeat_resources, | 290 | .resource = heartbeat_resources, |
294 | }; | 291 | }; |
295 | 292 | ||
296 | static struct mtd_partition *parsed_partitions; | ||
297 | |||
298 | static struct mtd_partition mpr2_partitions[] = { | 293 | static struct mtd_partition mpr2_partitions[] = { |
299 | /* Reserved for bootloader, read-only */ | 294 | /* Reserved for bootloader, read-only */ |
300 | { | 295 | { |
@@ -318,6 +313,8 @@ static struct mtd_partition mpr2_partitions[] = { | |||
318 | }; | 313 | }; |
319 | 314 | ||
320 | static struct physmap_flash_data flash_data = { | 315 | static struct physmap_flash_data flash_data = { |
316 | .parts = mpr2_partitions, | ||
317 | .nr_parts = ARRAY_SIZE(mpr2_partitions), | ||
321 | .width = 2, | 318 | .width = 2, |
322 | }; | 319 | }; |
323 | 320 | ||
@@ -337,32 +334,6 @@ static struct platform_device flash_device = { | |||
337 | }, | 334 | }, |
338 | }; | 335 | }; |
339 | 336 | ||
340 | static struct mtd_info *flash_mtd; | ||
341 | |||
342 | static struct map_info mpr2_flash_map = { | ||
343 | .name = "Magic Panel R2 Flash", | ||
344 | .size = 0x2000000UL, | ||
345 | .bankwidth = 2, | ||
346 | }; | ||
347 | |||
348 | static void __init set_mtd_partitions(void) | ||
349 | { | ||
350 | int nr_parts = 0; | ||
351 | |||
352 | simple_map_init(&mpr2_flash_map); | ||
353 | flash_mtd = do_map_probe("cfi_probe", &mpr2_flash_map); | ||
354 | nr_parts = parse_mtd_partitions(flash_mtd, probes, | ||
355 | &parsed_partitions, 0); | ||
356 | /* If there is no partition table, used the hard coded table */ | ||
357 | if (nr_parts <= 0) { | ||
358 | flash_data.parts = mpr2_partitions; | ||
359 | flash_data.nr_parts = ARRAY_SIZE(mpr2_partitions); | ||
360 | } else { | ||
361 | flash_data.nr_parts = nr_parts; | ||
362 | flash_data.parts = parsed_partitions; | ||
363 | } | ||
364 | } | ||
365 | |||
366 | /* | 337 | /* |
367 | * Add all resources to the platform_device | 338 | * Add all resources to the platform_device |
368 | */ | 339 | */ |
@@ -376,7 +347,6 @@ static struct platform_device *mpr2_devices[] __initdata = { | |||
376 | 347 | ||
377 | static int __init mpr2_devices_setup(void) | 348 | static int __init mpr2_devices_setup(void) |
378 | { | 349 | { |
379 | set_mtd_partitions(); | ||
380 | return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices)); | 350 | return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices)); |
381 | } | 351 | } |
382 | device_initcall(mpr2_devices_setup); | 352 | device_initcall(mpr2_devices_setup); |