Skip to contentSkip to conversation

spi: nxp_fspi: Fix clock imbalance

PATCH In review Marek Vasut 3 participants 3 messages Jun 13, 2022 – Jun 15, 2022 SPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: nxp_fspi: Fix clock imbalance

The nxp_fspi_default_setup() is only ever called from nxp_fspi_probe(), where the IP clock are initially disabled. Drop the second disabling of clock to prevent clock enable/disable imbalance reported by clock core:

"
clk qspi_root_clk already disabled
"

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
---
 drivers/spi/nxp_fspi.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/spi/nxp_fspi.c +0 -3
index 607c953987b..579d6bac9b1 100644
@@ -866,9 +866,6 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
 	u32 reg;
 
 #if CONFIG_IS_ENABLED(CLK)
-	/* disable and unprepare clock to avoid glitch pass to controller */
-	nxp_fspi_clk_disable_unprep(f);
-
 	/* the default frequency, we will change it later if necessary. */
 	ret = clk_set_rate(&f->clk, 20000000);
 	if (ret < 0)
Signature · 1 line
2.35.1
Reviewed-by Peng Fan on v1 1/1
#1 lore raw
Quoted 4 lines · Marek Vasut

The nxp_fspi_default_setup() is only ever called from nxp_fspi_probe(), where the IP clock are initially disabled. Drop the second disabling of clock to prevent clock enable/disable imbalance reported by clock core:

Quoted 8 lines

"
clk qspi_root_clk already disabled
"

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>
Quoted 18 lines
---
  drivers/spi/nxp_fspi.c | 3 ---
  1 file changed, 3 deletions(-)
drivers/spi/nxp_fspi.c +0 -3
index 607c953987b..579d6bac9b1 100644
@@ -866,9 +866,6 @@ static int nxp_fspi_default_setup(struct nxp_fspi *f)
  	u32 reg;
 
  #if CONFIG_IS_ENABLED(CLK)
-	/* disable and unprepare clock to avoid glitch pass to controller */
-	nxp_fspi_clk_disable_unprep(f);
-
  	/* the default frequency, we will change it later if necessary. */
  	ret = clk_set_rate(&f->clk, 20000000);
  	if (ret < 0)
#2 lore raw

PATCH 1/1 spi: nxp_fspi: Fix clock imbalance

In reply to Marek Vasut
Quoted 11 lines

The nxp_fspi_default_setup() is only ever called from nxp_fspi_probe(), where the IP clock are initially disabled. Drop the second disabling of clock to prevent clock enable/disable imbalance reported by clock core:
"
clk qspi_root_clk already disabled
"

Cc Fabio Estevam <[email protected]>
Cc Peng Fan <[email protected]>
Cc Stefano Babic <[email protected]>

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================