diff options
author | Cástor Muñoz <cmvidal@gmail.com> | 2016-02-04 20:12:02 +0100 |
---|---|---|
committer | Cástor Muñoz <cmvidal@gmail.com> | 2016-05-15 21:16:54 +0200 |
commit | 469d64539007584241ccd475e81038ea4166f17b (patch) | |
tree | 2de03ef2c45cfa845afd8015775d7457029404f7 /firmware/export | |
parent | 44ce4eebd61302a22cbcc8fdaa0851adc103550f (diff) |
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/export')
-rw-r--r-- | firmware/export/i2c-s5l8702.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/export/i2c-s5l8702.h b/firmware/export/i2c-s5l8702.h index 02dc40d89e..3883c8abc0 100644 --- a/firmware/export/i2c-s5l8702.h +++ b/firmware/export/i2c-s5l8702.h @@ -28,5 +28,9 @@ void i2c_init(void); int i2c_write(int bus, unsigned char slave, int address, int len, const unsigned char *data); int i2c_read(int bus, unsigned char slave, int address, int len, unsigned char *data); -#endif /* _I2C_S5l8702_H */ +#ifdef BOOTLOADER +int i2c_wr(int bus, unsigned char slave, int address, int len, const unsigned char *data); +int i2c_rd(int bus, unsigned char slave, int address, int len, unsigned char *data); +#endif +#endif /* _I2C_S5l8702_H */ |