summaryrefslogtreecommitdiffstats
path: root/src/soc/mediatek/mt8173
diff options
context:
space:
mode:
authorYidi Lin <yidi.lin@mediatek.com>2021-01-06 15:27:13 +0800
committerHung-Te Lin <hungte@chromium.org>2021-01-07 02:02:51 +0000
commit54f8b9ee7428068f0acb27d43d70d95c64b1a7ba (patch)
treee3ffe11b4f78a2643c8bef51b38d4a2288438c5a /src/soc/mediatek/mt8173
parent9990a172004354b6ccae7bca10bdab2b4b7b0bd9 (diff)
downloadcoreboot-54f8b9ee7428068f0acb27d43d70d95c64b1a7ba.tar.gz
coreboot-54f8b9ee7428068f0acb27d43d70d95c64b1a7ba.tar.bz2
coreboot-54f8b9ee7428068f0acb27d43d70d95c64b1a7ba.zip
soc/mediatek: rtc: Use `bool` as return type
BUG=b:176307061 TEST=emerge-asurada coreboot; emerge-kukui coreboot emerge-oak coreboot boot to shell on Asurada Signed-off-by: Yidi Lin <yidi.lin@mediatek.com> Change-Id: Id31fa04edc2920c1767d9f08ab7af0ab4a15bc24 Reviewed-on: https://review.coreboot.org/c/coreboot/+/49137 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/soc/mediatek/mt8173')
-rw-r--r--src/soc/mediatek/mt8173/include/soc/rtc.h1
-rw-r--r--src/soc/mediatek/mt8173/rtc.c12
2 files changed, 7 insertions, 6 deletions
diff --git a/src/soc/mediatek/mt8173/include/soc/rtc.h b/src/soc/mediatek/mt8173/include/soc/rtc.h
index bb9425fe8e3d..e82d514e86c1 100644
--- a/src/soc/mediatek/mt8173/include/soc/rtc.h
+++ b/src/soc/mediatek/mt8173/include/soc/rtc.h
@@ -5,6 +5,7 @@
#include <soc/pmic_wrap_common.h>
#include <soc/rtc_common.h>
+#include <stdbool.h>
#include <stdint.h>
#include "mt6391.h"
diff --git a/src/soc/mediatek/mt8173/rtc.c b/src/soc/mediatek/mt8173/rtc.c
index 94ec421f0dc0..d60f722564a2 100644
--- a/src/soc/mediatek/mt8173/rtc.c
+++ b/src/soc/mediatek/mt8173/rtc.c
@@ -10,7 +10,7 @@
#define RTC_GPIO_USER_MASK ((1 << 13) - (1 << 8))
/* initialize rtc related gpio */
-static int rtc_gpio_init(void)
+static bool rtc_gpio_init(void)
{
u16 con;
@@ -41,21 +41,21 @@ void rtc_osc_init(void)
}
/* low power detect setting */
-static int rtc_lpd_init(void)
+static bool rtc_lpd_init(void)
{
pwrap_write_field(RTC_CON, RTC_CON_LPEN, RTC_CON_LPRST, 0);
if (!rtc_write_trigger())
- return 0;
+ return false;
pwrap_write_field(RTC_CON, RTC_CON_LPRST, 0, 0);
if (!rtc_write_trigger())
- return 0;
+ return false;
pwrap_write_field(RTC_CON, 0, RTC_CON_LPRST, 0);
if (!rtc_write_trigger())
- return 0;
+ return false;
- return 1;
+ return true;
}
/* rtc init check */