diff options
author | eric miao <eric.y.miao@gmail.com> | 2007-10-30 03:10:18 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2007-11-16 17:26:12 -0500 |
commit | 2a0d7187340ca192ccc061a86c8a55be5e7627f0 (patch) | |
tree | 64d1659f7495ce8981ad3030bc8441ec7eaabc86 /arch | |
parent | 6d6a54d1e4c2c6fbccd128ab4e6c8817db124866 (diff) |
[ARM] 4638/1: pxa: use PXA3xx specific macros to define clks
PXA3xx uses its own clk_pxa3xx_cken_ops, modify the code to use the
PXA3xx specific macros to define its clocks
Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 5da798282a54..61d9c9d69e6b 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -150,22 +150,45 @@ static void clk_pxa3xx_cken_disable(struct clk *clk) | |||
150 | local_irq_enable(); | 150 | local_irq_enable(); |
151 | } | 151 | } |
152 | 152 | ||
153 | static const struct clkops clk_pxa3xx_cken_ops = { | ||
154 | .enable = clk_pxa3xx_cken_enable, | ||
155 | .disable = clk_pxa3xx_cken_disable, | ||
156 | }; | ||
157 | |||
153 | static const struct clkops clk_pxa3xx_hsio_ops = { | 158 | static const struct clkops clk_pxa3xx_hsio_ops = { |
154 | .enable = clk_pxa3xx_cken_enable, | 159 | .enable = clk_pxa3xx_cken_enable, |
155 | .disable = clk_pxa3xx_cken_disable, | 160 | .disable = clk_pxa3xx_cken_disable, |
156 | .getrate = clk_pxa3xx_hsio_getrate, | 161 | .getrate = clk_pxa3xx_hsio_getrate, |
157 | }; | 162 | }; |
158 | 163 | ||
164 | #define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ | ||
165 | { \ | ||
166 | .name = _name, \ | ||
167 | .dev = _dev, \ | ||
168 | .ops = &clk_pxa3xx_cken_ops, \ | ||
169 | .rate = _rate, \ | ||
170 | .cken = CKEN_##_cken, \ | ||
171 | .delay = _delay, \ | ||
172 | } | ||
173 | |||
174 | #define PXA3xx_CK(_name, _cken, _ops, _dev) \ | ||
175 | { \ | ||
176 | .name = _name, \ | ||
177 | .dev = _dev, \ | ||
178 | .ops = _ops, \ | ||
179 | .cken = CKEN_##_cken, \ | ||
180 | } | ||
181 | |||
159 | static struct clk pxa3xx_clks[] = { | 182 | static struct clk pxa3xx_clks[] = { |
160 | INIT_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), | 183 | PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), |
161 | INIT_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), | 184 | PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), |
162 | 185 | ||
163 | INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev), | 186 | PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev), |
164 | INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev), | 187 | PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev), |
165 | INIT_CKEN("UARTCLK", STUART, 14857000, 1, NULL), | 188 | PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL), |
166 | 189 | ||
167 | INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), | 190 | PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), |
168 | INIT_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev), | 191 | PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev), |
169 | }; | 192 | }; |
170 | 193 | ||
171 | void __init pxa3xx_init_irq(void) | 194 | void __init pxa3xx_init_irq(void) |