Commit 435ebcbc authored by Kefeng Wang's avatar Kefeng Wang Committed by Rob Herring

arm: use of_platform_default_populate() to populate

Use helper of_platform_default_populate() in linux/of_platform
when possible, instead of calling of_platform_populate() with
the default match table.
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Krzysztof Halasa <khalasa@piap.pl>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Viresh Kumar <vireshk@kernel.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 69d99e6c
...@@ -30,7 +30,7 @@ static void __init at91rm9200_dt_device_init(void) ...@@ -30,7 +30,7 @@ static void __init at91rm9200_dt_device_init(void)
if (soc != NULL) if (soc != NULL)
soc_dev = soc_device_to_device(soc); soc_dev = soc_device_to_device(soc);
of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev); of_platform_default_populate(NULL, NULL, soc_dev);
at91rm9200_pm_init(); at91rm9200_pm_init();
} }
......
...@@ -61,7 +61,7 @@ static void __init at91sam9_common_init(void) ...@@ -61,7 +61,7 @@ static void __init at91sam9_common_init(void)
if (soc != NULL) if (soc != NULL)
soc_dev = soc_device_to_device(soc); soc_dev = soc_device_to_device(soc);
of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev); of_platform_default_populate(NULL, NULL, soc_dev);
} }
static void __init at91sam9_dt_device_init(void) static void __init at91sam9_dt_device_init(void)
......
...@@ -68,7 +68,7 @@ static void __init sama5_dt_device_init(void) ...@@ -68,7 +68,7 @@ static void __init sama5_dt_device_init(void)
if (soc != NULL) if (soc != NULL)
soc_dev = soc_device_to_device(soc); soc_dev = soc_device_to_device(soc);
of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev); of_platform_default_populate(NULL, NULL, soc_dev);
sama5_pm_init(); sama5_pm_init();
} }
......
...@@ -395,8 +395,7 @@ static void __init cns3xxx_init(void) ...@@ -395,8 +395,7 @@ static void __init cns3xxx_init(void)
pm_power_off = cns3xxx_power_off; pm_power_off = cns3xxx_power_off;
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, cns3xxx_auxdata, NULL);
cns3xxx_auxdata, NULL);
} }
static const char *const cns3xxx_dt_compat[] __initconst = { static const char *const cns3xxx_dt_compat[] __initconst = {
......
...@@ -278,7 +278,7 @@ static void __init imx6q_init_machine(void) ...@@ -278,7 +278,7 @@ static void __init imx6q_init_machine(void)
imx6q_enet_phy_init(); imx6q_enet_phy_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); of_platform_default_populate(NULL, NULL, parent);
imx_anatop_init(); imx_anatop_init();
cpu_is_imx6q() ? imx6q_pm_init() : imx6dl_pm_init(); cpu_is_imx6q() ? imx6q_pm_init() : imx6dl_pm_init();
......
...@@ -52,7 +52,7 @@ static void __init imx6sl_init_machine(void) ...@@ -52,7 +52,7 @@ static void __init imx6sl_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, parent); of_platform_default_populate(NULL, NULL, parent);
imx6sl_fec_init(); imx6sl_fec_init();
imx_anatop_init(); imx_anatop_init();
......
...@@ -72,7 +72,7 @@ static void __init imx6sx_init_machine(void) ...@@ -72,7 +72,7 @@ static void __init imx6sx_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, parent); of_platform_default_populate(NULL, NULL, parent);
imx6sx_enet_init(); imx6sx_enet_init();
imx_anatop_init(); imx_anatop_init();
......
...@@ -240,8 +240,7 @@ static void __init ap_init_of(void) ...@@ -240,8 +240,7 @@ static void __init ap_init_of(void)
if (!ebi_base) if (!ebi_base)
return; return;
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, ap_auxdata_lookup, NULL);
ap_auxdata_lookup, NULL);
sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET);
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
......
...@@ -231,8 +231,7 @@ static void __init intcp_init_of(void) ...@@ -231,8 +231,7 @@ static void __init intcp_init_of(void)
if (!intcp_con_base) if (!intcp_con_base)
return; return;
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, intcp_auxdata_lookup, NULL);
intcp_auxdata_lookup, NULL);
} }
static const char * intcp_dt_board_compat[] = { static const char * intcp_dt_board_compat[] = {
......
...@@ -191,8 +191,7 @@ static void __init lpc3250_machine_init(void) ...@@ -191,8 +191,7 @@ static void __init lpc3250_machine_init(void)
LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN, LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN,
LPC32XX_CLKPWR_TEST_CLK_SEL); LPC32XX_CLKPWR_TEST_CLK_SEL);
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, lpc32xx_auxdata_lookup, NULL);
lpc32xx_auxdata_lookup, NULL);
} }
static const char *const lpc32xx_dt_compat[] __initconst = { static const char *const lpc32xx_dt_compat[] __initconst = {
......
...@@ -179,7 +179,7 @@ static void __init kirkwood_dt_init(void) ...@@ -179,7 +179,7 @@ static void __init kirkwood_dt_init(void)
kirkwood_pm_init(); kirkwood_pm_init();
kirkwood_dt_eth_fixup(); kirkwood_dt_eth_fixup();
of_platform_populate(NULL, of_default_bus_match_table, auxdata, NULL); of_platform_default_populate(NULL, auxdata, NULL);
} }
static const char * const kirkwood_dt_board_compat[] __initconst = { static const char * const kirkwood_dt_board_compat[] __initconst = {
......
...@@ -498,8 +498,7 @@ static void __init mxs_machine_init(void) ...@@ -498,8 +498,7 @@ static void __init mxs_machine_init(void)
else if (of_machine_is_compatible("msr,m28cu3")) else if (of_machine_is_compatible("msr,m28cu3"))
m28cu3_init(); m28cu3_init();
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, NULL, parent);
NULL, parent);
mxs_restart_init(); mxs_restart_init();
......
...@@ -57,8 +57,7 @@ static struct of_dev_auxdata nspire_auxdata[] __initdata = { ...@@ -57,8 +57,7 @@ static struct of_dev_auxdata nspire_auxdata[] __initdata = {
static void __init nspire_init(void) static void __init nspire_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, nspire_auxdata, NULL);
nspire_auxdata, NULL);
} }
static void nspire_restart(enum reboot_mode mode, const char *cmd) static void nspire_restart(enum reboot_mode mode, const char *cmd)
......
...@@ -63,8 +63,7 @@ static void __init orion5x_dt_init(void) ...@@ -63,8 +63,7 @@ static void __init orion5x_dt_init(void)
if (of_machine_is_compatible("maxtor,shared-storage-2")) if (of_machine_is_compatible("maxtor,shared-storage-2"))
mss2_init(); mss2_init();
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
orion5x_auxdata_lookup, NULL);
} }
static const char *orion5x_dt_compat[] = { static const char *orion5x_dt_compat[] = {
......
...@@ -194,8 +194,7 @@ static void __init spear300_dt_init(void) ...@@ -194,8 +194,7 @@ static void __init spear300_dt_init(void)
pl080_plat_data.slave_channels = spear300_dma_info; pl080_plat_data.slave_channels = spear300_dma_info;
pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear300_dma_info); pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear300_dma_info);
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, spear300_auxdata_lookup, NULL);
spear300_auxdata_lookup, NULL);
} }
static const char * const spear300_dt_board_compat[] = { static const char * const spear300_dt_board_compat[] = {
......
...@@ -236,8 +236,7 @@ static void __init spear310_dt_init(void) ...@@ -236,8 +236,7 @@ static void __init spear310_dt_init(void)
pl080_plat_data.slave_channels = spear310_dma_info; pl080_plat_data.slave_channels = spear310_dma_info;
pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear310_dma_info); pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear310_dma_info);
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, spear310_auxdata_lookup, NULL);
spear310_auxdata_lookup, NULL);
} }
static const char * const spear310_dt_board_compat[] = { static const char * const spear310_dt_board_compat[] = {
......
...@@ -240,8 +240,7 @@ static void __init spear320_dt_init(void) ...@@ -240,8 +240,7 @@ static void __init spear320_dt_init(void)
pl080_plat_data.slave_channels = spear320_dma_info; pl080_plat_data.slave_channels = spear320_dma_info;
pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear320_dma_info); pl080_plat_data.num_slave_channels = ARRAY_SIZE(spear320_dma_info);
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, spear320_auxdata_lookup, NULL);
spear320_auxdata_lookup, NULL);
} }
static const char * const spear320_dt_board_compat[] = { static const char * const spear320_dt_board_compat[] = {
......
...@@ -411,8 +411,7 @@ struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = { ...@@ -411,8 +411,7 @@ struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = {
static void __init spear600_dt_init(void) static void __init spear600_dt_init(void)
{ {
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, spear6xx_auxdata_lookup, NULL);
spear6xx_auxdata_lookup, NULL);
} }
static const char *spear600_dt_board_compat[] = { static const char *spear600_dt_board_compat[] = {
......
...@@ -115,7 +115,7 @@ static void __init tegra_dt_init(void) ...@@ -115,7 +115,7 @@ static void __init tegra_dt_init(void)
* devices * devices
*/ */
out: out:
of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); of_platform_default_populate(NULL, NULL, parent);
} }
static void __init paz00_init(void) static void __init paz00_init(void)
......
...@@ -391,8 +391,7 @@ static void __init u300_init_machine_dt(void) ...@@ -391,8 +391,7 @@ static void __init u300_init_machine_dt(void)
pinctrl_register_mappings(u300_pinmux_map, pinctrl_register_mappings(u300_pinmux_map,
ARRAY_SIZE(u300_pinmux_map)); ARRAY_SIZE(u300_pinmux_map));
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, u300_auxdata_lookup, NULL);
u300_auxdata_lookup, NULL);
/* Enable SEMI self refresh */ /* Enable SEMI self refresh */
val = readw(syscon_base + U300_SYSCON_SMCR) | val = readw(syscon_base + U300_SYSCON_SMCR) |
......
...@@ -344,8 +344,7 @@ static void __init versatile_dt_init(void) ...@@ -344,8 +344,7 @@ static void __init versatile_dt_init(void)
versatile_dt_pci_init(); versatile_dt_pci_init();
of_platform_populate(NULL, of_default_bus_match_table, of_platform_default_populate(NULL, versatile_auxdata_lookup, NULL);
versatile_auxdata_lookup, NULL);
} }
static const char *const versatile_dt_match[] __initconst = { static const char *const versatile_dt_match[] __initconst = {
......
...@@ -141,7 +141,7 @@ static void __init zynq_init_machine(void) ...@@ -141,7 +141,7 @@ static void __init zynq_init_machine(void)
* Finished with the static registrations now; fill in the missing * Finished with the static registrations now; fill in the missing
* devices * devices
*/ */
of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); of_platform_default_populate(NULL, NULL, parent);
platform_device_register(&zynq_cpuidle_device); platform_device_register(&zynq_cpuidle_device);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment