1
0
Fork 0
forked from len0rd/rockbox

iriver: Moved the I2C prescaler setting to i2c_init(), and removed it from set_cpu_frequency(). The Coldfire I2C controller can't handle on-the-fly prescaler changes. Also removed the unnecessary slave address setting in i2c_init.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7304 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-08-11 19:00:55 +00:00
parent 5a8eac1a5a
commit dc4a6b828e
2 changed files with 4 additions and 11 deletions

View file

@ -37,15 +37,17 @@ static volatile unsigned char *i2c_get_addr(int device);
void i2c_init(void)
{
/* I2C Clock divisor = 576 => 119.952 MHz / 2 / 576 = 104.125 kHz */
MFDR = 0x14;
MFDR2 = 0x14;
#if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD)
/* Audio Codec */
MADR = 0x6c; /* iRiver firmware uses this addr */
MBDR = 0; /* iRiver firmware does this */
MBCR = IEN; /* Enable interface */
#if 0
/* FM Tuner */
MADR2 = 0x6c;
MBDR2 = 0;
MBCR2 = IEN;
#endif