spi: ich: Use BIT macro
Replace numerical bit shift with BIT macro in ich :%s/(1 << nr)/BIT(nr)/g where nr = 0, 1, 2 .... 31 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jteki@openedev.com>
This commit is contained in:
parent
29e6abd94b
commit
69fd4c386c
|
@ -692,13 +692,13 @@ static int ich_spi_probe(struct udevice *bus)
|
||||||
*/
|
*/
|
||||||
if (plat->use_sbase) {
|
if (plat->use_sbase) {
|
||||||
bios_cntl = ich_readb(priv, priv->bcr);
|
bios_cntl = ich_readb(priv, priv->bcr);
|
||||||
bios_cntl &= ~(1 << 5); /* clear Enable InSMM_STS (EISS) */
|
bios_cntl &= ~BIT(5); /* clear Enable InSMM_STS (EISS) */
|
||||||
bios_cntl |= 1; /* Write Protect Disable (WPD) */
|
bios_cntl |= 1; /* Write Protect Disable (WPD) */
|
||||||
ich_writeb(priv, bios_cntl, priv->bcr);
|
ich_writeb(priv, bios_cntl, priv->bcr);
|
||||||
} else {
|
} else {
|
||||||
pci_read_config_byte(plat->dev, 0xdc, &bios_cntl);
|
pci_read_config_byte(plat->dev, 0xdc, &bios_cntl);
|
||||||
if (plat->ich_version == 9)
|
if (plat->ich_version == 9)
|
||||||
bios_cntl &= ~(1 << 5);
|
bios_cntl &= ~BIT(5);
|
||||||
pci_write_config_byte(plat->dev, 0xdc, bios_cntl | 0x1);
|
pci_write_config_byte(plat->dev, 0xdc, bios_cntl | 0x1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue