HID: intel-ish-hid: ipc: Address EHL Sx resume issues
authorZhang Lixu <lixu.zhang@intel.com>
Wed, 16 Dec 2020 06:36:40 +0000 (14:36 +0800)
committerJiri Kosina <jkosina@suse.cz>
Wed, 6 Jan 2021 16:20:02 +0000 (17:20 +0100)
commit2f4ec1548b4e816b25c1486df30b1a2920c62cbc
tree461cba7a01b94f663da8744c286e6ed924bac657
parent2e23a70edabe933284f690dff49497fb6b82b0e5
HID: intel-ish-hid: ipc: Address EHL Sx resume issues

When OOB is disabled, FW will be power gated when system is in S3/S4/S5
which is the same behavior with legacy ISH FW.
When OOB is enabled, FW will always power on which is totally different
comparing to legacy ISH FW.

So NO_D3 flag is not enough to check FW's status after resume.
Here we can use IPC FW status register to check host link status.
If it is false, it means FW get reset after power gated, need go through
the whole initialization flow; If it is true, it means FW is alive, just
set host ready bit to let fw know host is up.

Co-developed-by: Wei Jiang <wei.w.jiang@intel.com>
Signed-off-by: Wei Jiang <wei.w.jiang@intel.com>
Signed-off-by: Even Xu <even.xu@intel.com>
Signed-off-by: Zhang Lixu <lixu.zhang@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/intel-ish-hid/ipc/hw-ish.h
drivers/hid/intel-ish-hid/ipc/ipc.c
drivers/hid/intel-ish-hid/ipc/pci-ish.c