diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2024-07-17 12:22:43 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-08-11 17:10:08 +0000 |
commit | 96719adda3f5e96cc5af537f3d9c70ae75073b46 (patch) | |
tree | 6fc7ab1279509dae46eca94cbe38c62d3dc1d24b /src/southbridge/intel | |
parent | af0d4bce65df277b56e495892dff1c712ed76ddd (diff) |
azalia: Get rid of "return {-1,0}
Use 'enum cb_err' instead of {-1,0}.
Change-Id: Icea33ea3e6a5e3c7bbfedc29045026cd722ac23e
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83503
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Diffstat (limited to 'src/southbridge/intel')
-rw-r--r-- | src/southbridge/intel/bd82x6x/azalia.c | 3 | ||||
-rw-r--r-- | src/southbridge/intel/i82801gx/azalia.c | 7 | ||||
-rw-r--r-- | src/southbridge/intel/i82801ix/azalia.c | 6 | ||||
-rw-r--r-- | src/southbridge/intel/i82801jx/azalia.c | 6 | ||||
-rw-r--r-- | src/southbridge/intel/ibexpeak/azalia.c | 4 | ||||
-rw-r--r-- | src/southbridge/intel/lynxpoint/hda_verb.c | 7 |
6 files changed, 21 insertions, 12 deletions
diff --git a/src/southbridge/intel/bd82x6x/azalia.c b/src/southbridge/intel/bd82x6x/azalia.c index ddaa8a1bb0..4eeb3b5cf4 100644 --- a/src/southbridge/intel/bd82x6x/azalia.c +++ b/src/southbridge/intel/bd82x6x/azalia.c @@ -8,6 +8,7 @@ #include <device/mmio.h> #include <delay.h> #include <device/azalia_device.h> +#include <types.h> #include "chip.h" #include "pch.h" @@ -16,7 +17,7 @@ static int codec_detect(u8 *base) { u8 reg8; - if (azalia_exit_reset(base) < 0) + if (azalia_exit_reset(base) != CB_SUCCESS) goto no_codec; /* Write back the value once reset bit is set. */ diff --git a/src/southbridge/intel/i82801gx/azalia.c b/src/southbridge/intel/i82801gx/azalia.c index 31827e6de9..cef3dee191 100644 --- a/src/southbridge/intel/i82801gx/azalia.c +++ b/src/southbridge/intel/i82801gx/azalia.c @@ -8,7 +8,8 @@ #include <device/mmio.h> #include <delay.h> #include <device/azalia_device.h> -#include <stdint.h> +#include <types.h> + #include "chip.h" #include "i82801gx.h" @@ -16,10 +17,10 @@ static int codec_detect(u8 *base) { u32 reg32; - if (azalia_enter_reset(base) < 0) + if (azalia_enter_reset(base) != CB_SUCCESS) goto no_codec; - if (azalia_exit_reset(base) < 0) + if (azalia_exit_reset(base) != CB_SUCCESS) goto no_codec; /* Read in Codec location (BAR + 0xe)[2..0] */ diff --git a/src/southbridge/intel/i82801ix/azalia.c b/src/southbridge/intel/i82801ix/azalia.c index fdc951472e..228b188f89 100644 --- a/src/southbridge/intel/i82801ix/azalia.c +++ b/src/southbridge/intel/i82801ix/azalia.c @@ -7,6 +7,8 @@ #include <device/pci_ops.h> #include <device/mmio.h> #include <device/azalia_device.h> +#include <types.h> + #include "chip.h" #include "i82801ix.h" @@ -14,10 +16,10 @@ static int codec_detect(u8 *base) { u32 reg32; - if (azalia_enter_reset(base) < 0) + if (azalia_enter_reset(base) != CB_SUCCESS) goto no_codec; - if (azalia_exit_reset(base) < 0) + if (azalia_exit_reset(base) != CB_SUCCESS) goto no_codec; /* Read in Codec location (BAR + 0xe)[2..0] */ diff --git a/src/southbridge/intel/i82801jx/azalia.c b/src/southbridge/intel/i82801jx/azalia.c index fa0209ae78..6b840e7d50 100644 --- a/src/southbridge/intel/i82801jx/azalia.c +++ b/src/southbridge/intel/i82801jx/azalia.c @@ -7,6 +7,8 @@ #include <device/pci_ops.h> #include <device/mmio.h> #include <device/azalia_device.h> +#include <types.h> + #include "chip.h" #include "i82801jx.h" @@ -14,10 +16,10 @@ static int codec_detect(u8 *base) { u32 reg32; - if (azalia_enter_reset(base) < 0) + if (azalia_enter_reset(base) != CB_SUCCESS) goto no_codec; - if (azalia_exit_reset(base) < 0) + if (azalia_exit_reset(base) != CB_SUCCESS) goto no_codec; /* Read in Codec location (BAR + 0xe)[2..0] */ diff --git a/src/southbridge/intel/ibexpeak/azalia.c b/src/southbridge/intel/ibexpeak/azalia.c index ac950c46df..6196096a14 100644 --- a/src/southbridge/intel/ibexpeak/azalia.c +++ b/src/southbridge/intel/ibexpeak/azalia.c @@ -8,13 +8,15 @@ #include <device/mmio.h> #include <delay.h> #include <device/azalia_device.h> +#include <types.h> + #include "pch.h" static int codec_detect(u8 *base) { u8 reg8; - if (azalia_exit_reset(base) < 0) + if (azalia_exit_reset(base) != CB_SUCCESS) goto no_codec; /* Write back the value once reset bit is set. */ diff --git a/src/southbridge/intel/lynxpoint/hda_verb.c b/src/southbridge/intel/lynxpoint/hda_verb.c index 7e9f4d2c48..e79b5d1b20 100644 --- a/src/southbridge/intel/lynxpoint/hda_verb.c +++ b/src/southbridge/intel/lynxpoint/hda_verb.c @@ -3,6 +3,7 @@ #include <console/console.h> #include <device/azalia_device.h> #include <device/mmio.h> +#include <types.h> #include "hda_verb.h" @@ -11,7 +12,7 @@ int hda_codec_detect(u8 *base) u8 reg8; /* Set Bit 0 to 1 to exit reset state (BAR + 0x8)[0] */ - if (azalia_exit_reset(base) < 0) + if (azalia_exit_reset(base) != CB_SUCCESS) goto no_codec; /* Write back the value once reset bit is set. */ @@ -24,11 +25,11 @@ int hda_codec_detect(u8 *base) write8(base + HDA_STATESTS_REG, 0xf); /* Turn off the link and poll RESET# bit until it reads back as 0 */ - if (azalia_enter_reset(base) < 0) + if (azalia_enter_reset(base) != CB_SUCCESS) goto no_codec; /* Turn on the link and poll RESET# bit until it reads back as 1 */ - if (azalia_exit_reset(base) < 0) + if (azalia_exit_reset(base) != CB_SUCCESS) goto no_codec; /* Read in Codec location (BAR + 0xe)[2..0] */ |