aboutsummaryrefslogtreecommitdiff
path: root/src/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/clock.c b/src/clock.c
index 5603693..328ad52 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -44,18 +44,18 @@ enum clock_registers {
TRACECONFIG = 0x55c,
};
-static bool init_hfclk() {
+static int init_hfclk() {
/* We just assert that the source clock is running with the CPU internal clock
* as source */
u32 hfclk_status = READ_CLK_REG(HFCLKSTAT);
- int clk_src = hfclk_status & 0x1;
- bool clk_running = (hfclk_status >> 16) & 0x1;
+ u32 clk_src = hfclk_status & 0x1;
+ u32 clk_running = (hfclk_status >> 16) & 0x1;
return (clk_src == HFINT) && clk_running;
}
-static bool init_lfclk() {
- bool clk_started = false;
+static int init_lfclk() {
+ int clk_started = 0;
enum lfclk_src src = LFRC;
/* LFCLK use the LFRC clock by default, so it should be ready
@@ -74,6 +74,6 @@ static bool init_lfclk() {
return src == LFRC;
}
-bool init_clock() {
+int init_clock() {
return init_hfclk() && init_lfclk();
}