diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2021-06-08 12:47:50 +0200 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2021-06-22 02:50:28 +0200 |
commit | 28651e6c4237f4aee5e0744ce37d3a50e7b1f36b (patch) | |
tree | b5c9d7d039475d39bd2e8ceb78b76e2065251292 /drivers/char/ipmi/kcs_bmc_client.h | |
parent | ipmi: kcs_bmc: Decouple the IPMI chardev from the core (diff) | |
download | linux-28651e6c4237f4aee5e0744ce37d3a50e7b1f36b.tar.xz linux-28651e6c4237f4aee5e0744ce37d3a50e7b1f36b.zip |
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_client.h')
-rw-r--r-- | drivers/char/ipmi/kcs_bmc_client.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/ipmi/kcs_bmc_client.h b/drivers/char/ipmi/kcs_bmc_client.h index 814ad8e052ef..6fdcde0a7169 100644 --- a/drivers/char/ipmi/kcs_bmc_client.h +++ b/drivers/char/ipmi/kcs_bmc_client.h @@ -35,6 +35,8 @@ void kcs_bmc_unregister_driver(struct kcs_bmc_driver *drv); int kcs_bmc_enable_device(struct kcs_bmc_device *kcs_bmc, struct kcs_bmc_client *client); void kcs_bmc_disable_device(struct kcs_bmc_device *kcs_bmc, struct kcs_bmc_client *client); +void kcs_bmc_update_event_mask(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 events); + u8 kcs_bmc_read_data(struct kcs_bmc_device *kcs_bmc); void kcs_bmc_write_data(struct kcs_bmc_device *kcs_bmc, u8 data); u8 kcs_bmc_read_status(struct kcs_bmc_device *kcs_bmc); |