azalia: Use `HDA_GCTL_CRST` macro as unset-mask
The `HDA_GCTL_CRST` corresponds to bit zero, so this is equivalent. Change-Id: I5f4455aa1255f8954ac8b5f1ea5cf8f0874f77a4 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46728 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
554713ee0a
commit
22d4397913
|
@ -46,7 +46,7 @@ static int codec_detect(u8 *base)
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
|
||||||
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Write back the value once reset bit is set. */
|
/* Write back the value once reset bit is set. */
|
||||||
|
|
|
@ -43,11 +43,11 @@ static int codec_detect(u8 *base)
|
||||||
u32 reg32;
|
u32 reg32;
|
||||||
|
|
||||||
/* Set Bit 0 to 0 to enter reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 0 to enter reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, 0) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, 0) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Read in Codec location (BAR + 0xe)[2..0] */
|
/* Read in Codec location (BAR + 0xe)[2..0] */
|
||||||
|
|
|
@ -43,11 +43,11 @@ static int codec_detect(u8 *base)
|
||||||
u32 reg32;
|
u32 reg32;
|
||||||
|
|
||||||
/* Set Bit 0 to 0 to enter reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 0 to enter reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, 0) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, 0) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Read in Codec location (BAR + 0xe)[2..0] */
|
/* Read in Codec location (BAR + 0xe)[2..0] */
|
||||||
|
|
|
@ -43,11 +43,11 @@ static int codec_detect(u8 *base)
|
||||||
u32 reg32;
|
u32 reg32;
|
||||||
|
|
||||||
/* Set Bit 0 to 0 to enter reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 0 to enter reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, 0) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, 0) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Read in Codec location (BAR + 0xe)[2..0] */
|
/* Read in Codec location (BAR + 0xe)[2..0] */
|
||||||
|
|
|
@ -42,7 +42,7 @@ static int codec_detect(u8 *base)
|
||||||
u8 reg8;
|
u8 reg8;
|
||||||
|
|
||||||
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
|
||||||
if (set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
|
if (set_bits(base + HDA_GCTL_REG, HDA_GCTL_CRST, HDA_GCTL_CRST) < 0)
|
||||||
goto no_codec;
|
goto no_codec;
|
||||||
|
|
||||||
/* Write back the value once reset bit is set. */
|
/* Write back the value once reset bit is set. */
|
||||||
|
|
Loading…
Reference in New Issue