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>
This commit is contained in:
Jonathan Neuschäfer 2017-09-23 17:09:36 +02:00 committed by Ronald G. Minnich
parent df27690df3
commit 3a182f7e31
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ static void lpc_set_bios_control_reg(uint8_t bios_cntl_bit)
device_t dev = PCH_DEV_LPC; device_t dev = PCH_DEV_LPC;
uint8_t bc_cntl; 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 = pci_read_config8(dev, LPC_BIOS_CNTL);
bc_cntl |= bios_cntl_bit; bc_cntl |= bios_cntl_bit;
pci_write_config8(dev, LPC_BIOS_CNTL, bc_cntl); pci_write_config8(dev, LPC_BIOS_CNTL, bc_cntl);