Skip to content

Commit

Permalink
MIPS: BCM63XX: setup the HSSPI clock rate
Browse files Browse the repository at this point in the history
Properly set up the HSSPI clock rate depending on the SoC's PLL rate.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6177/
  • Loading branch information
Jonas Gorski authored and Ralf Baechle committed Jan 22, 2014
1 parent 0ebe8aa commit 26b8c07
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions arch/mips/bcm63xx/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,21 @@ void clk_put(struct clk *clk)
}

EXPORT_SYMBOL(clk_put);

#define HSSPI_PLL_HZ_6328 133333333
#define HSSPI_PLL_HZ_6362 400000000

static int __init bcm63xx_clk_init(void)
{
switch (bcm63xx_get_cpu_id()) {
case BCM6328_CPU_ID:
clk_hsspi.rate = HSSPI_PLL_HZ_6328;
break;
case BCM6362_CPU_ID:
clk_hsspi.rate = HSSPI_PLL_HZ_6362;
break;
}

return 0;
}
arch_initcall(bcm63xx_clk_init);

0 comments on commit 26b8c07

Please sign in to comment.