aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm3xxx.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-11-21 18:15:16 -0500
committerPaul Walmsley <paul@pwsan.com>2012-11-21 18:15:16 -0500
commit63a293e0005eb86c76657256737a931add8acbdc (patch)
tree121dd5100883538a32f00f24923828e5a3d42a04 /arch/arm/mach-omap2/prm3xxx.c
parent558a0780b0a04862a678f7823215424b4e5501f9 (diff)
ARM: OMAP2+: PRM: initialize some PRM functions early
Some PRM functions will need to be called by the hwmod code early in kernel init. To handle this, split the PRM initialization code into early and late phases. The early init is handled via mach-omap2/io.c, while the late init is handled by subsys_initcall(). Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/prm3xxx.c')
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index b86116cf0db9..db198d058584 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -383,27 +383,30 @@ static struct prm_ll_data omap3xxx_prm_ll_data = {
383 .read_reset_sources = &omap3xxx_prm_read_reset_sources, 383 .read_reset_sources = &omap3xxx_prm_read_reset_sources,
384}; 384};
385 385
386static int __init omap3xxx_prm_init(void) 386int __init omap3xxx_prm_init(void)
387{
388 if (!cpu_is_omap34xx())
389 return 0;
390
391 return prm_register(&omap3xxx_prm_ll_data);
392}
393
394static int __init omap3xxx_prm_late_init(void)
387{ 395{
388 int ret; 396 int ret;
389 397
390 if (!cpu_is_omap34xx()) 398 if (!cpu_is_omap34xx())
391 return 0; 399 return 0;
392 400
393 ret = prm_register(&omap3xxx_prm_ll_data);
394 if (ret)
395 return ret;
396
397 omap3xxx_prm_enable_io_wakeup(); 401 omap3xxx_prm_enable_io_wakeup();
398 ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); 402 ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
399 if (!ret) 403 if (!ret)
400 irq_set_status_flags(omap_prcm_event_to_irq("io"), 404 irq_set_status_flags(omap_prcm_event_to_irq("io"),
401 IRQ_NOAUTOEN); 405 IRQ_NOAUTOEN);
402 406
403
404 return ret; 407 return ret;
405} 408}
406subsys_initcall(omap3xxx_prm_init); 409subsys_initcall(omap3xxx_prm_late_init);
407 410
408static void __exit omap3xxx_prm_exit(void) 411static void __exit omap3xxx_prm_exit(void)
409{ 412{