You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
ipmi: add an Aspeed BT IPMI BMC driver
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>
This commit is contained in:
committed by
Corey Minyard
parent
c6169de730
commit
54f9c4d077
@@ -0,0 +1,23 @@
|
|||||||
|
* Aspeed BT (Block Transfer) IPMI interface
|
||||||
|
|
||||||
|
The Aspeed SOCs (AST2400 and AST2500) are commonly used as BMCs
|
||||||
|
(BaseBoard Management Controllers) and the BT interface can be used to
|
||||||
|
perform in-band IPMI communication with their host.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible : should be "aspeed,ast2400-bt-bmc"
|
||||||
|
- reg: physical address and size of the registers
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
|
||||||
|
- interrupts: interrupt generated by the BT interface. without an
|
||||||
|
interrupt, the driver will operate in poll mode.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
ibt@1e789140 {
|
||||||
|
compatible = "aspeed,ast2400-bt-bmc";
|
||||||
|
reg = <0x1e789140 0x18>;
|
||||||
|
interrupts = <8>;
|
||||||
|
};
|
||||||
+1
-1
@@ -21,7 +21,7 @@ obj-y += video/
|
|||||||
obj-y += idle/
|
obj-y += idle/
|
||||||
|
|
||||||
# IPMI must come before ACPI in order to provide IPMI opregion support
|
# IPMI must come before ACPI in order to provide IPMI opregion support
|
||||||
obj-$(CONFIG_IPMI_HANDLER) += char/ipmi/
|
obj-y += char/ipmi/
|
||||||
|
|
||||||
obj-$(CONFIG_ACPI) += acpi/
|
obj-$(CONFIG_ACPI) += acpi/
|
||||||
obj-$(CONFIG_SFI) += sfi/
|
obj-$(CONFIG_SFI) += sfi/
|
||||||
|
|||||||
@@ -76,3 +76,10 @@ config IPMI_POWEROFF
|
|||||||
the IPMI management controller is capable of this.
|
the IPMI management controller is capable of this.
|
||||||
|
|
||||||
endif # IPMI_HANDLER
|
endif # IPMI_HANDLER
|
||||||
|
|
||||||
|
config ASPEED_BT_IPMI_BMC
|
||||||
|
tristate "BT IPMI bmc driver"
|
||||||
|
help
|
||||||
|
Provides a driver for the BT (Block Transfer) IPMI interface
|
||||||
|
found on Aspeed SOCs (AST2400 and AST2500). The driver
|
||||||
|
implements the BMC side of the BT interface.
|
||||||
|
|||||||
@@ -11,3 +11,4 @@ obj-$(CONFIG_IPMI_SSIF) += ipmi_ssif.o
|
|||||||
obj-$(CONFIG_IPMI_POWERNV) += ipmi_powernv.o
|
obj-$(CONFIG_IPMI_POWERNV) += ipmi_powernv.o
|
||||||
obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o
|
obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o
|
||||||
obj-$(CONFIG_IPMI_POWEROFF) += ipmi_poweroff.o
|
obj-$(CONFIG_IPMI_POWEROFF) += ipmi_poweroff.o
|
||||||
|
obj-$(CONFIG_ASPEED_BT_IPMI_BMC) += bt-bmc.o
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -74,6 +74,7 @@ header-y += bpf_common.h
|
|||||||
header-y += bpf.h
|
header-y += bpf.h
|
||||||
header-y += bpqether.h
|
header-y += bpqether.h
|
||||||
header-y += bsg.h
|
header-y += bsg.h
|
||||||
|
header-y += bt-bmc.h
|
||||||
header-y += btrfs.h
|
header-y += btrfs.h
|
||||||
header-y += can.h
|
header-y += can.h
|
||||||
header-y += capability.h
|
header-y += capability.h
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2015-2016, IBM Corporation.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version
|
||||||
|
* 2 of the License, or (at your option) any later version.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _UAPI_LINUX_BT_BMC_H
|
||||||
|
#define _UAPI_LINUX_BT_BMC_H
|
||||||
|
|
||||||
|
#include <linux/ioctl.h>
|
||||||
|
|
||||||
|
#define __BT_BMC_IOCTL_MAGIC 0xb1
|
||||||
|
#define BT_BMC_IOCTL_SMS_ATN _IO(__BT_BMC_IOCTL_MAGIC, 0x00)
|
||||||
|
|
||||||
|
#endif /* _UAPI_LINUX_BT_BMC_H */
|
||||||
Reference in New Issue
Block a user