Skip to content

Commit 26b8c07

Browse files
KanjiMonsterralfbaechle
authored andcommitted
MIPS: BCM63XX: setup the HSSPI clock rate
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/
1 parent 0ebe8aa commit 26b8c07

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎arch/mips/bcm63xx/clk.c‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,3 +390,21 @@ void clk_put(struct clk *clk)
390390
}
391391

392392
EXPORT_SYMBOL(clk_put);
393+
394+
#define HSSPI_PLL_HZ_6328 133333333
395+
#define HSSPI_PLL_HZ_6362 400000000
396+
397+
static int __init bcm63xx_clk_init(void)
398+
{
399+
switch (bcm63xx_get_cpu_id()) {
400+
case BCM6328_CPU_ID:
401+
clk_hsspi.rate = HSSPI_PLL_HZ_6328;
402+
break;
403+
case BCM6362_CPU_ID:
404+
clk_hsspi.rate = HSSPI_PLL_HZ_6362;
405+
break;
406+
}
407+
408+
return 0;
409+
}
410+
arch_initcall(bcm63xx_clk_init);

0 commit comments

Comments
 (0)