public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Abbarapu, Venkatesh" <venkatesh.abbarapu@amd.com>
Cc: Jon Humphreys <j-humphreys@ti.com>,
	Marek Vasut <marek.vasut@mailbox.org>,
	"Simek, Michal" <michal.simek@amd.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>,
	Andre Przywara <andre.przywara@arm.com>,
	Ashok Reddy Soma <ashok.reddy.soma@amd.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Michael Walle <mwalle@kernel.org>,
	Patrice Chotard <patrice.chotard@foss.st.com>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Pratyush Yadav <p.yadav@ti.com>,
	Quentin Schulz <quentin.schulz@cherry.de>,
	Sean Anderson <seanga2@gmail.com>, Simon Glass <sjg@chromium.org>,
	Takahiro Kuwano <Takahiro.Kuwano@infineon.com>,
	Tudor Ambarus <tudor.ambarus@linaro.org>,
	"uboot-stm32@st-md-mailman.stormreply.com"
	<uboot-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH 1/6] Revert "spi: zynq_qspi: Add parallel memories support in QSPI driver"
Date: Fri, 6 Dec 2024 10:39:31 -0600	[thread overview]
Message-ID: <20241206163931.GS2457179@bill-the-cat> (raw)
In-Reply-To: <SA1PR12MB869743652A0B3EC3335A9F9F98312@SA1PR12MB8697.namprd12.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 8121 bytes --]

On Fri, Dec 06, 2024 at 09:46:08AM +0000, Abbarapu, Venkatesh wrote:
> 
> 
> > -----Original Message-----
> > From: Jon Humphreys <j-humphreys@ti.com>
> > Sent: Friday, December 6, 2024 10:04 AM
> > To: Abbarapu, Venkatesh <venkatesh.abbarapu@amd.com>; Marek Vasut
> > <marek.vasut@mailbox.org>; Simek, Michal <michal.simek@amd.com>; u-
> > boot@lists.denx.de; Tom Rini <trini@konsulko.com>
> > Cc: Andre Przywara <andre.przywara@arm.com>; Ashok Reddy Soma
> > <ashok.reddy.soma@amd.com>; Jagan Teki <jagan@amarulasolutions.com>;
> > Michael Walle <mwalle@kernel.org>; Patrice Chotard
> > <patrice.chotard@foss.st.com>; Patrick Delaunay <patrick.delaunay@foss.st.com>;
> > Pratyush Yadav <p.yadav@ti.com>; Quentin Schulz <quentin.schulz@cherry.de>;
> > Sean Anderson <seanga2@gmail.com>; Simon Glass <sjg@chromium.org>;
> > Takahiro Kuwano <Takahiro.Kuwano@infineon.com>; Tudor Ambarus
> > <tudor.ambarus@linaro.org>; uboot-stm32@st-md-mailman.stormreply.com
> > Subject: RE: [PATCH 1/6] Revert "spi: zynq_qspi: Add parallel memories support in
> > QSPI driver"
> > 
> > "Abbarapu, Venkatesh" <venkatesh.abbarapu@amd.com> writes:
> > 
> > > Hi,
> > >
> > >> -----Original Message-----
> > >> From: Jon Humphreys <j-humphreys@ti.com>
> > >> Sent: Thursday, December 5, 2024 9:47 AM
> > >> To: Marek Vasut <marek.vasut@mailbox.org>; Simek, Michal
> > >> <michal.simek@amd.com>; u-boot@lists.denx.de; Tom Rini
> > >> <trini@konsulko.com>
> > >> Cc: Andre Przywara <andre.przywara@arm.com>; Ashok Reddy Soma
> > >> <ashok.reddy.soma@amd.com>; Jagan Teki <jagan@amarulasolutions.com>;
> > >> Michael Walle <mwalle@kernel.org>; Patrice Chotard
> > >> <patrice.chotard@foss.st.com>; Patrick Delaunay
> > >> <patrick.delaunay@foss.st.com>; Pratyush Yadav <p.yadav@ti.com>;
> > >> Quentin Schulz <quentin.schulz@cherry.de>; Sean Anderson
> > >> <seanga2@gmail.com>; Simon Glass <sjg@chromium.org>; Takahiro Kuwano
> > >> <Takahiro.Kuwano@infineon.com>; Tudor Ambarus
> > >> <tudor.ambarus@linaro.org>; Abbarapu, Venkatesh
> > >> <venkatesh.abbarapu@amd.com>;
> > >> uboot-stm32@st-md-mailman.stormreply.com
> > >> Subject: Re: [PATCH 1/6] Revert "spi: zynq_qspi: Add parallel
> > >> memories support in QSPI driver"
> > >>
> > >> Jon Humphreys <j-humphreys@ti.com> writes:
> > >>
> > >> > Marek Vasut <marek.vasut@mailbox.org> writes:
> > >> >
> > >> >> On 11/7/24 4:49 PM, Jon Humphreys wrote:
> > >> >>> Marek Vasut <marek.vasut@mailbox.org> writes:
> > >> >>>
> > >> >>>> On 11/6/24 10:58 PM, Jon Humphreys wrote:
> > >> >>>>> Marek Vasut <marek.vasut@mailbox.org> writes:
> > >> >>>>>
> > >> >>>>>> On 11/6/24 8:18 PM, Jon Humphreys wrote:
> > >> >>>>>>> Marek Vasut <marek.vasut@mailbox.org> writes:
> > >> >>>>>>>
> > >> >>>>>>>> On 10/23/24 10:17 AM, Michal Simek wrote:
> > >> >>>>>>>>>
> > >> >>>>>>>>>
> > >> >>>>>>>>> On 10/22/24 23:06, Marek Vasut wrote:
> > >> >>>>>>>>>> This reverts commit
> > 1e36d34b52e7a1ebe5a2a5339d6905540f4253aa.
> > >> >>>>>>>>>>
> > >> >>>>>>>>>> This parallel/stacked support breaks basic SPI NOR
> > >> >>>>>>>>>> support, e.g. this no longer works:
> > >> >>>>>>>>>>
> > >> >>>>>>>>>> => sf probe && sf update 0x50000000 0 0x160000
> > >> >>>>>>>>>> SF: Detected s25fs512s with page size 256 Bytes, erase
> > >> >>>>>>>>>> size
> > >> >>>>>>>>>> 256 KiB, total 64 MiB device 0 offset 0x0, size 0x160000
> > >> >>>>>>>>>> SPI flash failed in read step
> > >> >>>>>>>>>
> > >> >>>>>>>>> Reverting everything seems to me too much. Tom has tested
> > >> >>>>>>>>> it on his HW and didn't see any issue. That's why better to
> > >> >>>>>>>>> look at code which is causing this.
> > >> >>>>>>>>> You are reverting everything but likely there is specific
> > >> >>>>>>>>> patch which is causing this. Which one is it?
> > >> >>>>>>>>> Which board was used for your testing? Likely we don't have
> > >> >>>>>>>>> access to
> > >> it.
> > >> >>>>>>>>> Is there any QEMU available which can be used for debugging?
> > >> >>>>>>>>
> > >> >>>>>>>> The testcase including the exact SPI NOR model is above.
> > >> >>>>>>>>
> > >> >>>>>>>> iMX6 with w25q16dw seems to be broken too.
> > >> >>>>>>>>
> > >> >>>>>>>> Basically every board I have access no longer has a working
> > >> >>>>>>>> "sf probe ; sf update" combination ... so yeah, this means
> > >> >>>>>>>> this patchset is fundamentally broken.
> > >> >>>>>>>>
> > >> >>>>>>>
> > >> >>>>>>> I can also confirm that the patch series:
> > >> >>>>>>>
> > >> >>>>>>> f8efc68b30e Merge patch series "spi-nor: Add parallel and
> > >> >>>>>>> stacked memories support"
> > >> >>>>>>>
> > >> >>>>>>> breaks SPI NOR on TI platforms, particularly SK-AM62 and SK-
> > AM62P:
> > >> >>>>>>>
> > >> >>>>>>> U-Boot 2024.10-00752-gf8efc68b30e2 (Nov 06 2024 - 12:25:13
> > >> >>>>>>> -0600)
> > >> >>>>>>>
> > >> >>>>>>> SoC:   AM62X SR1.0 HS-FS
> > >> >>>>>>> Model: Texas Instruments AM625 SK ...
> > >> >>>>>>> Hit any key to stop autoboot:  0 => sf probe && sf update
> > >> >>>>>>> ${loadaddr} 0x400000 0x10
> > >> >>>>>>> SF: Detected s28hs512t with page size 256 Bytes, erase size
> > >> >>>>>>> 256 KiB, total 64 MiB device 0 offset 0x400000, size 0x10 SPI
> > >> >>>>>>> flash failed in read step =>
> > >> >>>>>> Sigh ... can you please test current u-boot/master and see if
> > >> >>>>>> the error is fixed there ?
> > >> >>>>>>
> > >> >>>>>
> > >> >>>>> Yes I had verified it also fails against master, although the
> > >> >>>>> behavior was a bit different.  The .'s below are our DMA engine
> > >> >>>>> waiting
> > >> indefinitely.
> > >> >>>>>
> > >> >>>>> => sf probe && sf update ${loadaddr} 0x400000 0x10
> > >> >>>>> SF: Detected s28hs512t with page size 256 Bytes, erase size 256
> > >> >>>>> KiB, total 64 MiB device 0 offset 0x400000, size 0x10
> > >> >>>>> .....................................................
> > >> >>>>>
> > >> >>>>> I have not investigated further.
> > >> >>>>
> > >> >>>> Can you try and run some 'git bisect' to find out exactly which
> > >> >>>> commit broke your use case ? There is a bunch of fixes for the
> > >> >>>> worst breakage that landed recently, but clearly there is more.
> > >> >>>>
> > >> >>>> Full revert seems increasingly appealing ...
> > >> >>>
> > >> >>> commit 5d40b3d384d
> > >> >> So there is still something broken in that specific commit that I
> > >> >> missed when removing the defects ? Sigh ... can you try to narrow it down ?
> > >> >
> > >> > Hi Marek, I tried to narrow the changes in commit
> > >> > 5d40b3d384dc536ec26ce9b76b20b0b84749d2d1 a bit by first applying
> > >> > all of the changes in the .h files, and then for spi-nor-core.c,
> > >> > only applying changes per function. The only function change that
> > >> > causes errors was spi_nor_read(). With the changes in
> > >> > spi_nor_read() in commit
> > >> > 5d40b3d384dc536ec26ce9b76b20b0b84749d2d1 applied to the prior
> > >> > commit fbe16bc2801, did I get:
> > >> >
> > >> > => sf probe && sf update ${loadaddr} 0x400000 0x10
> > >> > SF: Detected s28hs512t with page size 256 Bytes, erase size 256
> > >> > KiB, total 64 MiB device 0 offset 0x400000, size 0x10 SPI flash
> > >> > failed in read step
> > >> >
> > >>
> > >> Hi all.  What is the status of addressing the failures introduced by
> > >> this patchset?  I tried building from u-boot next and still see the failure.
> > >>
> > >> Marek, was the isolation of changes I performed above helpful in
> > >> understanding the failure?
> > >>
> > >
> > > Can you try by applying this change
> > > https://lore.kernel.org/u-boot/20241118090544.21956-1-venkatesh.abbara
> > > pu@amd.com/
> > >
> > 
> > Hi Venkatesh, the patch seems to remove the issue I was seeing.
> > 
> > Thanks
> > Jon
> 
> Hi Humphreys,
> Thank you for confirming that the patch worked and resolved the issue.

OK, but going back to the patch in question, Tudor has requested
changes. When can we expect a v2 that addresses those, so that Jon and
Marek can also confirm their platforms work? Thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2024-12-06 16:39 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 21:06 [PATCH 1/6] Revert "spi: zynq_qspi: Add parallel memories support in QSPI driver" Marek Vasut
2024-10-22 21:06 ` [PATCH 2/6] Revert "spi: zynqmp_gqspi: Add parallel memories support in GQSPI driver" Marek Vasut
2024-10-22 21:06 ` [PATCH 3/6] Revert "spi: spi-uclass: Read chipselect and restrict capabilities" Marek Vasut
2024-10-22 21:06 ` [PATCH 4/6] Revert "mtd: spi-nor: Add parallel and stacked memories support in read_bar and write_bar" Marek Vasut
2024-10-22 21:06 ` [PATCH 5/6] Revert "mtd: spi-nor: Add parallel memories support for read_sr and read_fsr" Marek Vasut
2024-10-22 21:06 ` [PATCH 6/6] Revert "mtd: spi-nor: Add parallel and stacked memories support" Marek Vasut
2024-11-02 13:26   ` Heinrich Schuchardt
2024-10-23  3:18 ` [PATCH 1/6] Revert "spi: zynq_qspi: Add parallel memories support in QSPI driver" Abbarapu, Venkatesh
2024-10-23  8:41   ` Marek Vasut
2024-10-23  9:07     ` Abbarapu, Venkatesh
2024-10-23 12:45       ` Marek Vasut
2024-10-23 14:14         ` Abbarapu, Venkatesh
2024-10-23 14:19           ` Marek Vasut
2024-10-23 14:25             ` Abbarapu, Venkatesh
2024-10-23 14:37               ` Abbarapu, Venkatesh
2024-10-23 15:18                 ` Marek Vasut
2024-10-23 15:33                   ` Abbarapu, Venkatesh
2024-10-23 15:10           ` Marek Vasut
2024-10-23  9:21     ` Michael Nazzareno Trimarchi
2024-10-23  8:17 ` Michal Simek
2024-10-23  8:38   ` Marek Vasut
2024-11-06 19:18     ` Jon Humphreys
2024-11-06 20:50       ` Marek Vasut
2024-11-06 21:58         ` Jon Humphreys
2024-11-07  0:46           ` Marek Vasut
2024-11-07 15:49             ` Jon Humphreys
2024-11-07 16:04               ` Marek Vasut
2024-11-11 14:18                 ` Jon Humphreys
2024-12-05  4:16                   ` Jon Humphreys
2024-12-05  4:27                     ` Abbarapu, Venkatesh
2024-12-05  5:17                       ` Marek Vasut
2024-12-06  4:33                       ` Jon Humphreys
2024-12-06  9:46                         ` Abbarapu, Venkatesh
2024-12-06 16:39                           ` Tom Rini [this message]
2024-12-10  3:20                             ` Abbarapu, Venkatesh
2024-12-10  8:19                               ` Marek Vasut
2024-12-10  8:32                                 ` Abbarapu, Venkatesh
2024-12-10 11:36                               ` Tudor Ambarus

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=20241206163931.GS2457179@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=Takahiro.Kuwano@infineon.com \
    --cc=andre.przywara@arm.com \
    --cc=ashok.reddy.soma@amd.com \
    --cc=j-humphreys@ti.com \
    --cc=jagan@amarulasolutions.com \
    --cc=marek.vasut@mailbox.org \
    --cc=michal.simek@amd.com \
    --cc=mwalle@kernel.org \
    --cc=p.yadav@ti.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=quentin.schulz@cherry.de \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    --cc=venkatesh.abbarapu@amd.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