aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/intel/ibexpeak
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/intel/ibexpeak')
-rw-r--r--src/southbridge/intel/ibexpeak/azalia.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/southbridge/intel/ibexpeak/azalia.c b/src/southbridge/intel/ibexpeak/azalia.c
index 011bde60b1..c947092f18 100644
--- a/src/southbridge/intel/ibexpeak/azalia.c
+++ b/src/southbridge/intel/ibexpeak/azalia.c
@@ -42,7 +42,7 @@ static int codec_detect(u8 *base)
u8 reg8;
/* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */
- if (set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) == -1)
+ if (set_bits(base + HDA_GCTL_REG, 1, HDA_GCTL_CRST) < 0)
goto no_codec;
/* Write back the value once reset bit is set. */
@@ -138,7 +138,7 @@ static void codec_init(struct device *dev, u8 *base, int addr)
printk(BIOS_DEBUG, "Azalia: Initializing codec #%d\n", addr);
/* 1 */
- if (wait_for_ready(base) == -1) {
+ if (wait_for_ready(base) < 0) {
printk(BIOS_DEBUG, " codec not ready.\n");
return;
}
@@ -146,7 +146,7 @@ static void codec_init(struct device *dev, u8 *base, int addr)
reg32 = (addr << 28) | 0x000f0000;
write32(base + HDA_IC_REG, reg32);
- if (wait_for_valid(base) == -1) {
+ if (wait_for_valid(base) < 0) {
printk(BIOS_DEBUG, " codec not valid.\n");
return;
}
@@ -164,12 +164,12 @@ static void codec_init(struct device *dev, u8 *base, int addr)
/* 3 */
for (i = 0; i < verb_size; i++) {
- if (wait_for_ready(base) == -1)
+ if (wait_for_ready(base) < 0)
return;
write32(base + HDA_IC_REG, verb[i]);
- if (wait_for_valid(base) == -1)
+ if (wait_for_valid(base) < 0)
return;
}
printk(BIOS_DEBUG, "Azalia: verb loaded.\n");
@@ -185,12 +185,12 @@ static void codecs_init(struct device *dev, u8 *base, u32 codec_mask)
}
for (i = 0; i < pc_beep_verbs_size; i++) {
- if (wait_for_ready(base) == -1)
+ if (wait_for_ready(base) < 0)
return;
write32(base + HDA_IC_REG, pc_beep_verbs[i]);
- if (wait_for_valid(base) == -1)
+ if (wait_for_valid(base) < 0)
return;
}
}