]> git.baikalelectronics.ru Git - kernel.git/commit
ipmi: kcs_bmc: Allow clients to control KCS IRQ state
authorAndrew Jeffery <andrew@aj.id.au>
Tue, 8 Jun 2021 10:47:50 +0000 (20:17 +0930)
committerCorey Minyard <cminyard@mvista.com>
Tue, 22 Jun 2021 00:50:28 +0000 (19:50 -0500)
commitd7a88e74183cc8658b4f1917e86db1aec1e84403
treeb5c9d7d039475d39bd2e8ceb78b76e2065251292
parenteeb051ce19140f8c49f5ecb64758d47cf6ba368b
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>
drivers/char/ipmi/kcs_bmc.c
drivers/char/ipmi/kcs_bmc.h
drivers/char/ipmi/kcs_bmc_aspeed.c
drivers/char/ipmi/kcs_bmc_client.h
drivers/char/ipmi/kcs_bmc_device.h
drivers/char/ipmi/kcs_bmc_npcm7xx.c