mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 08:46:49 +07:00
54f9c4d077
This patch adds a simple device driver to expose the iBT interface on Aspeed SOCs (AST2400 and AST2500) as a character device. Such SOCs are commonly used as BMCs (BaseBoard Management Controllers) and this driver implements the BMC side of the BT interface. The BT (Block Transfer) interface is used to perform in-band IPMI communication between a host and its BMC. Entire messages are buffered before sending a notification to the other end, host or BMC, that there is data to be read. Usually, the host emits requests and the BMC responses but the specification provides a mean for the BMC to send SMS Attention (BMC-to-Host attention or System Management Software attention) messages. For this purpose, the driver introduces a specific ioctl on the device: 'BT_BMC_IOCTL_SMS_ATN' that can be used by the system running on the BMC to signal the host of such an event. The device name defaults to '/dev/ipmi-bt-host' Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Joel Stanley <joel@jms.id.au> [clg: - checkpatch fixes - added a devicetree binding documentation - replace 'bt_host' by 'bt_bmc' to reflect that the driver is the BMC side of the IPMI BT interface - renamed the device to 'ipmi-bt-host' - introduced a temporary buffer to copy_{to,from}_user - used platform_get_irq() - moved the driver under drivers/char/ipmi/ but kept it as a misc device - changed the compatible cell to "aspeed,ast2400-bt-bmc" ] Signed-off-by: Cédric Le Goater <clg@kaod.org> Acked-by: Arnd Bergmann <arnd@arndb.de> [clg: - checkpatch --strict fixes - removed the use of devm_iounmap, devm_kfree in cleanup paths - introduced an atomic-t to limit opens to 1 - introduced a mutex to protect write/read operations] Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Corey Minyard <cminyard@mvista.com>
26 lines
686 B
Plaintext
26 lines
686 B
Plaintext
IPMI device
|
|
|
|
Required properties:
|
|
- compatible: should be one of ipmi-kcs, ipmi-smic, or ipmi-bt
|
|
- device_type: should be ipmi
|
|
- reg: Address and length of the register set for the device
|
|
|
|
Optional properties:
|
|
- interrupts: The interrupt for the device. Without this the interface
|
|
is polled.
|
|
- reg-size - The size of the register. Defaults to 1
|
|
- reg-spacing - The number of bytes between register starts. Defaults to 1
|
|
- reg-shift - The amount to shift the registers to the right to get the data
|
|
into bit zero.
|
|
|
|
Example:
|
|
|
|
smic@fff3a000 {
|
|
compatible = "ipmi-smic";
|
|
device_type = "ipmi";
|
|
reg = <0xfff3a000 0x1000>;
|
|
interrupts = <0 24 4>;
|
|
reg-size = <4>;
|
|
reg-spacing = <4>;
|
|
};
|