lkml.org 
[lkml]   [2018]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 1/5] spi: spi-mem: Add driver for NXP FlexSPI controller
On Mon, 10 Dec 2018 10:31:57 +0000
Schrempf Frieder <frieder.schrempf@kontron.de> wrote:

> >> Yes, I need to validate op->addr.nbytes else LUT would going to be programmed for 0 addrlen.
> >> I have checked this on the target.
> >
> > Also agree there. Some operations have 0 address bytes. We could also
> > test addr.buswidth, but I'm fine with the addr.nbytes test too.
>
> The "if (op->addr.nbytes)" is needed of course, but I think the default
> case in the switch statement (and for other reasons the whole switch
> statement) is not needed and rather a check for op->addr.nbytes > 4
> should be added to nxp_fspi_supports_op(). I wrongly assumed this check
> already exists in nxp_fspi_supports_op().

Ok, then this check on the max number of address bytes should indeed be
moved to the supports_op() implementation.

\
 
 \ /
  Last update: 2018-12-10 11:36    [W:0.074 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site