public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] spi: cadence_qspi: Ensure spi_calibration is run when sclk change
@ 2015-09-01  8:46 Chin Liang See
  2015-09-01  9:01 ` Marek Vasut
  0 siblings, 1 reply; 7+ messages in thread
From: Chin Liang See @ 2015-09-01  8:46 UTC (permalink / raw)
  To: u-boot

Ensuring spi_calibration is run when there is a change of sclk
frequency. This will ensure the qspi flash access works for high
sclk frequency

Signed-off-by: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Vikas Manocha <vikas.manocha@st.com>
Cc: Jagannadh Teki <jteki@openedev.com>
Cc: Pavel Machek <pavel@denx.de>
---
 drivers/spi/cadence_qspi.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c
index 34a0f46..512bf2d 100644
--- a/drivers/spi/cadence_qspi.c
+++ b/drivers/spi/cadence_qspi.c
@@ -128,6 +128,9 @@ static int cadence_spi_set_speed(struct udevice *bus, uint hz)
 
 	cadence_spi_write_speed(bus, hz);
 
+	/* to ensure spi_calibration is run when SCLK frequency change */
+	plat->max_hz = hz;
+
 	/* Calibration required for different SCLK speed or chip select */
 	if (priv->qspi_calibrated_hz != plat->max_hz ||
 	    priv->qspi_calibrated_cs != spi_chip_select(bus)) {
-- 
1.7.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-01  9:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-01  8:46 [U-Boot] [PATCH] spi: cadence_qspi: Ensure spi_calibration is run when sclk change Chin Liang See
2015-09-01  9:01 ` Marek Vasut
2015-09-01  9:13   ` Chin Liang See
2015-09-01  9:14     ` Chin Liang See
2015-09-01  9:19     ` Marek Vasut
2015-09-01  9:30       ` Chin Liang See
2015-09-01  9:34         ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox