diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-06-17 18:04:09 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2020-09-03 11:06:40 +0200 |
commit | 49f2a7f4cdaccb21ad964f6d8645ea3a0ec79293 (patch) | |
tree | dc88bf75b3c5845d81eb17e130c1c9937a204c59 /drivers/thunderbolt/icm.c | |
parent | thunderbolt: Software CM only should set force power in Tiger Lake (diff) | |
download | linux-49f2a7f4cdaccb21ad964f6d8645ea3a0ec79293.tar.xz linux-49f2a7f4cdaccb21ad964f6d8645ea3a0ec79293.zip |
thunderbolt: Use bit 31 to check if Firmware CM is running in Tiger Lake
In Tiger Lake the Firmware CM is always enabled (so bit 0 is always set)
but it may be in "pass through" mode which means it requires Software CM
instead. This can be determined by checking bit 31 instead.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/icm.c')
-rw-r--r-- | drivers/thunderbolt/icm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c index ffcc8c3459e5..b51fc3f62b1f 100644 --- a/drivers/thunderbolt/icm.c +++ b/drivers/thunderbolt/icm.c @@ -1635,11 +1635,14 @@ static void icm_icl_rtd3_veto(struct tb *tb, const struct icm_pkg_header *hdr) static bool icm_tgl_is_supported(struct tb *tb) { + u32 val; + /* * If the firmware is not running use software CM. This platform * should fully support both. */ - return icm_firmware_running(tb->nhi); + val = ioread32(tb->nhi->iobase + REG_FW_STS); + return !!(val & REG_FW_STS_NVM_AUTH_DONE); } static void icm_handle_notification(struct work_struct *work) |