OSDN Git Service

soc: aspeed: snoop: Add clock control logic
authorJae Hyun Yoo <jae.hyun.yoo@intel.com>
Tue, 8 Dec 2020 09:17:47 +0000 (17:17 +0800)
committerJoel Stanley <joel@jms.id.au>
Wed, 10 Feb 2021 09:59:31 +0000 (20:29 +1030)
commit3f94cf15583be554df7aaa651b8ff8e1b68fbe51
treee1654508eb9afd0fe7a5337b97832c9011e4dd62
parent5c8fe583cce542aa0b84adc939ce85293de36e5e
soc: aspeed: snoop: Add clock control logic

If LPC SNOOP driver is registered ahead of lpc-ctrl module, LPC
SNOOP block will be enabled without heart beating of LCLK until
lpc-ctrl enables the LCLK. This issue causes improper handling on
host interrupts when the host sends interrupt in that time frame.
Then kernel eventually forcibly disables the interrupt with
dumping stack and printing a 'nobody cared this irq' message out.

To prevent this issue, all LPC sub-nodes should enable LCLK
individually so this patch adds clock control logic into the LPC
SNOOP driver.

Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev")
Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Signed-off-by: John Wang <wangzhiqiang.bj@bytedance.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20201208091748.1920-1-wangzhiqiang.bj@bytedance.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
drivers/soc/aspeed/aspeed-lpc-snoop.c