From: Miquel Raynal <miquel.raynal@bootlin.com>
To: zhengxunli@mxic.com.tw
Cc: juliensu@mxic.com.tw, ycllin@mxic.com.tw, linux-mtd@lists.infradead.org
Subject: Re: [PATCH 2/3] spi: mxic: patch for octal DTR mode support
Date: Tue, 2 Feb 2021 09:06:30 +0100 [thread overview]
Message-ID: <20210202090630.09e6ed31@xps13> (raw)
In-Reply-To: <OF6211E4EF.55839180-ON48258670.0011946B-48258670.001EE31F@mxic.com.tw>
Hello,
zhengxunli@mxic.com.tw wrote on Tue, 2 Feb 2021 13:37:22 +0800:
> Hi,
>
> > > Driver patch for octal 8D-8D-8D mode support.
> > >
> > > Signed-off-by: zhengxunli <zhengxunli@mxic.com.tw>
> > > ---
> > > drivers/spi/spi-mxic.c | 33 ++++++++++++++++++++++-----------
> > > 1 file changed, 22 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
> > > index 96b4182..821328a 100644
> > > --- a/drivers/spi/spi-mxic.c
> > > +++ b/drivers/spi/spi-mxic.c
> > > @@ -335,8 +335,8 @@ static int mxic_spi_data_xfer(struct mxic_spi
> > *mxic, const void *txbuf,
> > > static bool mxic_spi_mem_supports_op(struct spi_mem *mem,
> > > const struct spi_mem_op *op)
> > > {
> > > - if (op->data.buswidth > 4 || op->addr.buswidth > 4 ||
> > > - op->dummy.buswidth > 4 || op->cmd.buswidth > 4)
> > > + if (op->data.buswidth > 8 || op->addr.buswidth > 8 ||
> > > + op->dummy.buswidth > 8 || op->cmd.buswidth > 8)
> > > return false;
> > >
> > > if (op->data.nbytes && op->dummy.nbytes &&
> > > @@ -346,7 +346,7 @@ static bool mxic_spi_mem_supports_op(struct
> > spi_mem *mem,
> > > if (op->addr.nbytes > 7)
> > > return false;
> > >
> > > - return spi_mem_default_supports_op(mem, op);
> > > + return true;
> >
> > Does not seem correct. Why would you drop this check?
>
> Same as Pratyush's reply. spi_mem_default_supports_op() does not support
> dtr.
As I said: spi_mem_default_supports_op() do many checks, I don't think
it's worth giving up these checks and having a complementary helper for
DTR operations is needed.
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-02-02 8:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-29 8:13 [PATCH 0/3] Add octal DTR support for Macronix flash zhengxunli
2021-01-29 8:13 ` [PATCH 1/3] mtd: spi-nor: macronix: add support for Macronix octaflash zhengxunli
2021-02-01 14:44 ` Miquel Raynal
2021-02-01 15:06 ` Miquel Raynal
2021-02-01 19:55 ` Pratyush Yadav
2021-01-29 8:13 ` [PATCH 2/3] spi: mxic: patch for octal DTR mode support zhengxunli
2021-02-01 14:49 ` Miquel Raynal
2021-02-01 20:10 ` Pratyush Yadav
2021-02-01 21:20 ` Miquel Raynal
[not found] ` <OF6211E4EF.55839180-ON48258670.0011946B-48258670.001EE31F@mxic.com.tw>
2021-02-02 8:06 ` Miquel Raynal [this message]
2021-01-29 8:13 ` [PATCH 3/3] spi: mxic: add maximum speed of spi host zhengxunli
2021-02-01 15:02 ` Miquel Raynal
[not found] ` <OFCBF59ED0.4C198CA3-ON48258670.00236718-48258670.0026E452@mxic.com.tw>
2021-02-02 8:04 ` Miquel Raynal
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=20210202090630.09e6ed31@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=juliensu@mxic.com.tw \
--cc=linux-mtd@lists.infradead.org \
--cc=ycllin@mxic.com.tw \
--cc=zhengxunli@mxic.com.tw \
/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 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.