aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa27x.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2010-11-22 09:48:49 -0500
committerEric Miao <eric.y.miao@gmail.com>2010-12-16 01:31:19 -0500
commit2a125dd56b3a853701063fe8a678ad7603e385fd (patch)
tree279a16da435e810fa8490fe4a1557486a54e9cf3 /arch/arm/mach-pxa/pxa27x.c
parent4029813c89926ae5d78cc2dff49d845d934424f6 (diff)
ARM: pxa: remove get_memclk_frequency_10khz()
Introduce 'struct clk' for memory and remove get_memclk_frequency_10khz(). Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/pxa27x.c')
-rw-r--r--arch/arm/mach-pxa/pxa27x.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 13242f2a3392..6d2254b92adc 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -111,10 +111,9 @@ unsigned int pxa27x_get_clk_frequency_khz(int info)
111} 111}
112 112
113/* 113/*
114 * Return the current mem clock frequency in units of 10kHz as 114 * Return the current mem clock frequency as reflected by CCCR[A], B, and L
115 * reflected by CCCR[A], B, and L
116 */ 115 */
117unsigned int pxa27x_get_memclk_frequency_10khz(void) 116static unsigned long clk_pxa27x_mem_getrate(struct clk *clk)
118{ 117{
119 unsigned long ccsr, clkcfg; 118 unsigned long ccsr, clkcfg;
120 unsigned int l, L, m, M; 119 unsigned int l, L, m, M;
@@ -133,9 +132,15 @@ unsigned int pxa27x_get_memclk_frequency_10khz(void)
133 L = l * BASE_CLK; 132 L = l * BASE_CLK;
134 M = (!cccr_a) ? (L/m) : ((b) ? L : (L/2)); 133 M = (!cccr_a) ? (L/m) : ((b) ? L : (L/2));
135 134
136 return (M / 10000); 135 return M;
137} 136}
138 137
138static const struct clkops clk_pxa27x_mem_ops = {
139 .enable = clk_dummy_enable,
140 .disable = clk_dummy_disable,
141 .getrate = clk_pxa27x_mem_getrate,
142};
143
139/* 144/*
140 * Return the current LCD clock frequency in units of 10kHz as 145 * Return the current LCD clock frequency in units of 10kHz as
141 */ 146 */
@@ -192,6 +197,7 @@ static DEFINE_PXA2_CKEN(pxa27x_memc, MEMC, 0, 0);
192 197
193static DEFINE_CK(pxa27x_lcd, LCD, &clk_pxa27x_lcd_ops); 198static DEFINE_CK(pxa27x_lcd, LCD, &clk_pxa27x_lcd_ops);
194static DEFINE_CK(pxa27x_camera, CAMERA, &clk_pxa27x_lcd_ops); 199static DEFINE_CK(pxa27x_camera, CAMERA, &clk_pxa27x_lcd_ops);
200static DEFINE_CLK(pxa27x_mem, &clk_pxa27x_mem_ops, 0, 0);
195 201
196static struct clk_lookup pxa27x_clkregs[] = { 202static struct clk_lookup pxa27x_clkregs[] = {
197 INIT_CLKREG(&clk_pxa27x_lcd, "pxa2xx-fb", NULL), 203 INIT_CLKREG(&clk_pxa27x_lcd, "pxa2xx-fb", NULL),
@@ -220,6 +226,7 @@ static struct clk_lookup pxa27x_clkregs[] = {
220 INIT_CLKREG(&clk_pxa27x_memstk, NULL, "MSTKCLK"), 226 INIT_CLKREG(&clk_pxa27x_memstk, NULL, "MSTKCLK"),
221 INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), 227 INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"),
222 INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), 228 INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"),
229 INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL),
223}; 230};
224 231
225#ifdef CONFIG_PM 232#ifdef CONFIG_PM