Skip to contentSkip to conversation

ARM: lpc32xx: stop overwriting TEST_CLK_SEL

PATCH In review Alexandre Belloni 3 participants 3 messages Apr 11, 2019 – Apr 19, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: lpc32xx: stop overwriting TEST_CLK_SEL

While the UDA1380 is described in some lpc3250 device trees, there is currently no real user of that codec. Anyway, if the codec needs a clock, it should take it explicitly.

lpc3250_machine_init is called for all the lpc32xx machines and some are using test1_clk (for example to strobe an HW watchdog). Overwriting TEST_CLK_SEL prevents booting those platforms.

---
 arch/arm/mach-lpc32xx/phy3250.c | 5 -----
 1 file changed, 5 deletions(-)
arch/arm/mach-lpc32xx/phy3250.c +0 -5
index fdbb1409c32b..1db8508493a5 100644
@@ -128,11 +128,6 @@ static void __init lpc3250_machine_init(void)
 {
 	lpc32xx_serial_init();
 
-	/* Test clock needed for UDA1380 initial init */
-	__raw_writel(LPC32XX_CLKPWR_TESTCLK2_SEL_MOSC |
-		LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN,
-		LPC32XX_CLKPWR_TEST_CLK_SEL);
-
 	of_platform_default_populate(NULL, lpc32xx_auxdata_lookup, NULL);
 }
 
Signature · 1 line
2.20.1
Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Alexandre Belloni

While the UDA1380 is described in some lpc3250 device trees, there is currently no real user of that codec. Anyway, if the codec needs a clock, it should take it explicitly.

lpc3250_machine_init is called for all the lpc32xx machines and some are using test1_clk (for example to strobe an HW watchdog). Overwriting TEST_CLK_SEL prevents booting those platforms.

Quoted 19 lines
---
 arch/arm/mach-lpc32xx/phy3250.c | 5 -----
 1 file changed, 5 deletions(-)
arch/arm/mach-lpc32xx/phy3250.c +0 -5
index fdbb1409c32b..1db8508493a5 100644
@@ -128,11 +128,6 @@ static void __init lpc3250_machine_init(void)
 {
 	lpc32xx_serial_init();
 
-	/* Test clock needed for UDA1380 initial init */
-	__raw_writel(LPC32XX_CLKPWR_TESTCLK2_SEL_MOSC |
-		LPC32XX_CLKPWR_TESTCLK_TESTCLK2_EN,
-		LPC32XX_CLKPWR_TEST_CLK_SEL);
-
 	of_platform_default_populate(NULL, lpc32xx_auxdata_lookup, NULL);
 }
#2 lore raw

Hi Alexandre, Gregory,

Quoted 6 lines · On 04/15/2019 10:59 AM, [email protected] wrote:
Quoted 5 lines · Alexandre Belloni

While the UDA1380 is described in some lpc3250 device trees, there is currently no real user of that codec. Anyway, if the codec needs a clock,
it should take it explicitly.

Quoted 8 lines
Quoted 6 lines

lpc3250_machine_init is called for all the lpc32xx machines and some are
using test1_clk (for example to strobe an HW watchdog). Overwriting TEST_CLK_SEL prevents booting those platforms.

I've applied the change to my tree, hopefully it will be included into v5.2.

Thank you!

--
Best wishes,
Vladimir