Skip to contentSkip to conversation

ARM: aspeed: add support for the BT IPMI interface

PATCH Superseded Cédric Le Goater 4 participants 12 messages Sep 20, 2016 – Sep 28, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v3 cover ARM: aspeed: add support for the BT IPMI interface

Hello,

This serie adds support for the iBT interface on Aspeed SOCs (AST2400 and AST2500). The BT (Block Transfer) interface is used to perform in-band IPMI communication between a host and its BMC. This driver implements the BMC side.

Changes since v2:

- limit to one opener
- protect write/read operations with a mutex.

Changes since v1:

- the driver is now called 'bt-bmc' and the device node '/dev/ipmi-bt-host'

- the code is now under drivers/char/ipmi/. This required a change of the top Makefile in drivers/ to compile the bt-bmc driver with the ipmi handlers not being selected. That might be an issue.

- changed the read/write operations to use a temporary buffer and get rid of the {get,put}_user calls

Thanks,

C.

Alistair Popple (1):
ipmi: add an Aspeed BT IPMI BMC driver

C?dric Le Goater (2):
ARM: aspeed: Add defconfigs for CONFIG_ASPEED_BT_IPMI_BMC
ARM: dts: aspeed: Enable BT IPMI BMC device

 .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +
 arch/arm/boot/dts/aspeed-g4.dtsi                   |   6 +
 arch/arm/boot/dts/aspeed-g5.dtsi                   |   6 +
 arch/arm/configs/aspeed_g4_defconfig               |   1 +
 arch/arm/configs/aspeed_g5_defconfig               |   1 +
 drivers/Makefile                                   |   2 +-
 drivers/char/ipmi/Kconfig                          |   7 +
 drivers/char/ipmi/Makefile                         |   1 +
 drivers/char/ipmi/bt-bmc.c                         | 510 +++++++++++++++++++++
 include/uapi/linux/Kbuild                          |   1 +
 include/uapi/linux/bt-bmc.h                        |  18 +
 11 files changed, 575 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt
 create mode 100644 drivers/char/ipmi/bt-bmc.c
 create mode 100644 include/uapi/linux/bt-bmc.h
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/3 ipmi: add an Aspeed BT IPMI BMC driver

From: Alistair Popple <[email protected]>

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'

[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"
]

[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]

---

Changes since v2:

- fixed checkpatch --strict issues
- cleanup'ed includes
- limit to one opener
- protect write/read operations with a mutex.
- removed the use of devm_iounmap, devm_kfree in cleanup paths

Changes since v1:

- 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"

 .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +
 drivers/Makefile                                   |   2 +-
 drivers/char/ipmi/Kconfig                          |   7 +
 drivers/char/ipmi/Makefile                         |   1 +
 drivers/char/ipmi/bt-bmc.c                         | 510 +++++++++++++++++++++
 include/uapi/linux/Kbuild                          |   1 +
 include/uapi/linux/bt-bmc.h                        |  18 +
 7 files changed, 561 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt
 create mode 100644 drivers/char/ipmi/bt-bmc.c
 create mode 100644 include/uapi/linux/bt-bmc.h
Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt new file +23 -0
new file mode 100644
index 000000000000..fbbacd958240
@@ -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 at 1e789140 {
+		compatible = "aspeed,ast2400-bt-bmc";
+		reg = <0x1e789140 0x18>;
+		interrupts = <8>;
+	};
drivers/Makefile +1 -1
index 53abb4a5f736..5a9e7b6b7928 100644
@@ -21,7 +21,7 @@ obj-y				+= video/
 obj-y				+= idle/
 
 # 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_SFI)		+= sfi/
drivers/char/ipmi/Kconfig +7 -0
index 5a9350b1069a..2c234e3e7513 100644
@@ -76,3 +76,10 @@ config IPMI_POWEROFF
 	 the IPMI management controller is capable of this.
 
 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.
drivers/char/ipmi/Makefile +1 -0
index f3ffde1f5f1f..0d98cd91def1 100644
@@ -11,3 +11,4 @@ obj-$(CONFIG_IPMI_SSIF) += ipmi_ssif.o
 obj-$(CONFIG_IPMI_POWERNV) += ipmi_powernv.o
 obj-$(CONFIG_IPMI_WATCHDOG) += ipmi_watchdog.o
 obj-$(CONFIG_IPMI_POWEROFF) += ipmi_poweroff.o
+obj-$(CONFIG_ASPEED_BT_IPMI_BMC) += bt-bmc.o
drivers/char/ipmi/bt-bmc.c new file +510 -0

510 lines not on this page · raw message

include/uapi/linux/Kbuild +1 -0
index 185f8ea2702f..17b12942c67d 100644
@@ -74,6 +74,7 @@ header-y += bpf_common.h
 header-y += bpf.h
 header-y += bpqether.h
 header-y += bsg.h
+header-y += bt-bmc.h
 header-y += btrfs.h
 header-y += can.h
 header-y += capability.h
include/uapi/linux/bt-bmc.h new file +18 -0
new file mode 100644
index 000000000000..d9ec766a63d0
@@ -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 */
Signature · 1 line
2.7.4
maintainer
#2 lore raw

PATCH v3 1/3 ipmi: add an Aspeed BT IPMI BMC driver

Quoted 64 lines · C?dric Le Goater

From: Alistair Popple <[email protected]>

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'

[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"
]

[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]

---

Changes since v2:

- fixed checkpatch --strict issues
- cleanup'ed includes
- limit to one opener
- protect write/read operations with a mutex.
- removed the use of devm_iounmap, devm_kfree in cleanup paths

Changes since v1:

- 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"

Quoted 1 line
 .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +

While similar, this is not the kernel directory structure. Just make this bindings/ipmi/

With that,

Quoted 10 lines
 drivers/Makefile                                   |   2 +-
 drivers/char/ipmi/Kconfig                          |   7 +
 drivers/char/ipmi/Makefile                         |   1 +
 drivers/char/ipmi/bt-bmc.c                         | 510 +++++++++++++++++++++
 include/uapi/linux/Kbuild                          |   1 +
 include/uapi/linux/bt-bmc.h                        |  18 +
 7 files changed, 561 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt
 create mode 100644 drivers/char/ipmi/bt-bmc.c
 create mode 100644 include/uapi/linux/bt-bmc.h
#3 lore raw

PATCH v3 1/3 ipmi: add an Aspeed BT IPMI BMC driver

Hello,

Quoted 65 lines · Rob Herring
Quoted 64 lines · C?dric Le Goater

From: Alistair Popple <[email protected]>

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'

[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"
]

[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]

---

Changes since v2:

- fixed checkpatch --strict issues
- cleanup'ed includes
- limit to one opener
- protect write/read operations with a mutex.
- removed the use of devm_iounmap, devm_kfree in cleanup paths

Changes since v1:

- 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"

Quoted 8 lines
Quoted 1 line
 .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +

While similar, this is not the kernel directory structure. Just make this bindings/ipmi/

With that,

OK. So I suppose we should be moving all IPMI documentation under the same directory.

Corey,

If the move is okay for you, I can send the patch below.

Thanks,

C.

Quoted 1 line

From ca25f89b25209c260480cda5e5532d6bbe83ed43 Mon Sep 17 00:00:00 2001

From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <[email protected]>
Date: Mon, 26 Sep 2016 08:45:15 +0200
Subject: [PATCH] dt-bindings: ipmi: move all documentation under
bindings/ipmi/
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../devicetree/bindings/{char => }/ipmi/aspeed,ast2400-bt-bmc.txt         | 0
 Documentation/devicetree/bindings/{ipmi.txt => ipmi/ipmi-smic.txt}        | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename Documentation/devicetree/bindings/{char => }/ipmi/aspeed,ast2400-bt-bmc.txt (100%)
 rename Documentation/devicetree/bindings/{ipmi.txt => ipmi/ipmi-smic.txt} (100%)
Documentation/devicetree/bindings/ipmi/aspeed,ast2400-bt-bmc.txt renamed from Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt +0 -0
similarity index 100%
rename from Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt
rename to Documentation/devicetree/bindings/ipmi/aspeed,ast2400-bt-bmc.txt
Documentation/devicetree/bindings/ipmi/ipmi-smic.txt renamed from Documentation/devicetree/bindings/ipmi.txt +0 -0
similarity index 100%
rename from Documentation/devicetree/bindings/ipmi.txt
rename to Documentation/devicetree/bindings/ipmi/ipmi-smic.txt
Signature · 1 line
2.7.4
#4 lore raw

PATCH v3 1/3 ipmi: add an Aspeed BT IPMI BMC driver

Quoted 23 lines · C?dric Le Goater
Quoted 12 lines
Quoted 12 lines

Changes since v1:

- 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"

Quoted 7 lines
Quoted 1 line
  .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +

While similar, this is not the kernel directory structure. Just make this bindings/ipmi/

With that,

OK. So I suppose we should be moving all IPMI documentation under the same directory.

Quoted 7 lines

Corey,

If the move is okay for you, I can send the patch below.

Thanks,

C.

Sorry this took so long, I'm at a conference. That change is fine, it does seem to match the structure better.

-corey

Quoted 26 lines

From ca25f89b25209c260480cda5e5532d6bbe83ed43 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <[email protected]>
Date: Mon, 26 Sep 2016 08:45:15 +0200
Subject: [PATCH] dt-bindings: ipmi: move all documentation under
bindings/ipmi/
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
  .../devicetree/bindings/{char => }/ipmi/aspeed,ast2400-bt-bmc.txt         | 0
  Documentation/devicetree/bindings/{ipmi.txt => ipmi/ipmi-smic.txt}        | 0
  2 files changed, 0 insertions(+), 0 deletions(-)

rename Documentation/devicetree/bindings/{char => }/ipmi/aspeed,ast2400-bt-bmc.txt (100%) rename Documentation/devicetree/bindings/{ipmi.txt => ipmi/ipmi-smic.txt} (100%)

Documentation/devicetree/bindings/ipmi/aspeed,ast2400-bt-bmc.txt renamed from Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt +0 -0
similarity index 100%
rename from Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt
rename to Documentation/devicetree/bindings/ipmi/aspeed,ast2400-bt-bmc.txt
Documentation/devicetree/bindings/ipmi/ipmi-smic.txt renamed from Documentation/devicetree/bindings/ipmi.txt +0 -0
similarity index 100%
rename from Documentation/devicetree/bindings/ipmi.txt
rename to Documentation/devicetree/bindings/ipmi/ipmi-smic.txt
#5 lore raw

PATCH v3 1/3 ipmi: add an Aspeed BT IPMI BMC driver

Quoted 26 lines · Corey Minyard
Quoted 25 lines · C?dric Le Goater
Quoted 12 lines
Quoted 12 lines

Changes since v1:

- 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"

Quoted 7 lines
Quoted 1 line
  .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +

While similar, this is not the kernel directory structure. Just make this bindings/ipmi/

With that,

OK. So I suppose we should be moving all IPMI documentation under the same directory.

Corey,

Quoted 8 lines
Quoted 5 lines

If the move is okay for you, I can send the patch below.

Thanks,

C.

Sorry this took so long, I'm at a conference. That change is fine, it does seem to match the structure better.

It's ok.

Checkpatch really does not like that patch and I don't know what we can do about it. You've been warned :)

Thanks,

C.

./scripts/checkpatch.pl --strict 0001-dt-bindings-ipmi-move-all-documentation-under-bindin.patch
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#12:

 .../devicetree/bindings/{char => }/ipmi/aspeed,ast2400-bt-bmc.txt         | 0

ERROR: Does not appear to be a unified-diff format patch

total: 1 errors, 1 warnings, 0 checks, 0 lines checked

#6 lore raw

PATCH v3 2/3 ARM: aspeed: Add defconfigs for CONFIG_ASPEED_BT_IPMI_BMC

In reply to Cédric Le Goater

---

Changes since v1:

- renamed config option

 arch/arm/configs/aspeed_g4_defconfig | 1 +
 arch/arm/configs/aspeed_g5_defconfig | 1 +
 2 files changed, 2 insertions(+)
arch/arm/configs/aspeed_g4_defconfig +1 -0
index ca39c04fec6b..af3847db00f8 100644
@@ -53,6 +53,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_ASPEED_BT_IPMI_BMC=y
 # CONFIG_HW_RANDOM is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_IOMMU_SUPPORT is not set
arch/arm/configs/aspeed_g5_defconfig +1 -0
index 4f366b0370e9..5d46290736fb 100644
@@ -54,6 +54,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_ASPEED_BT_IPMI_BMC=y
 # CONFIG_HW_RANDOM is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_IOMMU_SUPPORT is not set
Signature · 1 line
2.7.4
maintainer
#7 lore raw

PATCH v3 2/3 ARM: aspeed: Add defconfigs for CONFIG_ASPEED_BT_IPMI_BMC

Quoted 1 line · C?dric Le Goater

I'll this in my tree to send to Arnd.

Cheers,

Joel

Quoted 37 lines

---

Changes since v1:

- renamed config option

 arch/arm/configs/aspeed_g4_defconfig | 1 +
 arch/arm/configs/aspeed_g5_defconfig | 1 +
 2 files changed, 2 insertions(+)
arch/arm/configs/aspeed_g4_defconfig +1 -0
index ca39c04fec6b..af3847db00f8 100644
@@ -53,6 +53,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_ASPEED_BT_IPMI_BMC=y
 # CONFIG_HW_RANDOM is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_IOMMU_SUPPORT is not set
arch/arm/configs/aspeed_g5_defconfig +1 -1
index 4f366b0370e9..5d46290736fb 100644
@@ -54,6 +54,7 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_ASPEED_BT_IPMI_BMC=y
 # CONFIG_HW_RANDOM is not set
 # CONFIG_USB_SUPPORT is not set
 # CONFIG_IOMMU_SUPPORT is not set
--

2.7.4

#8 lore raw

PATCH v3 3/3 ARM: dts: aspeed: Enable BT IPMI BMC device

In reply to Cédric Le Goater

---

Changes since v1:

- added the soc name ast2400 in the compatible cell

 arch/arm/boot/dts/aspeed-g4.dtsi | 6 ++++++
 arch/arm/boot/dts/aspeed-g5.dtsi | 6 ++++++
 2 files changed, 12 insertions(+)
arch/arm/boot/dts/aspeed-g4.dtsi +6 -0
index 22dee5937d5c..7bb00b6f13d8 100644
@@ -82,6 +82,12 @@
 				clocks = <&clk_apb>;
 			};
 
+			ibt: ibt at 1e789140 {
+				compatible = "aspeed,ast2400-bt-bmc";
+				reg = <0x1e789140 0x18>;
+				interrupts = <8>;
+			};
+
 			wdt1: wdt at 1e785000 {
 				compatible = "aspeed,wdt";
 				reg = <0x1e785000 0x1c>;
arch/arm/boot/dts/aspeed-g5.dtsi +6 -0
index dd94d9361fda..1d8f81b548b3 100644
@@ -86,6 +86,12 @@
 				clocks = <&clk_apb>;
 			};
 
+			ibt: ibt at 1e789140 {
+				compatible = "aspeed,ast2400-bt-bmc";
+				reg = <0x1e789140 0x18>;
+				interrupts = <8>;
+			};
+
 			wdt1: wdt at 1e785000 {
 				compatible = "aspeed,wdt";
 				reg = <0x1e785000 0x1c>;
Signature · 1 line
2.7.4
maintainer
#9 lore raw

PATCH v3 3/3 ARM: dts: aspeed: Enable BT IPMI BMC device

Quoted 1 line · C?dric Le Goater

I'll put this in my tree to send to Arnd.

Cheers,

Joel

Quoted 47 lines

---

Changes since v1:

- added the soc name ast2400 in the compatible cell

 arch/arm/boot/dts/aspeed-g4.dtsi | 6 ++++++
 arch/arm/boot/dts/aspeed-g5.dtsi | 6 ++++++
 2 files changed, 12 insertions(+)
arch/arm/boot/dts/aspeed-g4.dtsi +6 -0
index 22dee5937d5c..7bb00b6f13d8 100644
@@ -82,6 +82,12 @@
                                clocks = <&clk_apb>;
                        };
 
+                       ibt: ibt at 1e789140 {
+                               compatible = "aspeed,ast2400-bt-bmc";
+                               reg = <0x1e789140 0x18>;
+                               interrupts = <8>;
+                       };
+
                        wdt1: wdt at 1e785000 {
                                compatible = "aspeed,wdt";
                                reg = <0x1e785000 0x1c>;
arch/arm/boot/dts/aspeed-g5.dtsi +6 -1
index dd94d9361fda..1d8f81b548b3 100644
@@ -86,6 +86,12 @@
                                clocks = <&clk_apb>;
                        };
 
+                       ibt: ibt at 1e789140 {
+                               compatible = "aspeed,ast2400-bt-bmc";
+                               reg = <0x1e789140 0x18>;
+                               interrupts = <8>;
+                       };
+
                        wdt1: wdt at 1e785000 {
                                compatible = "aspeed,wdt";
                                reg = <0x1e785000 0x1c>;
--

2.7.4

#10 lore raw

v3 cover ARM: aspeed: add support for the BT IPMI interface

In reply to Cédric Le Goater
Quoted 6 lines · C?dric Le Goater

Hello,

This serie adds support for the iBT interface on Aspeed SOCs (AST2400 and AST2500). The BT (Block Transfer) interface is used to perform in-band IPMI communication between a host and its BMC. This driver implements the BMC side.

This looks good. I pulled these into my tree, it's ok for 4.9 or whatever is next, since it's a new driver.

Do patches 2 and 3 go through Joel?

-corey

Quoted 43 lines

Changes since v2:

- limit to one opener
- protect write/read operations with a mutex.

Changes since v1:

- the driver is now called 'bt-bmc' and the device node '/dev/ipmi-bt-host'

- the code is now under drivers/char/ipmi/. This required a change of the top Makefile in drivers/ to compile the bt-bmc driver with the ipmi handlers not being selected. That might be an issue.

- changed the read/write operations to use a temporary buffer and get rid of the {get,put}_user calls

Thanks,

C.

Alistair Popple (1):
ipmi: add an Aspeed BT IPMI BMC driver

C?dric Le Goater (2):
ARM: aspeed: Add defconfigs for CONFIG_ASPEED_BT_IPMI_BMC
ARM: dts: aspeed: Enable BT IPMI BMC device

  .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +
  arch/arm/boot/dts/aspeed-g4.dtsi                   |   6 +
  arch/arm/boot/dts/aspeed-g5.dtsi                   |   6 +
  arch/arm/configs/aspeed_g4_defconfig               |   1 +
  arch/arm/configs/aspeed_g5_defconfig               |   1 +
  drivers/Makefile                                   |   2 +-
  drivers/char/ipmi/Kconfig                          |   7 +
  drivers/char/ipmi/Makefile                         |   1 +
  drivers/char/ipmi/bt-bmc.c                         | 510 +++++++++++++++++++++
  include/uapi/linux/Kbuild                          |   1 +
  include/uapi/linux/bt-bmc.h                        |  18 +
  11 files changed, 575 insertions(+), 1 deletion(-)

create mode 100644 Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt create mode 100644 drivers/char/ipmi/bt-bmc.c
create mode 100644 include/uapi/linux/bt-bmc.h

#11 lore raw

v3 cover ARM: aspeed: add support for the BT IPMI interface

Quoted 8 lines · Corey Minyard
Quoted 6 lines · C?dric Le Goater

Hello,

This serie adds support for the iBT interface on Aspeed SOCs (AST2400 and AST2500). The BT (Block Transfer) interface is used to perform in-band IPMI communication between a host and its BMC. This driver implements the BMC side.

Quoted 4 lines

This looks good. I pulled these into my tree, it's ok for 4.9 or whatever is next, since it's a new driver.

Do patches 2 and 3 go through Joel?

Yes. He said he would.

Thanks,

C.

Quoted 45 lines

-corey

Quoted 41 lines

Changes since v2:

- limit to one opener
- protect write/read operations with a mutex.

Changes since v1:

- the driver is now called 'bt-bmc' and the device node '/dev/ipmi-bt-host'
- the code is now under drivers/char/ipmi/. This required a change of
the top Makefile in drivers/ to compile the bt-bmc driver with the ipmi handlers not being selected. That might be an issue.
- changed the read/write operations to use a temporary buffer and get
rid of the {get,put}_user calls

Thanks,

C.

Alistair Popple (1):
ipmi: add an Aspeed BT IPMI BMC driver

C?dric Le Goater (2):
ARM: aspeed: Add defconfigs for CONFIG_ASPEED_BT_IPMI_BMC
ARM: dts: aspeed: Enable BT IPMI BMC device

  .../bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt   |  23 +
  arch/arm/boot/dts/aspeed-g4.dtsi                   |   6 +
  arch/arm/boot/dts/aspeed-g5.dtsi                   |   6 +
  arch/arm/configs/aspeed_g4_defconfig               |   1 +
  arch/arm/configs/aspeed_g5_defconfig               |   1 +
  drivers/Makefile                                   |   2 +-
  drivers/char/ipmi/Kconfig                          |   7 +
  drivers/char/ipmi/Makefile                         |   1 +
  drivers/char/ipmi/bt-bmc.c                         | 510 +++++++++++++++++++++
  include/uapi/linux/Kbuild                          |   1 +
  include/uapi/linux/bt-bmc.h                        |  18 +
  11 files changed, 575 insertions(+), 1 deletion(-)

create mode 100644 Documentation/devicetree/bindings/char/ipmi/aspeed,ast2400-bt-bmc.txt create mode 100644 drivers/char/ipmi/bt-bmc.c
create mode 100644 include/uapi/linux/bt-bmc.h