aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s5pc1xx
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2009-11-17 02:41:12 -0500
committerBen Dooks <ben-linux@fluff.org>2009-11-30 20:33:12 -0500
commit9ebaf2f4e7090a8c3b0c99419924b1e8f99a07a3 (patch)
treebb88df6d2f75be61c792108dd519a59b619ecfd7 /arch/arm/plat-s5pc1xx
parentb0cc3031ffe1800aa6fe8ab0f55a75939bb265b7 (diff)
ARM: S5PC1XX: clock registers rename
S5PC100 and S5PC110 clock registers differs in many places, rename all previously defined registers to be S5PC100 specific. Remove all power management registers. They will be added later to a separate file. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s5pc1xx')
-rw-r--r--arch/arm/plat-s5pc1xx/include/plat/regs-clock.h212
-rw-r--r--arch/arm/plat-s5pc1xx/s5pc100-clock.c44
2 files changed, 97 insertions, 159 deletions
diff --git a/arch/arm/plat-s5pc1xx/include/plat/regs-clock.h b/arch/arm/plat-s5pc1xx/include/plat/regs-clock.h
index 75c8390cb827..c5cc86e92d65 100644
--- a/arch/arm/plat-s5pc1xx/include/plat/regs-clock.h
+++ b/arch/arm/plat-s5pc1xx/include/plat/regs-clock.h
@@ -13,68 +13,69 @@
13#ifndef __PLAT_REGS_CLOCK_H 13#ifndef __PLAT_REGS_CLOCK_H
14#define __PLAT_REGS_CLOCK_H __FILE__ 14#define __PLAT_REGS_CLOCK_H __FILE__
15 15
16#define S5PC1XX_CLKREG(x) (S5PC1XX_VA_CLK + (x)) 16#define S5PC100_CLKREG(x) (S5PC1XX_VA_CLK + (x))
17 17#define S5PC100_CLKREG_OTHER(x) (S5PC1XX_VA_CLK_OTHER + (x))
18#define S5PC1XX_APLL_LOCK S5PC1XX_CLKREG(0x00) 18
19#define S5PC1XX_MPLL_LOCK S5PC1XX_CLKREG(0x04) 19/* s5pc100 register for clock */
20#define S5PC1XX_EPLL_LOCK S5PC1XX_CLKREG(0x08) 20#define S5PC100_APLL_LOCK S5PC100_CLKREG(0x00)
21#define S5PC100_HPLL_LOCK S5PC1XX_CLKREG(0x0C) 21#define S5PC100_MPLL_LOCK S5PC100_CLKREG(0x04)
22 22#define S5PC100_EPLL_LOCK S5PC100_CLKREG(0x08)
23#define S5PC1XX_APLL_CON S5PC1XX_CLKREG(0x100) 23#define S5PC100_HPLL_LOCK S5PC100_CLKREG(0x0C)
24#define S5PC1XX_MPLL_CON S5PC1XX_CLKREG(0x104) 24
25#define S5PC1XX_EPLL_CON S5PC1XX_CLKREG(0x108) 25#define S5PC100_APLL_CON S5PC100_CLKREG(0x100)
26#define S5PC100_HPLL_CON S5PC1XX_CLKREG(0x10C) 26#define S5PC100_MPLL_CON S5PC100_CLKREG(0x104)
27 27#define S5PC100_EPLL_CON S5PC100_CLKREG(0x108)
28#define S5PC1XX_CLK_SRC0 S5PC1XX_CLKREG(0x200) 28#define S5PC100_HPLL_CON S5PC100_CLKREG(0x10C)
29#define S5PC1XX_CLK_SRC1 S5PC1XX_CLKREG(0x204) 29
30#define S5PC1XX_CLK_SRC2 S5PC1XX_CLKREG(0x208) 30#define S5PC100_CLKSRC0 S5PC100_CLKREG(0x200)
31#define S5PC1XX_CLK_SRC3 S5PC1XX_CLKREG(0x20C) 31#define S5PC100_CLKSRC1 S5PC100_CLKREG(0x204)
32 32#define S5PC100_CLKSRC2 S5PC100_CLKREG(0x208)
33#define S5PC1XX_CLK_DIV0 S5PC1XX_CLKREG(0x300) 33#define S5PC100_CLKSRC3 S5PC100_CLKREG(0x20C)
34#define S5PC1XX_CLK_DIV1 S5PC1XX_CLKREG(0x304) 34
35#define S5PC1XX_CLK_DIV2 S5PC1XX_CLKREG(0x308) 35#define S5PC100_CLKDIV0 S5PC100_CLKREG(0x300)
36#define S5PC1XX_CLK_DIV3 S5PC1XX_CLKREG(0x30C) 36#define S5PC100_CLKDIV1 S5PC100_CLKREG(0x304)
37#define S5PC1XX_CLK_DIV4 S5PC1XX_CLKREG(0x310) 37#define S5PC100_CLKDIV2 S5PC100_CLKREG(0x308)
38 38#define S5PC100_CLKDIV3 S5PC100_CLKREG(0x30C)
39#define S5PC100_CLK_OUT S5PC1XX_CLKREG(0x400) 39#define S5PC100_CLKDIV4 S5PC100_CLKREG(0x310)
40 40
41#define S5PC100_CLKGATE_D00 S5PC1XX_CLKREG(0x500) 41#define S5PC100_CLK_OUT S5PC100_CLKREG(0x400)
42#define S5PC100_CLKGATE_D01 S5PC1XX_CLKREG(0x504) 42
43#define S5PC100_CLKGATE_D02 S5PC1XX_CLKREG(0x508) 43#define S5PC100_CLKGATE_D00 S5PC100_CLKREG(0x500)
44 44#define S5PC100_CLKGATE_D01 S5PC100_CLKREG(0x504)
45#define S5PC100_CLKGATE_D10 S5PC1XX_CLKREG(0x520) 45#define S5PC100_CLKGATE_D02 S5PC100_CLKREG(0x508)
46#define S5PC100_CLKGATE_D11 S5PC1XX_CLKREG(0x524) 46
47#define S5PC100_CLKGATE_D12 S5PC1XX_CLKREG(0x528) 47#define S5PC100_CLKGATE_D10 S5PC100_CLKREG(0x520)
48#define S5PC100_CLKGATE_D13 S5PC1XX_CLKREG(0x52C) 48#define S5PC100_CLKGATE_D11 S5PC100_CLKREG(0x524)
49#define S5PC100_CLKGATE_D14 S5PC1XX_CLKREG(0x530) 49#define S5PC100_CLKGATE_D12 S5PC100_CLKREG(0x528)
50#define S5PC100_CLKGATE_D15 S5PC1XX_CLKREG(0x534) 50#define S5PC100_CLKGATE_D13 S5PC100_CLKREG(0x52C)
51 51#define S5PC100_CLKGATE_D14 S5PC100_CLKREG(0x530)
52#define S5PC100_CLKGATE_D20 S5PC1XX_CLKREG(0x540) 52#define S5PC100_CLKGATE_D15 S5PC100_CLKREG(0x534)
53 53
54#define S5PC100_SCLKGATE0 S5PC1XX_CLKREG(0x560) 54#define S5PC100_CLKGATE_D20 S5PC100_CLKREG(0x540)
55#define S5PC100_SCLKGATE1 S5PC1XX_CLKREG(0x564) 55
56 56#define S5PC100_SCLKGATE0 S5PC100_CLKREG(0x560)
57#define S5PC100_OTHERS S5PC1XX_CLKREG(0x8200) 57#define S5PC100_SCLKGATE1 S5PC100_CLKREG(0x564)
58 58
59#define S5PC1XX_EPLL_EN (1<<31) 59/* EPLL_CON */
60#define S5PC1XX_EPLL_MASK 0xffffffff 60#define S5PC100_EPLL_EN (1<<31)
61#define S5PC1XX_EPLLVAL(_m, _p, _s) ((_m) << 16 | ((_p) << 8) | ((_s))) 61#define S5PC100_EPLL_MASK 0xffffffff
62#define S5PC100_EPLLVAL(_m, _p, _s) ((_m) << 16 | ((_p) << 8) | ((_s)))
62 63
63/* CLKSRC0 */ 64/* CLKSRC0 */
64#define S5PC1XX_CLKSRC0_APLL_MASK (0x1<<0) 65#define S5PC100_CLKSRC0_APLL_MASK (0x1<<0)
65#define S5PC1XX_CLKSRC0_APLL_SHIFT (0) 66#define S5PC100_CLKSRC0_APLL_SHIFT (0)
66#define S5PC1XX_CLKSRC0_MPLL_MASK (0x1<<4) 67#define S5PC100_CLKSRC0_MPLL_MASK (0x1<<4)
67#define S5PC1XX_CLKSRC0_MPLL_SHIFT (4) 68#define S5PC100_CLKSRC0_MPLL_SHIFT (4)
68#define S5PC1XX_CLKSRC0_EPLL_MASK (0x1<<8) 69#define S5PC100_CLKSRC0_EPLL_MASK (0x1<<8)
69#define S5PC1XX_CLKSRC0_EPLL_SHIFT (8) 70#define S5PC100_CLKSRC0_EPLL_SHIFT (8)
70#define S5PC100_CLKSRC0_HPLL_MASK (0x1<<12) 71#define S5PC100_CLKSRC0_HPLL_MASK (0x1<<12)
71#define S5PC100_CLKSRC0_HPLL_SHIFT (12) 72#define S5PC100_CLKSRC0_HPLL_SHIFT (12)
72#define S5PC100_CLKSRC0_AMMUX_MASK (0x1<<16) 73#define S5PC100_CLKSRC0_AMMUX_MASK (0x1<<16)
73#define S5PC100_CLKSRC0_AMMUX_SHIFT (16) 74#define S5PC100_CLKSRC0_AMMUX_SHIFT (16)
74#define S5PC100_CLKSRC0_HREF_MASK (0x1<<20) 75#define S5PC100_CLKSRC0_HREF_MASK (0x1<<20)
75#define S5PC100_CLKSRC0_HREF_SHIFT (20) 76#define S5PC100_CLKSRC0_HREF_SHIFT (20)
76#define S5PC1XX_CLKSRC0_ONENAND_MASK (0x1<<24) 77#define S5PC100_CLKSRC0_ONENAND_MASK (0x1<<24)
77#define S5PC1XX_CLKSRC0_ONENAND_SHIFT (24) 78#define S5PC100_CLKSRC0_ONENAND_SHIFT (24)
78 79
79 80
80/* CLKSRC1 */ 81/* CLKSRC1 */
@@ -127,10 +128,9 @@
127#define S5PC100_CLKSRC3_SPDIF_MASK (0x3<<24) 128#define S5PC100_CLKSRC3_SPDIF_MASK (0x3<<24)
128#define S5PC100_CLKSRC3_SPDIF_SHIFT (24) 129#define S5PC100_CLKSRC3_SPDIF_SHIFT (24)
129 130
130
131/* CLKDIV0 */ 131/* CLKDIV0 */
132#define S5PC1XX_CLKDIV0_APLL_MASK (0x1<<0) 132#define S5PC100_CLKDIV0_APLL_MASK (0x1<<0)
133#define S5PC1XX_CLKDIV0_APLL_SHIFT (0) 133#define S5PC100_CLKDIV0_APLL_SHIFT (0)
134#define S5PC100_CLKDIV0_ARM_MASK (0x7<<4) 134#define S5PC100_CLKDIV0_ARM_MASK (0x7<<4)
135#define S5PC100_CLKDIV0_ARM_SHIFT (4) 135#define S5PC100_CLKDIV0_ARM_SHIFT (4)
136#define S5PC100_CLKDIV0_D0_MASK (0x7<<8) 136#define S5PC100_CLKDIV0_D0_MASK (0x7<<8)
@@ -141,8 +141,8 @@
141#define S5PC100_CLKDIV0_SECSS_SHIFT (16) 141#define S5PC100_CLKDIV0_SECSS_SHIFT (16)
142 142
143/* CLKDIV1 */ 143/* CLKDIV1 */
144#define S5PC100_CLKDIV1_AM_MASK (0x7<<0) 144#define S5PC100_CLKDIV1_APLL2_MASK (0x7<<0)
145#define S5PC100_CLKDIV1_AM_SHIFT (0) 145#define S5PC100_CLKDIV1_APLL2_SHIFT (0)
146#define S5PC100_CLKDIV1_MPLL_MASK (0x3<<4) 146#define S5PC100_CLKDIV1_MPLL_MASK (0x3<<4)
147#define S5PC100_CLKDIV1_MPLL_SHIFT (4) 147#define S5PC100_CLKDIV1_MPLL_SHIFT (4)
148#define S5PC100_CLKDIV1_MPLL2_MASK (0x1<<8) 148#define S5PC100_CLKDIV1_MPLL2_MASK (0x1<<8)
@@ -202,7 +202,6 @@
202#define S5PC100_CLKDIV4_AUDIO2_MASK (0xf<<20) 202#define S5PC100_CLKDIV4_AUDIO2_MASK (0xf<<20)
203#define S5PC100_CLKDIV4_AUDIO2_SHIFT (20) 203#define S5PC100_CLKDIV4_AUDIO2_SHIFT (20)
204 204
205
206/* HCLKD0/PCLKD0 Clock Gate 0 Registers */ 205/* HCLKD0/PCLKD0 Clock Gate 0 Registers */
207#define S5PC100_CLKGATE_D00_INTC (1<<0) 206#define S5PC100_CLKGATE_D00_INTC (1<<0)
208#define S5PC100_CLKGATE_D00_TZIC (1<<1) 207#define S5PC100_CLKGATE_D00_TZIC (1<<1)
@@ -295,8 +294,8 @@
295#define S5PC100_CLKGATE_D20_I2SD2 (1<<1) 294#define S5PC100_CLKGATE_D20_I2SD2 (1<<1)
296 295
297/* Special Clock Gate 0 Registers */ 296/* Special Clock Gate 0 Registers */
298#define S5PC1XX_CLKGATE_SCLK0_HPM (1<<0) 297#define S5PC100_CLKGATE_SCLK0_HPM (1<<0)
299#define S5PC1XX_CLKGATE_SCLK0_PWI (1<<1) 298#define S5PC100_CLKGATE_SCLK0_PWI (1<<1)
300#define S5PC100_CLKGATE_SCLK0_ONENAND (1<<2) 299#define S5PC100_CLKGATE_SCLK0_ONENAND (1<<2)
301#define S5PC100_CLKGATE_SCLK0_UART (1<<3) 300#define S5PC100_CLKGATE_SCLK0_UART (1<<3)
302#define S5PC100_CLKGATE_SCLK0_SPI0 (1<<4) 301#define S5PC100_CLKGATE_SCLK0_SPI0 (1<<4)
@@ -329,89 +328,28 @@
329#define S5PC100_CLKGATE_SCLK1_SPDIF (1<<11) 328#define S5PC100_CLKGATE_SCLK1_SPDIF (1<<11)
330#define S5PC100_CLKGATE_SCLK1_CAM (1<<12) 329#define S5PC100_CLKGATE_SCLK1_CAM (1<<12)
331 330
332/* register for power management */ 331#define S5PC100_SWRESET S5PC100_CLKREG_OTHER(0x000)
333#define S5PC100_PWR_CFG S5PC1XX_CLKREG(0x8000) 332#define S5PC100_OND_SWRESET S5PC100_CLKREG_OTHER(0x008)
334#define S5PC100_EINT_WAKEUP_MASK S5PC1XX_CLKREG(0x8004) 333#define S5PC100_GEN_CTRL S5PC100_CLKREG_OTHER(0x100)
335#define S5PC100_NORMAL_CFG S5PC1XX_CLKREG(0x8010) 334#define S5PC100_GEN_STATUS S5PC100_CLKREG_OTHER(0x104)
336#define S5PC100_STOP_CFG S5PC1XX_CLKREG(0x8014) 335#define S5PC100_MEM_SYS_CFG S5PC100_CLKREG_OTHER(0x200)
337#define S5PC100_SLEEP_CFG S5PC1XX_CLKREG(0x8018) 336#define S5PC100_CAM_MUX_SEL S5PC100_CLKREG_OTHER(0x300)
338#define S5PC100_STOP_MEM_CFG S5PC1XX_CLKREG(0x801C) 337#define S5PC100_MIXER_OUT_SEL S5PC100_CLKREG_OTHER(0x304)
339#define S5PC100_OSC_FREQ S5PC1XX_CLKREG(0x8100) 338#define S5PC100_LPMP_MODE_SEL S5PC100_CLKREG_OTHER(0x308)
340#define S5PC100_OSC_STABLE S5PC1XX_CLKREG(0x8104) 339#define S5PC100_MIPI_PHY_CON0 S5PC100_CLKREG_OTHER(0x400)
341#define S5PC100_PWR_STABLE S5PC1XX_CLKREG(0x8108) 340#define S5PC100_MIPI_PHY_CON1 S5PC100_CLKREG_OTHER(0x414)
342#define S5PC100_MTC_STABLE S5PC1XX_CLKREG(0x8110) 341#define S5PC100_HDMI_PHY_CON0 S5PC100_CLKREG_OTHER(0x420)
343#define S5PC100_CLAMP_STABLE S5PC1XX_CLKREG(0x8114) 342
344#define S5PC100_OTHERS S5PC1XX_CLKREG(0x8200) 343#define S5PC100_SWRESET_RESETVAL 0xc100
345#define S5PC100_RST_STAT S5PC1XX_CLKREG(0x8300)
346#define S5PC100_WAKEUP_STAT S5PC1XX_CLKREG(0x8304)
347#define S5PC100_BLK_PWR_STAT S5PC1XX_CLKREG(0x8308)
348#define S5PC100_INFORM0 S5PC1XX_CLKREG(0x8400)
349#define S5PC100_INFORM1 S5PC1XX_CLKREG(0x8404)
350#define S5PC100_INFORM2 S5PC1XX_CLKREG(0x8408)
351#define S5PC100_INFORM3 S5PC1XX_CLKREG(0x840C)
352#define S5PC100_INFORM4 S5PC1XX_CLKREG(0x8410)
353#define S5PC100_INFORM5 S5PC1XX_CLKREG(0x8414)
354#define S5PC100_INFORM6 S5PC1XX_CLKREG(0x8418)
355#define S5PC100_INFORM7 S5PC1XX_CLKREG(0x841C)
356#define S5PC100_DCGIDX_MAP0 S5PC1XX_CLKREG(0x8500)
357#define S5PC100_DCGIDX_MAP1 S5PC1XX_CLKREG(0x8504)
358#define S5PC100_DCGIDX_MAP2 S5PC1XX_CLKREG(0x8508)
359#define S5PC100_DCGPERF_MAP0 S5PC1XX_CLKREG(0x850C)
360#define S5PC100_DCGPERF_MAP1 S5PC1XX_CLKREG(0x8510)
361#define S5PC100_DVCIDX_MAP S5PC1XX_CLKREG(0x8514)
362#define S5PC100_FREQ_CPU S5PC1XX_CLKREG(0x8518)
363#define S5PC100_FREQ_DPM S5PC1XX_CLKREG(0x851C)
364#define S5PC100_DVSEMCLK_EN S5PC1XX_CLKREG(0x8520)
365#define S5PC100_APLL_CON_L8 S5PC1XX_CLKREG(0x8600)
366#define S5PC100_APLL_CON_L7 S5PC1XX_CLKREG(0x8604)
367#define S5PC100_APLL_CON_L6 S5PC1XX_CLKREG(0x8608)
368#define S5PC100_APLL_CON_L5 S5PC1XX_CLKREG(0x860C)
369#define S5PC100_APLL_CON_L4 S5PC1XX_CLKREG(0x8610)
370#define S5PC100_APLL_CON_L3 S5PC1XX_CLKREG(0x8614)
371#define S5PC100_APLL_CON_L2 S5PC1XX_CLKREG(0x8618)
372#define S5PC100_APLL_CON_L1 S5PC1XX_CLKREG(0x861C)
373#define S5PC100_IEM_CONTROL S5PC1XX_CLKREG(0x8620)
374#define S5PC100_CLKDIV_IEM_L8 S5PC1XX_CLKREG(0x8700)
375#define S5PC100_CLKDIV_IEM_L7 S5PC1XX_CLKREG(0x8704)
376#define S5PC100_CLKDIV_IEM_L6 S5PC1XX_CLKREG(0x8708)
377#define S5PC100_CLKDIV_IEM_L5 S5PC1XX_CLKREG(0x870C)
378#define S5PC100_CLKDIV_IEM_L4 S5PC1XX_CLKREG(0x8710)
379#define S5PC100_CLKDIV_IEM_L3 S5PC1XX_CLKREG(0x8714)
380#define S5PC100_CLKDIV_IEM_L2 S5PC1XX_CLKREG(0x8718)
381#define S5PC100_CLKDIV_IEM_L1 S5PC1XX_CLKREG(0x871C)
382#define S5PC100_IEM_HPMCLK_DIV S5PC1XX_CLKREG(0x8724)
383
384#define S5PC100_SWRESET S5PC1XX_CLKREG(0x100000)
385#define S5PC100_OND_SWRESET S5PC1XX_CLKREG(0x100008)
386#define S5PC100_GEN_CTRL S5PC1XX_CLKREG(0x100100)
387#define S5PC100_GEN_STATUS S5PC1XX_CLKREG(0x100104)
388#define S5PC100_MEM_SYS_CFG S5PC1XX_CLKREG(0x100200)
389#define S5PC100_CAM_MUX_SEL S5PC1XX_CLKREG(0x100300)
390#define S5PC100_MIXER_OUT_SEL S5PC1XX_CLKREG(0x100304)
391#define S5PC100_LPMP_MODE_SEL S5PC1XX_CLKREG(0x100308)
392#define S5PC100_MIPI_PHY_CON0 S5PC1XX_CLKREG(0x100400)
393#define S5PC100_MIPI_PHY_CON1 S5PC1XX_CLKREG(0x100414)
394#define S5PC100_HDMI_PHY_CON0 S5PC1XX_CLKREG(0x100420)
395
396#define S5PC100_CFG_WFI_CLEAN (~(3<<5))
397#define S5PC100_CFG_WFI_IDLE (1<<5)
398#define S5PC100_CFG_WFI_STOP (2<<5)
399#define S5PC100_CFG_WFI_SLEEP (3<<5)
400
401#define S5PC100_OTHER_SYS_INT 24 344#define S5PC100_OTHER_SYS_INT 24
402#define S5PC100_OTHER_STA_TYPE 23 345#define S5PC100_OTHER_STA_TYPE 23
403#define STA_TYPE_EXPON 0 346#define STA_TYPE_EXPON 0
404#define STA_TYPE_SFR 1 347#define STA_TYPE_SFR 1
405 348
406#define S5PC100_PWR_STA_EXP_SCALE 0
407#define S5PC100_PWR_STA_CNT 4
408
409#define S5PC100_PWR_STABLE_COUNT 85500
410
411#define S5PC100_SLEEP_CFG_OSC_EN 0 349#define S5PC100_SLEEP_CFG_OSC_EN 0
412 350
413/* OTHERS Resgister */ 351/* OTHERS Resgister */
414#define S5PC100_OTHERS_USB_SIG_MASK (1 << 16) 352#define S5PC100_OTHERS_USB_SIG_MASK (1 << 16)
415#define S5PC100_OTHERS_MIPI_DPHY_EN (1 << 28) 353#define S5PC100_OTHERS_MIPI_DPHY_EN (1 << 28)
416 354
417/* MIPI D-PHY Control Register 0 */ 355/* MIPI D-PHY Control Register 0 */
diff --git a/arch/arm/plat-s5pc1xx/s5pc100-clock.c b/arch/arm/plat-s5pc1xx/s5pc100-clock.c
index 6b24035172fa..efc868b4c2a6 100644
--- a/arch/arm/plat-s5pc1xx/s5pc100-clock.c
+++ b/arch/arm/plat-s5pc1xx/s5pc100-clock.c
@@ -87,13 +87,13 @@ static int clk_48m_ctrl(struct clk *clk, int enable)
87 /* can't rely on clock lock, this register has other usages */ 87 /* can't rely on clock lock, this register has other usages */
88 local_irq_save(flags); 88 local_irq_save(flags);
89 89
90 val = __raw_readl(S5PC1XX_CLK_SRC1); 90 val = __raw_readl(S5PC100_CLKSRC1);
91 if (enable) 91 if (enable)
92 val |= S5PC100_CLKSRC1_CLK48M_MASK; 92 val |= S5PC100_CLKSRC1_CLK48M_MASK;
93 else 93 else
94 val &= ~S5PC100_CLKSRC1_CLK48M_MASK; 94 val &= ~S5PC100_CLKSRC1_CLK48M_MASK;
95 95
96 __raw_writel(val, S5PC1XX_CLK_SRC1); 96 __raw_writel(val, S5PC100_CLKSRC1);
97 local_irq_restore(flags); 97 local_irq_restore(flags);
98 98
99 return 0; 99 return 0;
@@ -685,7 +685,7 @@ static struct clk init_clocks[] = {
685 .id = -1, 685 .id = -1,
686 .parent = NULL, 686 .parent = NULL,
687 .enable = s5pc1xx_sclk0_ctrl, 687 .enable = s5pc1xx_sclk0_ctrl,
688 .ctrlbit = S5PC1XX_CLKGATE_SCLK0_HPM, 688 .ctrlbit = S5PC100_CLKGATE_SCLK0_HPM,
689 }, { 689 }, {
690 .name = "sclk_onenand", 690 .name = "sclk_onenand",
691 .id = -1, 691 .id = -1,
@@ -801,10 +801,10 @@ static struct clksrc_clk clk_mout_apll = {
801 .name = "mout_apll", 801 .name = "mout_apll",
802 .id = -1, 802 .id = -1,
803 }, 803 },
804 .shift = S5PC1XX_CLKSRC0_APLL_SHIFT, 804 .shift = S5PC100_CLKSRC0_APLL_SHIFT,
805 .mask = S5PC1XX_CLKSRC0_APLL_MASK, 805 .mask = S5PC100_CLKSRC0_APLL_MASK,
806 .sources = &clk_src_apll, 806 .sources = &clk_src_apll,
807 .reg_source = S5PC1XX_CLK_SRC0, 807 .reg_source = S5PC100_CLKSRC0,
808}; 808};
809 809
810static struct clk clk_fout_epll = { 810static struct clk clk_fout_epll = {
@@ -827,10 +827,10 @@ static struct clksrc_clk clk_mout_epll = {
827 .name = "mout_epll", 827 .name = "mout_epll",
828 .id = -1, 828 .id = -1,
829 }, 829 },
830 .shift = S5PC1XX_CLKSRC0_EPLL_SHIFT, 830 .shift = S5PC100_CLKSRC0_EPLL_SHIFT,
831 .mask = S5PC1XX_CLKSRC0_EPLL_MASK, 831 .mask = S5PC100_CLKSRC0_EPLL_MASK,
832 .sources = &clk_src_epll, 832 .sources = &clk_src_epll,
833 .reg_source = S5PC1XX_CLK_SRC0, 833 .reg_source = S5PC100_CLKSRC0,
834}; 834};
835 835
836static struct clk *clk_src_mpll_list[] = { 836static struct clk *clk_src_mpll_list[] = {
@@ -848,10 +848,10 @@ static struct clksrc_clk clk_mout_mpll = {
848 .name = "mout_mpll", 848 .name = "mout_mpll",
849 .id = -1, 849 .id = -1,
850 }, 850 },
851 .shift = S5PC1XX_CLKSRC0_MPLL_SHIFT, 851 .shift = S5PC100_CLKSRC0_MPLL_SHIFT,
852 .mask = S5PC1XX_CLKSRC0_MPLL_MASK, 852 .mask = S5PC100_CLKSRC0_MPLL_MASK,
853 .sources = &clk_src_mpll, 853 .sources = &clk_src_mpll,
854 .reg_source = S5PC1XX_CLK_SRC0, 854 .reg_source = S5PC100_CLKSRC0,
855}; 855};
856 856
857static unsigned long s5pc1xx_clk_doutmpll_get_rate(struct clk *clk) 857static unsigned long s5pc1xx_clk_doutmpll_get_rate(struct clk *clk)
@@ -861,7 +861,7 @@ static unsigned long s5pc1xx_clk_doutmpll_get_rate(struct clk *clk)
861 861
862 printk(KERN_DEBUG "%s: parent is %ld\n", __func__, rate); 862 printk(KERN_DEBUG "%s: parent is %ld\n", __func__, rate);
863 863
864 clkdiv = __raw_readl(S5PC1XX_CLK_DIV1) & S5PC100_CLKDIV1_MPLL_MASK; 864 clkdiv = __raw_readl(S5PC100_CLKDIV1) & S5PC100_CLKDIV1_MPLL_MASK;
865 rate /= (clkdiv >> S5PC100_CLKDIV1_MPLL_SHIFT) + 1; 865 rate /= (clkdiv >> S5PC100_CLKDIV1_MPLL_SHIFT) + 1;
866 866
867 return rate; 867 return rate;
@@ -881,7 +881,7 @@ static unsigned long s5pc1xx_clk_doutmpll2_get_rate(struct clk *clk)
881 881
882 printk(KERN_DEBUG "%s: parent is %ld\n", __func__, rate); 882 printk(KERN_DEBUG "%s: parent is %ld\n", __func__, rate);
883 883
884 clkdiv = __raw_readl(S5PC1XX_CLK_DIV1) & S5PC100_CLKDIV1_MPLL2_MASK; 884 clkdiv = __raw_readl(S5PC100_CLKDIV1) & S5PC100_CLKDIV1_MPLL2_MASK;
885 rate /= (clkdiv >> S5PC100_CLKDIV1_MPLL2_SHIFT) + 1; 885 rate /= (clkdiv >> S5PC100_CLKDIV1_MPLL2_SHIFT) + 1;
886 886
887 return rate; 887 return rate;
@@ -1007,8 +1007,8 @@ static struct clksrc_clk clk_uart_uclk1 = {
1007 .mask = S5PC100_CLKSRC1_UART_MASK, 1007 .mask = S5PC100_CLKSRC1_UART_MASK,
1008 .sources = &clkset_uart, 1008 .sources = &clkset_uart,
1009 .divider_shift = S5PC100_CLKDIV2_UART_SHIFT, 1009 .divider_shift = S5PC100_CLKDIV2_UART_SHIFT,
1010 .reg_divider = S5PC1XX_CLK_DIV2, 1010 .reg_divider = S5PC100_CLKDIV2,
1011 .reg_source = S5PC1XX_CLK_SRC1, 1011 .reg_source = S5PC100_CLKSRC1,
1012}; 1012};
1013 1013
1014/* Clock initialisation code */ 1014/* Clock initialisation code */
@@ -1061,8 +1061,8 @@ void __init_or_cpufreq s5pc100_setup_clocks(void)
1061 1061
1062 printk(KERN_DEBUG "%s: registering clocks\n", __func__); 1062 printk(KERN_DEBUG "%s: registering clocks\n", __func__);
1063 1063
1064 clkdiv0 = __raw_readl(S5PC1XX_CLK_DIV0); 1064 clkdiv0 = __raw_readl(S5PC100_CLKDIV0);
1065 clkdiv1 = __raw_readl(S5PC1XX_CLK_DIV1); 1065 clkdiv1 = __raw_readl(S5PC100_CLKDIV1);
1066 1066
1067 printk(KERN_DEBUG "%s: clkdiv0 = %08x, clkdiv1 = %08x\n", 1067 printk(KERN_DEBUG "%s: clkdiv0 = %08x, clkdiv1 = %08x\n",
1068 __func__, clkdiv0, clkdiv1); 1068 __func__, clkdiv0, clkdiv1);
@@ -1075,15 +1075,15 @@ void __init_or_cpufreq s5pc100_setup_clocks(void)
1075 1075
1076 printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); 1076 printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal);
1077 1077
1078 apll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC1XX_APLL_CON)); 1078 apll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC100_APLL_CON));
1079 mpll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC1XX_MPLL_CON)); 1079 mpll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC100_MPLL_CON));
1080 epll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC1XX_EPLL_CON)); 1080 epll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC100_EPLL_CON));
1081 hpll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC100_HPLL_CON)); 1081 hpll = s5pc1xx_get_pll(xtal, __raw_readl(S5PC100_HPLL_CON));
1082 1082
1083 printk(KERN_INFO "S5PC100: PLL settings, A=%ld, M=%ld, E=%ld, H=%ld\n", 1083 printk(KERN_INFO "S5PC100: PLL settings, A=%ld, M=%ld, E=%ld, H=%ld\n",
1084 apll, mpll, epll, hpll); 1084 apll, mpll, epll, hpll);
1085 1085
1086 armclk = apll / GET_DIV(clkdiv0, S5PC1XX_CLKDIV0_APLL); 1086 armclk = apll / GET_DIV(clkdiv0, S5PC100_CLKDIV0_APLL);
1087 armclk = armclk / GET_DIV(clkdiv0, S5PC100_CLKDIV0_ARM); 1087 armclk = armclk / GET_DIV(clkdiv0, S5PC100_CLKDIV0_ARM);
1088 hclkd0 = armclk / GET_DIV(clkdiv0, S5PC100_CLKDIV0_D0); 1088 hclkd0 = armclk / GET_DIV(clkdiv0, S5PC100_CLKDIV0_D0);
1089 pclkd0 = hclkd0 / GET_DIV(clkdiv0, S5PC100_CLKDIV0_PCLKD0); 1089 pclkd0 = hclkd0 / GET_DIV(clkdiv0, S5PC100_CLKDIV0_PCLKD0);