summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2017-09-23 17:09:36 +0200
committerRonald G. Minnich <rminnich@gmail.com>2017-09-25 23:38:43 +0000
commit3a182f7e31bbf76298f3fb08ce1238ed1e53c6ee (patch)
tree72a592a190db3eaab56400cb2b0e6d2e8494bff4 /src
parentdf27690df354169309970cfe5ebd292d2bf9ab3d (diff)
downloadcoreboot-3a182f7e31bbf76298f3fb08ce1238ed1e53c6ee.tar.xz
soc/intel: lpc: Use IS_POWER_OF_2 instead of open-coding it
Change-Id: I7a10a3fa5e1e9140a558f61109d0c9094d46e521 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/21655 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src')
-rw-r--r--src/soc/intel/common/block/lpc/lpc_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/intel/common/block/lpc/lpc_lib.c b/src/soc/intel/common/block/lpc/lpc_lib.c
index 6b5f29a038..c4144cb88b 100644
--- a/src/soc/intel/common/block/lpc/lpc_lib.c
+++ b/src/soc/intel/common/block/lpc/lpc_lib.c
@@ -161,7 +161,7 @@ static void lpc_set_bios_control_reg(uint8_t bios_cntl_bit)
device_t dev = PCH_DEV_LPC;
uint8_t bc_cntl;
- assert((bios_cntl_bit & (bios_cntl_bit - 1)) == 0);
+ assert(IS_POWER_OF_2(bios_cntl_bit));
bc_cntl = pci_read_config8(dev, LPC_BIOS_CNTL);
bc_cntl |= bios_cntl_bit;
pci_write_config8(dev, LPC_BIOS_CNTL, bc_cntl);