public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Stefan Herbrechtsmeier
	<stefan.herbrechtsmeier-oss@weidmueller.com>,
	u-boot@lists.denx.de
Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: Re: [PATCH] Revert "spi: zynq_qspi: Use dummy buswidth in dummy byte calculation"
Date: Wed, 26 Apr 2023 16:37:36 +0200	[thread overview]
Message-ID: <036b0a66-c1ae-be53-fb94-86a4b1e0cfb9@amd.com> (raw)
In-Reply-To: <20230331144440.30575-1-stefan.herbrechtsmeier-oss@weidmueller.com>



On 3/31/23 16:44, Stefan Herbrechtsmeier wrote:
> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> 
> This reverts commit e09784728689de7949d4cdd559a9590e0bfcc702. The
> commit wrongly divides the dummy bytes by dummy bus width to calculate
> the dummy bytes. The framework already converts the dummy cycles to the
> number of bytes and the controller use the SPI flash command to
> determine the dummy cycles via the address width.
> 
> Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
> 
> ---
> 
>   drivers/spi/zynq_qspi.c | 10 ++--------
>   1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
> index 00e3ffcd1d..d1d4048966 100644
> --- a/drivers/spi/zynq_qspi.c
> +++ b/drivers/spi/zynq_qspi.c
> @@ -676,7 +676,6 @@ static int zynq_qspi_exec_op(struct spi_slave *slave,
>                               const struct spi_mem_op *op)
>   {
>          int op_len, pos = 0, ret, i;
> -       u32 dummy_bytes = 0;
>          unsigned int flag = 0;
>          const u8 *tx_buf = NULL;
>          u8 *rx_buf = NULL;
> @@ -689,11 +688,6 @@ static int zynq_qspi_exec_op(struct spi_slave *slave,
>          }
> 
>          op_len = op->cmd.nbytes + op->addr.nbytes + op->dummy.nbytes;
> -       if (op->dummy.nbytes) {
> -               op_len = op->cmd.nbytes + op->addr.nbytes +
> -                        op->dummy.nbytes / op->dummy.buswidth;
> -               dummy_bytes = op->dummy.nbytes / op->dummy.buswidth;
> -       }
> 
>          u8 op_buf[op_len];
> 
> @@ -707,8 +701,8 @@ static int zynq_qspi_exec_op(struct spi_slave *slave,
>                  pos += op->addr.nbytes;
>          }
> 
> -       if (dummy_bytes)
> -               memset(op_buf + pos, 0xff, dummy_bytes);
> +       if (op->dummy.nbytes)
> +               memset(op_buf + pos, 0xff, op->dummy.nbytes);
> 
>          /* 1st transfer: opcode + address + dummy cycles */
>          /* Make sure to set END bit if no tx or rx data messages follow */
> --
> 2.30.2
> 
> ________________________________
> Kommanditgesellschaft - Sitz: Detmold - Amtsgericht Lemgo HRA 2790 -
> Komplementärin: Weidmüller Interface Führungsgesellschaft mbH -
> Sitz: Detmold - Amtsgericht Lemgo HRB 3924;
> Geschäftsführer: Dr. Timo Berger, Volker Bibelhausen, Dr. Sebastian Durst, André Sombecki;
> USt-ID-Nr. DE124599660

Can you please rebase it on the top of the latest version?

$ git am -s 
./20230331_stefan_herbrechtsmeier_oss_revert_spi_zynq_qspi_use_dummy_buswidth_in_dummy_byte_calculatio.mbx
Adding link to lore.kernel.org
Applying: Revert "spi: zynq_qspi: Use dummy buswidth in dummy byte calculation"
error: patch failed: drivers/spi/zynq_qspi.c:676
error: drivers/spi/zynq_qspi.c: patch does not apply
Patch failed at 0001 Revert "spi: zynq_qspi: Use dummy buswidth in dummy byte 
calculation"
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Thanks,
Michal

  parent reply	other threads:[~2023-04-26 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 14:44 [PATCH] Revert "spi: zynq_qspi: Use dummy buswidth in dummy byte calculation" Stefan Herbrechtsmeier
2023-04-17 10:17 ` Michal Simek
2023-04-18  8:43   ` Soma, Ashok Reddy
2023-04-18 10:27     ` Stefan Herbrechtsmeier
2023-04-19  8:46       ` Stefan Herbrechtsmeier
2023-04-26  9:49       ` Soma, Ashok Reddy
2023-04-26 14:37 ` Michal Simek [this message]
2023-04-27  6:56   ` Stefan Herbrechtsmeier

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=036b0a66-c1ae-be53-fb94-86a4b1e0cfb9@amd.com \
    --to=michal.simek@amd.com \
    --cc=jagan@amarulasolutions.com \
    --cc=stefan.herbrechtsmeier-oss@weidmueller.com \
    --cc=stefan.herbrechtsmeier@weidmueller.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox