aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-10-27 11:39:23 -0400
committerTony Lindgren <tony@atomide.com>2014-10-27 11:39:23 -0400
commit7632a02f80eb99e942999e522b2eb0f6592ea5b5 (patch)
treebb29d55d413711fffe05fd489faa2e3df1e0ed11
parent9907f85eb27d98c2184a56f3b636cb82536807a0 (diff)
ARM: OMAP4/AM33xx: add cm_init / cm_exit calls for AM33xx and OMAP4+
This is needed for expanding the generic CM driver API to include AM33xx and OMAP4 also. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/cm33xx.c13
-rw-r--r--arch/arm/mach-omap2/cm33xx.h1
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c13
-rw-r--r--arch/arm/mach-omap2/cminst44xx.h1
-rw-r--r--arch/arm/mach-omap2/io.c6
5 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index ef9e9018f4d5..e02988fd237f 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -358,3 +358,16 @@ struct clkdm_ops am33xx_clkdm_operations = {
358 .clkdm_clk_enable = am33xx_clkdm_clk_enable, 358 .clkdm_clk_enable = am33xx_clkdm_clk_enable,
359 .clkdm_clk_disable = am33xx_clkdm_clk_disable, 359 .clkdm_clk_disable = am33xx_clkdm_clk_disable,
360}; 360};
361
362static struct cm_ll_data am33xx_cm_ll_data;
363
364int __init am33xx_cm_init(void)
365{
366 return cm_register(&am33xx_cm_ll_data);
367}
368
369static void __exit am33xx_cm_exit(void)
370{
371 cm_unregister(&am33xx_cm_ll_data);
372}
373__exitcall(am33xx_cm_exit);
diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h
index 1771fc17fd8c..1d3cde732648 100644
--- a/arch/arm/mach-omap2/cm33xx.h
+++ b/arch/arm/mach-omap2/cm33xx.h
@@ -379,6 +379,7 @@ void am33xx_cm_clkdm_enable_hwsup(u16 inst, u16 cdoffs);
379void am33xx_cm_clkdm_disable_hwsup(u16 inst, u16 cdoffs); 379void am33xx_cm_clkdm_disable_hwsup(u16 inst, u16 cdoffs);
380void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs); 380void am33xx_cm_clkdm_force_sleep(u16 inst, u16 cdoffs);
381void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs); 381void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs);
382int am33xx_cm_init(void);
382 383
383#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX) 384#if defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_AM43XX)
384int am33xx_cm_wait_module_idle(u16 inst, u16 clkctrl_offs); 385int am33xx_cm_wait_module_idle(u16 inst, u16 clkctrl_offs);
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index 7e6970af1d66..695e71e802a5 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -505,3 +505,16 @@ struct clkdm_ops am43xx_clkdm_operations = {
505 .clkdm_clk_enable = omap4_clkdm_clk_enable, 505 .clkdm_clk_enable = omap4_clkdm_clk_enable,
506 .clkdm_clk_disable = omap4_clkdm_clk_disable, 506 .clkdm_clk_disable = omap4_clkdm_clk_disable,
507}; 507};
508
509static struct cm_ll_data omap4xxx_cm_ll_data;
510
511int __init omap4_cm_init(void)
512{
513 return cm_register(&omap4xxx_cm_ll_data);
514}
515
516static void __exit omap4_cm_exit(void)
517{
518 cm_unregister(&omap4xxx_cm_ll_data);
519}
520__exitcall(omap4_cm_exit);
diff --git a/arch/arm/mach-omap2/cminst44xx.h b/arch/arm/mach-omap2/cminst44xx.h
index 67a05f9f9eab..cc3c9133a304 100644
--- a/arch/arm/mach-omap2/cminst44xx.h
+++ b/arch/arm/mach-omap2/cminst44xx.h
@@ -38,5 +38,6 @@ extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx,
38 u32 mask); 38 u32 mask);
39 39
40extern void omap_cm_base_init(void); 40extern void omap_cm_base_init(void);
41int omap4_cm_init(void);
41 42
42#endif 43#endif
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 5f46f2729759..dc251673103a 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -45,6 +45,7 @@
45#include "sram.h" 45#include "sram.h"
46#include "cm2xxx.h" 46#include "cm2xxx.h"
47#include "cm3xxx.h" 47#include "cm3xxx.h"
48#include "cm33xx.h"
48#include "prm.h" 49#include "prm.h"
49#include "cm.h" 50#include "cm.h"
50#include "prcm_mpu44xx.h" 51#include "prcm_mpu44xx.h"
@@ -565,6 +566,7 @@ void __init am33xx_init_early(void)
565 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL); 566 omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRCM_BASE), NULL);
566 omap3xxx_check_revision(); 567 omap3xxx_check_revision();
567 am33xx_check_features(); 568 am33xx_check_features();
569 am33xx_cm_init();
568 am33xx_powerdomains_init(); 570 am33xx_powerdomains_init();
569 am33xx_clockdomains_init(); 571 am33xx_clockdomains_init();
570 am33xx_hwmod_init(); 572 am33xx_hwmod_init();
@@ -592,6 +594,7 @@ void __init am43xx_init_early(void)
592 omap3xxx_check_revision(); 594 omap3xxx_check_revision();
593 am33xx_check_features(); 595 am33xx_check_features();
594 omap44xx_prm_init(); 596 omap44xx_prm_init();
597 omap4_cm_init();
595 am43xx_powerdomains_init(); 598 am43xx_powerdomains_init();
596 am43xx_clockdomains_init(); 599 am43xx_clockdomains_init();
597 am43xx_hwmod_init(); 600 am43xx_hwmod_init();
@@ -621,6 +624,7 @@ void __init omap4430_init_early(void)
621 omap_cm_base_init(); 624 omap_cm_base_init();
622 omap4xxx_check_revision(); 625 omap4xxx_check_revision();
623 omap4xxx_check_features(); 626 omap4xxx_check_features();
627 omap4_cm_init();
624 omap4_pm_init_early(); 628 omap4_pm_init_early();
625 omap44xx_prm_init(); 629 omap44xx_prm_init();
626 omap44xx_voltagedomains_init(); 630 omap44xx_voltagedomains_init();
@@ -656,6 +660,7 @@ void __init omap5_init_early(void)
656 omap_cm_base_init(); 660 omap_cm_base_init();
657 omap44xx_prm_init(); 661 omap44xx_prm_init();
658 omap5xxx_check_revision(); 662 omap5xxx_check_revision();
663 omap4_cm_init();
659 omap54xx_voltagedomains_init(); 664 omap54xx_voltagedomains_init();
660 omap54xx_powerdomains_init(); 665 omap54xx_powerdomains_init();
661 omap54xx_clockdomains_init(); 666 omap54xx_clockdomains_init();
@@ -687,6 +692,7 @@ void __init dra7xx_init_early(void)
687 omap_cm_base_init(); 692 omap_cm_base_init();
688 omap44xx_prm_init(); 693 omap44xx_prm_init();
689 dra7xxx_check_revision(); 694 dra7xxx_check_revision();
695 omap4_cm_init();
690 dra7xx_powerdomains_init(); 696 dra7xx_powerdomains_init();
691 dra7xx_clockdomains_init(); 697 dra7xx_clockdomains_init();
692 dra7xx_hwmod_init(); 698 dra7xx_hwmod_init();