Commit 0ebe8aae authored by Jonas Gorski's avatar Jonas Gorski Committed by Ralf Baechle

MIPS: BCM63XX: expose the HSSPI clock

Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6178/
parent 597ce172
...@@ -225,6 +225,28 @@ static struct clk clk_spi = { ...@@ -225,6 +225,28 @@ static struct clk clk_spi = {
.set = spi_set, .set = spi_set,
}; };
/*
* HSSPI clock
*/
static void hsspi_set(struct clk *clk, int enable)
{
u32 mask;
if (BCMCPU_IS_6328())
mask = CKCTL_6328_HSSPI_EN;
else if (BCMCPU_IS_6362())
mask = CKCTL_6362_HSSPI_EN;
else
return;
bcm_hwclock_set(mask, enable);
}
static struct clk clk_hsspi = {
.set = hsspi_set,
};
/* /*
* XTM clock * XTM clock
*/ */
...@@ -346,6 +368,8 @@ struct clk *clk_get(struct device *dev, const char *id) ...@@ -346,6 +368,8 @@ struct clk *clk_get(struct device *dev, const char *id)
return &clk_usbd; return &clk_usbd;
if (!strcmp(id, "spi")) if (!strcmp(id, "spi"))
return &clk_spi; return &clk_spi;
if (!strcmp(id, "hsspi"))
return &clk_hsspi;
if (!strcmp(id, "xtm")) if (!strcmp(id, "xtm"))
return &clk_xtm; return &clk_xtm;
if (!strcmp(id, "periph")) if (!strcmp(id, "periph"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment