[0/4] spi: cadence-quadspi: correct chip-select logic

Message ID 20240209-cdns-qspi-cs-v1-0-a4f9dfed9ab4@bootlin.com
Headers
Series spi: cadence-quadspi: correct chip-select logic |

Message

Théo Lebrun Feb. 9, 2024, 1:45 p.m. UTC
  Hi,

Here are three independent patches that relate to the handling of
chip-select and the number of those in the spi-cadence-quadspi.c
driver.

 - First one is about checking each flash node reg (ie CS) against the
   ->num_chipselect value instead of the hardcoded max constant. That
   means it checks against the num-cs DT prop if it existed. Previously
   num-cs==1 with 2 flash nodes would have lead to no error,
   a ->num_chipselect==1 and 2 flashes.

 - Second, we lower the max CS constant from 16 to 4. The hardware only
   supports 4 anyway, and that makes for less memory used. This got
   discovered on v6.8-rc2 when the SPI subsystem imposed a max CS of 4.
   The change got reverted later.

 - Lastly, we adjust the ->num_chipselect value reported to the actual
   number of chip-selects. Previously, it reported either the num-cs DT
   prop or the max value (if no num-cs was provided).

There is also a small fix to move to modern names and avoid using the
legacy compatibility layer (slave, etc).

Thanks,
Théo

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
Théo Lebrun (4):
      spi: cadence-qspi: assert each subnode flash CS is valid
      spi: cadence-qspi: set maximum chip-select to 4
      spi: cadence-qspi: report correct number of chip-select
      spi: cadence-qspi: switch from legacy names to modern ones

 drivers/spi/spi-cadence-quadspi.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
---
base-commit: 19b50f80b3a4865bd477aa5c026dd234d39a50d2
change-id: 20240209-cdns-qspi-cs-621bfe7f327f

Best regards,
  

Comments

Mark Brown Feb. 21, 2024, 6:43 p.m. UTC | #1
On Fri, 09 Feb 2024 14:45:29 +0100, Théo Lebrun wrote:
> Here are three independent patches that relate to the handling of
> chip-select and the number of those in the spi-cadence-quadspi.c
> driver.
> 
>  - First one is about checking each flash node reg (ie CS) against the
>    ->num_chipselect value instead of the hardcoded max constant. That
>    means it checks against the num-cs DT prop if it existed. Previously
>    num-cs==1 with 2 flash nodes would have lead to no error,
>    a ->num_chipselect==1 and 2 flashes.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/4] spi: cadence-qspi: assert each subnode flash CS is valid
      commit: 0d62c64a8e48438545dcef7e5d2f4839ff5cfe4c
[2/4] spi: cadence-qspi: set maximum chip-select to 4
      commit: 7cc3522aedb5f4360c4502b2e89b279b7aa94ceb
[3/4] spi: cadence-qspi: report correct number of chip-select
      commit: 0f3841a5e1152eca1a58cfbd9ceb6d311aa7e647
[4/4] spi: cadence-qspi: switch from legacy names to modern ones
      (no commit info)

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark