mbox series

[V2,0/3] spi: cadence_qspi: Fixes for DTR ops and improve STIG support

Message ID 20230412105856.3565220-1-d-gole@ti.com
Headers show
Series spi: cadence_qspi: Fixes for DTR ops and improve STIG support | expand

Message

Dhruva Gole April 12, 2023, 10:58 a.m. UTC
This series aims to address some critical bugs in the cadence qspi
driver like the need to Flush the CMDCTRL reg after the execution due to
a hardware limitation and also fixes the check conditions for DTR ops.

previously posted:
https://lore.kernel.org/u-boot/20230323164408.1043725-1-d-gole@ti.com/

Changelog:
* Preserve Apurva's authorship
* Split the cmdctrl reg clearing patch into a seperate one
* Address few other comments from Pratyush on the previous series

Logs (on AM62x SK EVM):

...
U-Boot 2023.04-rc5-00589-g1a9171bfbc66 (Apr 12 2023 - 16:16:19 +0530)

SoC:   AM62X SR1.0 HS-FS
Model: Texas Instruments AM625 SK
DRAM:  2 GiB
Core:  50 devices, 20 uclasses, devicetree: separate
MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
Loading Environment from nowhere... OK
In:    serial@2800000
Out:   serial@2800000
Err:   serial@2800000
Net:   eth0: ethernet@8000000port@1
Hit any key to stop autoboot:  0
=>
=> sf probe
SF: Detected s28hs512t with page size 256 Bytes, erase size 256 KiB, total 64 MiB
=> random $loadaddr 0x200000
2097152 bytes filled with random data
=> sf update $loadaddr 0x0 0x200000
device 0 offset 0x0, size 0x200000
2097152 bytes written, 0 bytes skipped in 13.365s, speed 160643 B/s
=> sf read 0x90000000 0x0 0x200000
device 0 offset 0x0, size 0x200000
SF: 2097152 bytes @ 0x0 Read: OK
=> cmp.b $loadaddr 0x90000000 0x200000
Total of 2097152 byte(s) were the same

local git log:
...
1a9171bfbc66 (HEAD -> next) spi: cadence-quadspi: Reset CMD_CTRL Reg on cmd r/w completion
f60c2702c9df spi: cadence-quadspi: Use STIG mode for all ops with small payload
f84f1b610f90 spi: cadence-quadspi: Fix check condition for DTR ops
a25dcda452bf (origin/next) Revert "disk: Use a helper function to reduce duplication"
...

Apurva Nandan (2):
  spi: cadence-quadspi: Fix check condition for DTR ops
  spi: cadence-quadspi: Use STIG mode for all ops with small payload

Dhruva Gole (1):
  spi: cadence-quadspi: Reset CMD_CTRL Reg on cmd r/w completion

 drivers/spi/cadence_qspi.c     | 16 +++++++---
 drivers/spi/cadence_qspi_apb.c | 56 +++++++++++++++++++++-------------
 2 files changed, 46 insertions(+), 26 deletions(-)

Comments

Jagan Teki April 26, 2023, 8:08 a.m. UTC | #1
On Wed, Apr 12, 2023 at 4:29 PM Dhruva Gole <d-gole@ti.com> wrote:
>
> This series aims to address some critical bugs in the cadence qspi
> driver like the need to Flush the CMDCTRL reg after the execution due to
> a hardware limitation and also fixes the check conditions for DTR ops.
>
> previously posted:
> https://lore.kernel.org/u-boot/20230323164408.1043725-1-d-gole@ti.com/
>
> Changelog:
> * Preserve Apurva's authorship
> * Split the cmdctrl reg clearing patch into a seperate one
> * Address few other comments from Pratyush on the previous series
>
> Logs (on AM62x SK EVM):
>
> ...
> U-Boot 2023.04-rc5-00589-g1a9171bfbc66 (Apr 12 2023 - 16:16:19 +0530)
>
> SoC:   AM62X SR1.0 HS-FS
> Model: Texas Instruments AM625 SK
> DRAM:  2 GiB
> Core:  50 devices, 20 uclasses, devicetree: separate
> MMC:   mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2
> Loading Environment from nowhere... OK
> In:    serial@2800000
> Out:   serial@2800000
> Err:   serial@2800000
> Net:   eth0: ethernet@8000000port@1
> Hit any key to stop autoboot:  0
> =>
> => sf probe
> SF: Detected s28hs512t with page size 256 Bytes, erase size 256 KiB, total 64 MiB
> => random $loadaddr 0x200000
> 2097152 bytes filled with random data
> => sf update $loadaddr 0x0 0x200000
> device 0 offset 0x0, size 0x200000
> 2097152 bytes written, 0 bytes skipped in 13.365s, speed 160643 B/s
> => sf read 0x90000000 0x0 0x200000
> device 0 offset 0x0, size 0x200000
> SF: 2097152 bytes @ 0x0 Read: OK
> => cmp.b $loadaddr 0x90000000 0x200000
> Total of 2097152 byte(s) were the same
>
> local git log:
> ...
> 1a9171bfbc66 (HEAD -> next) spi: cadence-quadspi: Reset CMD_CTRL Reg on cmd r/w completion
> f60c2702c9df spi: cadence-quadspi: Use STIG mode for all ops with small payload
> f84f1b610f90 spi: cadence-quadspi: Fix check condition for DTR ops
> a25dcda452bf (origin/next) Revert "disk: Use a helper function to reduce duplication"
> ...
>
> Apurva Nandan (2):
>   spi: cadence-quadspi: Fix check condition for DTR ops
>   spi: cadence-quadspi: Use STIG mode for all ops with small payload
>
> Dhruva Gole (1):
>   spi: cadence-quadspi: Reset CMD_CTRL Reg on cmd r/w completion
>
>  drivers/spi/cadence_qspi.c     | 16 +++++++---
>  drivers/spi/cadence_qspi_apb.c | 56 +++++++++++++++++++++-------------
>  2 files changed, 46 insertions(+), 26 deletions(-)

Applied to u-boot-spi/master