All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Walle" <mwalle@kernel.org>
To: "Tomas Alvarez Vanoli" <tomas.alvarez-vanoli@hitachienergy.com>,
	<u-boot@lists.denx.de>
Cc: <trini@konsulko.com>, <chuanhua.han@nxp.com>
Subject: Re: [PATCH 0/1] spi: fsl_espi: fix din offset
Date: Mon, 27 Apr 2026 14:33:20 +0200	[thread overview]
Message-ID: <DI3XUWVXNGP3.2TI0N0LDP7ZJ4@kernel.org> (raw)
In-Reply-To: <20260324170212.481394-1-tomas.alvarez-vanoli@hitachienergy.com>

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

Hi Tomas,

On Tue Mar 24, 2026 at 6:02 PM CET, Tomas Alvarez Vanoli wrote:
> Hello,
>
> While working on an old T1040-based board, I ran into issues when reading data
> with spi_xfer. It seems to me that the driver is copying the data back to the
> caller at the wrong addresses. I am not entirely sure what was the intention
> with the original code as far as I can tell.
>
> With my suggested change, at least a small tx of 3 bytes works correctly and I
> can see the expected data in the buffer.
>
> I've really only tested this with a 2016 version of u-boot but the code has not
> changed regarding this since then, and I suspect that there's not a lot of
> boards left using this driver to read spi data in u-boot :)

This will break the SPI NOR flash on the P2041RDB:

=> sf probe
jedec_spi_nor flash@0: unrecognized JEDEC id bytes: 00, 01, 20
Failed to initialize SPI flash at 0:0 (error -2)

After reverting this commit, I get:
=> sf probe
SF: Detected s25sl12801 with page size 256 Bytes, erase size 64 KiB, total 16 MiB

What kind of issues do you see? And how does your patch resolves
this? I guess we can assume the code was working correctly once.
Honestly, I don't understand that code either. But I doubt just
moving pointers around will fix anything.

Thanks,
-michael

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

  parent reply	other threads:[~2026-04-27 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 17:02 [PATCH 0/1] spi: fsl_espi: fix din offset Tomas Alvarez Vanoli
2026-03-24 17:02 ` [PATCH 1/1] " Tomas Alvarez Vanoli
2026-04-27 12:33 ` Michael Walle [this message]
2026-04-27 15:00   ` [PATCH 0/1] " Tomas Alvarez Vanoli
2026-04-28  9:59     ` Michael Walle

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=DI3XUWVXNGP3.2TI0N0LDP7ZJ4@kernel.org \
    --to=mwalle@kernel.org \
    --cc=chuanhua.han@nxp.com \
    --cc=tomas.alvarez-vanoli@hitachienergy.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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.