diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-03-26 09:22:55 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-01 04:30:04 -0400 |
commit | 0c672aae287ef0b9a12a1ca67c1ad7a4bbe470ac (patch) | |
tree | e70b2a021b7dfaaec8a9a54a6174ce0cd1681115 | |
parent | 38d6590f0f54ad85a7e841ef6c2c6f0fc8e2e832 (diff) |
clk: mxs: remove the use of mach level IO accessor
It removes the use of mach level IO accessor __mxs_setl/clrl, and hence
removes mach header inclusion from clock driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
-rw-r--r-- | drivers/clk/mxs/clk-imx23.c | 11 | ||||
-rw-r--r-- | drivers/clk/mxs/clk-imx28.c | 13 |
2 files changed, 11 insertions, 13 deletions
diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c index 0c8fda48d0a2..f6a74872f14e 100644 --- a/drivers/clk/mxs/clk-imx23.c +++ b/drivers/clk/mxs/clk-imx23.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/of_address.h> | 18 | #include <linux/of_address.h> |
19 | #include <mach/mx23.h> | ||
20 | #include "clk.h" | 19 | #include "clk.h" |
21 | 20 | ||
22 | static void __iomem *clkctrl; | 21 | static void __iomem *clkctrl; |
@@ -52,10 +51,10 @@ static void __init clk_misc_init(void) | |||
52 | u32 val; | 51 | u32 val; |
53 | 52 | ||
54 | /* Gate off cpu clock in WFI for power saving */ | 53 | /* Gate off cpu clock in WFI for power saving */ |
55 | __mxs_setl(1 << BP_CPU_INTERRUPT_WAIT, CPU); | 54 | writel_relaxed(1 << BP_CPU_INTERRUPT_WAIT, CPU + SET); |
56 | 55 | ||
57 | /* Clear BYPASS for SAIF */ | 56 | /* Clear BYPASS for SAIF */ |
58 | __mxs_clrl(1 << BP_CLKSEQ_BYPASS_SAIF, CLKSEQ); | 57 | writel_relaxed(1 << BP_CLKSEQ_BYPASS_SAIF, CLKSEQ + CLR); |
59 | 58 | ||
60 | /* SAIF has to use frac div for functional operation */ | 59 | /* SAIF has to use frac div for functional operation */ |
61 | val = readl_relaxed(SAIF); | 60 | val = readl_relaxed(SAIF); |
@@ -66,14 +65,14 @@ static void __init clk_misc_init(void) | |||
66 | * Source ssp clock from ref_io than ref_xtal, | 65 | * Source ssp clock from ref_io than ref_xtal, |
67 | * as ref_xtal only provides 24 MHz as maximum. | 66 | * as ref_xtal only provides 24 MHz as maximum. |
68 | */ | 67 | */ |
69 | __mxs_clrl(1 << BP_CLKSEQ_BYPASS_SSP, CLKSEQ); | 68 | writel_relaxed(1 << BP_CLKSEQ_BYPASS_SSP, CLKSEQ + CLR); |
70 | 69 | ||
71 | /* | 70 | /* |
72 | * 480 MHz seems too high to be ssp clock source directly, | 71 | * 480 MHz seems too high to be ssp clock source directly, |
73 | * so set frac to get a 288 MHz ref_io. | 72 | * so set frac to get a 288 MHz ref_io. |
74 | */ | 73 | */ |
75 | __mxs_clrl(0x3f << BP_FRAC_IOFRAC, FRAC); | 74 | writel_relaxed(0x3f << BP_FRAC_IOFRAC, FRAC + CLR); |
76 | __mxs_setl(30 << BP_FRAC_IOFRAC, FRAC); | 75 | writel_relaxed(30 << BP_FRAC_IOFRAC, FRAC + SET); |
77 | } | 76 | } |
78 | 77 | ||
79 | static const char *sel_pll[] __initconst = { "pll", "ref_xtal", }; | 78 | static const char *sel_pll[] __initconst = { "pll", "ref_xtal", }; |
diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index f623fdd93b46..d0e5eed146de 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/of.h> | 17 | #include <linux/of.h> |
18 | #include <linux/of_address.h> | 18 | #include <linux/of_address.h> |
19 | #include <mach/mx28.h> | ||
20 | #include "clk.h" | 19 | #include "clk.h" |
21 | 20 | ||
22 | static void __iomem *clkctrl; | 21 | static void __iomem *clkctrl; |
@@ -75,8 +74,8 @@ int mxs_saif_clkmux_select(unsigned int clkmux) | |||
75 | if (clkmux > 0x3) | 74 | if (clkmux > 0x3) |
76 | return -EINVAL; | 75 | return -EINVAL; |
77 | 76 | ||
78 | __mxs_clrl(0x3 << BP_SAIF_CLKMUX, DIGCTRL); | 77 | writel_relaxed(0x3 << BP_SAIF_CLKMUX, DIGCTRL + CLR); |
79 | __mxs_setl(clkmux << BP_SAIF_CLKMUX, DIGCTRL); | 78 | writel_relaxed(clkmux << BP_SAIF_CLKMUX, DIGCTRL + SET); |
80 | 79 | ||
81 | return 0; | 80 | return 0; |
82 | } | 81 | } |
@@ -86,13 +85,13 @@ static void __init clk_misc_init(void) | |||
86 | u32 val; | 85 | u32 val; |
87 | 86 | ||
88 | /* Gate off cpu clock in WFI for power saving */ | 87 | /* Gate off cpu clock in WFI for power saving */ |
89 | __mxs_setl(1 << BP_CPU_INTERRUPT_WAIT, CPU); | 88 | writel_relaxed(1 << BP_CPU_INTERRUPT_WAIT, CPU + SET); |
90 | 89 | ||
91 | /* 0 is a bad default value for a divider */ | 90 | /* 0 is a bad default value for a divider */ |
92 | __mxs_setl(1 << BP_ENET_DIV_TIME, ENET); | 91 | writel_relaxed(1 << BP_ENET_DIV_TIME, ENET + SET); |
93 | 92 | ||
94 | /* Clear BYPASS for SAIF */ | 93 | /* Clear BYPASS for SAIF */ |
95 | __mxs_clrl(0x3 << BP_CLKSEQ_BYPASS_SAIF0, CLKSEQ); | 94 | writel_relaxed(0x3 << BP_CLKSEQ_BYPASS_SAIF0, CLKSEQ + CLR); |
96 | 95 | ||
97 | /* SAIF has to use frac div for functional operation */ | 96 | /* SAIF has to use frac div for functional operation */ |
98 | val = readl_relaxed(SAIF0); | 97 | val = readl_relaxed(SAIF0); |
@@ -112,7 +111,7 @@ static void __init clk_misc_init(void) | |||
112 | * Source ssp clock from ref_io than ref_xtal, | 111 | * Source ssp clock from ref_io than ref_xtal, |
113 | * as ref_xtal only provides 24 MHz as maximum. | 112 | * as ref_xtal only provides 24 MHz as maximum. |
114 | */ | 113 | */ |
115 | __mxs_clrl(0xf << BP_CLKSEQ_BYPASS_SSP0, CLKSEQ); | 114 | writel_relaxed(0xf << BP_CLKSEQ_BYPASS_SSP0, CLKSEQ + CLR); |
116 | 115 | ||
117 | /* | 116 | /* |
118 | * 480 MHz seems too high to be ssp clock source directly, | 117 | * 480 MHz seems too high to be ssp clock source directly, |