Skip to content

Commit

Permalink
MIPS: BCM63XX: expose the HSSPI clock
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6178/
  • Loading branch information
Jonas Gorski authored and Ralf Baechle committed Jan 22, 2014
1 parent 597ce17 commit 0ebe8aa
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions arch/mips/bcm63xx/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,28 @@ static struct clk clk_spi = {
.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
*/
Expand Down Expand Up @@ -346,6 +368,8 @@ struct clk *clk_get(struct device *dev, const char *id)
return &clk_usbd;
if (!strcmp(id, "spi"))
return &clk_spi;
if (!strcmp(id, "hsspi"))
return &clk_hsspi;
if (!strcmp(id, "xtm"))
return &clk_xtm;
if (!strcmp(id, "periph"))
Expand Down

0 comments on commit 0ebe8aa

Please sign in to comment.