aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@sirena.org.uk>2008-02-13 10:39:21 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-04-19 06:29:02 -0400
commitdcc88a170ce9f90e4b819c67feebb16e8a123f79 (patch)
treea4407f2d6ebdce9d386c27252dbaeec3f210abc1
parent184dd48102425467fbbb209765894b04f668a9de (diff)
[ARM] 4830/1: Add support for the CLK_POUT pin on PXA3xx CPUs
Expose control of the PXA3xx 13MHz CLK_POUT pin via the clock API Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c22
-rw-r--r--include/asm-arm/arch-pxa/pxa3xx-regs.h9
2 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 35f25fdaeba3..54c9e8371a21 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -156,6 +156,21 @@ static const struct clkops clk_pxa3xx_hsio_ops = {
156 .getrate = clk_pxa3xx_hsio_getrate, 156 .getrate = clk_pxa3xx_hsio_getrate,
157}; 157};
158 158
159static void clk_pout_enable(struct clk *clk)
160{
161 OSCC |= OSCC_PEN;
162}
163
164static void clk_pout_disable(struct clk *clk)
165{
166 OSCC &= ~OSCC_PEN;
167}
168
169static const struct clkops clk_pout_ops = {
170 .enable = clk_pout_enable,
171 .disable = clk_pout_disable,
172};
173
159#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ 174#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \
160 { \ 175 { \
161 .name = _name, \ 176 .name = _name, \
@@ -175,6 +190,13 @@ static const struct clkops clk_pxa3xx_hsio_ops = {
175 } 190 }
176 191
177static struct clk pxa3xx_clks[] = { 192static struct clk pxa3xx_clks[] = {
193 {
194 .name = "CLK_POUT",
195 .ops = &clk_pout_ops,
196 .rate = 13000000,
197 .delay = 70,
198 },
199
178 PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), 200 PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
179 PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), 201 PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
180 202
diff --git a/include/asm-arm/arch-pxa/pxa3xx-regs.h b/include/asm-arm/arch-pxa/pxa3xx-regs.h
index 8e1b3ead827f..fe9364c83a28 100644
--- a/include/asm-arm/arch-pxa/pxa3xx-regs.h
+++ b/include/asm-arm/arch-pxa/pxa3xx-regs.h
@@ -12,6 +12,15 @@
12 12
13#ifndef __ASM_ARCH_PXA3XX_REGS_H 13#ifndef __ASM_ARCH_PXA3XX_REGS_H
14#define __ASM_ARCH_PXA3XX_REGS_H 14#define __ASM_ARCH_PXA3XX_REGS_H
15
16/*
17 * Oscillator Configuration Register (OSCC)
18 */
19#define OSCC __REG(0x41350000) /* Oscillator Configuration Register */
20
21#define OSCC_PEN (1 << 11) /* 13MHz POUT */
22
23
15/* 24/*
16 * Service Power Management Unit (MPMU) 25 * Service Power Management Unit (MPMU)
17 */ 26 */