From: Dhruva Gole <d-gole@ti.com>
To: "Théo Lebrun" <theo.lebrun@bootlin.com>
Cc: Mark Brown <broonie@kernel.org>, <linux-spi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Gregory CLEMENT <gregory.clement@bootlin.com>,
Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Tawfik Bayouk <tawfik.bayouk@mobileye.com>
Subject: Re: [PATCH 1/4] spi: cadence-qspi: assert each subnode flash CS is valid
Date: Mon, 12 Feb 2024 10:54:35 +0530 [thread overview]
Message-ID: <20240212052435.vpisjmqxoe4aff2f@dhruva> (raw)
In-Reply-To: <20240209-cdns-qspi-cs-v1-1-a4f9dfed9ab4@bootlin.com>
Hi,
On Feb 09, 2024 at 14:45:30 +0100, Théo Lebrun wrote:
> Check each flash CS against the num-cs property from devicetree.
> Fallback to the driver max supported value (CQSPI_MAX_CHIPSELECT) if
> num-cs isn't present.
>
> cqspi->num_chipselect is set in cqspi_of_get_pdata() to the num-cs
> devicetree property, or to CQSPI_MAX_CHIPSELECT if num-cs is not set.
Makes sense,
>
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
> ---
> drivers/spi/spi-cadence-quadspi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
> index d44a0c501879..7ba4d5d16fd2 100644
> --- a/drivers/spi/spi-cadence-quadspi.c
> +++ b/drivers/spi/spi-cadence-quadspi.c
> @@ -1635,7 +1635,7 @@ static int cqspi_setup_flash(struct cqspi_st *cqspi)
> return ret;
> }
>
> - if (cs >= CQSPI_MAX_CHIPSELECT) {
> + if (cs >= cqspi->num_chipselect) {
Reviewed-by: Dhruva Gole <d-gole@ti.com>
--
Best regards,
Dhruva Gole <d-gole@ti.com>
next prev parent reply other threads:[~2024-02-12 5:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 13:45 [PATCH 0/4] spi: cadence-quadspi: correct chip-select logic Théo Lebrun
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 [this message]
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=20240212052435.vpisjmqxoe4aff2f@dhruva \
--to=d-gole@ti.com \
--cc=broonie@kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=tawfik.bayouk@mobileye.com \
--cc=theo.lebrun@bootlin.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
all inboxes | Powered by JetHome®