* [PATCH] spi: sun6i: update max transfer size reported
@ 2017-03-20 14:38 ` Icenowy Zheng
0 siblings, 0 replies; 5+ messages in thread
From: Icenowy Zheng @ 2017-03-20 14:38 UTC (permalink / raw)
To: Mark Brown, Maxime Ripard, Chen-Yu Tsai
Cc: Martin Ayotte, Icenowy Zheng, linux-kernel, linux-arm-kernel, linux-spi
The spi-sun6i driver have already got the ability to do large transfers.
However, the max transfer size reported is still fifo depth - 1.
Update the max transfer size reported to the max value possible.
Reported-by: Martin Ayotte <martinayotte@gmail.com>
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
drivers/spi/spi-sun6i.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index 6e9ca93db9bf..03a773a9531a 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -194,9 +194,7 @@ static void sun6i_spi_set_cs(struct spi_device *spi, bool enable)
static size_t sun6i_spi_max_transfer_size(struct spi_device *spi)
{
- struct sun6i_spi *sspi = spi_master_get_devdata(spi->master);
-
- return sspi->fifo_depth - 1;
+ return SUN6I_MAX_XFER_SIZE - 1;
}
static int sun6i_spi_transfer_one(struct spi_master *master,
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] spi: sun6i: update max transfer size reported
@ 2017-03-20 14:38 ` Icenowy Zheng
0 siblings, 0 replies; 5+ messages in thread
From: Icenowy Zheng @ 2017-03-20 14:38 UTC (permalink / raw)
To: linux-arm-kernel
The spi-sun6i driver have already got the ability to do large transfers.
However, the max transfer size reported is still fifo depth - 1.
Update the max transfer size reported to the max value possible.
Reported-by: Martin Ayotte <martinayotte@gmail.com>
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
drivers/spi/spi-sun6i.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index 6e9ca93db9bf..03a773a9531a 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -194,9 +194,7 @@ static void sun6i_spi_set_cs(struct spi_device *spi, bool enable)
static size_t sun6i_spi_max_transfer_size(struct spi_device *spi)
{
- struct sun6i_spi *sspi = spi_master_get_devdata(spi->master);
-
- return sspi->fifo_depth - 1;
+ return SUN6I_MAX_XFER_SIZE - 1;
}
static int sun6i_spi_transfer_one(struct spi_master *master,
--
2.12.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: sun6i: update max transfer size reported
2017-03-20 14:38 ` Icenowy Zheng
(?)
@ 2017-03-21 7:24 ` Maxime Ripard
-1 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2017-03-21 7:24 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Mark Brown, Chen-Yu Tsai, linux-spi, linux-arm-kernel,
linux-kernel, Martin Ayotte
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
On Mon, Mar 20, 2017 at 10:38:49PM +0800, Icenowy Zheng wrote:
> The spi-sun6i driver have already got the ability to do large transfers.
> However, the max transfer size reported is still fifo depth - 1.
>
> Update the max transfer size reported to the max value possible.
>
> Reported-by: Martin Ayotte <martinayotte@gmail.com>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] spi: sun6i: update max transfer size reported
@ 2017-03-21 7:24 ` Maxime Ripard
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2017-03-21 7:24 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Martin Ayotte, linux-kernel, linux-spi, Chen-Yu Tsai, Mark Brown,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 566 bytes --]
On Mon, Mar 20, 2017 at 10:38:49PM +0800, Icenowy Zheng wrote:
> The spi-sun6i driver have already got the ability to do large transfers.
> However, the max transfer size reported is still fifo depth - 1.
>
> Update the max transfer size reported to the max value possible.
>
> Reported-by: Martin Ayotte <martinayotte@gmail.com>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] spi: sun6i: update max transfer size reported
@ 2017-03-21 7:24 ` Maxime Ripard
0 siblings, 0 replies; 5+ messages in thread
From: Maxime Ripard @ 2017-03-21 7:24 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Mar 20, 2017 at 10:38:49PM +0800, Icenowy Zheng wrote:
> The spi-sun6i driver have already got the ability to do large transfers.
> However, the max transfer size reported is still fifo depth - 1.
>
> Update the max transfer size reported to the max value possible.
>
> Reported-by: Martin Ayotte <martinayotte@gmail.com>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170321/2ca9c79b/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-21 7:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 14:38 [PATCH] spi: sun6i: update max transfer size reported Icenowy Zheng
2017-03-20 14:38 ` Icenowy Zheng
2017-03-21 7:24 ` Maxime Ripard
2017-03-21 7:24 ` Maxime Ripard
2017-03-21 7:24 ` Maxime Ripard
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.