commit | 745b1d1546b8121d7401f62522992910defac281 | [log] [tgz] |
---|---|---|
author | Andrew Jeffery <andrew@aj.id.au> | Tue May 11 11:14:53 2021 +0930 |
committer | Andrew Jeffery <andrew@aj.id.au> | Tue May 11 13:26:57 2021 +0930 |
tree | 1940f23753ba276b22ae4b3fd654bb6e61812f24 | |
parent | eba19a3b122a39ef2b5dbda49b418a202f78a48d [diff] [blame] |
astlpc: Ship udev rules to help with device and driver transition Currently the OpenBMC kernel has a hacky device driver at drivers/char/misc/mctp-lpc.c that only works against KCS channel 4 on Aspeed BMCs. This hacky driver exposes an `mctp0` device node. The intent is to replace it with one that is slightly less hacky at drivers/char/ipmi/kcs_bmc_cdev_raw.c[1], though eventually this too will be replaced by an in-kernel implementation of the entire LPC MCTP binding. kcs_bmc_dev_raw.c works against all KCS devices in both Aspeed and Nuvoton BMC SoCs. We need to move away from KCS channel 4 on the Aspeed BMCs as the way the hardware initialises the status bits conflicts with the protocol definition for the LPC MCTP binding[2]. Kill two birds with one stone by shipping udev rules that accomodate the new device node names that come with kcs_bmc_dev_raw.c, and symlink them upon creation to /dev/mctp0 to emulate the original mctp-lpc.c interface. [1] https://lore.kernel.org/openbmc/20210510064955.1704652-1-andrew@aj.id.au/T/#me02d9a0e6ce82c9e0602cd615ccdad66d242af87 [2] https://github.com/openbmc/libmctp/blob/eba19a3b122a39ef2b5dbda49b418a202f78a48d/docs/bindings/vendor-ibm-astlpc.md#kcs-status-register-layout Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Change-Id: I21446936cea6c5e4024ec6536ad5983dd360deb2
diff --git a/udev/rules.d/mctp0-raw-kcs3.rules.in b/udev/rules.d/mctp0-raw-kcs3.rules.in new file mode 100644 index 0000000..bf4a76f --- /dev/null +++ b/udev/rules.d/mctp0-raw-kcs3.rules.in
@@ -0,0 +1 @@ +ACTION=="add", DEVPATH=="/devices/virtual/misc/raw-kcs3", SUBSYSTEM=="misc", SYMLINK+="mctp0"