diff options
author | Tony Lindgren <tony@atomide.com> | 2010-10-08 14:10:36 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-10-08 14:10:36 -0400 |
commit | a7c887510073b2f403e123f2befa40bf93554df9 (patch) | |
tree | afee0628d0688bb2460cfd4eb1ee4cc8281e925c /arch/arm/mach-omap2 | |
parent | 4415beb6fb519c4e98491666838494a8c46cc3ee (diff) | |
parent | 4367260c0bc1773c00b2309a31b31657cabfda3f (diff) |
Merge branch 'control_mcbsp_fix_2.6.37' of git://git.pwsan.com/linux-2.6 into omap-for-linus
Diffstat (limited to 'arch/arm/mach-omap2')
32 files changed, 740 insertions, 45 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 2b79b84d0542..ab784bfde908 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -100,20 +100,20 @@ config MACH_OMAP2_TUSB6010 | |||
100 | 100 | ||
101 | config MACH_OMAP_H4 | 101 | config MACH_OMAP_H4 |
102 | bool "OMAP 2420 H4 board" | 102 | bool "OMAP 2420 H4 board" |
103 | depends on ARCH_OMAP2 | 103 | depends on ARCH_OMAP2420 |
104 | default y | 104 | default y |
105 | select OMAP_PACKAGE_ZAF | 105 | select OMAP_PACKAGE_ZAF |
106 | select OMAP_DEBUG_DEVICES | 106 | select OMAP_DEBUG_DEVICES |
107 | 107 | ||
108 | config MACH_OMAP_APOLLON | 108 | config MACH_OMAP_APOLLON |
109 | bool "OMAP 2420 Apollon board" | 109 | bool "OMAP 2420 Apollon board" |
110 | depends on ARCH_OMAP2 | 110 | depends on ARCH_OMAP2420 |
111 | default y | 111 | default y |
112 | select OMAP_PACKAGE_ZAC | 112 | select OMAP_PACKAGE_ZAC |
113 | 113 | ||
114 | config MACH_OMAP_2430SDP | 114 | config MACH_OMAP_2430SDP |
115 | bool "OMAP 2430 SDP board" | 115 | bool "OMAP 2430 SDP board" |
116 | depends on ARCH_OMAP2 | 116 | depends on ARCH_OMAP2430 |
117 | default y | 117 | default y |
118 | select OMAP_PACKAGE_ZAC | 118 | select OMAP_PACKAGE_ZAC |
119 | 119 | ||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index d8b1de6f3f62..7352412e4917 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -3,7 +3,8 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o | 6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \ |
7 | common.o | ||
7 | 8 | ||
8 | omap-2-3-common = irq.o sdrc.o prm2xxx_3xxx.o | 9 | omap-2-3-common = irq.o sdrc.o prm2xxx_3xxx.o |
9 | hwmod-common = omap_hwmod.o \ | 10 | hwmod-common = omap_hwmod.o \ |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 9ba2ee246a75..88b5734d0bb2 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -39,7 +39,6 @@ | |||
39 | #include <plat/gpmc.h> | 39 | #include <plat/gpmc.h> |
40 | #include <plat/display.h> | 40 | #include <plat/display.h> |
41 | 41 | ||
42 | #include <plat/control.h> | ||
43 | #include <plat/gpmc-smc91x.h> | 42 | #include <plat/gpmc-smc91x.h> |
44 | 43 | ||
45 | #include "board-flash.h" | 44 | #include "board-flash.h" |
@@ -47,6 +46,7 @@ | |||
47 | #include "sdram-qimonda-hyb18m512160af-6.h" | 46 | #include "sdram-qimonda-hyb18m512160af-6.h" |
48 | #include "hsmmc.h" | 47 | #include "hsmmc.h" |
49 | #include "pm.h" | 48 | #include "pm.h" |
49 | #include "control.h" | ||
50 | 50 | ||
51 | #define CONFIG_DISABLE_HFCLK 1 | 51 | #define CONFIG_DISABLE_HFCLK 1 |
52 | 52 | ||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 1d7d70ae7cb8..aafd30680fc8 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -32,12 +32,12 @@ | |||
32 | 32 | ||
33 | #include <plat/board.h> | 33 | #include <plat/board.h> |
34 | #include <plat/common.h> | 34 | #include <plat/common.h> |
35 | #include <plat/control.h> | ||
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
37 | #include <plat/mmc.h> | 36 | #include <plat/mmc.h> |
38 | 37 | ||
39 | #include "hsmmc.h" | 38 | #include "hsmmc.h" |
40 | #include "timer-gp.h" | 39 | #include "timer-gp.h" |
40 | #include "control.h" | ||
41 | 41 | ||
42 | #define ETH_KS8851_IRQ 34 | 42 | #define ETH_KS8851_IRQ 34 |
43 | #define ETH_KS8851_POWER_ON 48 | 43 | #define ETH_KS8851_POWER_ON 48 |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index b091741500de..fada04ea1d5c 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -32,11 +32,11 @@ | |||
32 | 32 | ||
33 | #include <plat/board.h> | 33 | #include <plat/board.h> |
34 | #include <plat/common.h> | 34 | #include <plat/common.h> |
35 | #include <plat/control.h> | ||
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
37 | #include <plat/display.h> | 36 | #include <plat/display.h> |
38 | 37 | ||
39 | #include "mux.h" | 38 | #include "mux.h" |
39 | #include "control.h" | ||
40 | 40 | ||
41 | #define AM35XX_EVM_PHY_MASK (0xF) | 41 | #define AM35XX_EVM_PHY_MASK (0xF) |
42 | #define AM35XX_EVM_MDIO_FREQUENCY (1000000) | 42 | #define AM35XX_EVM_MDIO_FREQUENCY (1000000) |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index c6421a72514a..102719cb052b 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -39,9 +39,9 @@ | |||
39 | #include <plat/board.h> | 39 | #include <plat/board.h> |
40 | #include <plat/common.h> | 40 | #include <plat/common.h> |
41 | #include <plat/gpmc.h> | 41 | #include <plat/gpmc.h> |
42 | #include <plat/control.h> | ||
43 | 42 | ||
44 | #include "mux.h" | 43 | #include "mux.h" |
44 | #include "control.h" | ||
45 | 45 | ||
46 | /* LED & Switch macros */ | 46 | /* LED & Switch macros */ |
47 | #define LED0_GPIO13 13 | 47 | #define LED0_GPIO13 13 |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 1115b8ab5e1d..c49319ff5c36 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -40,7 +40,6 @@ | |||
40 | 40 | ||
41 | #include <plat/board.h> | 41 | #include <plat/board.h> |
42 | #include <plat/common.h> | 42 | #include <plat/common.h> |
43 | #include <plat/control.h> | ||
44 | #include <plat/usb.h> | 43 | #include <plat/usb.h> |
45 | #include <plat/nand.h> | 44 | #include <plat/nand.h> |
46 | #include <plat/gpmc.h> | 45 | #include <plat/gpmc.h> |
@@ -48,6 +47,7 @@ | |||
48 | #include <mach/am35xx.h> | 47 | #include <mach/am35xx.h> |
49 | 48 | ||
50 | #include "mux.h" | 49 | #include "mux.h" |
50 | #include "control.h" | ||
51 | 51 | ||
52 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | 52 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
53 | static struct gpio_led cm_t3517_leds[] = { | 53 | static struct gpio_led cm_t3517_leds[] = { |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 3482b99e8c86..8aee862b625a 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -48,10 +48,22 @@ static void __init omap_generic_init(void) | |||
48 | 48 | ||
49 | static void __init omap_generic_map_io(void) | 49 | static void __init omap_generic_map_io(void) |
50 | { | 50 | { |
51 | omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */ | 51 | if (cpu_is_omap242x()) { |
52 | omap242x_map_common_io(); | 52 | omap2_set_globals_242x(); |
53 | omap242x_map_common_io(); | ||
54 | } else if (cpu_is_omap243x()) { | ||
55 | omap2_set_globals_243x(); | ||
56 | omap243x_map_common_io(); | ||
57 | } else if (cpu_is_omap34xx()) { | ||
58 | omap2_set_globals_3xxx(); | ||
59 | omap34xx_map_common_io(); | ||
60 | } else if (cpu_is_omap44xx()) { | ||
61 | omap2_set_globals_443x(); | ||
62 | omap44xx_map_common_io(); | ||
63 | } | ||
53 | } | 64 | } |
54 | 65 | ||
66 | /* XXX This machine entry name should be updated */ | ||
55 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") | 67 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") |
56 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ | 68 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ |
57 | .phys_io = 0x48000000, | 69 | .phys_io = 0x48000000, |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index e09bd686389f..08492a34d310 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
33 | 33 | ||
34 | #include <plat/control.h> | ||
35 | #include <mach/gpio.h> | 34 | #include <mach/gpio.h> |
36 | #include <plat/usb.h> | 35 | #include <plat/usb.h> |
37 | #include <plat/board.h> | 36 | #include <plat/board.h> |
@@ -42,6 +41,7 @@ | |||
42 | #include <plat/gpmc.h> | 41 | #include <plat/gpmc.h> |
43 | 42 | ||
44 | #include "mux.h" | 43 | #include "mux.h" |
44 | #include "control.h" | ||
45 | 45 | ||
46 | #define H4_FLASH_CS 0 | 46 | #define H4_FLASH_CS 0 |
47 | #define H4_SMC91X_CS 1 | 47 | #define H4_SMC91X_CS 1 |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 7c1e6ad3972e..8495f37d2756 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -42,12 +42,12 @@ | |||
42 | #include <mach/board-zoom.h> | 42 | #include <mach/board-zoom.h> |
43 | 43 | ||
44 | #include <asm/delay.h> | 44 | #include <asm/delay.h> |
45 | #include <plat/control.h> | ||
46 | #include <plat/usb.h> | 45 | #include <plat/usb.h> |
47 | 46 | ||
48 | #include "board-flash.h" | 47 | #include "board-flash.h" |
49 | #include "mux.h" | 48 | #include "mux.h" |
50 | #include "hsmmc.h" | 49 | #include "hsmmc.h" |
50 | #include "control.h" | ||
51 | 51 | ||
52 | #define LDP_SMSC911X_CS 1 | 52 | #define LDP_SMSC911X_CS 1 |
53 | #define LDP_SMSC911X_GPIO 152 | 53 | #define LDP_SMSC911X_GPIO 152 |
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 3151cf269a59..44ff6744ef59 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "mux.h" | 36 | #include "mux.h" |
37 | #include "hsmmc.h" | 37 | #include "hsmmc.h" |
38 | #include "timer-gp.h" | 38 | #include "timer-gp.h" |
39 | #include "control.h" | ||
39 | 40 | ||
40 | #include <plat/mux.h> | 41 | #include <plat/mux.h> |
41 | #include <plat/board.h> | 42 | #include <plat/board.h> |
@@ -43,7 +44,6 @@ | |||
43 | #include <plat/gpmc-smsc911x.h> | 44 | #include <plat/gpmc-smsc911x.h> |
44 | #include <plat/gpmc.h> | 45 | #include <plat/gpmc.h> |
45 | #include <plat/sdrc.h> | 46 | #include <plat/sdrc.h> |
46 | #include <plat/control.h> | ||
47 | 47 | ||
48 | #define OMAP3LOGIC_SMSC911X_CS 1 | 48 | #define OMAP3LOGIC_SMSC911X_CS 1 |
49 | 49 | ||
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 5eb1a77bf0e5..a9d8a19ada7e 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -34,12 +34,12 @@ | |||
34 | 34 | ||
35 | #include <plat/board.h> | 35 | #include <plat/board.h> |
36 | #include <plat/common.h> | 36 | #include <plat/common.h> |
37 | #include <plat/control.h> | ||
38 | #include <plat/usb.h> | 37 | #include <plat/usb.h> |
39 | #include <plat/mmc.h> | 38 | #include <plat/mmc.h> |
40 | #include "hsmmc.h" | ||
41 | #include "timer-gp.h" | 39 | #include "timer-gp.h" |
42 | 40 | ||
41 | #include "hsmmc.h" | ||
42 | #include "control.h" | ||
43 | 43 | ||
44 | #define GPIO_HUB_POWER 1 | 44 | #define GPIO_HUB_POWER 1 |
45 | #define GPIO_HUB_NRESET 62 | 45 | #define GPIO_HUB_NRESET 62 |
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 605f531783a8..b5babf5440e4 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -395,7 +395,7 @@ void omap2_clk_disable_unused(struct clk *clk) | |||
395 | if ((regval32 & (1 << clk->enable_bit)) == v) | 395 | if ((regval32 & (1 << clk->enable_bit)) == v) |
396 | return; | 396 | return; |
397 | 397 | ||
398 | printk(KERN_DEBUG "Disabling unused clock \"%s\"\n", clk->name); | 398 | pr_debug("Disabling unused clock \"%s\"\n", clk->name); |
399 | if (cpu_is_omap34xx()) { | 399 | if (cpu_is_omap34xx()) { |
400 | omap2_clk_enable(clk); | 400 | omap2_clk_enable(clk); |
401 | omap2_clk_disable(clk); | 401 | omap2_clk_disable(clk); |
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index 5f2066a6ba74..21f856252ad8 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "prm-regbits-24xx.h" | 27 | #include "prm-regbits-24xx.h" |
28 | #include "cm-regbits-24xx.h" | 28 | #include "cm-regbits-24xx.h" |
29 | #include "sdrc.h" | 29 | #include "sdrc.h" |
30 | #include "control.h" | ||
30 | 31 | ||
31 | #define OMAP_CM_REGADDR OMAP2420_CM_REGADDR | 32 | #define OMAP_CM_REGADDR OMAP2420_CM_REGADDR |
32 | 33 | ||
@@ -89,6 +90,12 @@ static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */ | |||
89 | .clkdm_name = "wkup_clkdm", | 90 | .clkdm_name = "wkup_clkdm", |
90 | }; | 91 | }; |
91 | 92 | ||
93 | /* Optional external clock input for McBSP CLKS */ | ||
94 | static struct clk mcbsp_clks = { | ||
95 | .name = "mcbsp_clks", | ||
96 | .ops = &clkops_null, | ||
97 | }; | ||
98 | |||
92 | /* | 99 | /* |
93 | * Analog domain root source clocks | 100 | * Analog domain root source clocks |
94 | */ | 101 | */ |
@@ -1135,14 +1142,34 @@ static struct clk mcbsp1_ick = { | |||
1135 | .recalc = &followparent_recalc, | 1142 | .recalc = &followparent_recalc, |
1136 | }; | 1143 | }; |
1137 | 1144 | ||
1145 | static const struct clksel_rate common_mcbsp_96m_rates[] = { | ||
1146 | { .div = 1, .val = 0, .flags = RATE_IN_24XX }, | ||
1147 | { .div = 0 } | ||
1148 | }; | ||
1149 | |||
1150 | static const struct clksel_rate common_mcbsp_mcbsp_rates[] = { | ||
1151 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, | ||
1152 | { .div = 0 } | ||
1153 | }; | ||
1154 | |||
1155 | static const struct clksel mcbsp_fck_clksel[] = { | ||
1156 | { .parent = &func_96m_ck, .rates = common_mcbsp_96m_rates }, | ||
1157 | { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates }, | ||
1158 | { .parent = NULL } | ||
1159 | }; | ||
1160 | |||
1138 | static struct clk mcbsp1_fck = { | 1161 | static struct clk mcbsp1_fck = { |
1139 | .name = "mcbsp1_fck", | 1162 | .name = "mcbsp1_fck", |
1140 | .ops = &clkops_omap2_dflt_wait, | 1163 | .ops = &clkops_omap2_dflt_wait, |
1141 | .parent = &func_96m_ck, | 1164 | .parent = &func_96m_ck, |
1165 | .init = &omap2_init_clksel_parent, | ||
1142 | .clkdm_name = "core_l4_clkdm", | 1166 | .clkdm_name = "core_l4_clkdm", |
1143 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1167 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1144 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, | 1168 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
1145 | .recalc = &followparent_recalc, | 1169 | .clksel_reg = OMAP242X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1170 | .clksel_mask = OMAP2_MCBSP1_CLKS_MASK, | ||
1171 | .clksel = mcbsp_fck_clksel, | ||
1172 | .recalc = &omap2_clksel_recalc, | ||
1146 | }; | 1173 | }; |
1147 | 1174 | ||
1148 | static struct clk mcbsp2_ick = { | 1175 | static struct clk mcbsp2_ick = { |
@@ -1159,10 +1186,14 @@ static struct clk mcbsp2_fck = { | |||
1159 | .name = "mcbsp2_fck", | 1186 | .name = "mcbsp2_fck", |
1160 | .ops = &clkops_omap2_dflt_wait, | 1187 | .ops = &clkops_omap2_dflt_wait, |
1161 | .parent = &func_96m_ck, | 1188 | .parent = &func_96m_ck, |
1189 | .init = &omap2_init_clksel_parent, | ||
1162 | .clkdm_name = "core_l4_clkdm", | 1190 | .clkdm_name = "core_l4_clkdm", |
1163 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1191 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1164 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, | 1192 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
1165 | .recalc = &followparent_recalc, | 1193 | .clksel_reg = OMAP242X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1194 | .clksel_mask = OMAP2_MCBSP2_CLKS_MASK, | ||
1195 | .clksel = mcbsp_fck_clksel, | ||
1196 | .recalc = &omap2_clksel_recalc, | ||
1166 | }; | 1197 | }; |
1167 | 1198 | ||
1168 | static struct clk mcspi1_ick = { | 1199 | static struct clk mcspi1_ick = { |
@@ -1721,6 +1752,9 @@ static struct omap_clk omap2420_clks[] = { | |||
1721 | CLK(NULL, "osc_ck", &osc_ck, CK_242X), | 1752 | CLK(NULL, "osc_ck", &osc_ck, CK_242X), |
1722 | CLK(NULL, "sys_ck", &sys_ck, CK_242X), | 1753 | CLK(NULL, "sys_ck", &sys_ck, CK_242X), |
1723 | CLK(NULL, "alt_ck", &alt_ck, CK_242X), | 1754 | CLK(NULL, "alt_ck", &alt_ck, CK_242X), |
1755 | CLK("omap-mcbsp.1", "pad_fck", &mcbsp_clks, CK_242X), | ||
1756 | CLK("omap-mcbsp.2", "pad_fck", &mcbsp_clks, CK_242X), | ||
1757 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_242X), | ||
1724 | /* internal analog sources */ | 1758 | /* internal analog sources */ |
1725 | CLK(NULL, "dpll_ck", &dpll_ck, CK_242X), | 1759 | CLK(NULL, "dpll_ck", &dpll_ck, CK_242X), |
1726 | CLK(NULL, "apll96_ck", &apll96_ck, CK_242X), | 1760 | CLK(NULL, "apll96_ck", &apll96_ck, CK_242X), |
@@ -1728,6 +1762,8 @@ static struct omap_clk omap2420_clks[] = { | |||
1728 | /* internal prcm root sources */ | 1762 | /* internal prcm root sources */ |
1729 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_242X), | 1763 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_242X), |
1730 | CLK(NULL, "core_ck", &core_ck, CK_242X), | 1764 | CLK(NULL, "core_ck", &core_ck, CK_242X), |
1765 | CLK("omap-mcbsp.1", "prcm_fck", &func_96m_ck, CK_242X), | ||
1766 | CLK("omap-mcbsp.2", "prcm_fck", &func_96m_ck, CK_242X), | ||
1731 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_242X), | 1767 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_242X), |
1732 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_242X), | 1768 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_242X), |
1733 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_242X), | 1769 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_242X), |
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c index 701a1716019e..e32afcbdfb88 100644 --- a/arch/arm/mach-omap2/clock2430_data.c +++ b/arch/arm/mach-omap2/clock2430_data.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "prm-regbits-24xx.h" | 27 | #include "prm-regbits-24xx.h" |
28 | #include "cm-regbits-24xx.h" | 28 | #include "cm-regbits-24xx.h" |
29 | #include "sdrc.h" | 29 | #include "sdrc.h" |
30 | #include "control.h" | ||
30 | 31 | ||
31 | #define OMAP_CM_REGADDR OMAP2430_CM_REGADDR | 32 | #define OMAP_CM_REGADDR OMAP2430_CM_REGADDR |
32 | 33 | ||
@@ -89,6 +90,12 @@ static struct clk alt_ck = { /* Typical 54M or 48M, may not exist */ | |||
89 | .clkdm_name = "wkup_clkdm", | 90 | .clkdm_name = "wkup_clkdm", |
90 | }; | 91 | }; |
91 | 92 | ||
93 | /* Optional external clock input for McBSP CLKS */ | ||
94 | static struct clk mcbsp_clks = { | ||
95 | .name = "mcbsp_clks", | ||
96 | .ops = &clkops_null, | ||
97 | }; | ||
98 | |||
92 | /* | 99 | /* |
93 | * Analog domain root source clocks | 100 | * Analog domain root source clocks |
94 | */ | 101 | */ |
@@ -1123,14 +1130,34 @@ static struct clk mcbsp1_ick = { | |||
1123 | .recalc = &followparent_recalc, | 1130 | .recalc = &followparent_recalc, |
1124 | }; | 1131 | }; |
1125 | 1132 | ||
1133 | static const struct clksel_rate common_mcbsp_96m_rates[] = { | ||
1134 | { .div = 1, .val = 0, .flags = RATE_IN_24XX }, | ||
1135 | { .div = 0 } | ||
1136 | }; | ||
1137 | |||
1138 | static const struct clksel_rate common_mcbsp_mcbsp_rates[] = { | ||
1139 | { .div = 1, .val = 1, .flags = RATE_IN_24XX }, | ||
1140 | { .div = 0 } | ||
1141 | }; | ||
1142 | |||
1143 | static const struct clksel mcbsp_fck_clksel[] = { | ||
1144 | { .parent = &func_96m_ck, .rates = common_mcbsp_96m_rates }, | ||
1145 | { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates }, | ||
1146 | { .parent = NULL } | ||
1147 | }; | ||
1148 | |||
1126 | static struct clk mcbsp1_fck = { | 1149 | static struct clk mcbsp1_fck = { |
1127 | .name = "mcbsp1_fck", | 1150 | .name = "mcbsp1_fck", |
1128 | .ops = &clkops_omap2_dflt_wait, | 1151 | .ops = &clkops_omap2_dflt_wait, |
1129 | .parent = &func_96m_ck, | 1152 | .parent = &func_96m_ck, |
1153 | .init = &omap2_init_clksel_parent, | ||
1130 | .clkdm_name = "core_l4_clkdm", | 1154 | .clkdm_name = "core_l4_clkdm", |
1131 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1155 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1132 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, | 1156 | .enable_bit = OMAP24XX_EN_MCBSP1_SHIFT, |
1133 | .recalc = &followparent_recalc, | 1157 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1158 | .clksel_mask = OMAP2_MCBSP1_CLKS_MASK, | ||
1159 | .clksel = mcbsp_fck_clksel, | ||
1160 | .recalc = &omap2_clksel_recalc, | ||
1134 | }; | 1161 | }; |
1135 | 1162 | ||
1136 | static struct clk mcbsp2_ick = { | 1163 | static struct clk mcbsp2_ick = { |
@@ -1147,10 +1174,14 @@ static struct clk mcbsp2_fck = { | |||
1147 | .name = "mcbsp2_fck", | 1174 | .name = "mcbsp2_fck", |
1148 | .ops = &clkops_omap2_dflt_wait, | 1175 | .ops = &clkops_omap2_dflt_wait, |
1149 | .parent = &func_96m_ck, | 1176 | .parent = &func_96m_ck, |
1177 | .init = &omap2_init_clksel_parent, | ||
1150 | .clkdm_name = "core_l4_clkdm", | 1178 | .clkdm_name = "core_l4_clkdm", |
1151 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1179 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1152 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, | 1180 | .enable_bit = OMAP24XX_EN_MCBSP2_SHIFT, |
1153 | .recalc = &followparent_recalc, | 1181 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0), |
1182 | .clksel_mask = OMAP2_MCBSP2_CLKS_MASK, | ||
1183 | .clksel = mcbsp_fck_clksel, | ||
1184 | .recalc = &omap2_clksel_recalc, | ||
1154 | }; | 1185 | }; |
1155 | 1186 | ||
1156 | static struct clk mcbsp3_ick = { | 1187 | static struct clk mcbsp3_ick = { |
@@ -1167,10 +1198,14 @@ static struct clk mcbsp3_fck = { | |||
1167 | .name = "mcbsp3_fck", | 1198 | .name = "mcbsp3_fck", |
1168 | .ops = &clkops_omap2_dflt_wait, | 1199 | .ops = &clkops_omap2_dflt_wait, |
1169 | .parent = &func_96m_ck, | 1200 | .parent = &func_96m_ck, |
1201 | .init = &omap2_init_clksel_parent, | ||
1170 | .clkdm_name = "core_l4_clkdm", | 1202 | .clkdm_name = "core_l4_clkdm", |
1171 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1203 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
1172 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, | 1204 | .enable_bit = OMAP2430_EN_MCBSP3_SHIFT, |
1173 | .recalc = &followparent_recalc, | 1205 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1), |
1206 | .clksel_mask = OMAP2_MCBSP3_CLKS_MASK, | ||
1207 | .clksel = mcbsp_fck_clksel, | ||
1208 | .recalc = &omap2_clksel_recalc, | ||
1174 | }; | 1209 | }; |
1175 | 1210 | ||
1176 | static struct clk mcbsp4_ick = { | 1211 | static struct clk mcbsp4_ick = { |
@@ -1187,10 +1222,14 @@ static struct clk mcbsp4_fck = { | |||
1187 | .name = "mcbsp4_fck", | 1222 | .name = "mcbsp4_fck", |
1188 | .ops = &clkops_omap2_dflt_wait, | 1223 | .ops = &clkops_omap2_dflt_wait, |
1189 | .parent = &func_96m_ck, | 1224 | .parent = &func_96m_ck, |
1225 | .init = &omap2_init_clksel_parent, | ||
1190 | .clkdm_name = "core_l4_clkdm", | 1226 | .clkdm_name = "core_l4_clkdm", |
1191 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1227 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
1192 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, | 1228 | .enable_bit = OMAP2430_EN_MCBSP4_SHIFT, |
1193 | .recalc = &followparent_recalc, | 1229 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1), |
1230 | .clksel_mask = OMAP2_MCBSP4_CLKS_MASK, | ||
1231 | .clksel = mcbsp_fck_clksel, | ||
1232 | .recalc = &omap2_clksel_recalc, | ||
1194 | }; | 1233 | }; |
1195 | 1234 | ||
1196 | static struct clk mcbsp5_ick = { | 1235 | static struct clk mcbsp5_ick = { |
@@ -1207,10 +1246,14 @@ static struct clk mcbsp5_fck = { | |||
1207 | .name = "mcbsp5_fck", | 1246 | .name = "mcbsp5_fck", |
1208 | .ops = &clkops_omap2_dflt_wait, | 1247 | .ops = &clkops_omap2_dflt_wait, |
1209 | .parent = &func_96m_ck, | 1248 | .parent = &func_96m_ck, |
1249 | .init = &omap2_init_clksel_parent, | ||
1210 | .clkdm_name = "core_l4_clkdm", | 1250 | .clkdm_name = "core_l4_clkdm", |
1211 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 1251 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
1212 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, | 1252 | .enable_bit = OMAP2430_EN_MCBSP5_SHIFT, |
1213 | .recalc = &followparent_recalc, | 1253 | .clksel_reg = OMAP243X_CTRL_REGADDR(OMAP243X_CONTROL_DEVCONF1), |
1254 | .clksel_mask = OMAP2_MCBSP5_CLKS_MASK, | ||
1255 | .clksel = mcbsp_fck_clksel, | ||
1256 | .recalc = &omap2_clksel_recalc, | ||
1214 | }; | 1257 | }; |
1215 | 1258 | ||
1216 | static struct clk mcspi1_ick = { | 1259 | static struct clk mcspi1_ick = { |
@@ -1808,6 +1851,12 @@ static struct omap_clk omap2430_clks[] = { | |||
1808 | CLK(NULL, "osc_ck", &osc_ck, CK_243X), | 1851 | CLK(NULL, "osc_ck", &osc_ck, CK_243X), |
1809 | CLK(NULL, "sys_ck", &sys_ck, CK_243X), | 1852 | CLK(NULL, "sys_ck", &sys_ck, CK_243X), |
1810 | CLK(NULL, "alt_ck", &alt_ck, CK_243X), | 1853 | CLK(NULL, "alt_ck", &alt_ck, CK_243X), |
1854 | CLK("omap-mcbsp.1", "pad_fck", &mcbsp_clks, CK_243X), | ||
1855 | CLK("omap-mcbsp.2", "pad_fck", &mcbsp_clks, CK_243X), | ||
1856 | CLK("omap-mcbsp.3", "pad_fck", &mcbsp_clks, CK_243X), | ||
1857 | CLK("omap-mcbsp.4", "pad_fck", &mcbsp_clks, CK_243X), | ||
1858 | CLK("omap-mcbsp.5", "pad_fck", &mcbsp_clks, CK_243X), | ||
1859 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_243X), | ||
1811 | /* internal analog sources */ | 1860 | /* internal analog sources */ |
1812 | CLK(NULL, "dpll_ck", &dpll_ck, CK_243X), | 1861 | CLK(NULL, "dpll_ck", &dpll_ck, CK_243X), |
1813 | CLK(NULL, "apll96_ck", &apll96_ck, CK_243X), | 1862 | CLK(NULL, "apll96_ck", &apll96_ck, CK_243X), |
@@ -1815,6 +1864,11 @@ static struct omap_clk omap2430_clks[] = { | |||
1815 | /* internal prcm root sources */ | 1864 | /* internal prcm root sources */ |
1816 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_243X), | 1865 | CLK(NULL, "func_54m_ck", &func_54m_ck, CK_243X), |
1817 | CLK(NULL, "core_ck", &core_ck, CK_243X), | 1866 | CLK(NULL, "core_ck", &core_ck, CK_243X), |
1867 | CLK("omap-mcbsp.1", "prcm_fck", &func_96m_ck, CK_243X), | ||
1868 | CLK("omap-mcbsp.2", "prcm_fck", &func_96m_ck, CK_243X), | ||
1869 | CLK("omap-mcbsp.3", "prcm_fck", &func_96m_ck, CK_243X), | ||
1870 | CLK("omap-mcbsp.4", "prcm_fck", &func_96m_ck, CK_243X), | ||
1871 | CLK("omap-mcbsp.5", "prcm_fck", &func_96m_ck, CK_243X), | ||
1818 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_243X), | 1872 | CLK(NULL, "func_96m_ck", &func_96m_ck, CK_243X), |
1819 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_243X), | 1873 | CLK(NULL, "func_48m_ck", &func_48m_ck, CK_243X), |
1820 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_243X), | 1874 | CLK(NULL, "func_12m_ck", &func_12m_ck, CK_243X), |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index ba01ec0cae45..d85ecd5aebfd 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | 22 | ||
23 | #include <plat/control.h> | ||
24 | #include <plat/clkdev_omap.h> | 23 | #include <plat/clkdev_omap.h> |
25 | 24 | ||
26 | #include "clock.h" | 25 | #include "clock.h" |
@@ -33,6 +32,7 @@ | |||
33 | #include "cm-regbits-34xx.h" | 32 | #include "cm-regbits-34xx.h" |
34 | #include "prm.h" | 33 | #include "prm.h" |
35 | #include "prm-regbits-34xx.h" | 34 | #include "prm-regbits-34xx.h" |
35 | #include "control.h" | ||
36 | 36 | ||
37 | /* | 37 | /* |
38 | * clocks | 38 | * clocks |
@@ -3208,6 +3208,11 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3208 | CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX), | 3208 | CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX), |
3209 | CLK(NULL, "sys_ck", &sys_ck, CK_3XXX), | 3209 | CLK(NULL, "sys_ck", &sys_ck, CK_3XXX), |
3210 | CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX), | 3210 | CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX), |
3211 | CLK("omap-mcbsp.1", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3212 | CLK("omap-mcbsp.2", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3213 | CLK("omap-mcbsp.3", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3214 | CLK("omap-mcbsp.4", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3215 | CLK("omap-mcbsp.5", "pad_fck", &mcbsp_clks, CK_3XXX), | ||
3211 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX), | 3216 | CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX), |
3212 | CLK(NULL, "sys_clkout1", &sys_clkout1, CK_3XXX), | 3217 | CLK(NULL, "sys_clkout1", &sys_clkout1, CK_3XXX), |
3213 | CLK(NULL, "dpll1_ck", &dpll1_ck, CK_3XXX), | 3218 | CLK(NULL, "dpll1_ck", &dpll1_ck, CK_3XXX), |
@@ -3273,6 +3278,8 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3273 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2 | CK_AM35XX), | 3278 | CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2 | CK_AM35XX), |
3274 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2 | CK_AM35XX), | 3279 | CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2 | CK_AM35XX), |
3275 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX), | 3280 | CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX), |
3281 | CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), | ||
3282 | CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), | ||
3276 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), | 3283 | CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), |
3277 | CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2 | CK_AM35XX), | 3284 | CLK("mmci-omap-hs.2", "fck", &mmchs3_fck, CK_3430ES2 | CK_AM35XX), |
3278 | CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_3XXX), | 3285 | CLK("mmci-omap-hs.1", "fck", &mmchs2_fck, CK_3XXX), |
@@ -3366,6 +3373,9 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3366 | CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX), | 3373 | CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX), |
3367 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_3XXX), | 3374 | CLK(NULL, "gpt12_ick", &gpt12_ick, CK_3XXX), |
3368 | CLK(NULL, "gpt1_ick", &gpt1_ick, CK_3XXX), | 3375 | CLK(NULL, "gpt1_ick", &gpt1_ick, CK_3XXX), |
3376 | CLK("omap-mcbsp.2", "prcm_fck", &per_96m_fck, CK_3XXX), | ||
3377 | CLK("omap-mcbsp.3", "prcm_fck", &per_96m_fck, CK_3XXX), | ||
3378 | CLK("omap-mcbsp.4", "prcm_fck", &per_96m_fck, CK_3XXX), | ||
3369 | CLK(NULL, "per_96m_fck", &per_96m_fck, CK_3XXX), | 3379 | CLK(NULL, "per_96m_fck", &per_96m_fck, CK_3XXX), |
3370 | CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), | 3380 | CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), |
3371 | CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), | 3381 | CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 67fac44cb6e6..1599836ba3d9 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/list.h> | 27 | #include <linux/list.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <plat/control.h> | ||
30 | #include <plat/clkdev_omap.h> | 29 | #include <plat/clkdev_omap.h> |
31 | 30 | ||
32 | #include "clock.h" | 31 | #include "clock.h" |
@@ -35,6 +34,7 @@ | |||
35 | #include "cm-regbits-44xx.h" | 34 | #include "cm-regbits-44xx.h" |
36 | #include "prm.h" | 35 | #include "prm.h" |
37 | #include "prm-regbits-44xx.h" | 36 | #include "prm-regbits-44xx.h" |
37 | #include "control.h" | ||
38 | 38 | ||
39 | /* Root clocks */ | 39 | /* Root clocks */ |
40 | 40 | ||
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c new file mode 100644 index 000000000000..778929f7e92d --- /dev/null +++ b/arch/arm/mach-omap2/common.c | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/common.c | ||
3 | * | ||
4 | * Code common to all OMAP2+ machines. | ||
5 | * | ||
6 | * Copyright (C) 2009 Texas Instruments | ||
7 | * Copyright (C) 2010 Nokia Corporation | ||
8 | * Tony Lindgren <tony@atomide.com> | ||
9 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/clk.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <plat/common.h> | ||
21 | #include <plat/board.h> | ||
22 | #include <plat/mux.h> | ||
23 | |||
24 | #include <plat/clock.h> | ||
25 | |||
26 | #include "sdrc.h" | ||
27 | #include "control.h" | ||
28 | |||
29 | /* Global address base setup code */ | ||
30 | |||
31 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
32 | |||
33 | static void __init __omap2_set_globals(struct omap_globals *omap2_globals) | ||
34 | { | ||
35 | omap2_set_globals_tap(omap2_globals); | ||
36 | omap2_set_globals_sdrc(omap2_globals); | ||
37 | omap2_set_globals_control(omap2_globals); | ||
38 | omap2_set_globals_prcm(omap2_globals); | ||
39 | } | ||
40 | |||
41 | #endif | ||
42 | |||
43 | #if defined(CONFIG_ARCH_OMAP2420) | ||
44 | |||
45 | static struct omap_globals omap242x_globals = { | ||
46 | .class = OMAP242X_CLASS, | ||
47 | .tap = OMAP2_L4_IO_ADDRESS(0x48014000), | ||
48 | .sdrc = OMAP2420_SDRC_BASE, | ||
49 | .sms = OMAP2420_SMS_BASE, | ||
50 | .ctrl = OMAP242X_CTRL_BASE, | ||
51 | .prm = OMAP2420_PRM_BASE, | ||
52 | .cm = OMAP2420_CM_BASE, | ||
53 | .uart1_phys = OMAP2_UART1_BASE, | ||
54 | .uart2_phys = OMAP2_UART2_BASE, | ||
55 | .uart3_phys = OMAP2_UART3_BASE, | ||
56 | }; | ||
57 | |||
58 | void __init omap2_set_globals_242x(void) | ||
59 | { | ||
60 | __omap2_set_globals(&omap242x_globals); | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | #if defined(CONFIG_ARCH_OMAP2430) | ||
65 | |||
66 | static struct omap_globals omap243x_globals = { | ||
67 | .class = OMAP243X_CLASS, | ||
68 | .tap = OMAP2_L4_IO_ADDRESS(0x4900a000), | ||
69 | .sdrc = OMAP243X_SDRC_BASE, | ||
70 | .sms = OMAP243X_SMS_BASE, | ||
71 | .ctrl = OMAP243X_CTRL_BASE, | ||
72 | .prm = OMAP2430_PRM_BASE, | ||
73 | .cm = OMAP2430_CM_BASE, | ||
74 | .uart1_phys = OMAP2_UART1_BASE, | ||
75 | .uart2_phys = OMAP2_UART2_BASE, | ||
76 | .uart3_phys = OMAP2_UART3_BASE, | ||
77 | }; | ||
78 | |||
79 | void __init omap2_set_globals_243x(void) | ||
80 | { | ||
81 | __omap2_set_globals(&omap243x_globals); | ||
82 | } | ||
83 | #endif | ||
84 | |||
85 | #if defined(CONFIG_ARCH_OMAP3) | ||
86 | |||
87 | static struct omap_globals omap3_globals = { | ||
88 | .class = OMAP343X_CLASS, | ||
89 | .tap = OMAP2_L4_IO_ADDRESS(0x4830A000), | ||
90 | .sdrc = OMAP343X_SDRC_BASE, | ||
91 | .sms = OMAP343X_SMS_BASE, | ||
92 | .ctrl = OMAP343X_CTRL_BASE, | ||
93 | .prm = OMAP3430_PRM_BASE, | ||
94 | .cm = OMAP3430_CM_BASE, | ||
95 | .uart1_phys = OMAP3_UART1_BASE, | ||
96 | .uart2_phys = OMAP3_UART2_BASE, | ||
97 | .uart3_phys = OMAP3_UART3_BASE, | ||
98 | .uart4_phys = OMAP3_UART4_BASE, /* Only on 3630 */ | ||
99 | }; | ||
100 | |||
101 | void __init omap2_set_globals_3xxx(void) | ||
102 | { | ||
103 | __omap2_set_globals(&omap3_globals); | ||
104 | } | ||
105 | |||
106 | void __init omap3_map_io(void) | ||
107 | { | ||
108 | omap2_set_globals_3xxx(); | ||
109 | omap34xx_map_common_io(); | ||
110 | } | ||
111 | #endif | ||
112 | |||
113 | #if defined(CONFIG_ARCH_OMAP4) | ||
114 | static struct omap_globals omap4_globals = { | ||
115 | .class = OMAP443X_CLASS, | ||
116 | .tap = OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE), | ||
117 | .ctrl = OMAP443X_SCM_BASE, | ||
118 | .ctrl_pad = OMAP443X_CTRL_BASE, | ||
119 | .prm = OMAP4430_PRM_BASE, | ||
120 | .cm = OMAP4430_CM_BASE, | ||
121 | .cm2 = OMAP4430_CM2_BASE, | ||
122 | .uart1_phys = OMAP4_UART1_BASE, | ||
123 | .uart2_phys = OMAP4_UART2_BASE, | ||
124 | .uart3_phys = OMAP4_UART3_BASE, | ||
125 | .uart4_phys = OMAP4_UART4_BASE, | ||
126 | }; | ||
127 | |||
128 | void __init omap2_set_globals_443x(void) | ||
129 | { | ||
130 | omap2_set_globals_tap(&omap4_globals); | ||
131 | omap2_set_globals_control(&omap4_globals); | ||
132 | omap2_set_globals_prcm(&omap4_globals); | ||
133 | } | ||
134 | #endif | ||
135 | |||
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 5d9b30dd6e56..1fa3294b6048 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c | |||
@@ -16,14 +16,15 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | 17 | ||
18 | #include <plat/common.h> | 18 | #include <plat/common.h> |
19 | #include <plat/control.h> | ||
20 | #include <plat/sdrc.h> | 19 | #include <plat/sdrc.h> |
20 | |||
21 | #include "cm-regbits-34xx.h" | 21 | #include "cm-regbits-34xx.h" |
22 | #include "prm-regbits-34xx.h" | 22 | #include "prm-regbits-34xx.h" |
23 | #include "cm.h" | 23 | #include "cm.h" |
24 | #include "prm.h" | 24 | #include "prm.h" |
25 | #include "sdrc.h" | 25 | #include "sdrc.h" |
26 | #include "pm.h" | 26 | #include "pm.h" |
27 | #include "control.h" | ||
27 | 28 | ||
28 | static void __iomem *omap2_ctrl_base; | 29 | static void __iomem *omap2_ctrl_base; |
29 | static void __iomem *omap4_ctrl_pad_base; | 30 | static void __iomem *omap4_ctrl_pad_base; |
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h new file mode 100644 index 000000000000..b6c6b7c450b3 --- /dev/null +++ b/arch/arm/mach-omap2/control.h | |||
@@ -0,0 +1,368 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/control.h | ||
3 | * | ||
4 | * OMAP2/3/4 System Control Module definitions | ||
5 | * | ||
6 | * Copyright (C) 2007-2010 Texas Instruments, Inc. | ||
7 | * Copyright (C) 2007-2008, 2010 Nokia Corporation | ||
8 | * | ||
9 | * Written by Paul Walmsley | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H | ||
17 | #define __ARCH_ARM_MACH_OMAP2_CONTROL_H | ||
18 | |||
19 | #include <mach/io.h> | ||
20 | #include <mach/ctrl_module_core_44xx.h> | ||
21 | #include <mach/ctrl_module_wkup_44xx.h> | ||
22 | #include <mach/ctrl_module_pad_core_44xx.h> | ||
23 | #include <mach/ctrl_module_pad_wkup_44xx.h> | ||
24 | |||
25 | #ifndef __ASSEMBLY__ | ||
26 | #define OMAP242X_CTRL_REGADDR(reg) \ | ||
27 | OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) | ||
28 | #define OMAP243X_CTRL_REGADDR(reg) \ | ||
29 | OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | ||
30 | #define OMAP343X_CTRL_REGADDR(reg) \ | ||
31 | OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | ||
32 | #else | ||
33 | #define OMAP242X_CTRL_REGADDR(reg) \ | ||
34 | OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) | ||
35 | #define OMAP243X_CTRL_REGADDR(reg) \ | ||
36 | OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | ||
37 | #define OMAP343X_CTRL_REGADDR(reg) \ | ||
38 | OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | ||
39 | #endif /* __ASSEMBLY__ */ | ||
40 | |||
41 | /* | ||
42 | * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for | ||
43 | * OMAP24XX and OMAP34XX. | ||
44 | */ | ||
45 | |||
46 | /* Control submodule offsets */ | ||
47 | |||
48 | #define OMAP2_CONTROL_INTERFACE 0x000 | ||
49 | #define OMAP2_CONTROL_PADCONFS 0x030 | ||
50 | #define OMAP2_CONTROL_GENERAL 0x270 | ||
51 | #define OMAP343X_CONTROL_MEM_WKUP 0x600 | ||
52 | #define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 | ||
53 | #define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 | ||
54 | |||
55 | /* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ | ||
56 | |||
57 | #define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) | ||
58 | |||
59 | /* CONTROL_GENERAL register offsets common to OMAP2 & 3 */ | ||
60 | #define OMAP2_CONTROL_DEVCONF0 (OMAP2_CONTROL_GENERAL + 0x0004) | ||
61 | #define OMAP2_CONTROL_MSUSPENDMUX_0 (OMAP2_CONTROL_GENERAL + 0x0020) | ||
62 | #define OMAP2_CONTROL_MSUSPENDMUX_1 (OMAP2_CONTROL_GENERAL + 0x0024) | ||
63 | #define OMAP2_CONTROL_MSUSPENDMUX_2 (OMAP2_CONTROL_GENERAL + 0x0028) | ||
64 | #define OMAP2_CONTROL_MSUSPENDMUX_3 (OMAP2_CONTROL_GENERAL + 0x002c) | ||
65 | #define OMAP2_CONTROL_MSUSPENDMUX_4 (OMAP2_CONTROL_GENERAL + 0x0030) | ||
66 | #define OMAP2_CONTROL_MSUSPENDMUX_5 (OMAP2_CONTROL_GENERAL + 0x0034) | ||
67 | #define OMAP2_CONTROL_SEC_CTRL (OMAP2_CONTROL_GENERAL + 0x0040) | ||
68 | #define OMAP2_CONTROL_RPUB_KEY_H_0 (OMAP2_CONTROL_GENERAL + 0x0090) | ||
69 | #define OMAP2_CONTROL_RPUB_KEY_H_1 (OMAP2_CONTROL_GENERAL + 0x0094) | ||
70 | #define OMAP2_CONTROL_RPUB_KEY_H_2 (OMAP2_CONTROL_GENERAL + 0x0098) | ||
71 | #define OMAP2_CONTROL_RPUB_KEY_H_3 (OMAP2_CONTROL_GENERAL + 0x009c) | ||
72 | |||
73 | /* 242x-only CONTROL_GENERAL register offsets */ | ||
74 | #define OMAP242X_CONTROL_DEVCONF OMAP2_CONTROL_DEVCONF0 /* match TRM */ | ||
75 | #define OMAP242X_CONTROL_OCM_RAM_PERM (OMAP2_CONTROL_GENERAL + 0x0068) | ||
76 | |||
77 | /* 243x-only CONTROL_GENERAL register offsets */ | ||
78 | /* CONTROL_IVA2_BOOT{ADDR,MOD} are at the same place on 343x - noted below */ | ||
79 | #define OMAP243X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0078) | ||
80 | #define OMAP243X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x007c) | ||
81 | #define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | ||
82 | #define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | ||
83 | #define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198) | ||
84 | #define OMAP243X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x0230) | ||
85 | |||
86 | /* 24xx-only CONTROL_GENERAL register offsets */ | ||
87 | #define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000) | ||
88 | #define OMAP24XX_CONTROL_EMU_SUPPORT (OMAP2_CONTROL_GENERAL + 0x0008) | ||
89 | #define OMAP24XX_CONTROL_SEC_TEST (OMAP2_CONTROL_GENERAL + 0x0044) | ||
90 | #define OMAP24XX_CONTROL_PSA_CTRL (OMAP2_CONTROL_GENERAL + 0x0048) | ||
91 | #define OMAP24XX_CONTROL_PSA_CMD (OMAP2_CONTROL_GENERAL + 0x004c) | ||
92 | #define OMAP24XX_CONTROL_PSA_VALUE (OMAP2_CONTROL_GENERAL + 0x0050) | ||
93 | #define OMAP24XX_CONTROL_SEC_EMU (OMAP2_CONTROL_GENERAL + 0x0060) | ||
94 | #define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064) | ||
95 | #define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c) | ||
96 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070) | ||
97 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074) | ||
98 | #define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) | ||
99 | #define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) | ||
100 | #define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088) | ||
101 | #define OMAP24XX_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x008c) | ||
102 | #define OMAP24XX_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a0) | ||
103 | #define OMAP24XX_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00a4) | ||
104 | #define OMAP24XX_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00a8) | ||
105 | #define OMAP24XX_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00ac) | ||
106 | #define OMAP24XX_CONTROL_CUST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00b0) | ||
107 | #define OMAP24XX_CONTROL_CUST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00b4) | ||
108 | #define OMAP24XX_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c0) | ||
109 | #define OMAP24XX_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00c4) | ||
110 | #define OMAP24XX_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00c8) | ||
111 | #define OMAP24XX_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00cc) | ||
112 | #define OMAP24XX_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d0) | ||
113 | #define OMAP24XX_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00d4) | ||
114 | #define OMAP24XX_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00d8) | ||
115 | #define OMAP24XX_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00dc) | ||
116 | #define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0) | ||
117 | #define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4) | ||
118 | |||
119 | #define OMAP343X_CONTROL_PADCONF_SYSNIRQ (OMAP2_CONTROL_INTERFACE + 0x01b0) | ||
120 | |||
121 | /* 34xx-only CONTROL_GENERAL register offsets */ | ||
122 | #define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000) | ||
123 | #define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008) | ||
124 | #define OMAP343X_CONTROL_MEM_DFTRW1 (OMAP2_CONTROL_GENERAL + 0x000c) | ||
125 | #define OMAP343X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0068) | ||
126 | #define OMAP343X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x006c) | ||
127 | #define OMAP343X_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0070) | ||
128 | #define OMAP343X_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0074) | ||
129 | #define OMAP343X_CONTROL_SEC_ERR_STATUS_DEBUG (OMAP2_CONTROL_GENERAL + 0x0078) | ||
130 | #define OMAP343X_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) | ||
131 | #define OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) | ||
132 | #define OMAP343X_CONTROL_RPUB_KEY_H_4 (OMAP2_CONTROL_GENERAL + 0x00a0) | ||
133 | #define OMAP343X_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a8) | ||
134 | #define OMAP343X_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00ac) | ||
135 | #define OMAP343X_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00b0) | ||
136 | #define OMAP343X_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00b4) | ||
137 | #define OMAP343X_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c8) | ||
138 | #define OMAP343X_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00cc) | ||
139 | #define OMAP343X_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00d0) | ||
140 | #define OMAP343X_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00d4) | ||
141 | #define OMAP343X_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d8) | ||
142 | #define OMAP343X_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00dc) | ||
143 | #define OMAP343X_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00e0) | ||
144 | #define OMAP343X_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00e4) | ||
145 | #define OMAP343X_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e8) | ||
146 | #define OMAP343X_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00ec) | ||
147 | #define OMAP343X_CONTROL_TEST_KEY_10 (OMAP2_CONTROL_GENERAL + 0x00f0) | ||
148 | #define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4) | ||
149 | #define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8) | ||
150 | #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) | ||
151 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | ||
152 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | ||
153 | #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ | ||
154 | + ((i) >> 1) * 4 + (!((i) & 1)) * 2) | ||
155 | #define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4) | ||
156 | #define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8) | ||
157 | #define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0) | ||
158 | #define OMAP343X_CONTROL_CORE_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E4) | ||
159 | #define OMAP343X_CONTROL_PER_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E8) | ||
160 | #define OMAP343X_CONTROL_USBHOST_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01EC) | ||
161 | #define OMAP343X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x02B0) | ||
162 | #define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02B4) | ||
163 | #define OMAP343X_CONTROL_SRAMLDO4 (OMAP2_CONTROL_GENERAL + 0x02B8) | ||
164 | #define OMAP343X_CONTROL_SRAMLDO5 (OMAP2_CONTROL_GENERAL + 0x02C0) | ||
165 | #define OMAP343X_CONTROL_CSI (OMAP2_CONTROL_GENERAL + 0x02C4) | ||
166 | |||
167 | /* AM35XX only CONTROL_GENERAL register offsets */ | ||
168 | #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038) | ||
169 | #define AM35XX_CONTROL_DEVCONF2 (OMAP2_CONTROL_GENERAL + 0x0310) | ||
170 | #define AM35XX_CONTROL_DEVCONF3 (OMAP2_CONTROL_GENERAL + 0x0314) | ||
171 | #define AM35XX_CONTROL_CBA_PRIORITY (OMAP2_CONTROL_GENERAL + 0x0320) | ||
172 | #define AM35XX_CONTROL_LVL_INTR_CLEAR (OMAP2_CONTROL_GENERAL + 0x0324) | ||
173 | #define AM35XX_CONTROL_IP_SW_RESET (OMAP2_CONTROL_GENERAL + 0x0328) | ||
174 | #define AM35XX_CONTROL_IPSS_CLK_CTRL (OMAP2_CONTROL_GENERAL + 0x032C) | ||
175 | |||
176 | /* 34xx PADCONF register offsets */ | ||
177 | #define OMAP343X_PADCONF_ETK(i) (OMAP2_CONTROL_PADCONFS + 0x5a8 + \ | ||
178 | (i)*2) | ||
179 | #define OMAP343X_PADCONF_ETK_CLK OMAP343X_PADCONF_ETK(0) | ||
180 | #define OMAP343X_PADCONF_ETK_CTL OMAP343X_PADCONF_ETK(1) | ||
181 | #define OMAP343X_PADCONF_ETK_D0 OMAP343X_PADCONF_ETK(2) | ||
182 | #define OMAP343X_PADCONF_ETK_D1 OMAP343X_PADCONF_ETK(3) | ||
183 | #define OMAP343X_PADCONF_ETK_D2 OMAP343X_PADCONF_ETK(4) | ||
184 | #define OMAP343X_PADCONF_ETK_D3 OMAP343X_PADCONF_ETK(5) | ||
185 | #define OMAP343X_PADCONF_ETK_D4 OMAP343X_PADCONF_ETK(6) | ||
186 | #define OMAP343X_PADCONF_ETK_D5 OMAP343X_PADCONF_ETK(7) | ||
187 | #define OMAP343X_PADCONF_ETK_D6 OMAP343X_PADCONF_ETK(8) | ||
188 | #define OMAP343X_PADCONF_ETK_D7 OMAP343X_PADCONF_ETK(9) | ||
189 | #define OMAP343X_PADCONF_ETK_D8 OMAP343X_PADCONF_ETK(10) | ||
190 | #define OMAP343X_PADCONF_ETK_D9 OMAP343X_PADCONF_ETK(11) | ||
191 | #define OMAP343X_PADCONF_ETK_D10 OMAP343X_PADCONF_ETK(12) | ||
192 | #define OMAP343X_PADCONF_ETK_D11 OMAP343X_PADCONF_ETK(13) | ||
193 | #define OMAP343X_PADCONF_ETK_D12 OMAP343X_PADCONF_ETK(14) | ||
194 | #define OMAP343X_PADCONF_ETK_D13 OMAP343X_PADCONF_ETK(15) | ||
195 | #define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16) | ||
196 | #define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17) | ||
197 | |||
198 | /* 34xx GENERAL_WKUP regist offsets */ | ||
199 | #define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \ | ||
200 | 0x008 + (i)) | ||
201 | #define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008) | ||
202 | #define OMAP343X_CONTROL_WKUP_DEBOBS1 (OMAP343X_CONTROL_GENERAL_WKUP + 0x00C) | ||
203 | #define OMAP343X_CONTROL_WKUP_DEBOBS2 (OMAP343X_CONTROL_GENERAL_WKUP + 0x010) | ||
204 | #define OMAP343X_CONTROL_WKUP_DEBOBS3 (OMAP343X_CONTROL_GENERAL_WKUP + 0x014) | ||
205 | #define OMAP343X_CONTROL_WKUP_DEBOBS4 (OMAP343X_CONTROL_GENERAL_WKUP + 0x018) | ||
206 | |||
207 | /* 34xx D2D idle-related pins, handled by PM core */ | ||
208 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 | ||
209 | #define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 | ||
210 | |||
211 | /* | ||
212 | * REVISIT: This list of registers is not comprehensive - there are more | ||
213 | * that should be added. | ||
214 | */ | ||
215 | |||
216 | /* | ||
217 | * Control module register bit defines - these should eventually go into | ||
218 | * their own regbits file. Some of these will be complicated, depending | ||
219 | * on the device type (general-purpose, emulator, test, secure, bad, other) | ||
220 | * and the security mode (secure, non-secure, don't care) | ||
221 | */ | ||
222 | /* CONTROL_DEVCONF0 bits */ | ||
223 | #define OMAP2_MMCSDIO1ADPCLKISEL (1 << 24) /* MMC1 loop back clock */ | ||
224 | #define OMAP24XX_USBSTANDBYCTRL (1 << 15) | ||
225 | #define OMAP2_MCBSP2_CLKS_MASK (1 << 6) | ||
226 | #define OMAP2_MCBSP1_FSR_MASK (1 << 4) | ||
227 | #define OMAP2_MCBSP1_CLKR_MASK (1 << 3) | ||
228 | #define OMAP2_MCBSP1_CLKS_MASK (1 << 2) | ||
229 | |||
230 | /* CONTROL_DEVCONF1 bits */ | ||
231 | #define OMAP243X_MMC1_ACTIVE_OVERWRITE (1 << 31) | ||
232 | #define OMAP2_MMCSDIO2ADPCLKISEL (1 << 6) /* MMC2 loop back clock */ | ||
233 | #define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */ | ||
234 | #define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */ | ||
235 | #define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */ | ||
236 | |||
237 | /* CONTROL_STATUS bits */ | ||
238 | #define OMAP2_DEVICETYPE_MASK (0x7 << 8) | ||
239 | #define OMAP2_SYSBOOT_5_MASK (1 << 5) | ||
240 | #define OMAP2_SYSBOOT_4_MASK (1 << 4) | ||
241 | #define OMAP2_SYSBOOT_3_MASK (1 << 3) | ||
242 | #define OMAP2_SYSBOOT_2_MASK (1 << 2) | ||
243 | #define OMAP2_SYSBOOT_1_MASK (1 << 1) | ||
244 | #define OMAP2_SYSBOOT_0_MASK (1 << 0) | ||
245 | |||
246 | /* CONTROL_PBIAS_LITE bits */ | ||
247 | #define OMAP343X_PBIASLITESUPPLY_HIGH1 (1 << 15) | ||
248 | #define OMAP343X_PBIASLITEVMODEERROR1 (1 << 11) | ||
249 | #define OMAP343X_PBIASSPEEDCTRL1 (1 << 10) | ||
250 | #define OMAP343X_PBIASLITEPWRDNZ1 (1 << 9) | ||
251 | #define OMAP343X_PBIASLITEVMODE1 (1 << 8) | ||
252 | #define OMAP343X_PBIASLITESUPPLY_HIGH0 (1 << 7) | ||
253 | #define OMAP343X_PBIASLITEVMODEERROR0 (1 << 3) | ||
254 | #define OMAP2_PBIASSPEEDCTRL0 (1 << 2) | ||
255 | #define OMAP2_PBIASLITEPWRDNZ0 (1 << 1) | ||
256 | #define OMAP2_PBIASLITEVMODE0 (1 << 0) | ||
257 | |||
258 | /* CONTROL_PROG_IO1 bits */ | ||
259 | #define OMAP3630_PRG_SDMMC1_SPEEDCTRL (1 << 20) | ||
260 | |||
261 | /* CONTROL_IVA2_BOOTMOD bits */ | ||
262 | #define OMAP3_IVA2_BOOTMOD_SHIFT 0 | ||
263 | #define OMAP3_IVA2_BOOTMOD_MASK (0xf << 0) | ||
264 | #define OMAP3_IVA2_BOOTMOD_IDLE (0x1 << 0) | ||
265 | |||
266 | /* CONTROL_PADCONF_X bits */ | ||
267 | #define OMAP3_PADCONF_WAKEUPEVENT0 (1 << 15) | ||
268 | #define OMAP3_PADCONF_WAKEUPENABLE0 (1 << 14) | ||
269 | |||
270 | #define OMAP343X_SCRATCHPAD_ROM (OMAP343X_CTRL_BASE + 0x860) | ||
271 | #define OMAP343X_SCRATCHPAD (OMAP343X_CTRL_BASE + 0x910) | ||
272 | #define OMAP343X_SCRATCHPAD_ROM_OFFSET 0x19C | ||
273 | |||
274 | /* AM35XX_CONTROL_IPSS_CLK_CTRL bits */ | ||
275 | #define AM35XX_USBOTG_VBUSP_CLK_SHIFT 0 | ||
276 | #define AM35XX_CPGMAC_VBUSP_CLK_SHIFT 1 | ||
277 | #define AM35XX_VPFE_VBUSP_CLK_SHIFT 2 | ||
278 | #define AM35XX_HECC_VBUSP_CLK_SHIFT 3 | ||
279 | #define AM35XX_USBOTG_FCLK_SHIFT 8 | ||
280 | #define AM35XX_CPGMAC_FCLK_SHIFT 9 | ||
281 | #define AM35XX_VPFE_FCLK_SHIFT 10 | ||
282 | |||
283 | /*AM35XX CONTROL_LVL_INTR_CLEAR bits*/ | ||
284 | #define AM35XX_CPGMAC_C0_MISC_PULSE_CLR BIT(0) | ||
285 | #define AM35XX_CPGMAC_C0_RX_PULSE_CLR BIT(1) | ||
286 | #define AM35XX_CPGMAC_C0_RX_THRESH_CLR BIT(2) | ||
287 | #define AM35XX_CPGMAC_C0_TX_PULSE_CLR BIT(3) | ||
288 | #define AM35XX_USBOTGSS_INT_CLR BIT(4) | ||
289 | #define AM35XX_VPFE_CCDC_VD0_INT_CLR BIT(5) | ||
290 | #define AM35XX_VPFE_CCDC_VD1_INT_CLR BIT(6) | ||
291 | #define AM35XX_VPFE_CCDC_VD2_INT_CLR BIT(7) | ||
292 | |||
293 | /*AM35XX CONTROL_IP_SW_RESET bits*/ | ||
294 | #define AM35XX_USBOTGSS_SW_RST BIT(0) | ||
295 | #define AM35XX_CPGMACSS_SW_RST BIT(1) | ||
296 | #define AM35XX_VPFE_VBUSP_SW_RST BIT(2) | ||
297 | #define AM35XX_HECC_SW_RST BIT(3) | ||
298 | #define AM35XX_VPFE_PCLK_SW_RST BIT(4) | ||
299 | |||
300 | /* | ||
301 | * CONTROL OMAP STATUS register to identify OMAP3 features | ||
302 | */ | ||
303 | #define OMAP3_CONTROL_OMAP_STATUS 0x044c | ||
304 | |||
305 | #define OMAP3_SGX_SHIFT 13 | ||
306 | #define OMAP3_SGX_MASK (3 << OMAP3_SGX_SHIFT) | ||
307 | #define FEAT_SGX_FULL 0 | ||
308 | #define FEAT_SGX_HALF 1 | ||
309 | #define FEAT_SGX_NONE 2 | ||
310 | |||
311 | #define OMAP3_IVA_SHIFT 12 | ||
312 | #define OMAP3_IVA_MASK (1 << OMAP3_SGX_SHIFT) | ||
313 | #define FEAT_IVA 0 | ||
314 | #define FEAT_IVA_NONE 1 | ||
315 | |||
316 | #define OMAP3_L2CACHE_SHIFT 10 | ||
317 | #define OMAP3_L2CACHE_MASK (3 << OMAP3_L2CACHE_SHIFT) | ||
318 | #define FEAT_L2CACHE_NONE 0 | ||
319 | #define FEAT_L2CACHE_64KB 1 | ||
320 | #define FEAT_L2CACHE_128KB 2 | ||
321 | #define FEAT_L2CACHE_256KB 3 | ||
322 | |||
323 | #define OMAP3_ISP_SHIFT 5 | ||
324 | #define OMAP3_ISP_MASK (1 << OMAP3_ISP_SHIFT) | ||
325 | #define FEAT_ISP 0 | ||
326 | #define FEAT_ISP_NONE 1 | ||
327 | |||
328 | #define OMAP3_NEON_SHIFT 4 | ||
329 | #define OMAP3_NEON_MASK (1 << OMAP3_NEON_SHIFT) | ||
330 | #define FEAT_NEON 0 | ||
331 | #define FEAT_NEON_NONE 1 | ||
332 | |||
333 | |||
334 | #ifndef __ASSEMBLY__ | ||
335 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
336 | extern void __iomem *omap_ctrl_base_get(void); | ||
337 | extern u8 omap_ctrl_readb(u16 offset); | ||
338 | extern u16 omap_ctrl_readw(u16 offset); | ||
339 | extern u32 omap_ctrl_readl(u16 offset); | ||
340 | extern u32 omap4_ctrl_pad_readl(u16 offset); | ||
341 | extern void omap_ctrl_writeb(u8 val, u16 offset); | ||
342 | extern void omap_ctrl_writew(u16 val, u16 offset); | ||
343 | extern void omap_ctrl_writel(u32 val, u16 offset); | ||
344 | extern void omap4_ctrl_pad_writel(u32 val, u16 offset); | ||
345 | |||
346 | extern void omap3_save_scratchpad_contents(void); | ||
347 | extern void omap3_clear_scratchpad_contents(void); | ||
348 | extern u32 *get_restore_pointer(void); | ||
349 | extern u32 *get_es3_restore_pointer(void); | ||
350 | extern u32 omap3_arm_context[128]; | ||
351 | extern void omap3_control_save_context(void); | ||
352 | extern void omap3_control_restore_context(void); | ||
353 | |||
354 | #else | ||
355 | #define omap_ctrl_base_get() 0 | ||
356 | #define omap_ctrl_readb(x) 0 | ||
357 | #define omap_ctrl_readw(x) 0 | ||
358 | #define omap_ctrl_readl(x) 0 | ||
359 | #define omap4_ctrl_pad_readl(x) 0 | ||
360 | #define omap_ctrl_writeb(x, y) WARN_ON(1) | ||
361 | #define omap_ctrl_writew(x, y) WARN_ON(1) | ||
362 | #define omap_ctrl_writel(x, y) WARN_ON(1) | ||
363 | #define omap4_ctrl_pad_writel(x, y) WARN_ON(1) | ||
364 | #endif | ||
365 | #endif /* __ASSEMBLY__ */ | ||
366 | |||
367 | #endif /* __ARCH_ARM_MACH_OMAP2_CONTROL_H */ | ||
368 | |||
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 703b5ec88e98..0d50b45d041c 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -29,10 +29,10 @@ | |||
29 | #include <plat/irqs.h> | 29 | #include <plat/irqs.h> |
30 | #include <plat/powerdomain.h> | 30 | #include <plat/powerdomain.h> |
31 | #include <plat/clockdomain.h> | 31 | #include <plat/clockdomain.h> |
32 | #include <plat/control.h> | ||
33 | #include <plat/serial.h> | 32 | #include <plat/serial.h> |
34 | 33 | ||
35 | #include "pm.h" | 34 | #include "pm.h" |
35 | #include "control.h" | ||
36 | 36 | ||
37 | #ifdef CONFIG_CPU_IDLE | 37 | #ifdef CONFIG_CPU_IDLE |
38 | 38 | ||
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 818452ac905d..eaf37994403b 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * (at your option) any later version. | 9 | * (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
@@ -23,7 +22,6 @@ | |||
23 | #include <asm/mach/map.h> | 22 | #include <asm/mach/map.h> |
24 | #include <asm/pmu.h> | 23 | #include <asm/pmu.h> |
25 | 24 | ||
26 | #include <plat/control.h> | ||
27 | #include <plat/tc.h> | 25 | #include <plat/tc.h> |
28 | #include <plat/board.h> | 26 | #include <plat/board.h> |
29 | #include <mach/gpio.h> | 27 | #include <mach/gpio.h> |
@@ -33,6 +31,7 @@ | |||
33 | #include <plat/omap_device.h> | 31 | #include <plat/omap_device.h> |
34 | 32 | ||
35 | #include "mux.h" | 33 | #include "mux.h" |
34 | #include "control.h" | ||
36 | 35 | ||
37 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) | 36 | #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE) |
38 | 37 | ||
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index ab78a5a8d9b0..34272e4863fd 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -14,11 +14,11 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
17 | #include <plat/control.h> | ||
18 | #include <plat/mmc.h> | 17 | #include <plat/mmc.h> |
19 | #include <plat/omap-pm.h> | 18 | #include <plat/omap-pm.h> |
20 | 19 | ||
21 | #include "hsmmc.h" | 20 | #include "hsmmc.h" |
21 | #include "control.h" | ||
22 | 22 | ||
23 | #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | 23 | #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) |
24 | 24 | ||
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 04a2fa240bc3..5f9086c65e48 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -22,11 +22,12 @@ | |||
22 | #include <asm/cputype.h> | 22 | #include <asm/cputype.h> |
23 | 23 | ||
24 | #include <plat/common.h> | 24 | #include <plat/common.h> |
25 | #include <plat/control.h> | ||
26 | #include <plat/cpu.h> | 25 | #include <plat/cpu.h> |
27 | 26 | ||
28 | #include <mach/id.h> | 27 | #include <mach/id.h> |
29 | 28 | ||
29 | #include "control.h" | ||
30 | |||
30 | static struct omap_chip_id omap_chip; | 31 | static struct omap_chip_id omap_chip; |
31 | static unsigned int omap_revision; | 32 | static unsigned int omap_revision; |
32 | 33 | ||
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 88b8790e4fec..f9c9df5b5ff1 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -23,6 +23,86 @@ | |||
23 | #include <plat/cpu.h> | 23 | #include <plat/cpu.h> |
24 | #include <plat/mcbsp.h> | 24 | #include <plat/mcbsp.h> |
25 | 25 | ||
26 | #include "control.h" | ||
27 | |||
28 | |||
29 | /* McBSP internal signal muxing functions */ | ||
30 | |||
31 | void omap2_mcbsp1_mux_clkr_src(u8 mux) | ||
32 | { | ||
33 | u32 v; | ||
34 | |||
35 | v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
36 | if (mux == CLKR_SRC_CLKR) | ||
37 | v &= ~OMAP2_MCBSP1_CLKR_MASK; | ||
38 | else if (mux == CLKR_SRC_CLKX) | ||
39 | v |= OMAP2_MCBSP1_CLKR_MASK; | ||
40 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
41 | } | ||
42 | EXPORT_SYMBOL(omap2_mcbsp1_mux_clkr_src); | ||
43 | |||
44 | void omap2_mcbsp1_mux_fsr_src(u8 mux) | ||
45 | { | ||
46 | u32 v; | ||
47 | |||
48 | v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
49 | if (mux == FSR_SRC_FSR) | ||
50 | v &= ~OMAP2_MCBSP1_FSR_MASK; | ||
51 | else if (mux == FSR_SRC_FSX) | ||
52 | v |= OMAP2_MCBSP1_FSR_MASK; | ||
53 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
54 | } | ||
55 | EXPORT_SYMBOL(omap2_mcbsp1_mux_fsr_src); | ||
56 | |||
57 | /* McBSP CLKS source switching function */ | ||
58 | |||
59 | int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id) | ||
60 | { | ||
61 | struct omap_mcbsp *mcbsp; | ||
62 | struct clk *fck_src; | ||
63 | char *fck_src_name; | ||
64 | int r; | ||
65 | |||
66 | if (!omap_mcbsp_check_valid_id(id)) { | ||
67 | pr_err("%s: Invalid id (%d)\n", __func__, id + 1); | ||
68 | return -EINVAL; | ||
69 | } | ||
70 | mcbsp = id_to_mcbsp_ptr(id); | ||
71 | |||
72 | if (fck_src_id == MCBSP_CLKS_PAD_SRC) | ||
73 | fck_src_name = "pad_fck"; | ||
74 | else if (fck_src_id == MCBSP_CLKS_PRCM_SRC) | ||
75 | fck_src_name = "prcm_fck"; | ||
76 | else | ||
77 | return -EINVAL; | ||
78 | |||
79 | fck_src = clk_get(mcbsp->dev, fck_src_name); | ||
80 | if (IS_ERR_OR_NULL(fck_src)) { | ||
81 | pr_err("omap-mcbsp: %s: could not clk_get() %s\n", "clks", | ||
82 | fck_src_name); | ||
83 | return -EINVAL; | ||
84 | } | ||
85 | |||
86 | clk_disable(mcbsp->fclk); | ||
87 | |||
88 | r = clk_set_parent(mcbsp->fclk, fck_src); | ||
89 | if (IS_ERR_VALUE(r)) { | ||
90 | pr_err("omap-mcbsp: %s: could not clk_set_parent() to %s\n", | ||
91 | "clks", fck_src_name); | ||
92 | clk_put(fck_src); | ||
93 | return -EINVAL; | ||
94 | } | ||
95 | |||
96 | clk_enable(mcbsp->fclk); | ||
97 | |||
98 | clk_put(fck_src); | ||
99 | |||
100 | return 0; | ||
101 | } | ||
102 | EXPORT_SYMBOL(omap2_mcbsp_set_clks_src); | ||
103 | |||
104 | |||
105 | /* Platform data */ | ||
26 | 106 | ||
27 | #ifdef CONFIG_ARCH_OMAP2420 | 107 | #ifdef CONFIG_ARCH_OMAP2420 |
28 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | 108 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index e33740c091be..074536ae401f 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -23,12 +23,11 @@ | |||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 | * | 24 | * |
25 | */ | 25 | */ |
26 | #include <linux/module.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/slab.h> | ||
30 | #include <linux/spinlock.h> | ||
31 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/slab.h> | ||
32 | #include <linux/ctype.h> | 31 | #include <linux/ctype.h> |
33 | #include <linux/debugfs.h> | 32 | #include <linux/debugfs.h> |
34 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
@@ -36,8 +35,7 @@ | |||
36 | 35 | ||
37 | #include <asm/system.h> | 36 | #include <asm/system.h> |
38 | 37 | ||
39 | #include <plat/control.h> | 38 | #include "control.h" |
40 | |||
41 | #include "mux.h" | 39 | #include "mux.h" |
42 | 40 | ||
43 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ | 41 | #define OMAP_MUX_BASE_OFFSET 0x30 /* Offset from CTRL_BASE */ |
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index f5c7ef955942..a40457d81927 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <mach/irqs.h> | 38 | #include <mach/irqs.h> |
39 | #include <plat/clock.h> | 39 | #include <plat/clock.h> |
40 | #include <plat/sram.h> | 40 | #include <plat/sram.h> |
41 | #include <plat/control.h> | ||
42 | #include <plat/dma.h> | 41 | #include <plat/dma.h> |
43 | #include <plat/board.h> | 42 | #include <plat/board.h> |
44 | 43 | ||
@@ -48,6 +47,7 @@ | |||
48 | #include "cm-regbits-24xx.h" | 47 | #include "cm-regbits-24xx.h" |
49 | #include "sdrc.h" | 48 | #include "sdrc.h" |
50 | #include "pm.h" | 49 | #include "pm.h" |
50 | #include "control.h" | ||
51 | 51 | ||
52 | #include <plat/powerdomain.h> | 52 | #include <plat/powerdomain.h> |
53 | #include <plat/clockdomain.h> | 53 | #include <plat/clockdomain.h> |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index e57c9aeeefe0..8c8f1acd3526 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <plat/sram.h> | 32 | #include <plat/sram.h> |
33 | #include <plat/clockdomain.h> | 33 | #include <plat/clockdomain.h> |
34 | #include <plat/powerdomain.h> | 34 | #include <plat/powerdomain.h> |
35 | #include <plat/control.h> | ||
36 | #include <plat/serial.h> | 35 | #include <plat/serial.h> |
37 | #include <plat/sdrc.h> | 36 | #include <plat/sdrc.h> |
38 | #include <plat/prcm.h> | 37 | #include <plat/prcm.h> |
@@ -48,6 +47,7 @@ | |||
48 | #include "prm.h" | 47 | #include "prm.h" |
49 | #include "pm.h" | 48 | #include "pm.h" |
50 | #include "sdrc.h" | 49 | #include "sdrc.h" |
50 | #include "control.h" | ||
51 | 51 | ||
52 | /* Scratchpad offsets */ | 52 | /* Scratchpad offsets */ |
53 | #define OMAP343X_TABLE_ADDRESS_OFFSET 0x31 | 53 | #define OMAP343X_TABLE_ADDRESS_OFFSET 0x31 |
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index a48a1e24f42b..a51846e3a6fa 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <plat/common.h> | 26 | #include <plat/common.h> |
27 | #include <plat/prcm.h> | 27 | #include <plat/prcm.h> |
28 | #include <plat/irqs.h> | 28 | #include <plat/irqs.h> |
29 | #include <plat/control.h> | ||
30 | 29 | ||
31 | #include "clock.h" | 30 | #include "clock.h" |
32 | #include "clock2xxx.h" | 31 | #include "clock2xxx.h" |
@@ -34,6 +33,7 @@ | |||
34 | #include "prm.h" | 33 | #include "prm.h" |
35 | #include "prm-regbits-24xx.h" | 34 | #include "prm-regbits-24xx.h" |
36 | #include "prm-regbits-44xx.h" | 35 | #include "prm-regbits-44xx.h" |
36 | #include "control.h" | ||
37 | 37 | ||
38 | static void __iomem *prm_base; | 38 | static void __iomem *prm_base; |
39 | static void __iomem *cm_base; | 39 | static void __iomem *cm_base; |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 0bcc9df0c034..338e46a844a4 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <plat/common.h> | 35 | #include <plat/common.h> |
36 | #include <plat/board.h> | 36 | #include <plat/board.h> |
37 | #include <plat/clock.h> | 37 | #include <plat/clock.h> |
38 | #include <plat/control.h> | ||
39 | #include <plat/dma.h> | 38 | #include <plat/dma.h> |
40 | #include <plat/omap_hwmod.h> | 39 | #include <plat/omap_hwmod.h> |
41 | #include <plat/omap_device.h> | 40 | #include <plat/omap_device.h> |
@@ -44,6 +43,7 @@ | |||
44 | #include "pm.h" | 43 | #include "pm.h" |
45 | #include "cm.h" | 44 | #include "cm.h" |
46 | #include "prm-regbits-34xx.h" | 45 | #include "prm-regbits-34xx.h" |
46 | #include "control.h" | ||
47 | 47 | ||
48 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 | 48 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 |
49 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | 49 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ |
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index ba53191ae4c5..2fb205a7f285 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
@@ -27,11 +27,11 @@ | |||
27 | #include <linux/linkage.h> | 27 | #include <linux/linkage.h> |
28 | #include <asm/assembler.h> | 28 | #include <asm/assembler.h> |
29 | #include <mach/io.h> | 29 | #include <mach/io.h> |
30 | #include <plat/control.h> | ||
31 | 30 | ||
32 | #include "cm.h" | 31 | #include "cm.h" |
33 | #include "prm.h" | 32 | #include "prm.h" |
34 | #include "sdrc.h" | 33 | #include "sdrc.h" |
34 | #include "control.h" | ||
35 | 35 | ||
36 | #define SDRC_SCRATCHPAD_SEM_V 0xfa00291c | 36 | #define SDRC_SCRATCHPAD_SEM_V 0xfa00291c |
37 | 37 | ||
diff --git a/arch/arm/mach-omap2/usb-fs.c b/arch/arm/mach-omap2/usb-fs.c index a216d88b04b5..1481078763b8 100644 --- a/arch/arm/mach-omap2/usb-fs.c +++ b/arch/arm/mach-omap2/usb-fs.c | |||
@@ -29,18 +29,18 @@ | |||
29 | 29 | ||
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
31 | 31 | ||
32 | #include <plat/control.h> | ||
33 | #include <plat/usb.h> | 32 | #include <plat/usb.h> |
34 | #include <plat/board.h> | 33 | #include <plat/board.h> |
35 | 34 | ||
35 | #include "control.h" | ||
36 | #include "mux.h" | ||
37 | |||
36 | #define INT_USB_IRQ_GEN INT_24XX_USB_IRQ_GEN | 38 | #define INT_USB_IRQ_GEN INT_24XX_USB_IRQ_GEN |
37 | #define INT_USB_IRQ_NISO INT_24XX_USB_IRQ_NISO | 39 | #define INT_USB_IRQ_NISO INT_24XX_USB_IRQ_NISO |
38 | #define INT_USB_IRQ_ISO INT_24XX_USB_IRQ_ISO | 40 | #define INT_USB_IRQ_ISO INT_24XX_USB_IRQ_ISO |
39 | #define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN | 41 | #define INT_USB_IRQ_HGEN INT_24XX_USB_IRQ_HGEN |
40 | #define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG | 42 | #define INT_USB_IRQ_OTG INT_24XX_USB_IRQ_OTG |
41 | 43 | ||
42 | #include "mux.h" | ||
43 | |||
44 | #if defined(CONFIG_ARCH_OMAP2) | 44 | #if defined(CONFIG_ARCH_OMAP2) |
45 | 45 | ||
46 | #ifdef CONFIG_USB_GADGET_OMAP | 46 | #ifdef CONFIG_USB_GADGET_OMAP |