summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/ipod6g/pmu-target.h
diff options
context:
space:
mode:
authorCástor Muñoz <cmvidal@gmail.com>2016-02-04 20:12:02 +0100
committerCástor Muñoz <cmvidal@gmail.com>2016-05-15 21:16:54 +0200
commit469d64539007584241ccd475e81038ea4166f17b (patch)
tree2de03ef2c45cfa845afd8015775d7457029404f7 /firmware/target/arm/s5l8702/ipod6g/pmu-target.h
parent44ce4eebd61302a22cbcc8fdaa0851adc103550f (diff)
downloadrockbox-469d64539007584241ccd475e81038ea4166f17b.tar.gz
rockbox-469d64539007584241ccd475e81038ea4166f17b.zip
iPod Classic: prepare i2c and PMU for bootloader
When the bootloader starts only IRAM is available, the first task is to ask the PMU to verify if the iPod has previously been hibernated by OF. Due to memory limitations, the kernel cannot be used on this stage. This patch modifies I2C and PMU low level functions to not to depend on kernel (removes mutexes, and uses HW timer instead of current_tick), actual kernel functions are modified to be 'mutexed' wrappers of the new functions. Change-Id: I7cef9e95dedaf176dc0659315f3dc33166d5b116
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g/pmu-target.h')
-rw-r--r--firmware/target/arm/s5l8702/ipod6g/pmu-target.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/pmu-target.h b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h
index 94fd17010b..3a90ad8789 100644
--- a/firmware/target/arm/s5l8702/ipod6g/pmu-target.h
+++ b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h
@@ -25,7 +25,7 @@
25#include <stdbool.h> 25#include <stdbool.h>
26#include "config.h" 26#include "config.h"
27 27
28#include <pcf5063x.h> 28#include "pcf5063x.h"
29 29
30/* undocummented PMU registers */ 30/* undocummented PMU registers */
31#define PCF50635_REG_INT6 0x85 31#define PCF50635_REG_INT6 0x85
@@ -77,4 +77,11 @@ void pmu_read_rtc(unsigned char* buffer);
77void pmu_write_rtc(unsigned char* buffer); 77void pmu_write_rtc(unsigned char* buffer);
78void pmu_hdd_power(bool on); 78void pmu_hdd_power(bool on);
79 79
80#ifdef BOOTLOADER
81unsigned char pmu_rd(int address);
82int pmu_wr(int address, unsigned char val);
83int pmu_rd_multiple(int address, int count, unsigned char* buffer);
84int pmu_wr_multiple(int address, int count, unsigned char* buffer);
80#endif 85#endif
86
87#endif /* __PMU_TARGET_H__ */