diff options
author | Cástor Muñoz <cmvidal@gmail.com> | 2016-05-22 00:43:18 +0200 |
---|---|---|
committer | Cástor Muñoz <cmvidal@gmail.com> | 2016-05-25 12:23:47 +0200 |
commit | 3f17745930ab0bee11555ab35318121dbec8fab1 (patch) | |
tree | f55eca9ef78772842b9f9e9dc448b04d9cefaef5 /firmware/target/arm/s5l8702/system-s5l8702.c | |
parent | e863f9a0ce8d968b085252c3b093b17ca07b65dd (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.c | 8 |
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) { |