summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-03-23 09:20:12 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-03-23 09:20:12 +0000
commite4972b08f7600c7fb6bff0d9c622e27307c9ce34 (patch)
tree0c9f94c30d08f5683cc439cab837c14479f0e5d4 /firmware
parent83fe35f4a11b1798031e0913a897567608f78273 (diff)
downloadrockbox-e4972b08f7600c7fb6bff0d9c622e27307c9ce34.tar.gz
rockbox-e4972b08f7600c7fb6bff0d9c622e27307c9ce34.tar.bz2
rockbox-e4972b08f7600c7fb6bff0d9c622e27307c9ce34.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/debug-as3525.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c
index 037dc044f2..4d4373fc04 100644
--- a/firmware/target/arm/as3525/debug-as3525.c
+++ b/firmware/target/arm/as3525/debug-as3525.c
@@ -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: