diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2005-12-15 01:11:19 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2005-12-15 01:11:19 +0000 |
commit | a4b15a4f1ff03e2a7ff33b78ee59ba4540a39ff9 (patch) | |
tree | f7731cb2ba34656f53aa325a8d681cfdad6e7186 /firmware/drivers/i2c-coldfire.c | |
parent | c3387e545d84393dd47a0e49924334e751536de4 (diff) | |
download | rockbox-a4b15a4f1ff03e2a7ff33b78ee59ba4540a39ff9.tar.gz rockbox-a4b15a4f1ff03e2a7ff33b78ee59ba4540a39ff9.zip |
H300 FM radio support, with help from Peter D'Hoye
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8237 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/i2c-coldfire.c')
-rw-r--r-- | firmware/drivers/i2c-coldfire.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/drivers/i2c-coldfire.c b/firmware/drivers/i2c-coldfire.c index 0c83c1cb1a..ffdc4f29de 100644 --- a/firmware/drivers/i2c-coldfire.c +++ b/firmware/drivers/i2c-coldfire.c | |||
@@ -46,7 +46,14 @@ void i2c_init(void) | |||
46 | or_l(0x00000008, &GPIO_ENABLE); | 46 | or_l(0x00000008, &GPIO_ENABLE); |
47 | or_l(0x00800000, &GPIO1_FUNCTION); | 47 | or_l(0x00800000, &GPIO1_FUNCTION); |
48 | or_l(0x00000008, &GPIO_FUNCTION); | 48 | or_l(0x00000008, &GPIO_FUNCTION); |
49 | #elif defined(IRIVER_H300_SERIES) | ||
50 | /* The FM chip has no pullup for SCL, so we have to bit-bang the | ||
51 | I2C for that one. */ | ||
52 | or_l(0x03000000, &GPIO1_OUT); | ||
53 | or_l(0x03000000, &GPIO1_ENABLE); | ||
54 | or_l(0x03000000, &GPIO1_FUNCTION); | ||
49 | #endif | 55 | #endif |
56 | |||
50 | /* I2C Clock divisor = 576 => 119.952 MHz / 2 / 576 = 104.125 kHz */ | 57 | /* I2C Clock divisor = 576 => 119.952 MHz / 2 / 576 = 104.125 kHz */ |
51 | MFDR = 0x14; | 58 | MFDR = 0x14; |
52 | 59 | ||