From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Maciej Andrzejewski <maciej.andrzejewski@m-works.net>
Cc: Michal Simek <michal.simek@amd.com>,
Jinjie Ruan <ruanjinjie@huawei.com>,
Punnaiah Choudary Kalluri <punnaia@xilinx.com>,
Naga Sureshkumar Relli <nagasure@xilinx.com>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: rawnand: arasan: Fix double assertion of chip-select
Date: Sun, 24 Nov 2024 12:54:36 +0100 [thread overview]
Message-ID: <87wmgsdeyr.fsf@bootlin.com> (raw)
In-Reply-To: <Z0Iq9ex25MkwC_Cm@UBUNTU-PF54DSY0> (Maciej Andrzejewski's message of "Sat, 23 Nov 2024 20:20:21 +0100")
Hi Maciej,
On 23/11/2024 at 20:20:21 +01, Maciej Andrzejewski <maciej.andrzejewski@m-works.net> wrote:
> When two chip-selects are configured in the device tree, and the second is
> a non-native GPIO, both the GPIO-based chip-select and the first native
> chip-select may be asserted simultaneously. This double assertion causes
> incorrect read and write operations.
>
> The issue occurs because when nfc->ncs <= 2, nfc->spare_cs is always
> initialized to 0 due to static initialization. Consequently, when the
> second chip-select (GPIO-based) is selected in anfc_assert_cs(), it is
> detected by anfc_is_gpio_cs(), and nfc->native_cs is assigned the value 0.
> This results in both the GPIO-based chip-select being asserted and the
> NAND controller register receiving 0, erroneously selecting the native
> chip-select.
>
> This patch resolves the issue, as confirmed by oscilloscope testing with
> configurations involving two or more chip-selects in the device tree.
>
Ok to me, can you please send a v2 with correct Fixes and Cc: stable
tags, please?
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2024-11-24 11:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-23 19:20 [PATCH] mtd: rawnand: arasan: Fix double assertion of chip-select Maciej Andrzejewski
2024-11-24 11:54 ` Miquel Raynal [this message]
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=87wmgsdeyr.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=linux-mtd@lists.infradead.org \
--cc=maciej.andrzejewski@m-works.net \
--cc=michal.simek@amd.com \
--cc=nagasure@xilinx.com \
--cc=punnaia@xilinx.com \
--cc=ruanjinjie@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.