summaryrefslogtreecommitdiff
path: root/src/southbridge/intel/i82801gx
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-12-05 18:15:48 +0100
committerHung-Te Lin <hungte@chromium.org>2020-12-17 13:53:51 +0000
commit75c4f06314f64b570f7535e308ab0f4e7b316dea (patch)
tree338845f579fc2e43464933ced0536853798fd1eb /src/southbridge/intel/i82801gx
parente108e41b3347f29e0f266949d70cc2f01e6adebd (diff)
azalia: Make `find_verb` function non-static
To allow dropping copies of this function, make it non-static. Also, rename it to `azalia_find_verb` as the function is now globally visible. Finally, replace the copies in chipset code with `azalia_find_verb`. Change-Id: Ie66323b2c62139e86d3d7e003f6653a3def7b5f2 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/48348 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/southbridge/intel/i82801gx')
-rw-r--r--src/southbridge/intel/i82801gx/azalia.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/southbridge/intel/i82801gx/azalia.c b/src/southbridge/intel/i82801gx/azalia.c
index a511468171..fa3e9b405c 100644
--- a/src/southbridge/intel/i82801gx/azalia.c
+++ b/src/southbridge/intel/i82801gx/azalia.c
@@ -39,24 +39,6 @@ no_codec:
return 0;
}
-static u32 find_verb(struct device *dev, u32 viddid, const u32 **verb)
-{
- int idx = 0;
-
- while (idx < (cim_verb_data_size / sizeof(u32))) {
- u32 verb_size = 4 * cim_verb_data[idx + 2]; // in u32
- if (cim_verb_data[idx] != viddid) {
- idx += verb_size + 3; // skip verb + header
- continue;
- }
- *verb = &cim_verb_data[idx + 3];
- return verb_size;
- }
-
- /* Not all codecs need to load another verb */
- return 0;
-}
-
/*
* Wait 50usec for the codec to indicate it is ready.
* No response would imply that the codec is non-operative.
@@ -129,7 +111,7 @@ static void codec_init(struct device *dev, u8 *base, int addr)
/* 2 */
reg32 = read32(base + HDA_IR_REG);
printk(BIOS_DEBUG, "Azalia: codec viddid: %08x\n", reg32);
- verb_size = find_verb(dev, reg32, &verb);
+ verb_size = azalia_find_verb(dev, reg32, &verb);
if (!verb_size) {
printk(BIOS_DEBUG, "Azalia: No verb!\n");