From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v3 1/3] ipmi: add an Aspeed BT IPMI BMC driver Date: Fri, 23 Sep 2016 13:34:21 -0500 Message-ID: <20160923183421.GA14864@rob-hp-laptop> References: <1474354900-5618-1-git-send-email-clg@kaod.org> <1474354900-5618-2-git-send-email-clg@kaod.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <1474354900-5618-2-git-send-email-clg-Bxea+6Xhats@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: Corey Minyard , openipmi-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Joel Stanley , Alistair Popple , Mark Rutland , Russell King , Arnd Bergmann , Jeremy Kerr , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: devicetree@vger.kernel.org On Tue, Sep 20, 2016 at 09:01:38AM +0200, Cédric Le Goater wrote: > From: Alistair Popple > > 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 > Signed-off-by: Jeremy Kerr > Signed-off-by: Joel Stanley > [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 > Acked-by: Arnd Bergmann > [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] > Signed-off-by: Cédric Le Goater > > --- > > 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 + While similar, this is not the kernel directory structure. Just make this bindings/ipmi/ With that, Acked-by: Rob Herring > 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: robh@kernel.org (Rob Herring) Date: Fri, 23 Sep 2016 13:34:21 -0500 Subject: [PATCH v3 1/3] ipmi: add an Aspeed BT IPMI BMC driver In-Reply-To: <1474354900-5618-2-git-send-email-clg@kaod.org> References: <1474354900-5618-1-git-send-email-clg@kaod.org> <1474354900-5618-2-git-send-email-clg@kaod.org> Message-ID: <20160923183421.GA14864@rob-hp-laptop> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Sep 20, 2016 at 09:01:38AM +0200, C?dric Le Goater wrote: > From: Alistair Popple > > 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 > Signed-off-by: Jeremy Kerr > Signed-off-by: Joel Stanley > [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 > Acked-by: Arnd Bergmann > [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] > Signed-off-by: C?dric Le Goater > > --- > > 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 + While similar, this is not the kernel directory structure. Just make this bindings/ipmi/ With that, Acked-by: Rob Herring > 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