mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-03-06 06:21:03 +01:00
spi: cadence_qspi: Set tshsl_ns to at least one sclk_ns
tshsl_ns is the clock delay for chip select deassert. This is the delay in master reference clocks for the length that the master mode chip select outputs are de-asserted between transactions. The minimum delay is always SCLK period to ensure the chip select is never re-asserted within one SCLK period. That is why tshsl_ns delay should be at least one sclk_ns value. If it is less than sclk_ns, set it equal to sclk_ns. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20250702065717.3871435-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
This commit is contained in:
parent
92fcd3c168
commit
bfa3f147e1
@ -303,6 +303,10 @@ void cadence_qspi_apb_delay(void *reg_base,
|
||||
tshsl_ns -= sclk_ns + ref_clk_ns;
|
||||
if (tchsh_ns >= sclk_ns + 3 * ref_clk_ns)
|
||||
tchsh_ns -= sclk_ns + 3 * ref_clk_ns;
|
||||
|
||||
if (tshsl_ns < sclk_ns)
|
||||
tshsl_ns = sclk_ns;
|
||||
|
||||
tshsl = DIV_ROUND_UP(tshsl_ns, ref_clk_ns);
|
||||
tchsh = DIV_ROUND_UP(tchsh_ns, ref_clk_ns);
|
||||
tslch = DIV_ROUND_UP(tslch_ns, ref_clk_ns);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user