arm: Remove unnecessary of_platform_populate with default match table

After patch "of/platform: Add common method to populate default bus",
it is possible for arch code to remove unnecessary callers of
of_platform_populate with default match table.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Lee Jones <lee@kernel.org>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Santosh Shilimkar <ssantosh@kernel.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
Cc: Tony Prisk <linux@prisktech.co.nz>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Kefeng Wang 2016-06-01 14:52:56 +08:00 committed by Rob Herring
parent 61c78644e7
commit 850bea2335
23 changed files with 1 additions and 59 deletions

View File

@ -904,11 +904,7 @@ static int __init customize_machine(void)
*/ */
if (machine_desc->init_machine) if (machine_desc->init_machine)
machine_desc->init_machine(); machine_desc->init_machine();
#ifdef CONFIG_OF
else
of_platform_populate(NULL, of_default_bus_match_table,
NULL, NULL);
#endif
return 0; return 0;
} }
arch_initcall(customize_machine); arch_initcall(customize_machine);

View File

@ -13,7 +13,6 @@
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/mfd/syscon.h> #include <linux/mfd/syscon.h>
#include <linux/of_platform.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/clk-provider.h> #include <linux/clk-provider.h>
@ -44,8 +43,6 @@ static void __init artpec6_init_machine(void)
regmap_write(regmap, ARTPEC6_DMACFG_REGNUM, regmap_write(regmap, ARTPEC6_DMACFG_REGNUM,
ARTPEC6_DMACFG_UARTS_BURST); ARTPEC6_DMACFG_UARTS_BURST);
}; };
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static void artpec6_l2c310_write_sec(unsigned long val, unsigned reg) static void artpec6_l2c310_write_sec(unsigned long val, unsigned reg)

View File

@ -12,7 +12,6 @@
*/ */
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -60,7 +59,6 @@ static void bcm21664_restart(enum reboot_mode mode, const char *cmd)
static void __init bcm21664_init(void) static void __init bcm21664_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
kona_l2_cache_init(); kona_l2_cache_init();
} }

View File

@ -13,7 +13,6 @@
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -58,7 +57,6 @@ static void bcm281xx_restart(enum reboot_mode mode, const char *cmd)
static void __init bcm281xx_init(void) static void __init bcm281xx_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
kona_l2_cache_init(); kona_l2_cache_init();
} }

View File

@ -15,7 +15,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/clk/bcm2835.h> #include <linux/clk/bcm2835.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -23,16 +22,7 @@
static void __init bcm2835_init(void) static void __init bcm2835_init(void)
{ {
int ret;
bcm2835_init_clocks(); bcm2835_init_clocks();
ret = of_platform_populate(NULL, of_default_bus_match_table, NULL,
NULL);
if (ret) {
pr_err("of_platform_populate failed: %d\n", ret);
BUG();
}
} }
static const char * const bcm2835_compat[] = { static const char * const bcm2835_compat[] = {

View File

@ -14,7 +14,6 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/soc/samsung/exynos-regs-pmu.h> #include <linux/soc/samsung/exynos-regs-pmu.h>
@ -217,8 +216,6 @@ static void __init exynos_dt_machine_init(void)
of_machine_is_compatible("samsung,exynos3250") || of_machine_is_compatible("samsung,exynos3250") ||
of_machine_is_compatible("samsung,exynos5250")) of_machine_is_compatible("samsung,exynos5250"))
platform_device_register(&exynos_cpuidle); platform_device_register(&exynos_cpuidle);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static char const *const exynos_dt_compat[] __initconst = { static char const *const exynos_dt_compat[] __initconst = {

View File

@ -23,7 +23,6 @@
#include <linux/pl320-ipc.h> #include <linux/pl320-ipc.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <linux/amba/bus.h> #include <linux/amba/bus.h>
@ -163,8 +162,6 @@ static void __init highbank_init(void)
pl320_ipc_register_notifier(&hb_keys_nb); pl320_ipc_register_notifier(&hb_keys_nb);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
if (psci_ops.cpu_suspend) if (psci_ops.cpu_suspend)
platform_device_register(&highbank_cpuidle_device); platform_device_register(&highbank_cpuidle_device);
} }

View File

@ -52,8 +52,6 @@ static void __init imx51_dt_init(void)
{ {
imx51_ipu_mipi_setup(); imx51_ipu_mipi_setup();
imx_src_init(); imx_src_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static void __init imx51_init_late(void) static void __init imx51_init_late(void)

View File

@ -32,8 +32,6 @@ static void __init imx53_dt_init(void)
{ {
imx_src_init(); imx_src_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
imx_aips_allow_unprivileged_access("fsl,imx53-aipstz"); imx_aips_allow_unprivileged_access("fsl,imx53-aipstz");
} }

View File

@ -64,7 +64,6 @@ static void __init imx6ul_init_machine(void)
if (parent == NULL) if (parent == NULL)
pr_warn("failed to initialize soc device\n"); pr_warn("failed to initialize soc device\n");
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
imx6ul_enet_init(); imx6ul_enet_init();
imx_anatop_init(); imx_anatop_init();
imx6ul_pm_init(); imx6ul_pm_init();

View File

@ -93,7 +93,6 @@ static void __init imx7d_init_machine(void)
if (parent == NULL) if (parent == NULL)
pr_warn("failed to initialize soc device\n"); pr_warn("failed to initialize soc device\n");
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
imx_anatop_init(); imx_anatop_init();
imx7d_enet_init(); imx7d_enet_init();
} }

View File

@ -60,7 +60,6 @@ static void __init keystone_init(void)
bus_register_notifier(&platform_bus_type, &platform_nb); bus_register_notifier(&platform_bus_type, &platform_nb);
} }
keystone_pm_runtime_init(); keystone_pm_runtime_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static long long __init keystone_pv_fixup(void) static long long __init keystone_pv_fixup(void)

View File

@ -16,7 +16,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/of_platform.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
@ -144,8 +143,6 @@ static void __init mvebu_dt_init(void)
{ {
if (of_machine_is_compatible("marvell,armadaxp")) if (of_machine_is_compatible("marvell,armadaxp"))
i2c_quirk(); i2c_quirk();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static const char * const armada_370_xp_dt_compat[] __initconst = { static const char * const armada_370_xp_dt_compat[] __initconst = {

View File

@ -11,7 +11,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/mbus.h> #include <linux/mbus.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/soc/dove/pmu.h> #include <linux/soc/dove/pmu.h>
#include <asm/hardware/cache-tauros2.h> #include <asm/hardware/cache-tauros2.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -26,7 +25,6 @@ static void __init dove_init(void)
#endif #endif
BUG_ON(mvebu_mbus_dt_init(false)); BUG_ON(mvebu_mbus_dt_init(false));
dove_init_pmu(); dove_init_pmu();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static const char * const dove_dt_compat[] __initconst = { static const char * const dove_dt_compat[] __initconst = {

View File

@ -10,7 +10,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -54,7 +53,6 @@ static void __init picoxcell_map_io(void)
static void __init picoxcell_init_machine(void) static void __init picoxcell_init_machine(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
picoxcell_setup_restart(); picoxcell_setup_restart();
} }

View File

@ -73,7 +73,6 @@ static void __init rockchip_timer_init(void)
static void __init rockchip_dt_init(void) static void __init rockchip_dt_init(void)
{ {
rockchip_suspend_init(); rockchip_suspend_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static const char * const rockchip_board_dt_compat[] = { static const char * const rockchip_board_dt_compat[] = {

View File

@ -17,7 +17,6 @@
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/of_platform.h>
#include <linux/serial_s3c.h> #include <linux/serial_s3c.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -35,7 +34,6 @@ static void __init s3c2416_dt_map_io(void)
static void __init s3c2416_dt_machine_init(void) static void __init s3c2416_dt_machine_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
s3c_pm_init(); s3c_pm_init();
} }

View File

@ -8,8 +8,6 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/of_platform.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
@ -48,7 +46,6 @@ static void __init s3c64xx_dt_map_io(void)
static void __init s3c64xx_dt_init_machine(void) static void __init s3c64xx_dt_init_machine(void)
{ {
samsung_wdt_reset_of_init(); samsung_wdt_reset_of_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd) static void s3c64xx_dt_restart(enum reboot_mode mode, const char *cmd)

View File

@ -18,7 +18,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/of_platform.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
@ -77,8 +76,6 @@ static void __init r8a7740_init_irq_of(void)
static void __init r8a7740_generic_init(void) static void __init r8a7740_generic_init(void)
{ {
r8a7740_meram_workaround(); r8a7740_meram_workaround();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static const char *const r8a7740_boards_compat_dt[] __initconst = { static const char *const r8a7740_boards_compat_dt[] __initconst = {

View File

@ -18,7 +18,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/of_platform.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/io.h> #include <linux/io.h>
@ -55,7 +54,6 @@ static void __init sh73a0_generic_init(void)
/* Shared attribute override enable, 64K*8way */ /* Shared attribute override enable, 64K*8way */
l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff); l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
#endif #endif
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static const char *const sh73a0_boards_compat_dt[] __initconst = { static const char *const sh73a0_boards_compat_dt[] __initconst = {

View File

@ -14,7 +14,6 @@
#define pr_fmt(fmt) "SPEAr1310: " fmt #define pr_fmt(fmt) "SPEAr1310: " fmt
#include <linux/amba/pl022.h> #include <linux/amba/pl022.h>
#include <linux/of_platform.h>
#include <linux/pata_arasan_cf_data.h> #include <linux/pata_arasan_cf_data.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
@ -27,7 +26,6 @@
static void __init spear1310_dt_init(void) static void __init spear1310_dt_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
platform_device_register_simple("spear-cpufreq", -1, NULL, 0); platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
} }

View File

@ -19,7 +19,6 @@
static void __init spear1340_dt_init(void) static void __init spear1340_dt_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
platform_device_register_simple("spear-cpufreq", -1, NULL, 0); platform_device_register_simple("spear-cpufreq", -1, NULL, 0);
} }

View File

@ -30,7 +30,6 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/of_platform.h>
#define LEGACY_GPIO_BASE 0xD8110000 #define LEGACY_GPIO_BASE 0xD8110000
#define LEGACY_PMC_BASE 0xD8130000 #define LEGACY_PMC_BASE 0xD8130000
@ -158,8 +157,6 @@ static void __init vt8500_init(void)
pm_power_off = &vt8500_power_off; pm_power_off = &vt8500_power_off;
else else
pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__); pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }
static const char * const vt8500_dt_compat[] = { static const char * const vt8500_dt_compat[] = {