diff options
| author | T Karthik Reddy <[email protected]> | 2022-05-12 04:05:35 -0600 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2022-06-29 16:00:31 +0200 |
| commit | 2c27fdc0705251f594ecee3de0ea195ea421e05e (patch) | |
| tree | c321bcfcdfa5de9d7bc30424979007234d01b167 | |
| parent | 248fe9f302df5f20d75a7d88b793db017262d750 (diff) | |
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 <[email protected]>
Signed-off-by: Ashok Reddy Soma <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
| -rw-r--r-- | drivers/spi/cadence_qspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/cadence_qspi.c b/drivers/spi/cadence_qspi.c index 5fb4d2ff03b..907f5dadc4f 100644 --- a/drivers/spi/cadence_qspi.c +++ b/drivers/spi/cadence_qspi.c @@ -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 */ |
