From d4ac047c78c3fec22107bc66a499144ab5602a5f Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Wed, 14 Aug 2024 06:35:17 +0200 Subject: soc/intel/broadwell; Use boolean for pch_is_wpt_xx Use boolean for pch_is_wpt() and pch_is_wpt_ulx(). Change-Id: Ifd1a46ebdbe08df6cc21ada100b94930b02cd7de Signed-off-by: Elyes Haouas Reviewed-on: https://review.coreboot.org/c/coreboot/+/83903 Tested-by: build bot (Jenkins) Reviewed-by: coreboot org --- src/soc/intel/broadwell/pch/pch.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/soc/intel/broadwell/pch/pch.c') diff --git a/src/soc/intel/broadwell/pch/pch.c b/src/soc/intel/broadwell/pch/pch.c index ddb51ccf12..fa03d7359a 100644 --- a/src/soc/intel/broadwell/pch/pch.c +++ b/src/soc/intel/broadwell/pch/pch.c @@ -10,6 +10,7 @@ #include #include #include +#include u8 pch_revision(void) { @@ -21,14 +22,14 @@ u16 pch_type(void) return pci_read_config16(PCH_DEV_LPC, PCI_DEVICE_ID); } -/* Return 1 if PCH type is WildcatPoint */ -int pch_is_wpt(void) +/* Return true if PCH type is WildcatPoint */ +bool pch_is_wpt(void) { - return ((pch_type() & 0xfff0) == 0x9cc0) ? 1 : 0; + return ((pch_type() & 0xfff0) == 0x9cc0) ? true : false; } -/* Return 1 if PCH type is WildcatPoint ULX */ -int pch_is_wpt_ulx(void) +/* Return true if PCH type is WildcatPoint ULX */ +bool pch_is_wpt_ulx(void) { u16 lpcid = pch_type(); @@ -36,10 +37,10 @@ int pch_is_wpt_ulx(void) case PCH_WPT_BDW_Y_SAMPLE: case PCH_WPT_BDW_Y_PREMIUM: case PCH_WPT_BDW_Y_BASE: - return 1; + return true; } - return 0; + return false; } u32 pch_read_soft_strap(int id) -- cgit v1.2.3