summaryrefslogtreecommitdiff
path: root/firmware/target/arm/i2c-pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/i2c-pp.c')
-rw-r--r--firmware/target/arm/i2c-pp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/target/arm/i2c-pp.c b/firmware/target/arm/i2c-pp.c
index 07fa822ab3..1cc25a1a10 100644
--- a/firmware/target/arm/i2c-pp.c
+++ b/firmware/target/arm/i2c-pp.c
@@ -198,10 +198,27 @@ void i2c_init(void)
198 outl(0x0, 0x600060a4); 198 outl(0x0, 0x600060a4);
199 outl(0x80 | (0 << 8), 0x600060a4); 199 outl(0x80 | (0 << 8), 0x600060a4);
200#elif CONFIG_I2C == I2C_PP5024 200#elif CONFIG_I2C == I2C_PP5024
201#ifdef SANSA_E200
201 /* Sansa OF sets this to 0x20 first, communicates with the AS3514 202 /* Sansa OF sets this to 0x20 first, communicates with the AS3514
202 then sets it to 0x23 - this still works fine though */ 203 then sets it to 0x23 - this still works fine though */
203 outl(0x0, 0x600060a4); 204 outl(0x0, 0x600060a4);
204 outl(0x23, 0x600060a4); 205 outl(0x23, 0x600060a4);
206#elif defined(SANSA_C200)
207 /* This is the init sequence from the Sansa c200 bootloader.
208 I'm not sure what's really necessary. */
209 pp_i2c_wait_not_busy();
210
211 outl(0, 0x600060a4);
212 outl(0x64, 0x600060a4);
213
214 outl(0x55, 0x7000c02c);
215 outl(0x54, 0x7000c030);
216
217 outl(0, 0x600060a4);
218 outl(0x1e, 0x600060a4);
219
220 pp_i2c_send(0x46, 0x24, 5);
221#endif
205#endif 222#endif
206 223
207 spinlock_init(&i2c_mutex); 224 spinlock_init(&i2c_mutex);