mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
omap1: Add initcall checks for omap1 and booted board
Otherwise multi-omap1 configurations will fail. Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
df1e9d1c21
commit
7f9187c26f
@ -339,6 +339,9 @@ static int __init ams_delta_modem_init(void)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (!machine_is_ams_delta())
|
||||
return -ENODEV;
|
||||
|
||||
omap_cfg_reg(M14_1510_GPIO2);
|
||||
ams_delta_modem_ports[0].irq =
|
||||
gpio_to_irq(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
|
||||
|
@ -83,6 +83,9 @@ static struct platform_device serial_device = {
|
||||
|
||||
static int __init ext_uart_init(void)
|
||||
{
|
||||
if (!machine_is_voiceblue())
|
||||
return -ENODEV;
|
||||
|
||||
return platform_device_register(&serial_device);
|
||||
}
|
||||
arch_initcall(ext_uart_init);
|
||||
@ -236,6 +239,9 @@ static struct notifier_block panic_block = {
|
||||
|
||||
static int __init voiceblue_setup(void)
|
||||
{
|
||||
if (!machine_is_voiceblue())
|
||||
return -ENODEV;
|
||||
|
||||
/* Setup panic notifier */
|
||||
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
||||
|
||||
|
@ -288,6 +288,9 @@ static inline void omap_init_audio(void) {}
|
||||
*/
|
||||
static int __init omap1_init_devices(void)
|
||||
{
|
||||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
/* please keep these calls, and their implementations above,
|
||||
* in alphabetical order so they're easier to sort through.
|
||||
*/
|
||||
|
@ -424,6 +424,9 @@ static int __init omap_init_lcd_dma(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
if (cpu_is_omap16xx()) {
|
||||
u16 w;
|
||||
|
||||
|
@ -17,6 +17,9 @@
|
||||
static int __init
|
||||
omap_leds_init(void)
|
||||
{
|
||||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
if (machine_is_omap_innovator())
|
||||
leds_event = innovator_leds_event;
|
||||
|
||||
|
@ -176,6 +176,9 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = {
|
||||
|
||||
static int __init omap1_mcbsp_init(void)
|
||||
{
|
||||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
if (cpu_is_omap7xx()) {
|
||||
omap_mcbsp_count = OMAP7XX_MCBSP_PDATA_SZ;
|
||||
omap_mcbsp_cache_size = OMAP7XX_MCBSP_REG_NUM * sizeof(u16);
|
||||
|
@ -661,6 +661,9 @@ static int __init omap_pm_init(void)
|
||||
int error;
|
||||
#endif
|
||||
|
||||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
printk("Power Management for TI OMAP.\n");
|
||||
|
||||
/*
|
||||
|
@ -73,6 +73,9 @@ static int __init omap1_pm_runtime_init(void)
|
||||
const struct dev_pm_ops *pm;
|
||||
struct dev_pm_ops *omap_pm;
|
||||
|
||||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
pm = platform_bus_get_pm_ops();
|
||||
if (!pm) {
|
||||
pr_err("%s: unable to get dev_pm_ops from platform_bus\n",
|
||||
|
@ -258,6 +258,9 @@ late_initcall(omap_serial_wakeup_init);
|
||||
|
||||
static int __init omap_init(void)
|
||||
{
|
||||
if (!cpu_class_is_omap1())
|
||||
return -ENODEV;
|
||||
|
||||
return platform_device_register(&serial_device);
|
||||
}
|
||||
arch_initcall(omap_init);
|
||||
|
Loading…
Reference in New Issue
Block a user