hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/m68k/coldfire/m5441x.c
....@@ -52,7 +52,7 @@
5252 DEFINE_CLK(0, "pll.0", 48, MCF_CLK);
5353 DEFINE_CLK(0, "mcfrng.0", 49, MCF_CLK);
5454 DEFINE_CLK(0, "mcfssi.1", 50, MCF_CLK);
55
-DEFINE_CLK(0, "mcfsdhc.0", 51, MCF_CLK);
55
+DEFINE_CLK(0, "sdhci-esdhc-mcf.0", 51, MCF_CLK);
5656 DEFINE_CLK(0, "enet-fec.0", 53, MCF_CLK);
5757 DEFINE_CLK(0, "enet-fec.1", 54, MCF_CLK);
5858 DEFINE_CLK(0, "switch.0", 55, MCF_CLK);
....@@ -73,6 +73,10 @@
7373 DEFINE_CLK(1, "mcfpwm.0", 34, MCF_BUSCLK);
7474 DEFINE_CLK(1, "sys.0", 36, MCF_BUSCLK);
7575 DEFINE_CLK(1, "gpio.0", 37, MCF_BUSCLK);
76
+
77
+DEFINE_CLK(2, "ipg.0", 0, MCF_CLK);
78
+DEFINE_CLK(2, "ahb.0", 1, MCF_CLK);
79
+DEFINE_CLK(2, "per.0", 2, MCF_CLK);
7680
7781 struct clk *mcf_clks[] = {
7882 &__clk_0_2,
....@@ -131,12 +135,19 @@
131135 &__clk_1_34,
132136 &__clk_1_36,
133137 &__clk_1_37,
138
+
139
+ &__clk_2_0,
140
+ &__clk_2_1,
141
+ &__clk_2_2,
142
+
134143 NULL,
135144 };
136145
137146
138147 static struct clk * const enable_clks[] __initconst = {
139148 /* make sure these clocks are enabled */
149
+ &__clk_0_15, /* dspi.1 */
150
+ &__clk_0_17, /* eDMA */
140151 &__clk_0_18, /* intc0 */
141152 &__clk_0_19, /* intc0 */
142153 &__clk_0_20, /* intc0 */
....@@ -149,6 +160,7 @@
149160 &__clk_0_33, /* pit.1 */
150161 &__clk_0_37, /* eport */
151162 &__clk_0_48, /* pll */
163
+ &__clk_0_51, /* esdhc */
152164
153165 &__clk_1_36, /* CCM/reset module/Power management */
154166 &__clk_1_37, /* gpio */
....@@ -157,8 +169,6 @@
157169 &__clk_0_8, /* can.0 */
158170 &__clk_0_9, /* can.1 */
159171 &__clk_0_14, /* i2c.1 */
160
- &__clk_0_15, /* dspi.1 */
161
- &__clk_0_17, /* eDMA */
162172 &__clk_0_22, /* i2c.0 */
163173 &__clk_0_23, /* dspi.0 */
164174 &__clk_0_28, /* tmr.1 */
....@@ -194,6 +204,21 @@
194204 &__clk_1_29, /* uart 9 */
195205 };
196206
207
+static void __clk_enable2(struct clk *clk)
208
+{
209
+ __raw_writel(__raw_readl(MCFSDHC_CLK) | (1 << clk->slot), MCFSDHC_CLK);
210
+}
211
+
212
+static void __clk_disable2(struct clk *clk)
213
+{
214
+ __raw_writel(__raw_readl(MCFSDHC_CLK) & ~(1 << clk->slot), MCFSDHC_CLK);
215
+}
216
+
217
+struct clk_ops clk_ops2 = {
218
+ .enable = __clk_enable2,
219
+ .disable = __clk_disable2,
220
+};
221
+
197222 static void __init m5441x_clk_init(void)
198223 {
199224 unsigned i;