aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa3xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pxa3xx.c')
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c37
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
153static const struct clkops clk_pxa3xx_cken_ops = {
154 .enable = clk_pxa3xx_cken_enable,
155 .disable = clk_pxa3xx_cken_disable,
156};
157
153static const struct clkops clk_pxa3xx_hsio_ops = { 158static 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
159static struct clk pxa3xx_clks[] = { 182static 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
171void __init pxa3xx_init_irq(void) 194void __init pxa3xx_init_irq(void)