Skip to content

Commit 0ebe8aa

Browse files
KanjiMonsterralfbaechle
authored andcommitted
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/
1 parent 597ce17 commit 0ebe8aa

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

‎arch/mips/bcm63xx/clk.c‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,28 @@ static struct clk clk_spi = {
225225
.set = spi_set,
226226
};
227227

228+
/*
229+
* HSSPI clock
230+
*/
231+
static 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+
245+
static struct clk clk_hsspi = {
246+
.set = hsspi_set,
247+
};
248+
249+
228250
/*
229251
* XTM clock
230252
*/
@@ -346,6 +368,8 @@ struct clk *clk_get(struct device *dev, const char *id)
346368
return &clk_usbd;
347369
if (!strcmp(id, "spi"))
348370
return &clk_spi;
371+
if (!strcmp(id, "hsspi"))
372+
return &clk_hsspi;
349373
if (!strcmp(id, "xtm"))
350374
return &clk_xtm;
351375
if (!strcmp(id, "periph"))

0 commit comments

Comments
 (0)