From: Miquel Raynal <miquel.raynal@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4 v2] spi: spi-mem: Use 2 SPI messages instead of a single full-duplex one
Date: Wed, 8 Aug 2018 10:56:53 +0200 [thread overview]
Message-ID: <20180808105653.1cca3bc0@xps13> (raw)
In-Reply-To: <20180807152802.0a3d1332@bbrezillon>
Hi Stefan, Jagan,
Boris Brezillon <boris.brezillon@bootlin.com> wrote on Tue, 7 Aug 2018
15:28:02 +0200:
> On Tue, 7 Aug 2018 14:16:52 +0200
> Stefan Roese <sr@denx.de> wrote:
>
> > Some SPI controller do not support full-duplex SPI transfers. This patch
> > changes the SPI transfer into 2 separate transfers - or 1, if no data is
> > to transmitted.
> >
> > With this change, no buffers need to be allocated anymore. We use the
> > TX and RX buffers that are passed to spi_mem_exec_op() directly.
> >
> > Signed-off-by: Stefan Roese <sr@denx.de>
> > Suggested-by: Boris Brezillon <boris.brezillon@bootlin.com>
> > Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> > Cc: Boris Brezillon <boris.brezillon@bootlin.com>
> > Cc: Jagan Teki <jagan@openedev.com>
>
> Looks good overall, just a few comments (that you might chose to ignore
> if you disagree).
>
> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
>
Sorry for being a bit late on the discussion, but while I do agree with
the change, I'm not sure about its implementation : I think SPI
controllers are supposed to be abstracted by the SPI layer.
Addressing the controller's limitations in the SPI-mem layer would
not be appropriate.
Would it be possible to adapt spi_xfer() to handle such case?
Thanks,
Miquèl
next prev parent reply other threads:[~2018-08-08 8:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-07 12:16 [U-Boot] [PATCH 1/4 v2] spi: spi-mem: Use 2 SPI messages instead of a single full-duplex one Stefan Roese
2018-08-07 12:16 ` [U-Boot] [PATCH 2/4 v2] cmd: mtd: Don't abort erase operation when a bad block is detected Stefan Roese
2018-08-07 13:05 ` Boris Brezillon
2018-08-07 12:16 ` [U-Boot] [PATCH 3/4 v2] cmd: mtd: Don't use with negative return codes for shell commands Stefan Roese
2018-08-07 13:29 ` Boris Brezillon
2018-08-07 12:16 ` [U-Boot] [PATCH 4/4 v2] cmd: mtd: Add info text to mtd erase subcommand Stefan Roese
2018-08-07 13:32 ` Boris Brezillon
2018-08-07 13:38 ` Stefan Roese
2018-08-07 13:28 ` [U-Boot] [PATCH 1/4 v2] spi: spi-mem: Use 2 SPI messages instead of a single full-duplex one Boris Brezillon
2018-08-08 8:56 ` Miquel Raynal [this message]
2018-08-09 5:24 ` Stefan Roese
2018-08-09 8:13 ` Miquel Raynal
2018-08-09 9:10 ` Stefan Roese
2018-08-09 14:50 ` Miquel Raynal
2018-08-09 14:53 ` Stefan Roese
2018-08-08 9:58 ` Miquel Raynal
2018-08-09 5:25 ` Stefan Roese
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=20180808105653.1cca3bc0@xps13 \
--to=miquel.raynal@bootlin.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