summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/system-s5l8702.c
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2016-05-22 00:43:18 +0200
committerCástor Muñoz <cmvidal@gmail.com>2016-05-25 12:23:47 +0200
commit3f17745930ab0bee11555ab35318121dbec8fab1 (patch)
treef55eca9ef78772842b9f9e9dc448b04d9cefaef5 /firmware/target/arm/s5l8702/system-s5l8702.c
parente863f9a0ce8d968b085252c3b093b17ca07b65dd (diff)
iPod Classic: HW initialization for RB
Do not rely on a bootloader initializing the HW, RB initializes and configures GPIO, I2C, and PMU at startup. Change-Id: If7f856b1f345f63de584aa4e4fc22d130cd66c80
Diffstat (limited to 'firmware/target/arm/s5l8702/system-s5l8702.c')
-rw-r--r--firmware/target/arm/s5l8702/system-s5l8702.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/target/arm/s5l8702/system-s5l8702.c b/firmware/target/arm/s5l8702/system-s5l8702.c
index d285efde78..e94e12a153 100644
--- a/firmware/target/arm/s5l8702/system-s5l8702.c
+++ b/firmware/target/arm/s5l8702/system-s5l8702.c
@@ -23,6 +23,7 @@
#include "system.h"
#include "panic.h"
#include "system-target.h"
+#include "i2c-s5l8702.h"
#include "pmu-target.h"
#include "uart-target.h"
#include "gpio-s5l8702.h"
@@ -199,6 +200,11 @@ enum {
void system_init(void)
{
clocking_init(clk_modes, 0);
+#ifndef BOOTLOADER
+ gpio_preinit();
+ i2c_preinit(0);
+ pmu_preinit();
+#endif
gpio_init();
pmu_init();
dma_init();
@@ -279,7 +285,7 @@ void memory_init(void)
}
#ifdef BOOTLOADER
-#include "i2c-s5l8702.h"
+#include <stdbool.h>
static void syscon_preinit(void)
{