From: Boris Brezillon <boris.brezillon@collabora.com>
To: Tomer Maimon <tmaimon77@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Avi Fishman <avifishman70@gmail.com>,
Tali Perry <tali.perry1@gmail.com>,
Patrick Venture <venture@google.com>,
Nancy Yuen <yuenn@google.com>,
Benjamin Fair <benjaminfair@google.com>,
linux-spi@vger.kernel.org,
devicetree <devicetree@vger.kernel.org>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] spi: npcm-fiu: add NPCM FIU controller driver
Date: Fri, 9 Aug 2019 17:25:57 +0200 [thread overview]
Message-ID: <20190809172557.346e7c41@collabora.com> (raw)
In-Reply-To: <CAP6Zq1iW0C0FDOoqmn5r_xk5HQFWw+GgLfeapvt-8mB50N2Vvg@mail.gmail.com>
On Fri, 9 Aug 2019 18:26:23 +0300
Tomer Maimon <tmaimon77@gmail.com> wrote:
> Hi Boris,
>
> Thanks a lot for your comment.
>
> On Thu, 8 Aug 2019 at 18:32, Boris Brezillon <boris.brezillon@collabora.com>
> wrote:
>
> > On Thu, 8 Aug 2019 16:14:48 +0300
> > Tomer Maimon <tmaimon77@gmail.com> wrote:
> >
> >
> > > +
> > > +static const struct spi_controller_mem_ops npcm_fiu_mem_ops = {
> > > + .exec_op = npcm_fiu_exec_op,
> >
> > No npcm_supports_op()? That's suspicious, especially after looking at
> > the npcm_fiu_exec_op() (and the functions called from there) where the
> > requested ->buswidth seems to be completely ignored...
> >
> > Sorry but I do not fully understand it, do you mean a support for the
> buswidth?
> If yes it been done in the UMA functions as follow:
>
> uma_cfg |= ilog2(op->cmd.buswidth);
> uma_cfg |= ilog2(op->addr.buswidth) <<
> NPCM_FIU_UMA_CFG_ADBPCK_SHIFT;
> uma_cfg |= ilog2(op->data.buswidth) <<
> NPCM_FIU_UMA_CFG_WDBPCK_SHIFT;
> uma_cfg |= op->addr.nbytes << NPCM_FIU_UMA_CFG_ADDSIZ_SHIFT;
> regmap_write(fiu->regmap, NPCM_FIU_UMA_ADDR, op->addr.val);
>
Hm, the default supports_op() implementation might be just fine for
your use case. But there's one thing you still need to check: the
number of addr cycles (or address size as you call it in this driver).
Looks like your IP is limited to 4 address cycles, if I'm right, you
should reject any operation that have op->addr.nbytes > 4. I also
wonder if there's a limitation on the data size you can have on a
single transfer. If there's one you should implement ->adjust_op() too.
next prev parent reply other threads:[~2019-08-09 15:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 13:14 [PATCH v2 0/2] spi: add NPCM FIU controller driver Tomer Maimon
2019-08-08 13:14 ` [PATCH v2 1/2] dt-binding: spi: add NPCM FIU controller Tomer Maimon
2019-08-21 20:56 ` Rob Herring
2019-08-08 13:14 ` [PATCH v2 2/2] spi: npcm-fiu: add NPCM FIU controller driver Tomer Maimon
2019-08-08 13:27 ` Mark Brown
2019-08-08 15:37 ` Tomer Maimon
2019-08-08 18:55 ` Mark Brown
2019-08-09 15:31 ` Tomer Maimon
2019-08-08 15:32 ` Boris Brezillon
2019-08-09 15:26 ` Tomer Maimon
2019-08-09 15:25 ` Boris Brezillon [this message]
2019-08-09 15:47 ` Tomer Maimon
2019-08-09 15:51 ` Boris Brezillon
2019-08-09 16:19 ` Tomer Maimon
2019-08-09 18:01 ` Benjamin Fair
2019-08-09 22:23 ` Tomer Maimon
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=20190809172557.346e7c41@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=avifishman70@gmail.com \
--cc=bbrezillon@kernel.org \
--cc=benjaminfair@google.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=venture@google.com \
--cc=vigneshr@ti.com \
--cc=yuenn@google.com \
/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;
as well as URLs for NNTP newsgroup(s).