diff options
author | Angel Pons <th3fanbus@gmail.com> | 2021-11-10 18:09:04 +0100 |
---|---|---|
committer | Paul Fagerburg <pfagerburg@chromium.org> | 2021-11-11 22:45:11 +0000 |
commit | 4f8aea05944129e9fee7692c413fabe1ab287d0a (patch) | |
tree | 810942d76ecea05043b517b812635ebc7b8fb431 /src/soc/intel/broadwell | |
parent | aae6b55b2db351c9a6bd267bbfe63a4ac2594dc0 (diff) |
lynxpoint/broadwell: Use `azalia_codecs_init()`
Use the functionally-equivalent common Azalia code to get rid of
redundant code.
Change-Id: Id25d2797a91b05264b1a76fa8faec0533dd5ac78
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59120
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/broadwell')
-rw-r--r-- | src/soc/intel/broadwell/pch/Kconfig | 3 | ||||
-rw-r--r-- | src/soc/intel/broadwell/pch/hda.c | 16 |
2 files changed, 4 insertions, 15 deletions
diff --git a/src/soc/intel/broadwell/pch/Kconfig b/src/soc/intel/broadwell/pch/Kconfig index 4e187ff114..3fbaa79bc2 100644 --- a/src/soc/intel/broadwell/pch/Kconfig +++ b/src/soc/intel/broadwell/pch/Kconfig @@ -24,6 +24,9 @@ config PCH_SPECIFIC_OPTIONS select SOUTHBRIDGE_INTEL_COMMON_SPI_ICH9 select SPI_FLASH +config AZALIA_MAX_CODECS + default 4 + config EHCI_BAR hex default 0xd8000000 diff --git a/src/soc/intel/broadwell/pch/hda.c b/src/soc/intel/broadwell/pch/hda.c index 5c5e08fc31..c292b942e0 100644 --- a/src/soc/intel/broadwell/pch/hda.c +++ b/src/soc/intel/broadwell/pch/hda.c @@ -11,20 +11,6 @@ #include <soc/rcba.h> #include <southbridge/intel/lynxpoint/hda_verb.h> -static void codecs_init(u8 *base, u32 codec_mask) -{ - int i; - - /* Can support up to 4 codecs */ - for (i = 3; i >= 0; i--) { - if (codec_mask & (1 << i)) - azalia_codec_init(base, i, cim_verb_data, cim_verb_data_size); - } - - if (pc_beep_verbs_size) - azalia_program_verb_table(base, pc_beep_verbs, pc_beep_verbs_size); -} - static void hda_pch_init(struct device *dev, u8 *base) { u8 reg8; @@ -94,7 +80,7 @@ static void hda_init(struct device *dev) if (codec_mask) { printk(BIOS_DEBUG, "HDA: codec_mask = %02x\n", codec_mask); - codecs_init(base, codec_mask); + azalia_codecs_init(base, codec_mask); } } |