sb/intel/lynxpoint/hda_verb.c: Add missing codec detect steps
Lynx Point reference code version 1.9.1 and soc/intel/common/hda_verb.c perform these steps. Add them to Lynx Point as well. With this change, Lynx Point and soc/intel/common hda_verb.c files are now identical. Change-Id: I2fc592f73697a43bd5a3315ac80c77ff9f00da9b Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51642 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
aa566ad07f
commit
f20ef65e65
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue