From: Robin Gong <yibin.gong@nxp.com>
To: broonie@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de,
festevam@gmail.com, robin.murphy@arm.com,
matthias.schiffer@ew.tq-group.com
Cc: kernel@pengutronix.de, linux-imx@nxp.com,
linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] introduce fallback to pio in spi core
Date: Wed, 17 Jun 2020 06:42:07 +0800 [thread overview]
Message-ID: <1592347329-28363-1-git-send-email-yibin.gong@nxp.com> (raw)
Introudce fallback pio way at spi core level so that the tx/rx buffer
mapped by spi core for dma could be unmap and fallback pio again. Hence no
need the below patch where 'dma_sync_sg_for_devic' to sync fresh data back
into 'device' memory and sync to 'cpu' again in spi core.
https://www.spinics.net/lists/arm-kernel/msg812236.html
If you want to use this fallback feature, please set xfer->error with
SPI_TRANS_FAIL_NO_START in case dma transfer failed(but no any data push
into spi bus yet) in spi client driver and add 'master->fallback' checking
in your can_dma() to ensure spi core can fallback to pio next time.
change from:
v2:
1. Add error flag in stuct spi_transfer and fallback to pio if spi client
return SPI_TRANS_FAIL_NO_START failure before dma transfer start.
2. Remove SPI_MASTER_FALLBACK set on master->flags since the above error
flag could ensure no any impact for other spi client drivers which don't
need this feature.
Robin Gong (2):
spi: introduce fallback to pio
spi: imx: add fallback feature
drivers/spi/spi-imx.c | 23 +++++------------------
drivers/spi/spi.c | 11 +++++++++++
include/linux/spi/spi.h | 4 ++++
3 files changed, 20 insertions(+), 18 deletions(-)
--
2.7.4
next reply other threads:[~2020-06-16 14:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 22:42 Robin Gong [this message]
2020-06-16 22:42 ` [PATCH v2 1/2] spi: introduce fallback to pio Robin Gong
2020-06-16 22:42 ` [PATCH v2 2/2] spi: imx: add fallback feature Robin Gong
2020-06-24 15:38 ` [PATCH v2 0/2] introduce fallback to pio in spi core Mark Brown
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=1592347329-28363-1-git-send-email-yibin.gong@nxp.com \
--to=yibin.gong@nxp.com \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=robin.murphy@arm.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/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
all inboxes | Powered by JetHome®