Commit 1c1744cc7cee83b96e3a89c1b9853fc033bafb9c
1 parent
603129afe6
Exists in
master
and in
6 other branches
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>
Showing 1 changed file with 2 additions and 32 deletions Side-by-side Diff
arch/sh/boards/board-magicpanelr2.c
... | ... | @@ -25,9 +25,6 @@ |
25 | 25 | |
26 | 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 | 28 | /* Wait until reset finished. Timeout is 100ms. */ |
32 | 29 | static int __init ethernet_reset_finished(void) |
33 | 30 | { |
... | ... | @@ -293,8 +290,6 @@ |
293 | 290 | .resource = heartbeat_resources, |
294 | 291 | }; |
295 | 292 | |
296 | -static struct mtd_partition *parsed_partitions; | |
297 | - | |
298 | 293 | static struct mtd_partition mpr2_partitions[] = { |
299 | 294 | /* Reserved for bootloader, read-only */ |
300 | 295 | { |
... | ... | @@ -318,6 +313,8 @@ |
318 | 313 | }; |
319 | 314 | |
320 | 315 | static struct physmap_flash_data flash_data = { |
316 | + .parts = mpr2_partitions, | |
317 | + .nr_parts = ARRAY_SIZE(mpr2_partitions), | |
321 | 318 | .width = 2, |
322 | 319 | }; |
323 | 320 | |
... | ... | @@ -337,32 +334,6 @@ |
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 | 338 | * Add all resources to the platform_device |
368 | 339 | */ |
... | ... | @@ -376,7 +347,6 @@ |
376 | 347 | |
377 | 348 | static int __init mpr2_devices_setup(void) |
378 | 349 | { |
379 | - set_mtd_partitions(); | |
380 | 350 | return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices)); |
381 | 351 | } |
382 | 352 | device_initcall(mpr2_devices_setup); |