From: Clay Chang <clayc@hpe.com>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: <linux-kernel@vger.kernel.org>, <soc@kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<devicetree@vger.kernel.org>, <verdun@hpe.com>,
<nick.hawkins@hpe.com>, Arnd Bergmann <arnd@arndb.de>,
"Rob Herring" <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Russell King <linux@armlinux.org.uk>,
Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 0/5] ARM: Add GXP SROM Support
Date: Thu, 2 Feb 2023 23:25:09 +0800 [thread overview]
Message-ID: <Y9vV1WFinNVpLhvi@enigma.ccjz.io> (raw)
In-Reply-To: <206f0e93-059d-4657-8359-0c5080797c76@app.fastmail.com>
On Thu, Feb 02, 2023 at 11:42:49AM +1030, Andrew Jeffery wrote:
>
>
> On Wed, 1 Feb 2023, at 23:58, Clay Chang wrote:
> > Hi Andrew,
> >
> > On Tue, Jan 31, 2023 at 09:46:42PM +0800, Clay Chang wrote:
> >> > I'm trying to understand whether we can find some common ground with
> >> > controlling e.g. Aspeed's BMCs LPC peripherals based on Arnd's query[1],
> >> > but the description is a bit too vague right now for me to be able to do
> >> > that.
> >> >
> >> > [1] https://lore.kernel.org/all/66ef9643-b47e-428d-892d-7c1cbd358a5d@app.fastmail.com/
> >> >
> >> > Andrew
> >
> > I briefly studied driver/soc/aspeed/aspeed-lpc-ctrl.c, and IMO the
> > similarity between HPE GXP driver and Aspeed's could be that we both
> > expose the LPC memory addresses or registers for configuration purposes.
> > However, the functions to be configured could vary. There are a few sets
> > of registers that HPE wants to expose for configuration in the future.
>
> The talk of "exposing registers" feels concerning - we're trying not to
> do that directly. Instead we want to lift out an API that constrains
> the behaviour a bit but works for both of us if there's overlap in
> functionality.
>
Let me describe it more clearly. We don't expose the registers directly
to the user. We describe those registers in the device tree, and then
the driver exposes them though sysfs interfaces. Users access the
registers through the device attributes defined under the sysfs
structure (e.g. /sys/class/soc/srom/vromoff) exposed by the driver. In
the show/store function pair, we get or set the regmap or memory,
validate input, do sanity check, synchronization, and so on.
I learned that in the drivers/soc/aspeed/aspeed-lpc-ctrl.c, both mmap
and ioctl were used, and revelant ioctl commands were defined in
include/uapi/linux/aspeed-lpc-ctrl.h. Is this what you mean an API for
aspeed? And we are trying to see if there are commonalities among us?
If yes, yeah I think it is good to see a common abstraction for BMC
chips.
Accroding to [1], I'd comment that, in terms of flash update, what we
want to do is similar to what was described in [1]. The SROM driver I
am working on partially layouts the registers for flash update for HPE
GXP hardware.
BTW, the way for user to access the registers is flexible - ioctl should
work as well.
> Can you point to any documentation of the behaviour of your hardware?
> It's still a little vague to me.
>
> Andrew
I wish I could, but there is not yet a technical document or datasheet
available to the public. Sorry.
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?h=v6.2-rc4&id=6c4e976785011dfbe461821d0bfc58cfd60eac56
Thanks,
Clay
prev parent reply other threads:[~2023-02-02 15:27 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 4:25 [PATCH 0/5] ARM: Add GXP SROM Support clayc
2023-01-10 4:25 ` [PATCH 1/5] soc: hpe: Add GXP SROM Control Register Driver clayc
2023-01-10 9:46 ` Krzysztof Kozlowski
2023-01-12 12:46 ` Clay Chang
2023-01-10 4:25 ` [PATCH 2/5] dt-bindings: soc: hpe: hpe,gxp-srom.yaml clayc
2023-01-10 9:49 ` Krzysztof Kozlowski
2023-01-12 13:16 ` Clay Chang
2023-01-12 13:37 ` Arnd Bergmann
2023-01-16 13:42 ` Clay Chang
2023-01-16 15:18 ` Arnd Bergmann
2023-01-19 7:39 ` Clay Chang
2023-01-19 7:56 ` Arnd Bergmann
2023-01-10 4:25 ` [PATCH 3/5] ARM: dts: hpe: Add SROM Driver clayc
2023-01-10 4:25 ` [PATCH 4/5] ARM: multi_v7_defconfig: Add GXP " clayc
2023-01-10 9:50 ` Krzysztof Kozlowski
2023-01-12 13:17 ` Clay Chang
2023-01-10 4:25 ` [PATCH 5/5] MAINTAINERS: Add maintainer of GXP SROM support clayc
2023-01-10 9:51 ` Krzysztof Kozlowski
2023-01-12 13:18 ` Clay Chang
2023-01-20 2:21 ` [PATCH 0/5] ARM: Add GXP SROM Support Andrew Jeffery
2023-01-31 13:46 ` Clay Chang
2023-02-01 13:28 ` Clay Chang
2023-02-02 1:12 ` Andrew Jeffery
2023-02-02 15:25 ` Clay Chang [this message]
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=Y9vV1WFinNVpLhvi@enigma.ccjz.io \
--to=clayc@hpe.com \
--cc=andrew@aj.id.au \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=nick.hawkins@hpe.com \
--cc=olof@lixom.net \
--cc=robh+dt@kernel.org \
--cc=soc@kernel.org \
--cc=verdun@hpe.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).