From: Andrew Jeffery <andrew@aj.id.au>
To: joel@jms.id.au
Cc: openbmc@lists.ozlabs.org
Subject: [PATCH linux dev-5.10 v3 00/18] ipmi: Allow raw access to KCS devices
Date: Mon, 10 May 2021 16:19:37 +0930 [thread overview]
Message-ID: <20210510064955.1704652-1-andrew@aj.id.au> (raw)
Hi Joel,
This series is (mostly) a backport of v3 I sent upstream:
https://lore.kernel.org/lkml/20210510054213.1610760-1-andrew@aj.id.au/T/#m26377de5e29c6d7d8091a6584457657e5f740dbc
The patches that aren't on the upstream lists are 17 and 18.
There's no reason that 17 isn't on the upstream lists, and I'll send it shortly
(too many branches lying around).
As for patch 18, it's a more thorough implementation of the hacky driver we
already have in the OpenBMC tree at drivers/misc/mctp-lpc.c. mctp-lpc.c only
worked against KCS channel 4 whereas kcs_bmc_cdev_raw will work with any KCS
channel in the system. We need to switch away from KCS channel 4 on the Aspeed
BMCs due to the way the status bits are initialised in hardware[1].
Both mctp-lpc.c and kcs_bmc_cdev_raw.c will go away in the mid-term once we have
jk's MCTP subsystem merged into net/ and I've implemented the in-kernel LPC
binding against it. In the mean time, kcs_bmc_cdev_raw.c replaces mctp-lpc.c.
Its chardev semantics are a superset of mctp-lpc.c so there is no userspace
impact aside from needing to ship a udev rule to account for the name of the
device node.
I plan to send a follow up series to do the switch-over in the devicetree and
remove mctp-lpc.c (which also removes a hack from the devicetree).
Aside from patch 18 (which is temporary) there should be no userspace-visible
impact from the series. Modulo bugs, this should make it safe to merge now.
I've tested the series on a Rainier system and it can boot the host without
issue. I've also exercised all the insmod/rmmod combinations with the kernel
debug config options listed in Documentation/process/submit-checklist.rst
enabled and found no issues.
Please take a look!
Andrew
[1] They're initialised in IPMI style, with some bits set to indicate the
channel isn't active. Unfortunately these are the same bits we chose to
represent the channel as active for the LPC MCTP binding.
Andrew Jeffery (18):
ipmi: kcs_bmc_aspeed: Use of match data to extract KCS properties
ipmi: kcs_bmc: Make status update atomic
ipmi: kcs_bmc: Rename {read,write}_{status,data}() functions
ipmi: kcs_bmc: Split out kcs_bmc_cdev_ipmi
ipmi: kcs_bmc: Turn the driver data-structures inside-out
ipmi: kcs_bmc: Split headers into device and client
ipmi: kcs_bmc: Strip private client data from struct kcs_bmc
ipmi: kcs_bmc: Decouple the IPMI chardev from the core
ipmi: kcs_bmc: Allow clients to control KCS IRQ state
ipmi: kcs_bmc: Don't enforce single-open policy in the kernel
ipmi: kcs_bmc: Add serio adaptor
dt-bindings: ipmi: Convert ASPEED KCS binding to schema
dt-bindings: ipmi: Add optional SerIRQ property to ASPEED KCS devices
ipmi: kcs_bmc_aspeed: Implement KCS SerIRQ configuration
ipmi: kcs_bmc_aspeed: Fix IBFIE typo from datasheet
ipmi: kcs_bmc_aspeed: Optionally apply status address
ARM: dts: rainier: Enable KCS channel 2
ipmi: kcs_bmc: Add a "raw" character device interface
Documentation/ABI/testing/dev-raw-kcs | 25 +
.../bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml | 106 +++
.../bindings/ipmi/aspeed-kcs-bmc.txt | 33 -
arch/arm/boot/dts/aspeed-bmc-ibm-rainier.dts | 5 +
drivers/char/ipmi/Kconfig | 44 ++
drivers/char/ipmi/Makefile | 3 +
drivers/char/ipmi/kcs_bmc.c | 526 ++++-----------
drivers/char/ipmi/kcs_bmc.h | 92 +--
drivers/char/ipmi/kcs_bmc_aspeed.c | 637 +++++++++++++-----
drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 568 ++++++++++++++++
drivers/char/ipmi/kcs_bmc_cdev_raw.c | 440 ++++++++++++
drivers/char/ipmi/kcs_bmc_client.h | 48 ++
drivers/char/ipmi/kcs_bmc_device.h | 22 +
drivers/char/ipmi/kcs_bmc_npcm7xx.c | 94 ++-
drivers/char/ipmi/kcs_bmc_serio.c | 151 +++++
15 files changed, 2071 insertions(+), 723 deletions(-)
create mode 100644 Documentation/ABI/testing/dev-raw-kcs
create mode 100644 Documentation/devicetree/bindings/ipmi/aspeed,ast2400-kcs-bmc.yaml
delete mode 100644 Documentation/devicetree/bindings/ipmi/aspeed-kcs-bmc.txt
create mode 100644 drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
create mode 100644 drivers/char/ipmi/kcs_bmc_cdev_raw.c
create mode 100644 drivers/char/ipmi/kcs_bmc_client.h
create mode 100644 drivers/char/ipmi/kcs_bmc_device.h
create mode 100644 drivers/char/ipmi/kcs_bmc_serio.c
--
2.27.0
next reply other threads:[~2021-05-10 6:51 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 6:49 Andrew Jeffery [this message]
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 01/18] ipmi: kcs_bmc_aspeed: Use of match data to extract KCS properties Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 02/18] ipmi: kcs_bmc: Make status update atomic Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 03/18] ipmi: kcs_bmc: Rename {read, write}_{status, data}() functions Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 04/18] ipmi: kcs_bmc: Split out kcs_bmc_cdev_ipmi Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 05/18] ipmi: kcs_bmc: Turn the driver data-structures inside-out Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 06/18] ipmi: kcs_bmc: Split headers into device and client Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 07/18] ipmi: kcs_bmc: Strip private client data from struct kcs_bmc Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 08/18] ipmi: kcs_bmc: Decouple the IPMI chardev from the core Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 09/18] ipmi: kcs_bmc: Allow clients to control KCS IRQ state Andrew Jeffery
2021-05-14 2:46 ` CS20 KWLiu
2021-05-14 3:03 ` Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 10/18] ipmi: kcs_bmc: Don't enforce single-open policy in the kernel Andrew Jeffery
2021-05-10 8:56 ` William Kennington
2021-05-10 23:59 ` Andrew Jeffery
2021-05-21 7:43 ` Zev Weiss
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 11/18] ipmi: kcs_bmc: Add serio adaptor Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 12/18] dt-bindings: ipmi: Convert ASPEED KCS binding to schema Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 13/18] dt-bindings: ipmi: Add optional SerIRQ property to ASPEED KCS devices Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 14/18] ipmi: kcs_bmc_aspeed: Implement KCS SerIRQ configuration Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 15/18] ipmi: kcs_bmc_aspeed: Fix IBFIE typo from datasheet Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 16/18] ipmi: kcs_bmc_aspeed: Optionally apply status address Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 17/18] ARM: dts: rainier: Enable KCS channel 2 Andrew Jeffery
2021-05-10 6:49 ` [PATCH linux dev-5.10 v3 18/18] ipmi: kcs_bmc: Add a "raw" character device interface Andrew Jeffery
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=20210510064955.1704652-1-andrew@aj.id.au \
--to=andrew@aj.id.au \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.org \
/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).