spi: cadence-qspi: Fix programming ospi flash speed

When the requested flash speed is 0, the baudrate division for the
requested speed causing drop in the performance. So set the ospi flash
to operate at max frequency when requested speed is zero.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/20220512100535.16364-6-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
This commit is contained in:
T Karthik Reddy authored and Michal Simek committed 2022-06-29 16:00:31 +02:00
1 parent 248fe9f302
commit 2c27fdc070
1 file changed
+1 -1
+1 -1
View File
@@ -151,7 +151,7 @@ static int cadence_spi_set_speed(struct udevice *bus, uint hz)
struct cadence_spi_priv *priv = dev_get_priv(bus);
int err;
if (hz > plat->max_hz)
if (!hz || hz > plat->max_hz)
hz = plat->max_hz;
/* Disable QSPI */