Linux-Aspeed Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Kevin Chen <kevin_chen@aspeedtech.com>,
	"joel@jms.id.au" <joel@jms.id.au>,
	 Z-ChiaWei Wang <chiawei_wang@aspeedtech.com>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	 "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mo Elbadry <elbadrym@google.com>
Cc: "tomer.maimon" <tomer.maimon@nuvoton.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	"lee@kernel.org" <lee@kernel.org>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	 "conor+dt@kernel.org" <conor+dt@kernel.org>
Subject: Re: [PATCH v1 3/3] soc: aspeed: lpc-pcc: Add PCC controller support
Date: Wed, 19 Feb 2025 11:34:31 +1030	[thread overview]
Message-ID: <d4945482509cad0bf3e8cd93c1fb21bac2e0c7f2.camel@codeconstruct.com.au> (raw)
In-Reply-To: <PSAPR06MB4949C65DF5C034BD6B40C9B589FA2@PSAPR06MB4949.apcprd06.prod.outlook.com>

On Tue, 2025-02-18 at 11:11 +0000, Kevin Chen wrote:
> > On Mon, 2025-02-17 at 13:00 +0100, Krzysztof Kozlowski wrote:
> > > On 17/02/2025 12:48, Kevin Chen wrote:
> > > > +
> > > > +       pcc->mdev.parent = dev;
> > > > +       pcc->mdev.minor = MISC_DYNAMIC_MINOR;
> > > > +       pcc->mdev.name = devm_kasprintf(dev, GFP_KERNEL,
> > > > "%s%d",
> > > > DEVICE_NAME,
> > > > 
> > +                                       pcc->mdev_id);
> > > > +       pcc->mdev.fops = &pcc_fops;
> > > > +       rc = misc_register(&pcc->mdev);
> > > > +       if (rc) {
> > > > +               dev_err(dev, "Couldn't register misc
> > > > device\n");
> > > > +               goto err_free_kfifo;
> > > > +       }
> > > 
> > > You cannot expose user-space interfaces from SoC drivers. Use
> > > appropriate subsystem for this with proper ABI documentation.
> > > 
> > > See:
> > > https://lore.kernel.org/all/bc5118f2-8982-46ff-bc75-d0c71475e909@app.f
> > > astmail.com/
> > > and more discussions on LKML
> > 
> > Further, drivers/misc/aspeed-lpc-snoop.c already exists:
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=
> > 9f4f9ae81d0affc182f54dd00285ddb90e0b3ae1
> > 
> > Kevin: Did you consider reworking it?
> Andrew: No, I do not rework it but add the post code capture driver
> using the SNOOP registers. As a result, I add some code in
> aspeed_a2600_15 to check the SNOOP enable bit. PCC driver probe abort
> if snoop is enabled.

Hmm, I think OpenBMC's history regarding POST code support caused some
confusion on my part. For whatever reason, the snoop device was used as
a source of POST codes despite the existence of the dedicated POST code
hardware since at least the AST2400, but...

> PCC is used for port I/O byte snooping over eSPI.

... it seems that they're largely interchangeable, just with different
hardware features (PCC has DMA)? My impression is that the snoop device
could also be used over eSPI?

> 
> 
> > 
> > Nuvoton have a similar capability in their NPCM BMC SoC(s) with the
> > "BPC"
> > ("BIOS POST Code" controller). There should be some consensus on
> > the binding
> > and userspace interface.

This is still the case.

Andrew


  reply	other threads:[~2025-02-19  1:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-17 11:48 [PATCH v1 0/3] Add AST2600 LPC PCC support Kevin Chen
2025-02-17 11:48 ` [PATCH v1 1/3] dt-binding: aspeed: Add LPC PCC controller Kevin Chen
2025-02-17 11:56   ` Krzysztof Kozlowski
2025-02-17 11:48 ` [PATCH v1 2/3] ARM: dts: aspeed-g6: Add AST2600 LPC PCC support Kevin Chen
2025-02-17 11:48 ` [PATCH v1 3/3] soc: aspeed: lpc-pcc: Add PCC controller support Kevin Chen
2025-02-17 12:00   ` Krzysztof Kozlowski
2025-02-18  0:56     ` Andrew Jeffery
2025-02-18 11:11       ` Kevin Chen
2025-02-19  1:04         ` Andrew Jeffery [this message]
2025-02-19 11:59           ` Kevin Chen
2025-02-20  1:22             ` Andrew Jeffery
2025-02-21  0:51               ` Kevin Chen
2025-02-25  4:27                 ` Andrew Jeffery
2025-02-25  4:34                   ` Mo Elbadry
2025-02-25 23:28                     ` Andrew Jeffery
2025-02-26  0:48                       ` Mo Elbadry

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=d4945482509cad0bf3e8cd93c1fb21bac2e0c7f2.camel@codeconstruct.com.au \
    --to=andrew@codeconstruct.com.au \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=conor+dt@kernel.org \
    --cc=elbadrym@google.com \
    --cc=joel@jms.id.au \
    --cc=kevin_chen@aspeedtech.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tomer.maimon@nuvoton.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