diff options
Diffstat (limited to 'arch/mips/bcm63xx/clk.c')
-rw-r--r-- | arch/mips/bcm63xx/clk.c | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c index c726a97fc798..43da4ae04cc2 100644 --- a/arch/mips/bcm63xx/clk.c +++ b/arch/mips/bcm63xx/clk.c | |||
@@ -84,7 +84,7 @@ static void enetx_set(struct clk *clk, int enable) | |||
84 | else | 84 | else |
85 | clk_disable_unlocked(&clk_enet_misc); | 85 | clk_disable_unlocked(&clk_enet_misc); |
86 | 86 | ||
87 | if (BCMCPU_IS_6358()) { | 87 | if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) { |
88 | u32 mask; | 88 | u32 mask; |
89 | 89 | ||
90 | if (clk->id == 0) | 90 | if (clk->id == 0) |
@@ -110,9 +110,8 @@ static struct clk clk_enet1 = { | |||
110 | */ | 110 | */ |
111 | static void ephy_set(struct clk *clk, int enable) | 111 | static void ephy_set(struct clk *clk, int enable) |
112 | { | 112 | { |
113 | if (!BCMCPU_IS_6358()) | 113 | if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) |
114 | return; | 114 | bcm_hwclock_set(CKCTL_6358_EPHY_EN, enable); |
115 | bcm_hwclock_set(CKCTL_6358_EPHY_EN, enable); | ||
116 | } | 115 | } |
117 | 116 | ||
118 | 117 | ||
@@ -155,9 +154,10 @@ static struct clk clk_enetsw = { | |||
155 | */ | 154 | */ |
156 | static void pcm_set(struct clk *clk, int enable) | 155 | static void pcm_set(struct clk *clk, int enable) |
157 | { | 156 | { |
158 | if (!BCMCPU_IS_6358()) | 157 | if (BCMCPU_IS_3368()) |
159 | return; | 158 | bcm_hwclock_set(CKCTL_3368_PCM_EN, enable); |
160 | bcm_hwclock_set(CKCTL_6358_PCM_EN, enable); | 159 | if (BCMCPU_IS_6358()) |
160 | bcm_hwclock_set(CKCTL_6358_PCM_EN, enable); | ||
161 | } | 161 | } |
162 | 162 | ||
163 | static struct clk clk_pcm = { | 163 | static struct clk clk_pcm = { |
@@ -211,7 +211,7 @@ static void spi_set(struct clk *clk, int enable) | |||
211 | mask = CKCTL_6338_SPI_EN; | 211 | mask = CKCTL_6338_SPI_EN; |
212 | else if (BCMCPU_IS_6348()) | 212 | else if (BCMCPU_IS_6348()) |
213 | mask = CKCTL_6348_SPI_EN; | 213 | mask = CKCTL_6348_SPI_EN; |
214 | else if (BCMCPU_IS_6358()) | 214 | else if (BCMCPU_IS_3368() || BCMCPU_IS_6358()) |
215 | mask = CKCTL_6358_SPI_EN; | 215 | mask = CKCTL_6358_SPI_EN; |
216 | else if (BCMCPU_IS_6362()) | 216 | else if (BCMCPU_IS_6362()) |
217 | mask = CKCTL_6362_SPI_EN; | 217 | mask = CKCTL_6362_SPI_EN; |
@@ -318,6 +318,18 @@ unsigned long clk_get_rate(struct clk *clk) | |||
318 | 318 | ||
319 | EXPORT_SYMBOL(clk_get_rate); | 319 | EXPORT_SYMBOL(clk_get_rate); |
320 | 320 | ||
321 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
322 | { | ||
323 | return 0; | ||
324 | } | ||
325 | EXPORT_SYMBOL_GPL(clk_set_rate); | ||
326 | |||
327 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
328 | { | ||
329 | return 0; | ||
330 | } | ||
331 | EXPORT_SYMBOL_GPL(clk_round_rate); | ||
332 | |||
321 | struct clk *clk_get(struct device *dev, const char *id) | 333 | struct clk *clk_get(struct device *dev, const char *id) |
322 | { | 334 | { |
323 | if (!strcmp(id, "enet0")) | 335 | if (!strcmp(id, "enet0")) |
@@ -338,7 +350,7 @@ struct clk *clk_get(struct device *dev, const char *id) | |||
338 | return &clk_xtm; | 350 | return &clk_xtm; |
339 | if (!strcmp(id, "periph")) | 351 | if (!strcmp(id, "periph")) |
340 | return &clk_periph; | 352 | return &clk_periph; |
341 | if (BCMCPU_IS_6358() && !strcmp(id, "pcm")) | 353 | if ((BCMCPU_IS_3368() || BCMCPU_IS_6358()) && !strcmp(id, "pcm")) |
342 | return &clk_pcm; | 354 | return &clk_pcm; |
343 | if ((BCMCPU_IS_6362() || BCMCPU_IS_6368()) && !strcmp(id, "ipsec")) | 355 | if ((BCMCPU_IS_6362() || BCMCPU_IS_6368()) && !strcmp(id, "ipsec")) |
344 | return &clk_ipsec; | 356 | return &clk_ipsec; |