mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xu Yilun <yilun.xu@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-fpga@vger.kernel.org, "Wu Hao" <hao.wu@intel.com>,
	"Tom Rix" <trix@redhat.com>, "Moritz Fischer" <mdf@kernel.org>,
	"Lee Jones" <lee@kernel.org>,
	"Matthew Gerlach" <matthew.gerlach@linux.intel.com>,
	"Russ Weight" <russell.h.weight@intel.com>,
	"Tianfei zhang" <tianfei.zhang@intel.com>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Marco Pagani" <marpagan@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 7/9] mfd: intel-m10-bmc: Add PMCI driver
Date: Mon, 5 Dec 2022 23:08:24 +0800	[thread overview]
Message-ID: <Y44JaLtAnTll4gU0@yilunxu-OptiPlex-7050> (raw)
In-Reply-To: <Y43eejWSYIBIlUKB@sirena.org.uk>

On 2022-12-05 at 12:05:14 +0000, Mark Brown wrote:
> On Mon, Dec 05, 2022 at 11:51:15AM +0200, Ilpo Järvinen wrote:
> > On Sat, 3 Dec 2022, Xu Yilun wrote:
> > > On 2022-12-02 at 12:08:39 +0200, Ilpo Järvinen wrote:
> 
> > > > +struct regmap *__devm_m10_regmap_indirect(struct device *dev,
> 
> > > We name the file intel-m10-bmc-pmci-xxx.c, and this function
> > > xx_m10_regmap_xx(). But I can see the implementation is just about the indirect
> > > bus which from your commit message could be used by various DFL features
> > > like HSSI or PMCI. So is it better we put the implementation in
> > > drivers/fpga and name the file dfl-indirect-regmap.c and the
> > > initialization function dfl_indirect_regmap_init()?
> 
> > I guess that would be doable unless Mark objects. My understanding was 
> > that he preferred to have in the driver that is currently using it.
> 
> > Mark, any opinion on this?
> 
> The above does not look good.  As I have said several times now drivers
> implementing their own regmap operations should use the reg_read() and
> reg_write() operations in regmap_config when allocating their regmap
> unless they're doing something unusual.  There are a few cases where it
> makes sense but nothing I've seen here makes it look like this is one of
> them.  Most of the current users don't fit.

It is good for now to implement the indirect access interface in
regmap_config, as intel-m10-bmc is the only one who uses it. But I'm not
sure when a second IP block(like HSSI) in intel FPGA uses it, how to
implement? A shared library?

Some background about hardware:
Several IP blocks in intel FPGA integrate the same mmio register layout
(so called indirect access interface here) as the bridge to the IP's real
registers address space. Like:

 +---------+          +---------+
 | m10 BMC |          |  HSSI   |
 +---------+          +---------+
 |indirect |          |indirect |
 | access  |          | access  |
 |  MMIOs  |          |  MMIOs  |
 +----+----+          +----+----+
      |                    |
      |                    |
 +----+-----+         +---------+
 |m10 bmc   |         | HSSI    |
 |registers |         |registers|
 +----------+         +---------+

Thanks,
Yilun

> 
> Please, just implement a normal driver using a normal regmap_config as
> I've repeatedly said you should if you don't want to provide something
> generic.



  reply	other threads:[~2022-12-05 15:18 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-02 10:08 [PATCH v3 0/9] intel-m10-bmc: Split BMC to core and SPI parts & add PMCI+N6000 support Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 1/9] mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 2/9] mfd: intel-m10-bmc: Rename the local variables Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 3/9] mfd: intel-m10-bmc: Split into core and spi specific parts Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 4/9] mfd: intel-m10-bmc: Support multiple CSR register layouts Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 5/9] fpga: intel-m10-bmc: Rework flash read/write Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 6/9] mfd: intel-m10-bmc: Downscope SPI defines & prefix with M10BMC_SPI Ilpo Järvinen
2022-12-02 16:28   ` Xu Yilun
2022-12-02 17:29     ` Russ Weight
2022-12-05  9:31       ` Ilpo Järvinen
2022-12-05 15:41         ` Xu Yilun
2022-12-08 11:57           ` Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 7/9] mfd: intel-m10-bmc: Add PMCI driver Ilpo Järvinen
2022-12-02 17:12   ` Xu Yilun
2022-12-05  9:51     ` Ilpo Järvinen
2022-12-05 12:05       ` Mark Brown
2022-12-05 15:08         ` Xu Yilun [this message]
2022-12-05 18:22           ` Mark Brown
2022-12-06  2:37             ` Xu Yilun
2022-12-05 16:28       ` Xu Yilun
2022-12-02 10:08 ` [PATCH v3 8/9] fpga: m10bmc-sec: Add support for N6000 Ilpo Järvinen
2022-12-02 10:08 ` [PATCH v3 9/9] mfd: intel-m10-bmc: Change MODULE_LICENSE() to GPL Ilpo Järvinen
2022-12-04  9:44   ` Greg KH
2022-12-05  9:05     ` Ilpo Järvinen

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=Y44JaLtAnTll4gU0@yilunxu-OptiPlex-7050 \
    --to=yilun.xu@intel.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hao.wu@intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=lee@kernel.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marpagan@redhat.com \
    --cc=matthew.gerlach@linux.intel.com \
    --cc=mdf@kernel.org \
    --cc=russell.h.weight@intel.com \
    --cc=tianfei.zhang@intel.com \
    --cc=trix@redhat.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®