linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Dhruva Gole" <d-gole@ti.com>,
	"Gregory CLEMENT" <gregory.clement@bootlin.com>,
	"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>
Subject: [PATCH 0/4] spi: cadence-quadspi: correct chip-select logic
Date: Fri, 09 Feb 2024 14:45:29 +0100	[thread overview]
Message-ID: <20240209-cdns-qspi-cs-v1-0-a4f9dfed9ab4@bootlin.com> (raw)

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,
-- 
Théo Lebrun <theo.lebrun@bootlin.com>


             reply	other threads:[~2024-02-09 13:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 13:45 Théo Lebrun [this message]
2024-02-09 13:45 ` [PATCH 1/4] spi: cadence-qspi: assert each subnode flash CS is valid Théo Lebrun
2024-02-12  5:24   ` Dhruva Gole
2024-02-09 13:45 ` [PATCH 2/4] spi: cadence-qspi: set maximum chip-select to 4 Théo Lebrun
2024-02-09 13:45 ` [PATCH 3/4] spi: cadence-qspi: report correct number of chip-select Théo Lebrun
2024-02-09 13:45 ` [PATCH 4/4] spi: cadence-qspi: switch from legacy names to modern ones Théo Lebrun
2024-02-21 18:43 ` [PATCH 0/4] spi: cadence-quadspi: correct chip-select logic Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240209-cdns-qspi-cs-v1-0-a4f9dfed9ab4@bootlin.com \
    --to=theo.lebrun@bootlin.com \
    --cc=broonie@kernel.org \
    --cc=d-gole@ti.com \
    --cc=gregory.clement@bootlin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vladimir.kondratiev@mobileye.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).