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>
diff --git a/src/southbridge/intel/lynxpoint/Kconfig b/src/southbridge/intel/lynxpoint/Kconfig
index 891b06a..b7c719b 100644
--- a/src/southbridge/intel/lynxpoint/Kconfig
+++ b/src/southbridge/intel/lynxpoint/Kconfig
@@ -41,6 +41,9 @@
help
Set this option to y for LynxPoint LP (Haswell ULT).
+config AZALIA_MAX_CODECS
+ default 4
+
config EHCI_BAR
hex
default 0xe8000000
diff --git a/src/southbridge/intel/lynxpoint/azalia.c b/src/southbridge/intel/lynxpoint/azalia.c
index 9201caa..1bde180 100644
--- a/src/southbridge/intel/lynxpoint/azalia.c
+++ b/src/southbridge/intel/lynxpoint/azalia.c
@@ -11,20 +11,6 @@
#include "pch.h"
#include "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 azalia_pch_init(struct device *dev, u8 *base)
{
u8 reg8;
@@ -115,7 +101,7 @@
if (codec_mask) {
printk(BIOS_DEBUG, "Azalia: codec_mask = %02x\n", codec_mask);
- codecs_init(base, codec_mask);
+ azalia_codecs_init(base, codec_mask);
}
}