diff options
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g')
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c | 9 | ||||
-rw-r--r-- | firmware/target/arm/s5l8702/ipod6g/pmu-target.h | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c b/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c index 9c3ec8e711..920c93ad5d 100644 --- a/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c +++ b/firmware/target/arm/s5l8702/ipod6g/pmu-ipod6g.c | |||
@@ -143,7 +143,9 @@ void pmu_write_rtc(unsigned char* buffer) | |||
143 | pmu_write_multiple(0x59, 7, buffer); | 143 | pmu_write_multiple(0x59, 7, buffer); |
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef BOOTLOADER | 146 | /* |
147 | * preinit | ||
148 | */ | ||
147 | int pmu_rd_multiple(int address, int count, unsigned char* buffer) | 149 | int pmu_rd_multiple(int address, int count, unsigned char* buffer) |
148 | { | 150 | { |
149 | return i2c_rd(0, 0xe6, address, count, buffer); | 151 | return i2c_rd(0, 0xe6, address, count, buffer); |
@@ -225,7 +227,9 @@ void pmu_preinit(void) | |||
225 | /* AUTOLDO (HDD): 3400 mV, disabled, | 227 | /* AUTOLDO (HDD): 3400 mV, disabled, |
226 | limit = 1000 mA (40mA*0x19), limit always active */ | 228 | limit = 1000 mA (40mA*0x19), limit always active */ |
227 | PCF5063X_REG_AUTOOUT, 0x6f, | 229 | PCF5063X_REG_AUTOOUT, 0x6f, |
230 | #ifdef BOOTLOADER | ||
228 | PCF5063X_REG_AUTOENA, 0x0, | 231 | PCF5063X_REG_AUTOENA, 0x0, |
232 | #endif | ||
229 | PCF5063X_REG_AUTOCTL, 0x0, | 233 | PCF5063X_REG_AUTOCTL, 0x0, |
230 | PCF5063X_REG_AUTOMXC, 0x59, | 234 | PCF5063X_REG_AUTOMXC, 0x59, |
231 | 235 | ||
@@ -257,7 +261,9 @@ void pmu_preinit(void) | |||
257 | PCF5063X_REG_GPOCFG, 0x1, | 261 | PCF5063X_REG_GPOCFG, 0x1, |
258 | /* LED converter OFF, overvoltage protection enabled, | 262 | /* LED converter OFF, overvoltage protection enabled, |
259 | OCP limit is 500 mA, led_dimstep = 16*0x6/32768 */ | 263 | OCP limit is 500 mA, led_dimstep = 16*0x6/32768 */ |
264 | #ifdef BOOTLOADER | ||
260 | PCF5063X_REG_LEDENA, 0x0, | 265 | PCF5063X_REG_LEDENA, 0x0, |
266 | #endif | ||
261 | PCF5063X_REG_LEDCTL, 0x5, | 267 | PCF5063X_REG_LEDCTL, 0x5, |
262 | PCF5063X_REG_LEDDIM, 0x6, | 268 | PCF5063X_REG_LEDDIM, 0x6, |
263 | 269 | ||
@@ -274,4 +280,3 @@ void pmu_preinit(void) | |||
274 | pmu_rd_multiple(PCF5063X_REG_INT1, 5, rd_buf); | 280 | pmu_rd_multiple(PCF5063X_REG_INT1, 5, rd_buf); |
275 | pmu_rd(PCF50635_REG_INT6); | 281 | pmu_rd(PCF50635_REG_INT6); |
276 | } | 282 | } |
277 | #endif /* BOOTLOADER */ | ||
diff --git a/firmware/target/arm/s5l8702/ipod6g/pmu-target.h b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h index e4bef6f47c..d090f72a67 100644 --- a/firmware/target/arm/s5l8702/ipod6g/pmu-target.h +++ b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h | |||
@@ -77,12 +77,12 @@ void pmu_read_rtc(unsigned char* buffer); | |||
77 | void pmu_write_rtc(unsigned char* buffer); | 77 | void pmu_write_rtc(unsigned char* buffer); |
78 | void pmu_hdd_power(bool on); | 78 | void pmu_hdd_power(bool on); |
79 | 79 | ||
80 | void pmu_preinit(void); | ||
80 | #ifdef BOOTLOADER | 81 | #ifdef BOOTLOADER |
81 | unsigned char pmu_rd(int address); | 82 | unsigned char pmu_rd(int address); |
82 | int pmu_wr(int address, unsigned char val); | 83 | int pmu_wr(int address, unsigned char val); |
83 | int pmu_rd_multiple(int address, int count, unsigned char* buffer); | 84 | int pmu_rd_multiple(int address, int count, unsigned char* buffer); |
84 | int pmu_wr_multiple(int address, int count, unsigned char* buffer); | 85 | int pmu_wr_multiple(int address, int count, unsigned char* buffer); |
85 | void pmu_preinit(void); | ||
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | #endif /* __PMU_TARGET_H__ */ | 88 | #endif /* __PMU_TARGET_H__ */ |