forked from luck/tmp_suning_uos_patched
ARM: davinci: use machine specific hook for late init
Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:
parent
90de41375c
commit
3aa3e8407a
|
@ -681,6 +681,7 @@ MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP-L137/AM17x EVM")
|
|||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = da830_evm_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = da8xx_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -1411,6 +1411,7 @@ MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
|
|||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = da850_evm_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = da8xx_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -357,6 +357,7 @@ MACHINE_START(DAVINCI_DM355_EVM, "DaVinci DM355 EVM")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = dm355_evm_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -276,6 +276,7 @@ MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = dm355_leopard_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -618,6 +618,7 @@ MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = dm365_evm_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -825,6 +825,7 @@ MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = davinci_evm_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -788,6 +788,7 @@ MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = evm_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
@ -798,6 +799,7 @@ MACHINE_START(DAVINCI_DM6467TEVM, "DaVinci DM6467T EVM")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = evm_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -572,6 +572,7 @@ MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808")
|
|||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = mityomapl138_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = da8xx_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -278,6 +278,7 @@ MACHINE_START(NEUROS_OSD2, "Neuros OSD2")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = davinci_ntosd2_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -343,6 +343,7 @@ MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
|
|||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = omapl138_hawk_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = da8xx_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -157,6 +157,7 @@ MACHINE_START(SFFSDR, "Lyrtech SFFSDR")
|
|||
.init_irq = davinci_irq_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = davinci_sffsdr_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = davinci_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -282,6 +282,7 @@ MACHINE_START(TNETV107X, "TNETV107X EVM")
|
|||
.init_irq = cp_intc_init,
|
||||
.timer = &davinci_timer,
|
||||
.init_machine = tnetv107x_evm_board_init,
|
||||
.init_late = davinci_init_late,
|
||||
.dma_zone_size = SZ_128M,
|
||||
.restart = tnetv107x_restart,
|
||||
MACHINE_END
|
||||
|
|
|
@ -213,7 +213,7 @@ EXPORT_SYMBOL(clk_unregister);
|
|||
/*
|
||||
* Disable any unused clocks left on by the bootloader
|
||||
*/
|
||||
static int __init clk_disable_unused(void)
|
||||
int __init davinci_clk_disable_unused(void)
|
||||
{
|
||||
struct clk *ck;
|
||||
|
||||
|
@ -237,7 +237,6 @@ static int __init clk_disable_unused(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
late_initcall(clk_disable_unused);
|
||||
#endif
|
||||
|
||||
static unsigned long clk_sysclk_recalc(struct clk *clk)
|
||||
|
|
|
@ -117,3 +117,10 @@ void __init davinci_common_init(struct davinci_soc_info *soc_info)
|
|||
err:
|
||||
panic("davinci_common_init: SoC Initialization failed\n");
|
||||
}
|
||||
|
||||
void __init davinci_init_late(void)
|
||||
{
|
||||
davinci_cpufreq_init();
|
||||
davinci_pm_init();
|
||||
davinci_clk_disable_unused();
|
||||
}
|
||||
|
|
|
@ -240,10 +240,9 @@ static struct platform_driver davinci_cpufreq_driver = {
|
|||
.remove = __exit_p(davinci_cpufreq_remove),
|
||||
};
|
||||
|
||||
static int __init davinci_cpufreq_init(void)
|
||||
int __init davinci_cpufreq_init(void)
|
||||
{
|
||||
return platform_driver_probe(&davinci_cpufreq_driver,
|
||||
davinci_cpufreq_probe);
|
||||
}
|
||||
late_initcall(davinci_cpufreq_init);
|
||||
|
||||
|
|
|
@ -84,6 +84,25 @@ extern struct davinci_soc_info davinci_soc_info;
|
|||
extern void davinci_common_init(struct davinci_soc_info *soc_info);
|
||||
extern void davinci_init_ide(void);
|
||||
void davinci_restart(char mode, const char *cmd);
|
||||
void davinci_init_late(void);
|
||||
|
||||
#ifdef CONFIG_DAVINCI_RESET_CLOCKS
|
||||
int davinci_clk_disable_unused(void);
|
||||
#else
|
||||
static inline int davinci_clk_disable_unused(void) { return 0; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
int davinci_cpufreq_init(void);
|
||||
#else
|
||||
static inline int davinci_cpufreq_init(void) { return 0; }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SUSPEND
|
||||
int davinci_pm_init(void);
|
||||
#else
|
||||
static inline int davinci_pm_init(void) { return 0; }
|
||||
#endif
|
||||
|
||||
/* standard place to map on-chip SRAMs; they *may* support DMA */
|
||||
#define SRAM_VIRT 0xfffe0000
|
||||
|
|
|
@ -152,8 +152,7 @@ static struct platform_driver davinci_pm_driver = {
|
|||
.remove = __exit_p(davinci_pm_remove),
|
||||
};
|
||||
|
||||
static int __init davinci_pm_init(void)
|
||||
int __init davinci_pm_init(void)
|
||||
{
|
||||
return platform_driver_probe(&davinci_pm_driver, davinci_pm_probe);
|
||||
}
|
||||
late_initcall(davinci_pm_init);
|
||||
|
|
Loading…
Reference in New Issue
Block a user