aboutsummaryrefslogtreecommitdiff
path: root/src/device/azalia_device.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-12-05 19:02:14 +0100
committerHung-Te Lin <hungte@chromium.org>2020-12-17 13:55:23 +0000
commit7f839f66ea552ad939a8a8de6d3afec2934f3868 (patch)
tree180ed2a91b7719b7350172ef3345ecaef4e0485f /src/device/azalia_device.c
parent4919028e6207e011f93488732ebaaf70b8377cd5 (diff)
azalia: Use `azalia_exit_reset` function
Change-Id: I346040eb6531dac6c066a96cd73033aa17f026d0 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48356 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/device/azalia_device.c')
-rw-r--r--src/device/azalia_device.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/device/azalia_device.c b/src/device/azalia_device.c
index 9306e2ac37..5e9c6c9466 100644
--- a/src/device/azalia_device.c
+++ b/src/device/azalia_device.c
@@ -51,8 +51,7 @@ static int codec_detect(u8 *base)
u32 reg32;
int count;
- /* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
- if (azalia_set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
+ if (azalia_exit_reset(base) < 0)
goto no_codec;
/* clear STATESTS bits (BAR + 0xe)[2:0] */
@@ -77,8 +76,7 @@ static int codec_detect(u8 *base)
if (azalia_set_bits(base + HDA_GCTL_REG, 1, 0) < 0)
goto no_codec;
- /* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
- if (azalia_set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
+ if (azalia_exit_reset(base) < 0)
goto no_codec;
/* Read in Codec location (BAR + 0xe)[2..0] */