diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-03-29 17:12:16 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-03-29 17:12:16 +0000 |
commit | dedf08a6e15daa676176221cea19b0ab0e93df12 (patch) | |
tree | 23d6740e0337bbe6aaa4994b524554639d17f83b | |
parent | ba76e2870e49711d393e065a52de41295352188d (diff) |
as3525: CGU_USB has only 3 bits for the divider
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25381 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/as3525/debug-as3525.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c index 8c9ff15859..0e09464c3d 100644 --- a/firmware/target/arm/as3525/debug-as3525.c +++ b/firmware/target/arm/as3525/debug-as3525.c @@ -211,20 +211,20 @@ static int calc_freq(int clk) case CLK_USB: switch(CGU_USB & 3) { /* 0-> div=1 other->div=1/(2*n) */ case 0: - if (!((CGU_USB>>2) & 0xf)) + if (!((CGU_USB>>2) & 0x7)) return CLK_MAIN; else - return CLK_MAIN/(2*((CGU_USB>>2) & 0xf)); + return CLK_MAIN/(2*((CGU_USB>>2) & 0x7)); case 1: - if (!((CGU_USB>>2) & 0xf)) + if (!((CGU_USB>>2) & 0x7)) return calc_freq(CLK_PLLA); else - return calc_freq(CLK_PLLA)/(2*((CGU_USB>>2) & 0xf)); + return calc_freq(CLK_PLLA)/(2*((CGU_USB>>2) & 0x7)); case 2: - if (!((CGU_USB>>2) & 0xf)) + if (!((CGU_USB>>2) & 0x7)) return calc_freq(CLK_PLLB); else - return calc_freq(CLK_PLLB)/(2*((CGU_USB>>2) & 0xf)); + return calc_freq(CLK_PLLB)/(2*((CGU_USB>>2) & 0x7)); default: return 0; } |