lkml.org 
[lkml]   [2020]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v10 03/17] spi: atmel-quadspi: reject DTR ops
Date
On 6/23/20 9:30 PM, Pratyush Yadav wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Double Transfer Rate (DTR) ops are added in spi-mem. But this controller
> doesn't support DTR transactions. Since we don't use the default

the sam9x60 version of the controller supports DTR ops.

> supports_op(), which rejects all DTR ops, do that explicitly in our
> supports_op().
>
> Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
> ---
> drivers/spi/atmel-quadspi.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
> index cb44d1e169aa..a898755fb41e 100644
> --- a/drivers/spi/atmel-quadspi.c
> +++ b/drivers/spi/atmel-quadspi.c
> @@ -285,6 +285,12 @@ static bool atmel_qspi_supports_op(struct spi_mem *mem,
> op->dummy.nbytes == 0)
> return false;
>
> + /* DTR ops not supported. */

Better to say that "DTR ops are not implemented."

> + if (op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr)
> + return false;
> + if (op->cmd.nbytes != 1)
> + return false;
> +

I would move these the first thing in the function, to speed up the exit.

With these addressed:

Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>

> return true;
> }
>
> --
> 2.27.0
>

\
 
 \ /
  Last update: 2020-07-13 08:19    [W:2.493 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site