diff options
author | Tony Lindgren <tony@atomide.com> | 2018-04-16 13:23:46 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2018-04-30 15:04:51 -0400 |
commit | 02b83dcb3db7974cc25834b67ffac7eb90ce56ac (patch) | |
tree | 0769846454f047728c1ee301342ebec607865a43 /arch/arm/mach-omap2/io.c | |
parent | 71941002ad140cba0ee922a2bc9f5dcf9ac70b54 (diff) |
ARM: OMAP2+: Initialize SoC PM later
There's no need to probe devices until at module_init time and we
currently have at least PM trying to use I2C for PMICs early on.
As only a part of the SoC init_early is SoC specific, we only need to call
the SoC specific PM init function. And we can modify omap2_common_pm_late_init()
so it becomes a late_initcall().
Note that this changes am335x to call omap2_clk_enable_autoidle_all() that
seems to be missing currently.
Cc: Keerthy <j-keerthy@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/io.c')
-rw-r--r-- | arch/arm/mach-omap2/io.c | 67 |
1 files changed, 9 insertions, 58 deletions
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 6ce60a478409..bb8e0bb7ef5d 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -422,11 +422,6 @@ static void __init __maybe_unused omap_hwmod_init_postsetup(void) | |||
422 | omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state); | 422 | omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state); |
423 | } | 423 | } |
424 | 424 | ||
425 | static void __init __maybe_unused omap_common_late_init(void) | ||
426 | { | ||
427 | omap2_common_pm_late_init(); | ||
428 | } | ||
429 | |||
430 | #ifdef CONFIG_SOC_OMAP2420 | 425 | #ifdef CONFIG_SOC_OMAP2420 |
431 | void __init omap2420_init_early(void) | 426 | void __init omap2420_init_early(void) |
432 | { | 427 | { |
@@ -447,9 +442,7 @@ void __init omap2420_init_early(void) | |||
447 | 442 | ||
448 | void __init omap2420_init_late(void) | 443 | void __init omap2420_init_late(void) |
449 | { | 444 | { |
450 | omap_common_late_init(); | 445 | omap_pm_soc_init = omap2_pm_init; |
451 | omap2_pm_init(); | ||
452 | omap2_clk_enable_autoidle_all(); | ||
453 | } | 446 | } |
454 | #endif | 447 | #endif |
455 | 448 | ||
@@ -473,9 +466,7 @@ void __init omap2430_init_early(void) | |||
473 | 466 | ||
474 | void __init omap2430_init_late(void) | 467 | void __init omap2430_init_late(void) |
475 | { | 468 | { |
476 | omap_common_late_init(); | 469 | omap_pm_soc_init = omap2_pm_init; |
477 | omap2_pm_init(); | ||
478 | omap2_clk_enable_autoidle_all(); | ||
479 | } | 470 | } |
480 | #endif | 471 | #endif |
481 | 472 | ||
@@ -526,43 +517,12 @@ void __init am35xx_init_early(void) | |||
526 | 517 | ||
527 | void __init omap3_init_late(void) | 518 | void __init omap3_init_late(void) |
528 | { | 519 | { |
529 | omap_common_late_init(); | 520 | omap_pm_soc_init = omap3_pm_init; |
530 | omap3_pm_init(); | ||
531 | omap2_clk_enable_autoidle_all(); | ||
532 | } | ||
533 | |||
534 | void __init omap3430_init_late(void) | ||
535 | { | ||
536 | omap_common_late_init(); | ||
537 | omap3_pm_init(); | ||
538 | omap2_clk_enable_autoidle_all(); | ||
539 | } | ||
540 | |||
541 | void __init omap35xx_init_late(void) | ||
542 | { | ||
543 | omap_common_late_init(); | ||
544 | omap3_pm_init(); | ||
545 | omap2_clk_enable_autoidle_all(); | ||
546 | } | ||
547 | |||
548 | void __init omap3630_init_late(void) | ||
549 | { | ||
550 | omap_common_late_init(); | ||
551 | omap3_pm_init(); | ||
552 | omap2_clk_enable_autoidle_all(); | ||
553 | } | ||
554 | |||
555 | void __init am35xx_init_late(void) | ||
556 | { | ||
557 | omap_common_late_init(); | ||
558 | omap3_pm_init(); | ||
559 | omap2_clk_enable_autoidle_all(); | ||
560 | } | 521 | } |
561 | 522 | ||
562 | void __init ti81xx_init_late(void) | 523 | void __init ti81xx_init_late(void) |
563 | { | 524 | { |
564 | omap_common_late_init(); | 525 | omap_pm_soc_init = omap_pm_nop_init; |
565 | omap2_clk_enable_autoidle_all(); | ||
566 | } | 526 | } |
567 | #endif | 527 | #endif |
568 | 528 | ||
@@ -618,8 +578,7 @@ void __init am33xx_init_early(void) | |||
618 | 578 | ||
619 | void __init am33xx_init_late(void) | 579 | void __init am33xx_init_late(void) |
620 | { | 580 | { |
621 | omap_common_late_init(); | 581 | omap_pm_soc_init = amx3_common_pm_init; |
622 | amx3_common_pm_init(); | ||
623 | } | 582 | } |
624 | #endif | 583 | #endif |
625 | 584 | ||
@@ -642,9 +601,7 @@ void __init am43xx_init_early(void) | |||
642 | 601 | ||
643 | void __init am43xx_init_late(void) | 602 | void __init am43xx_init_late(void) |
644 | { | 603 | { |
645 | omap_common_late_init(); | 604 | omap_pm_soc_init = amx3_common_pm_init; |
646 | omap2_clk_enable_autoidle_all(); | ||
647 | amx3_common_pm_init(); | ||
648 | } | 605 | } |
649 | #endif | 606 | #endif |
650 | 607 | ||
@@ -672,9 +629,7 @@ void __init omap4430_init_early(void) | |||
672 | 629 | ||
673 | void __init omap4430_init_late(void) | 630 | void __init omap4430_init_late(void) |
674 | { | 631 | { |
675 | omap_common_late_init(); | 632 | omap_pm_soc_init = omap4_pm_init; |
676 | omap4_pm_init(); | ||
677 | omap2_clk_enable_autoidle_all(); | ||
678 | } | 633 | } |
679 | #endif | 634 | #endif |
680 | 635 | ||
@@ -700,9 +655,7 @@ void __init omap5_init_early(void) | |||
700 | 655 | ||
701 | void __init omap5_init_late(void) | 656 | void __init omap5_init_late(void) |
702 | { | 657 | { |
703 | omap_common_late_init(); | 658 | omap_pm_soc_init = omap4_pm_init; |
704 | omap4_pm_init(); | ||
705 | omap2_clk_enable_autoidle_all(); | ||
706 | } | 659 | } |
707 | #endif | 660 | #endif |
708 | 661 | ||
@@ -725,9 +678,7 @@ void __init dra7xx_init_early(void) | |||
725 | 678 | ||
726 | void __init dra7xx_init_late(void) | 679 | void __init dra7xx_init_late(void) |
727 | { | 680 | { |
728 | omap_common_late_init(); | 681 | omap_pm_soc_init = omap4_pm_init; |
729 | omap4_pm_init(); | ||
730 | omap2_clk_enable_autoidle_all(); | ||
731 | } | 682 | } |
732 | #endif | 683 | #endif |
733 | 684 | ||