mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kevin Chen <kevin_chen@aspeedtech.com>
To: Andrew Jeffery <andrew@codeconstruct.com.au>,
	"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:59:25 +0000	[thread overview]
Message-ID: <TY0PR06MB4960EA7255DF0BDF235F0D9689C52@TY0PR06MB4960.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <d4945482509cad0bf3e8cd93c1fb21bac2e0c7f2.camel@codeconstruct.com.au>

> 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@a
> > > > pp.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/c
> > > ommit/?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...
What I know about the dedicated POST code hardware in ASPEED should be the same one in LPC module.

> 
> > 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?
Yes, PCC has DMA to capture the POST code.
And snoop device also can be used over eSPI.

These two devices of PCC and snoop use the same port I/O of 80h and 81h.
But, in current usage of PCC, it can support a continuous, 4-bytes maximum region from port I/O 80h to 83h.
What I know about PCC or snoop usage, depends on INTEL platform or AMD platform.

For ASPEED, we want to upstream the PCC driver for the PCC usage.


> 
> >
> >
> > >
> > > 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 11:59 UTC|newest]

Thread overview: 15+ 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
2025-02-19 11:59           ` Kevin Chen [this message]
2025-02-20  1:22             ` Andrew Jeffery
2025-02-21  0:51               ` Kevin Chen
2025-02-25  4:27                 ` Andrew Jeffery
     [not found]                   ` <CAOO6b=udHyXx3QXyUE=siuuJopanUxzbFeBujtqWRy=j2ut4fw@mail.gmail.com>
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=TY0PR06MB4960EA7255DF0BDF235F0D9689C52@TY0PR06MB4960.apcprd06.prod.outlook.com \
    --to=kevin_chen@aspeedtech.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=conor+dt@kernel.org \
    --cc=elbadrym@google.com \
    --cc=joel@jms.id.au \
    --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

all inboxes | Powered by JetHome®