aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/smihandler.c
diff options
context:
space:
mode:
authorSubrata Banik <subrata.banik@intel.com>2021-06-09 03:57:01 +0530
committerSubrata Banik <subrata.banik@intel.com>2021-06-16 03:48:29 +0000
commit6f910e24b6650da46bc45ea6bd25d426b3361752 (patch)
tree5ef621cb237c208803b980dc8380020b311920c6 /src/soc/intel/cannonlake/smihandler.c
parent54a3417254858fda03476f6bbbad37d7f8d251e6 (diff)
soc/intel/cannonlake: Make use of is_devfn_enabled() function
1. Replace all pcidev_path_on_root() and is_dev_enabled() functions combination with is_devfn_enabled(). 2. Remove unused local variable of device structure type (struct device *). 3. Replace pcidev_path_on_root() and dev->enabled check with is_devfn_enabled() call. TEST=Able to build and boot without any regression seen on CML. Signed-off-by: Subrata Banik <subrata.banik@intel.com> Change-Id: Ib5df5fd32e2e2742d349754a942bf81ca505dd39 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55328 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc/intel/cannonlake/smihandler.c')
-rw-r--r--src/soc/intel/cannonlake/smihandler.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/soc/intel/cannonlake/smihandler.c b/src/soc/intel/cannonlake/smihandler.c
index bfee1c0904..a287a7bc0a 100644
--- a/src/soc/intel/cannonlake/smihandler.c
+++ b/src/soc/intel/cannonlake/smihandler.c
@@ -19,8 +19,7 @@ void smihandler_soc_at_finalize(void)
if (!CONFIG(HECI_DISABLE_USING_SMM))
return;
- const struct device *dev = pcidev_path_on_root(PCH_DEVFN_CSE);
- if (!is_dev_enabled(dev))
+ if (!is_devfn_enabled(PCH_DEVFN_CSE))
heci_disable();
}