Commit b76c8b19 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP2+: Use omap initcalls

This way the initcalls don't run on other SoCs on multiplatform
kernels. Otherwise we'll get something like this when booting
on vexpress:

omap_hwmod: _ensure_mpu_hwmod_is_setup: MPU initiator hwmod mpu not yet registered
...
WARNING: at arch/arm/mach-omap2/pm.c:82 _init_omap_device+0x74/0x94()
_init_omap_device: could not find omap_hwmod for mpu
...
omap-dma-engine omap-dma-engine: OMAP DMA engine driver
...
Tested-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 816a65ef
......@@ -494,7 +494,7 @@ static int __init beagle_opp_init(void)
}
return 0;
}
device_initcall(beagle_opp_init);
omap_device_initcall(beagle_opp_init);
static void __init omap3_beagle_init(void)
{
......
......@@ -18,6 +18,7 @@
#include <video/omapdss.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include "soc.h"
#include "board-rx51.h"
#include "mux.h"
......@@ -85,5 +86,5 @@ static int __init rx51_video_init(void)
return 0;
}
subsys_initcall(rx51_video_init);
omap_subsys_initcall(rx51_video_init);
#endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */
......@@ -52,6 +52,6 @@ static int __init omap2xxx_clk_arch_init(void)
return ret;
}
arch_initcall(omap2xxx_clk_arch_init);
omap_arch_initcall(omap2xxx_clk_arch_init);
......@@ -94,6 +94,6 @@ static int __init omap3xxx_clk_arch_init(void)
return ret;
}
arch_initcall(omap3xxx_clk_arch_init);
omap_arch_initcall(omap3xxx_clk_arch_init);
......@@ -68,7 +68,7 @@ static int __init omap3_l3_init(void)
return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
}
postcore_initcall(omap3_l3_init);
omap_postcore_initcall(omap3_l3_init);
static int __init omap4_l3_init(void)
{
......@@ -103,7 +103,7 @@ static int __init omap4_l3_init(void)
return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
}
postcore_initcall(omap4_l3_init);
omap_postcore_initcall(omap4_l3_init);
#if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
......@@ -734,4 +734,4 @@ static int __init omap2_init_devices(void)
return 0;
}
arch_initcall(omap2_init_devices);
omap_arch_initcall(omap2_init_devices);
......@@ -293,4 +293,4 @@ static int __init omap2_system_dma_init(void)
return omap_hwmod_for_each_by_class("dma",
omap2_system_dma_init_dev, NULL);
}
arch_initcall(omap2_system_dma_init);
omap_arch_initcall(omap2_system_dma_init);
......@@ -62,6 +62,6 @@ static int __init omap_init_drm(void)
}
arch_initcall(omap_init_drm);
omap_arch_initcall(omap_init_drm);
#endif
......@@ -47,4 +47,4 @@ static int __init emu_init(void)
return 0;
}
subsys_initcall(emu_init);
omap_subsys_initcall(emu_init);
......@@ -89,7 +89,7 @@ static int __init omap_init_vrfb(void)
return 0;
}
arch_initcall(omap_init_vrfb);
omap_arch_initcall(omap_init_vrfb);
#endif
#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
......@@ -113,6 +113,6 @@ static int __init omap_init_fb(void)
return platform_device_register(&omap_fb_device);
}
arch_initcall(omap_init_fb);
omap_arch_initcall(omap_init_fb);
#endif
......@@ -23,6 +23,7 @@
#include <linux/of.h>
#include <linux/platform_data/gpio-omap.h>
#include "soc.h"
#include "omap_hwmod.h"
#include "omap_device.h"
#include "omap-pm.h"
......@@ -147,7 +148,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
/*
* gpio_init needs to be done before
* machine_init functions access gpio APIs.
* Hence gpio_init is a postcore_initcall.
* Hence gpio_init is a omap_postcore_initcall.
*/
static int __init omap2_gpio_init(void)
{
......@@ -157,4 +158,4 @@ static int __init omap2_gpio_init(void)
return omap_hwmod_for_each_by_class("gpio", omap2_gpio_dev_init, NULL);
}
postcore_initcall(omap2_gpio_init);
omap_postcore_initcall(omap2_gpio_init);
......@@ -1205,7 +1205,7 @@ static __exit void gpmc_exit(void)
}
postcore_initcall(gpmc_init);
omap_postcore_initcall(gpmc_init);
module_exit(gpmc_exit);
static int __init omap_gpmc_init(void)
......@@ -1225,7 +1225,7 @@ static int __init omap_gpmc_init(void)
return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
}
postcore_initcall(omap_gpmc_init);
omap_postcore_initcall(omap_gpmc_init);
static irqreturn_t gpmc_handle_irq(int irq, void *dev)
{
......
......@@ -27,6 +27,7 @@
#include <linux/err.h>
#include <linux/platform_device.h>
#include "soc.h"
#include "omap_hwmod.h"
#include "omap_device.h"
#include "hdq1w.h"
......@@ -93,4 +94,4 @@ static int __init omap_init_hdq(void)
return 0;
}
arch_initcall(omap_init_hdq);
omap_arch_initcall(omap_init_hdq);
......@@ -57,4 +57,4 @@ static int __init hwspinlocks_init(void)
return retval;
}
/* early board code might need to reserve specific hwspinlock instances */
postcore_initcall(hwspinlocks_init);
omap_postcore_initcall(hwspinlocks_init);
......@@ -23,6 +23,7 @@
#include <linux/omap-dma.h>
#include "soc.h"
#include "omap_device.h"
/*
......@@ -118,4 +119,4 @@ static int __init omap2_mcbsp_init(void)
return 0;
}
arch_initcall(omap2_mcbsp_init);
omap_arch_initcall(omap2_mcbsp_init);
......@@ -61,7 +61,7 @@ static int __init omap_iommu_init(void)
return omap_hwmod_for_each_by_class("mmu", omap_iommu_dev_init, NULL);
}
/* must be ready before omap3isp is probed */
subsys_initcall(omap_iommu_init);
omap_subsys_initcall(omap_iommu_init);
static void __exit omap_iommu_exit(void)
{
......
......@@ -13,6 +13,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include "soc.h"
#include "common.h"
#include "prm2xxx.h"
......@@ -62,4 +63,4 @@ static int __init omap2xxx_common_look_up_clks_for_reset(void)
return 0;
}
core_initcall(omap2xxx_common_look_up_clks_for_reset);
omap_core_initcall(omap2xxx_common_look_up_clks_for_reset);
......@@ -225,7 +225,7 @@ static int __init omap_l2_cache_init(void)
return 0;
}
early_initcall(omap_l2_cache_init);
omap_early_initcall(omap_l2_cache_init);
#endif
void __iomem *omap4_get_sar_ram_base(void)
......@@ -253,7 +253,7 @@ static int __init omap4_sar_ram_init(void)
return 0;
}
early_initcall(omap4_sar_ram_init);
omap_early_initcall(omap4_sar_ram_init);
static struct of_device_id irq_match[] __initdata = {
{ .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
......
......@@ -89,6 +89,7 @@
#include <linux/of.h>
#include <linux/notifier.h>
#include "soc.h"
#include "omap_device.h"
#include "omap_hwmod.h"
......@@ -1259,7 +1260,7 @@ static int __init omap_device_init(void)
bus_register_notifier(&platform_bus_type, &platform_nb);
return 0;
}
core_initcall(omap_device_init);
omap_core_initcall(omap_device_init);
/**
* omap_device_late_idle - idle devices without drivers
......@@ -1297,4 +1298,4 @@ static int __init omap_device_late_init(void)
bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle);
return 0;
}
late_initcall(omap_device_late_init);
omap_late_initcall(omap_device_late_init);
......@@ -3303,7 +3303,7 @@ static int __init omap_hwmod_setup_all(void)
return 0;
}
core_initcall(omap_hwmod_setup_all);
omap_core_initcall(omap_hwmod_setup_all);
/**
* omap_hwmod_enable - enable an omap_hwmod
......
......@@ -63,7 +63,7 @@ static int __init omap4430_phy_power_down(void)
return 0;
}
early_initcall(omap4430_phy_power_down);
omap_early_initcall(omap4430_phy_power_down);
void am35x_musb_reset(void)
{
......
......@@ -168,4 +168,4 @@ int __init omap3_opp_init(void)
return r;
}
device_initcall(omap3_opp_init);
omap_device_initcall(omap3_opp_init);
......@@ -177,4 +177,4 @@ int __init omap4_opp_init(void)
ARRAY_SIZE(omap446x_opp_def_list));
return r;
}
device_initcall(omap4_opp_init);
omap_device_initcall(omap4_opp_init);
......@@ -279,6 +279,6 @@ static int __init pm_dbg_init(void)
return 0;
}
arch_initcall(pm_dbg_init);
omap_arch_initcall(pm_dbg_init);
#endif
......@@ -336,7 +336,7 @@ static int __init omap2_common_pm_init(void)
return 0;
}
postcore_initcall(omap2_common_pm_init);
omap_postcore_initcall(omap2_common_pm_init);
int __init omap2_common_pm_late_init(void)
{
......
......@@ -89,4 +89,4 @@ static int __init omap_init_pmu(void)
return omap2_init_pmu(oh_num, oh_names);
}
subsys_initcall(omap_init_pmu);
omap_subsys_initcall(omap_init_pmu);
......@@ -427,7 +427,7 @@ static int __init omap3xxx_prm_late_init(void)
return ret;
}
subsys_initcall(omap3xxx_prm_late_init);
omap_subsys_initcall(omap3xxx_prm_late_init);
static void __exit omap3xxx_prm_exit(void)
{
......
......@@ -665,7 +665,7 @@ static int __init omap44xx_prm_late_init(void)
return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup);
}
subsys_initcall(omap44xx_prm_late_init);
omap_subsys_initcall(omap44xx_prm_late_init);
static void __exit omap44xx_prm_exit(void)
{
......
......@@ -254,7 +254,7 @@ static int __init omap_serial_early_init(void)
return 0;
}
core_initcall(omap_serial_early_init);
omap_core_initcall(omap_serial_early_init);
/**
* omap_serial_init_port() - initialize single serial port
......
......@@ -58,4 +58,4 @@ static int __init sr_class3_init(void)
pr_info("SmartReflex Class3 initialized\n");
return sr_register_class(&class3_data);
}
late_initcall(sr_class3_init);
omap_late_initcall(sr_class3_init);
......@@ -742,7 +742,7 @@ static int __init omap2_dm_timer_init(void)
return 0;
}
arch_initcall(omap2_dm_timer_init);
omap_arch_initcall(omap2_dm_timer_init);
/**
* omap2_override_clocksource - clocksource override with user configuration
......
......@@ -130,4 +130,4 @@ static int __init omap_init_wdt(void)
dev_name, oh->name);
return 0;
}
subsys_initcall(omap_init_wdt);
omap_subsys_initcall(omap_init_wdt);
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