Skip to content

Commit

Permalink
MIPS: BCM63XX: move the HSSPI PLL HZ into its own clock
Browse files Browse the repository at this point in the history
Split up the HSSPL clock into rate and a gate clock, to more closely
match the actual hardware.

Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: Jonas Gorski <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Kevin Cernekee <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/17330/
Signed-off-by: Ralf Baechle <[email protected]>
Signed-off-by: James Hogan <[email protected]>
  • Loading branch information
KanjiMonster authored and amalon committed Nov 7, 2017
1 parent bed8d2a commit 5d69103
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arch/mips/bcm63xx/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ static struct clk clk_hsspi = {
.set = hsspi_set,
};

/*
* HSSPI PLL
*/
static struct clk clk_hsspi_pll;

/*
* XTM clock
Expand Down Expand Up @@ -380,6 +384,7 @@ static struct clk_lookup bcm6328_clks[] = {
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
Expand Down Expand Up @@ -447,6 +452,7 @@ static struct clk_lookup bcm6362_clks[] = {
CLKDEV_INIT(NULL, "periph", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.0", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx_uart.1", "refclk", &clk_periph),
CLKDEV_INIT("bcm63xx-hsspi.0", "pll", &clk_hsspi_pll),
/* gated clocks */
CLKDEV_INIT(NULL, "enetsw", &clk_enetsw),
CLKDEV_INIT(NULL, "usbh", &clk_usbh),
Expand Down Expand Up @@ -481,7 +487,7 @@ static int __init bcm63xx_clk_init(void)
clkdev_add_table(bcm3368_clks, ARRAY_SIZE(bcm3368_clks));
break;
case BCM6328_CPU_ID:
clk_hsspi.rate = HSSPI_PLL_HZ_6328;
clk_hsspi_pll.rate = HSSPI_PLL_HZ_6328;
clkdev_add_table(bcm6328_clks, ARRAY_SIZE(bcm6328_clks));
break;
case BCM6338_CPU_ID:
Expand All @@ -497,7 +503,7 @@ static int __init bcm63xx_clk_init(void)
clkdev_add_table(bcm6358_clks, ARRAY_SIZE(bcm6358_clks));
break;
case BCM6362_CPU_ID:
clk_hsspi.rate = HSSPI_PLL_HZ_6362;
clk_hsspi_pll.rate = HSSPI_PLL_HZ_6362;
clkdev_add_table(bcm6362_clks, ARRAY_SIZE(bcm6362_clks));
break;
case BCM6368_CPU_ID:
Expand Down

0 comments on commit 5d69103

Please sign in to comment.