From: Mark Brown <broonie@kernel.org>
To: matthew.gerlach@linux.intel.com
Cc: Tianfei Zhang <tianfei.zhang@intel.com>,
gregkh@linuxfoundation.org, rafael@kernel.org,
linux-kernel@vger.kernel.org, hao.wu@intel.com, trix@redhat.com,
yilun.xu@intel.com, russell.h.weight@intel.com
Subject: Re: [PATCH v1] regmap: add generic indirect regmap support
Date: Wed, 8 Jun 2022 11:43:07 +0100 [thread overview]
Message-ID: <YqB9O8HhZV2tXo8g@sirena.org.uk> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2206071714420.3001206@rhweight-WRK1>
[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]
On Tue, Jun 07, 2022 at 05:27:38PM -0700, matthew.gerlach@linux.intel.com wrote:
> On Tue, 7 Jun 2022, Mark Brown wrote:
> > On Mon, Jun 06, 2022 at 09:37:55PM -0400, Tianfei Zhang wrote:
> > > From: Matthew Gerlach <matthew.gerlach@linux.intel.com>
> > > This patch adds support for regmap APIs that are intended to be used by
> > > the drivers of some devices which support generic indirect register access,
> > > for example PMCI (Platform Management Control Interface) device, HSSI
> > > (High Speed Serial Interface) device in FPGA.
> > What is "generic indirect register access"? I'm not clear what this is
> > intended to support...
> "indirect register access" is a RTL design pattern we use in FPGAs
> frequently. The design pattern involves a small number of registers plus a
> little handshake code to access various register spaces inside the FPGA
> fabric. The design pattern is "generic" in the sense that the same small
> number of registers and handshake can be used with many different IP
> components in the FPGA. Historically, the bit definitions and handshaking
> was slightly different for each IP component. This is an attempt at a
> consistent usage across IP components.
> Would a different name help?
This wouldn't address the major problem which is...
> > > + writel(0, ctx->base + INDIRECT_CMD_OFF);
> > > + ret = readl_poll_timeout((ctx->base + INDIRECT_CMD_OFF), cmd,
> > > + (!cmd), INDIRECT_INT_US, INDIRECT_TIMEOUT_US);
> > > + if (ret)
> > > + dev_err(ctx->dev, "%s timed out on clearing cmd 0x%xn", __func__, cmd);
> > ...and this doesn't look particularly generic, it looks like it's for
> > some particular controller/bridge?
...that this appears to be entirely specific to some particular device,
it's got things like hard coded register addresses and timeouts which
mean it can't be reused.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-06-08 10:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 1:37 Tianfei Zhang
2022-06-07 4:50 ` Greg KH
2022-06-07 5:57 ` Zhang, Tianfei
2022-06-07 13:15 ` Mark Brown
2022-06-08 0:27 ` matthew.gerlach
2022-06-08 10:43 ` Mark Brown [this message]
2022-06-08 23:54 ` Zhang, Tianfei
2022-06-09 10:14 ` Mark Brown
2022-06-10 0:30 ` matthew.gerlach
2022-06-10 11:59 ` Mark Brown
2022-08-09 17:06 ` Russ Weight
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=YqB9O8HhZV2tXo8g@sirena.org.uk \
--to=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hao.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.gerlach@linux.intel.com \
--cc=rafael@kernel.org \
--cc=russell.h.weight@intel.com \
--cc=tianfei.zhang@intel.com \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.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
all inboxes | Powered by JetHome®