diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/southbridge/intel/lynxpoint/hda_verb.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/southbridge/intel/lynxpoint/hda_verb.c b/src/southbridge/intel/lynxpoint/hda_verb.c index a7bfa4a705..41ecac11c5 100644 --- a/src/southbridge/intel/lynxpoint/hda_verb.c +++ b/src/southbridge/intel/lynxpoint/hda_verb.c @@ -5,7 +5,6 @@ #include <device/mmio.h> #include <delay.h> -#include "pch.h" #include "hda_verb.h" int hda_codec_detect(u8 *base) @@ -19,6 +18,20 @@ int hda_codec_detect(u8 *base) /* Write back the value once reset bit is set. */ write16(base + HDA_GCAP_REG, read16(base + HDA_GCAP_REG)); + /* + * Clear the "State Change Status Register" STATESTS bits + * for each of the "SDIN Stat Change Status Flag" + */ + write8(base + HDA_STATESTS_REG, 0xf); + + /* Turn off the link and poll RESET# bit until it reads back as 0 */ + if (azalia_enter_reset(base) < 0) + goto no_codec; + + /* Turn on the link and poll RESET# bit until it reads back as 1 */ + if (azalia_exit_reset(base) < 0) + goto no_codec; + /* Read in Codec location (BAR + 0xe)[2..0] */ reg8 = read8(base + HDA_STATESTS_REG); reg8 &= 0x0f; |