summaryrefslogtreecommitdiff
path: root/src/southbridge
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-06-21 13:29:28 +0200
committerAngel Pons <th3fanbus@gmail.com>2020-06-22 14:48:57 +0000
commit7a2864b42197dfd344b7f5ddee527f9522309563 (patch)
treea3318e7b3be4f7dd573de15da3a0bdbee64aba1f /src/southbridge
parentc9d6333ab615e0814338dfc81e518b8a93da89d4 (diff)
sb/intel/i82801jx/hdaudio.c: Align with i82801ix
The code is pretty much the same, only differing in a comment and a printk statement. Change-Id: Ic404ef466636fc05c2baa70aad8a39bb1b458d42 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42635 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/southbridge')
-rw-r--r--src/southbridge/intel/i82801jx/hdaudio.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/southbridge/intel/i82801jx/hdaudio.c b/src/southbridge/intel/i82801jx/hdaudio.c
index 4ba7828c48..7968f711bf 100644
--- a/src/southbridge/intel/i82801jx/hdaudio.c
+++ b/src/southbridge/intel/i82801jx/hdaudio.c
@@ -29,9 +29,7 @@ static int set_bits(void *port, u32 mask, u32 val)
reg32 |= val;
write32(port, reg32);
- /* Wait for readback of register to
- * match what was just written to it
- */
+ /* Wait for readback of register to match what was just written to it */
count = 50;
do {
/* Wait 1ms based on BKDG wait time */
@@ -76,7 +74,7 @@ no_codec:
static u32 find_verb(struct device *dev, u32 viddid, const u32 **verb)
{
- int idx=0;
+ int idx = 0;
while (idx < (cim_verb_data_size / sizeof(u32))) {
u32 verb_size = 4 * cim_verb_data[idx+2]; // in u32
@@ -99,9 +97,7 @@ static u32 find_verb(struct device *dev, u32 viddid, const u32 **verb)
static int wait_for_ready(u8 *base)
{
- /* Use a 50 usec timeout - the Linux kernel uses the
- * same duration */
-
+ /* Use a 50 usec timeout - the Linux kernel uses the same duration */
int timeout = 50;
while (timeout--) {
@@ -115,9 +111,8 @@ static int wait_for_ready(u8 *base)
}
/**
- * Wait 50usec for the codec to indicate that it accepted
- * the previous command. No response would imply that the code
- * is non-operative
+ * Wait 50usec for the codec to indicate that it accepted the previous command.
+ * No response would imply that the code is non-operative.
*/
static int wait_for_valid(u8 *base)
@@ -129,14 +124,12 @@ static int wait_for_valid(u8 *base)
reg32 |= (1 << 0) | (1 << 1);
write32(base + 0x68, reg32);
- /* Use a 50 usec timeout - the Linux kernel uses the
- * same duration */
+ /* Use a 50 usec timeout - the Linux kernel uses the same duration */
int timeout = 50;
while (timeout--) {
reg32 = read32(base + HDA_ICII_REG);
- if ((reg32 & (HDA_ICII_VALID | HDA_ICII_BUSY)) ==
- HDA_ICII_VALID)
+ if ((reg32 & (HDA_ICII_VALID | HDA_ICII_BUSY)) == HDA_ICII_VALID)
return 0;
udelay(1);
}
@@ -223,7 +216,7 @@ static void azalia_init(struct device *dev)
pci_update_config32(dev, 0x114, ~0x000000ff, 1);
// VCi traffic class
- pci_or_config8(dev, 0x44, 7 << 0);
+ pci_or_config8(dev, 0x44, 7 << 0); // TC7
// VCi Resource Control
pci_or_config32(dev, 0x120, (1 << 31) | (1 << 24) | (0x80 << 0)); /* VCi ID and map */
@@ -244,7 +237,7 @@ static void azalia_init(struct device *dev)
// NOTE this will break as soon as the Azalia get's a bar above
// 4G. Is there anything we can do about it?
base = res2mmio(res, 0, 0);
- printk(BIOS_DEBUG, "Azalia: base = %08x\n", (u32)base);
+ printk(BIOS_DEBUG, "Azalia: base = %p\n", base);
codec_mask = codec_detect(base);
if (codec_mask) {