From 2de349775ffc5bfb01dba542cb394533ad1b95cb Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Thu, 12 Jan 2012 13:47:42 +0900 Subject: [PATCH] --- yaml --- r: 283611 b: refs/heads/master c: 603129afe6f8174c6305498dd5903304c41cd00d h: refs/heads/master i: 283609: d7ff9871e41d673b5d8213cdf8fdc46557df04b3 283607: e7ae6ef2d482f9e197ee09cfd7541a106386c3b3 v: v3 --- [refs] | 2 +- trunk/arch/sh/boards/mach-rsk/setup.c | 43 ++++----------------------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/[refs] b/[refs] index c528a8e971ab..0daa1c7aad4f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b1bdd255661369cb6eb90b6e181169b5e6d0f9b6 +refs/heads/master: 603129afe6f8174c6305498dd5903304c41cd00d diff --git a/trunk/arch/sh/boards/mach-rsk/setup.c b/trunk/arch/sh/boards/mach-rsk/setup.c index a5c0df785bfe..895f030070d3 100644 --- a/trunk/arch/sh/boards/mach-rsk/setup.c +++ b/trunk/arch/sh/boards/mach-rsk/setup.c @@ -15,12 +15,12 @@ #include #include #include -#ifdef CONFIG_MTD #include -#endif #include #include +static const char *part_probes[] = { "cmdlinepart", NULL }; + static struct mtd_partition rsk_partitions[] = { { .name = "Bootloader", @@ -39,9 +39,10 @@ static struct mtd_partition rsk_partitions[] = { }; static struct physmap_flash_data flash_data = { - .parts = rsk_partitions, - .nr_parts = ARRAY_SIZE(rsk_partitions), - .width = 2, + .parts = rsk_partitions, + .nr_parts = ARRAY_SIZE(rsk_partitions), + .width = 2, + .part_probe_types = part_probes, }; static struct resource flash_resource = { @@ -60,44 +61,12 @@ static struct platform_device flash_device = { }, }; -#ifdef CONFIG_MTD -static const char *probes[] = { "cmdlinepart", NULL }; - -static struct map_info rsk_flash_map = { - .name = "RSK+ Flash", - .size = 0x400000, - .bankwidth = 2, -}; - -static struct mtd_info *flash_mtd; - -static struct mtd_partition *parsed_partitions; - -static void __init set_mtd_partitions(void) -{ - int nr_parts = 0; - - simple_map_init(&rsk_flash_map); - flash_mtd = do_map_probe("cfi_probe", &rsk_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.nr_parts = nr_parts; - flash_data.parts = parsed_partitions; - } -} -#else -static inline void set_mtd_partitions(void) {} -#endif - static struct platform_device *rsk_devices[] __initdata = { &flash_device, }; static int __init rsk_devices_setup(void) { - set_mtd_partitions(); return platform_add_devices(rsk_devices, ARRAY_SIZE(rsk_devices)); }