aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/bcm63xx
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-11-30 06:42:02 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-01-22 14:18:49 -0500
commit0ebe8aaefade244b224d65d1c83addea21dce4c3 (patch)
tree87729b7b15b79c18bdd7040677a038ee2479e9e3 /arch/mips/bcm63xx
parent597ce1723e0fa0bdbe2ae4c94f18da6e29b92635 (diff)
MIPS: BCM63XX: expose the HSSPI clock
Signed-off-by: Jonas Gorski <jogo@openwrt.org> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6178/
Diffstat (limited to 'arch/mips/bcm63xx')
-rw-r--r--arch/mips/bcm63xx/clk.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/bcm63xx/clk.c b/arch/mips/bcm63xx/clk.c
index 43da4ae04cc2..37a621a634ee 100644
--- a/arch/mips/bcm63xx/clk.c
+++ b/arch/mips/bcm63xx/clk.c
@@ -226,6 +226,28 @@ static struct clk clk_spi = {
226}; 226};
227 227
228/* 228/*
229 * HSSPI clock
230 */
231static void hsspi_set(struct clk *clk, int enable)
232{
233 u32 mask;
234
235 if (BCMCPU_IS_6328())
236 mask = CKCTL_6328_HSSPI_EN;
237 else if (BCMCPU_IS_6362())
238 mask = CKCTL_6362_HSSPI_EN;
239 else
240 return;
241
242 bcm_hwclock_set(mask, enable);
243}
244
245static struct clk clk_hsspi = {
246 .set = hsspi_set,
247};
248
249
250/*
229 * XTM clock 251 * XTM clock
230 */ 252 */
231static void xtm_set(struct clk *clk, int enable) 253static void xtm_set(struct clk *clk, int enable)
@@ -346,6 +368,8 @@ struct clk *clk_get(struct device *dev, const char *id)
346 return &clk_usbd; 368 return &clk_usbd;
347 if (!strcmp(id, "spi")) 369 if (!strcmp(id, "spi"))
348 return &clk_spi; 370 return &clk_spi;
371 if (!strcmp(id, "hsspi"))
372 return &clk_hsspi;
349 if (!strcmp(id, "xtm")) 373 if (!strcmp(id, "xtm"))
350 return &clk_xtm; 374 return &clk_xtm;
351 if (!strcmp(id, "periph")) 375 if (!strcmp(id, "periph"))