mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
as3525: do not read i2c2_cpsr* registers because the clock might be disabled
The registers value does not change so we don't need to read them This avoids dividing by 0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25303 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
83fe35f4a1
commit
e4972b08f7
1 changed files with 1 additions and 1 deletions
|
|
@ -167,7 +167,7 @@ static int calc_freq(int clk)
|
|||
return 0;
|
||||
}
|
||||
case CLK_I2C:
|
||||
return calc_freq(CLK_PCLK)/(I2C2_CPSR1<<8 | I2C2_CPSR0);
|
||||
return calc_freq(CLK_PCLK)/I2C_PRESCALER;
|
||||
case CLK_I2SI:
|
||||
switch((CGU_AUDIO>>12) & 3) {
|
||||
case 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue