summaryrefslogtreecommitdiff
path: root/drivers/char/ipmi/kcs_bmc.h
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2021-06-08 13:47:50 +0300
committerCorey Minyard <cminyard@mvista.com>2021-06-22 03:50:28 +0300
commit28651e6c4237f4aee5e0744ce37d3a50e7b1f36b (patch)
treeb5c9d7d039475d39bd2e8ceb78b76e2065251292 /drivers/char/ipmi/kcs_bmc.h
parent7cafff991e32d4b97251982ab0665601b65f2736 (diff)
downloadlinux-28651e6c4237f4aee5e0744ce37d3a50e7b1f36b.tar.xz
ipmi: kcs_bmc: Allow clients to control KCS IRQ state
Add a mechanism for controlling whether the client associated with a KCS device will receive Input Buffer Full (IBF) and Output Buffer Empty (OBE) events. This enables an abstract implementation of poll() for KCS devices. A wart in the implementation is that the ASPEED KCS devices don't support an OBE interrupt for the BMC. Instead we pretend it has one by polling the status register waiting for the Output Buffer Full (OBF) bit to clear, and generating an event when OBE is observed. Cc: CS20 KWLiu <KWLIU@nuvoton.com> Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Zev Weiss <zweiss@equinix.com> Message-Id: <20210608104757.582199-10-andrew@aj.id.au> Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/kcs_bmc.h')
-rw-r--r--drivers/char/ipmi/kcs_bmc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/ipmi/kcs_bmc.h b/drivers/char/ipmi/kcs_bmc.h
index 3f0cce315b4f..fa408b802c79 100644
--- a/drivers/char/ipmi/kcs_bmc.h
+++ b/drivers/char/ipmi/kcs_bmc.h
@@ -8,6 +8,9 @@
#include <linux/list.h>
+#define KCS_BMC_EVENT_TYPE_OBE BIT(0)
+#define KCS_BMC_EVENT_TYPE_IBF BIT(1)
+
#define KCS_BMC_STR_OBF BIT(0)
#define KCS_BMC_STR_IBF BIT(1)
#define KCS_BMC_STR_CMD_DAT BIT(3)