summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-10-13 13:06:48 +0200
committerPatrick Georgi <patrick@coreboot.org>2022-10-28 17:29:36 +0000
commitd6317e738ec887fd6999c4361ab4cd41e27d8286 (patch)
treed823015adc8fccd30ff1c0100c54ae584d4af982 /src/mainboard
parent1733983d55aaa988f5a57e1a1d1542f77cd39cc5 (diff)
mb/getac/p470: Use 'enum cb_err'
Change-Id: I9650fc672a94343472b44037f8a664d7d15aaf15 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68374 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/getac/p470/ec_oem.c14
-rw-r--r--src/mainboard/getac/p470/ec_oem.h6
2 files changed, 12 insertions, 8 deletions
diff --git a/src/mainboard/getac/p470/ec_oem.c b/src/mainboard/getac/p470/ec_oem.c
index 26767d9965..c810953bab 100644
--- a/src/mainboard/getac/p470/ec_oem.c
+++ b/src/mainboard/getac/p470/ec_oem.c
@@ -4,9 +4,11 @@
#include <arch/io.h>
#include <delay.h>
#include <ec/acpi/ec.h>
+#include <types.h>
+
#include "ec_oem.h"
-int send_ec_oem_command(u8 command)
+enum cb_err send_ec_oem_command(u8 command)
{
int timeout;
@@ -19,14 +21,14 @@ int send_ec_oem_command(u8 command)
if (!timeout) {
printk(BIOS_DEBUG, "Timeout while sending OEM command 0x%02x to EC!\n",
command);
- // return -1;
+ // return CB_ERR;
}
outb(command, EC_OEM_SC);
- return 0;
+ return CB_SUCCESS;
}
-int send_ec_oem_data(u8 data)
+enum cb_err send_ec_oem_data(u8 data)
{
int timeout;
@@ -39,12 +41,12 @@ int send_ec_oem_data(u8 data)
if (!timeout) {
printk(BIOS_DEBUG, "Timeout while sending OEM data 0x%02x to EC!\n",
data);
- // return -1;
+ // return CB_ERR;
}
outb(data, EC_OEM_DATA);
- return 0;
+ return CB_SUCCESS;
}
u8 recv_ec_oem_data(void)
diff --git a/src/mainboard/getac/p470/ec_oem.h b/src/mainboard/getac/p470/ec_oem.h
index 9200f0e104..5b5bbcd60f 100644
--- a/src/mainboard/getac/p470/ec_oem.h
+++ b/src/mainboard/getac/p470/ec_oem.h
@@ -3,6 +3,8 @@
#ifndef _MAINBOARD_EC_OEM_H
#define _MAINBOARD_EC_OEM_H
+#include <types.h>
+
#define EC_OEM_DATA 0x68
#define EC_OEM_SC 0x6c
@@ -21,8 +23,8 @@
#define BD_EC 0x83 // Burst Disable Embedded Controller
#define QR_EC 0x84 // Query Embedded Controller
-int send_ec_oem_command(u8 command);
-int send_ec_oem_data(u8 data);
+enum cb_err send_ec_oem_command(u8 command);
+enum cb_err send_ec_oem_data(u8 data);
u8 recv_ec_oem_data(void);
u8 ec_oem_read(u8 addr);