aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-01-23 05:26:46 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-08 12:50:19 -0500
commitb820ce4e6736ddad7ccda528e10aaf37ad3f13f9 (patch)
tree173ca76cff521df77256564ee3905ccd0928f10f /arch/arm/mach-omap2
parent1b5715ec471d1def9722e22b6cb1d24841b5e290 (diff)
[ARM] omap: mcbsp: convert to use fck/ick clocks directly
Rather than introducing a special 'mcbsp_clk' with code behind it in mach-omap*/mcbsp.c to handle the SoC specifics, arrange for the mcbsp driver to be like any other driver. mcbsp requests its fck and ick clocks directly, and the SoC specific code deals with selecting the correct clock. There is one oddity to deal with - OMAP1 fiddles with the DSP clocks and DSP reset, so we move this to the two callback functions. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/clock24xx.c20
-rw-r--r--arch/arm/mach-omap2/clock34xx.c20
-rw-r--r--arch/arm/mach-omap2/mcbsp.c26
3 files changed, 20 insertions, 46 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index ac038035c1c9..ea21d55a2075 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -139,16 +139,16 @@ static struct omap_clk omap24xx_clks[] = {
139 CLK(NULL, "gpt11_fck", &gpt11_fck, CK_243X | CK_242X), 139 CLK(NULL, "gpt11_fck", &gpt11_fck, CK_243X | CK_242X),
140 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X | CK_242X), 140 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X | CK_242X),
141 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X | CK_242X), 141 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X | CK_242X),
142 CLK("omap-mcbsp.1", "mcbsp_ick", &mcbsp1_ick, CK_243X | CK_242X), 142 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X | CK_242X),
143 CLK("omap-mcbsp.1", "mcbsp_fck", &mcbsp1_fck, CK_243X | CK_242X), 143 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_243X | CK_242X),
144 CLK("omap-mcbsp.2", "mcbsp_ick", &mcbsp2_ick, CK_243X | CK_242X), 144 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X | CK_242X),
145 CLK("omap-mcbsp.2", "mcbsp_fck", &mcbsp2_fck, CK_243X | CK_242X), 145 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_243X | CK_242X),
146 CLK("omap-mcbsp.3", "mcbsp_ick", &mcbsp3_ick, CK_243X), 146 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X),
147 CLK("omap-mcbsp.3", "mcbsp_fck", &mcbsp3_fck, CK_243X), 147 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_243X),
148 CLK("omap-mcbsp.4", "mcbsp_ick", &mcbsp4_ick, CK_243X), 148 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X),
149 CLK("omap-mcbsp.4", "mcbsp_fck", &mcbsp4_fck, CK_243X), 149 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_243X),
150 CLK("omap-mcbsp.5", "mcbsp_ick", &mcbsp5_ick, CK_243X), 150 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X),
151 CLK("omap-mcbsp.5", "mcbsp_fck", &mcbsp5_fck, CK_243X), 151 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_243X),
152 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X | CK_242X), 152 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X | CK_242X),
153 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X | CK_242X), 153 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X | CK_242X),
154 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X | CK_242X), 154 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X | CK_242X),
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
index d0bfae5a2f41..a70aa2eaf053 100644
--- a/arch/arm/mach-omap2/clock34xx.c
+++ b/arch/arm/mach-omap2/clock34xx.c
@@ -144,8 +144,8 @@ static struct omap_clk omap34xx_clks[] = {
144 CLK("i2c_omap.3", "i2c_fck", &i2c3_fck, CK_343X), 144 CLK("i2c_omap.3", "i2c_fck", &i2c3_fck, CK_343X),
145 CLK("i2c_omap.2", "i2c_fck", &i2c2_fck, CK_343X), 145 CLK("i2c_omap.2", "i2c_fck", &i2c2_fck, CK_343X),
146 CLK("i2c_omap.1", "i2c_fck", &i2c1_fck, CK_343X), 146 CLK("i2c_omap.1", "i2c_fck", &i2c1_fck, CK_343X),
147 CLK("omap-mcbsp.5", "mcbsp_fck", &mcbsp5_fck, CK_343X), 147 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_343X),
148 CLK("omap-mcbsp.1", "mcbsp_fck", &mcbsp1_fck, CK_343X), 148 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_343X),
149 CLK(NULL, "core_48m_fck", &core_48m_fck, CK_343X), 149 CLK(NULL, "core_48m_fck", &core_48m_fck, CK_343X),
150 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_343X), 150 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_343X),
151 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_343X), 151 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_343X),
@@ -186,8 +186,8 @@ static struct omap_clk omap34xx_clks[] = {
186 CLK(NULL, "uart1_ick", &uart1_ick, CK_343X), 186 CLK(NULL, "uart1_ick", &uart1_ick, CK_343X),
187 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_343X), 187 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_343X),
188 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_343X), 188 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_343X),
189 CLK("omap-mcbsp.5", "mcbsp_ick", &mcbsp5_ick, CK_343X), 189 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_343X),
190 CLK("omap-mcbsp.1", "mcbsp_ick", &mcbsp1_ick, CK_343X), 190 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_343X),
191 CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1), 191 CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1),
192 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_343X), 192 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_343X),
193 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_343X), 193 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_343X),
@@ -257,12 +257,12 @@ static struct omap_clk omap34xx_clks[] = {
257 CLK(NULL, "gpt4_ick", &gpt4_ick, CK_343X), 257 CLK(NULL, "gpt4_ick", &gpt4_ick, CK_343X),
258 CLK(NULL, "gpt3_ick", &gpt3_ick, CK_343X), 258 CLK(NULL, "gpt3_ick", &gpt3_ick, CK_343X),
259 CLK(NULL, "gpt2_ick", &gpt2_ick, CK_343X), 259 CLK(NULL, "gpt2_ick", &gpt2_ick, CK_343X),
260 CLK("omap-mcbsp.2", "mcbsp_ick", &mcbsp2_ick, CK_343X), 260 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_343X),
261 CLK("omap-mcbsp.3", "mcbsp_ick", &mcbsp3_ick, CK_343X), 261 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_343X),
262 CLK("omap-mcbsp.4", "mcbsp_ick", &mcbsp4_ick, CK_343X), 262 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_343X),
263 CLK("omap-mcbsp.2", "mcbsp_fck", &mcbsp2_fck, CK_343X), 263 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_343X),
264 CLK("omap-mcbsp.3", "mcbsp_fck", &mcbsp3_fck, CK_343X), 264 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_343X),
265 CLK("omap-mcbsp.4", "mcbsp_fck", &mcbsp4_fck, CK_343X), 265 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_343X),
266 CLK(NULL, "emu_src_ck", &emu_src_ck, CK_343X), 266 CLK(NULL, "emu_src_ck", &emu_src_ck, CK_343X),
267 CLK(NULL, "pclk_fck", &pclk_fck, CK_343X), 267 CLK(NULL, "pclk_fck", &pclk_fck, CK_343X),
268 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_343X), 268 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_343X),
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
index a9e631fc1134..a5c0f0435cd6 100644
--- a/arch/arm/mach-omap2/mcbsp.c
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -24,8 +24,6 @@
24#include <mach/cpu.h> 24#include <mach/cpu.h>
25#include <mach/mcbsp.h> 25#include <mach/mcbsp.h>
26 26
27const char *clk_names[] = { "mcbsp_ick", "mcbsp_fck" };
28
29static void omap2_mcbsp2_mux_setup(void) 27static void omap2_mcbsp2_mux_setup(void)
30{ 28{
31 omap_cfg_reg(Y15_24XX_MCBSP2_CLKX); 29 omap_cfg_reg(Y15_24XX_MCBSP2_CLKX);
@@ -57,8 +55,6 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = {
57 .rx_irq = INT_24XX_MCBSP1_IRQ_RX, 55 .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
58 .tx_irq = INT_24XX_MCBSP1_IRQ_TX, 56 .tx_irq = INT_24XX_MCBSP1_IRQ_TX,
59 .ops = &omap2_mcbsp_ops, 57 .ops = &omap2_mcbsp_ops,
60 .clk_names = clk_names,
61 .num_clks = 2,
62 }, 58 },
63 { 59 {
64 .phys_base = OMAP24XX_MCBSP2_BASE, 60 .phys_base = OMAP24XX_MCBSP2_BASE,
@@ -67,8 +63,6 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = {
67 .rx_irq = INT_24XX_MCBSP2_IRQ_RX, 63 .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
68 .tx_irq = INT_24XX_MCBSP2_IRQ_TX, 64 .tx_irq = INT_24XX_MCBSP2_IRQ_TX,
69 .ops = &omap2_mcbsp_ops, 65 .ops = &omap2_mcbsp_ops,
70 .clk_names = clk_names,
71 .num_clks = 2,
72 }, 66 },
73}; 67};
74#define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata) 68#define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata)
@@ -86,8 +80,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
86 .rx_irq = INT_24XX_MCBSP1_IRQ_RX, 80 .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
87 .tx_irq = INT_24XX_MCBSP1_IRQ_TX, 81 .tx_irq = INT_24XX_MCBSP1_IRQ_TX,
88 .ops = &omap2_mcbsp_ops, 82 .ops = &omap2_mcbsp_ops,
89 .clk_names = clk_names,
90 .num_clks = 2,
91 }, 83 },
92 { 84 {
93 .phys_base = OMAP24XX_MCBSP2_BASE, 85 .phys_base = OMAP24XX_MCBSP2_BASE,
@@ -96,8 +88,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
96 .rx_irq = INT_24XX_MCBSP2_IRQ_RX, 88 .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
97 .tx_irq = INT_24XX_MCBSP2_IRQ_TX, 89 .tx_irq = INT_24XX_MCBSP2_IRQ_TX,
98 .ops = &omap2_mcbsp_ops, 90 .ops = &omap2_mcbsp_ops,
99 .clk_names = clk_names,
100 .num_clks = 2,
101 }, 91 },
102 { 92 {
103 .phys_base = OMAP2430_MCBSP3_BASE, 93 .phys_base = OMAP2430_MCBSP3_BASE,
@@ -106,8 +96,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
106 .rx_irq = INT_24XX_MCBSP3_IRQ_RX, 96 .rx_irq = INT_24XX_MCBSP3_IRQ_RX,
107 .tx_irq = INT_24XX_MCBSP3_IRQ_TX, 97 .tx_irq = INT_24XX_MCBSP3_IRQ_TX,
108 .ops = &omap2_mcbsp_ops, 98 .ops = &omap2_mcbsp_ops,
109 .clk_names = clk_names,
110 .num_clks = 2,
111 }, 99 },
112 { 100 {
113 .phys_base = OMAP2430_MCBSP4_BASE, 101 .phys_base = OMAP2430_MCBSP4_BASE,
@@ -116,8 +104,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
116 .rx_irq = INT_24XX_MCBSP4_IRQ_RX, 104 .rx_irq = INT_24XX_MCBSP4_IRQ_RX,
117 .tx_irq = INT_24XX_MCBSP4_IRQ_TX, 105 .tx_irq = INT_24XX_MCBSP4_IRQ_TX,
118 .ops = &omap2_mcbsp_ops, 106 .ops = &omap2_mcbsp_ops,
119 .clk_names = clk_names,
120 .num_clks = 2,
121 }, 107 },
122 { 108 {
123 .phys_base = OMAP2430_MCBSP5_BASE, 109 .phys_base = OMAP2430_MCBSP5_BASE,
@@ -126,8 +112,6 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = {
126 .rx_irq = INT_24XX_MCBSP5_IRQ_RX, 112 .rx_irq = INT_24XX_MCBSP5_IRQ_RX,
127 .tx_irq = INT_24XX_MCBSP5_IRQ_TX, 113 .tx_irq = INT_24XX_MCBSP5_IRQ_TX,
128 .ops = &omap2_mcbsp_ops, 114 .ops = &omap2_mcbsp_ops,
129 .clk_names = clk_names,
130 .num_clks = 2,
131 }, 115 },
132}; 116};
133#define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata) 117#define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata)
@@ -145,8 +129,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
145 .rx_irq = INT_24XX_MCBSP1_IRQ_RX, 129 .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
146 .tx_irq = INT_24XX_MCBSP1_IRQ_TX, 130 .tx_irq = INT_24XX_MCBSP1_IRQ_TX,
147 .ops = &omap2_mcbsp_ops, 131 .ops = &omap2_mcbsp_ops,
148 .clk_names = clk_names,
149 .num_clks = 2,
150 }, 132 },
151 { 133 {
152 .phys_base = OMAP34XX_MCBSP2_BASE, 134 .phys_base = OMAP34XX_MCBSP2_BASE,
@@ -155,8 +137,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
155 .rx_irq = INT_24XX_MCBSP2_IRQ_RX, 137 .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
156 .tx_irq = INT_24XX_MCBSP2_IRQ_TX, 138 .tx_irq = INT_24XX_MCBSP2_IRQ_TX,
157 .ops = &omap2_mcbsp_ops, 139 .ops = &omap2_mcbsp_ops,
158 .clk_names = clk_names,
159 .num_clks = 2,
160 }, 140 },
161 { 141 {
162 .phys_base = OMAP34XX_MCBSP3_BASE, 142 .phys_base = OMAP34XX_MCBSP3_BASE,
@@ -165,8 +145,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
165 .rx_irq = INT_24XX_MCBSP3_IRQ_RX, 145 .rx_irq = INT_24XX_MCBSP3_IRQ_RX,
166 .tx_irq = INT_24XX_MCBSP3_IRQ_TX, 146 .tx_irq = INT_24XX_MCBSP3_IRQ_TX,
167 .ops = &omap2_mcbsp_ops, 147 .ops = &omap2_mcbsp_ops,
168 .clk_names = clk_names,
169 .num_clks = 2,
170 }, 148 },
171 { 149 {
172 .phys_base = OMAP34XX_MCBSP4_BASE, 150 .phys_base = OMAP34XX_MCBSP4_BASE,
@@ -175,8 +153,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
175 .rx_irq = INT_24XX_MCBSP4_IRQ_RX, 153 .rx_irq = INT_24XX_MCBSP4_IRQ_RX,
176 .tx_irq = INT_24XX_MCBSP4_IRQ_TX, 154 .tx_irq = INT_24XX_MCBSP4_IRQ_TX,
177 .ops = &omap2_mcbsp_ops, 155 .ops = &omap2_mcbsp_ops,
178 .clk_names = clk_names,
179 .num_clks = 2,
180 }, 156 },
181 { 157 {
182 .phys_base = OMAP34XX_MCBSP5_BASE, 158 .phys_base = OMAP34XX_MCBSP5_BASE,
@@ -185,8 +161,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = {
185 .rx_irq = INT_24XX_MCBSP5_IRQ_RX, 161 .rx_irq = INT_24XX_MCBSP5_IRQ_RX,
186 .tx_irq = INT_24XX_MCBSP5_IRQ_TX, 162 .tx_irq = INT_24XX_MCBSP5_IRQ_TX,
187 .ops = &omap2_mcbsp_ops, 163 .ops = &omap2_mcbsp_ops,
188 .clk_names = clk_names,
189 .num_clks = 2,
190 }, 164 },
191}; 165};
192#define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata) 166#define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata)