diff options
Diffstat (limited to 'firmware/target/arm/as3525/debug-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/debug-as3525.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/firmware/target/arm/as3525/debug-as3525.c b/firmware/target/arm/as3525/debug-as3525.c index ac7253d579..ea1bf9c381 100644 --- a/firmware/target/arm/as3525/debug-as3525.c +++ b/firmware/target/arm/as3525/debug-as3525.c @@ -120,39 +120,39 @@ int calc_freq(int clk) switch(CGU_PROC & 3) { case 0: return CLK_MAIN/ - ((8/(8-((CGU_PROC & 0xc)>>2)))*(((CGU_PROC & 0xf0)>>4) + 1)); + ((8/(8-((CGU_PROC>>2)& 0x3)))*(((CGU_PROC>>4)& 0xf) + 1)); case 1: return calc_freq(CLK_PLLA)/ - ((8/(8-((CGU_PROC & 0xc)>>2)))*(((CGU_PROC & 0xf0)>>4) + 1)); + ((8/(8-((CGU_PROC>>2)& 0x3)))*(((CGU_PROC>>4)& 0xf) + 1)); case 2: return calc_freq(CLK_PLLB)/ - ((8/(8-((CGU_PROC & 0xc)>>2)))*(((CGU_PROC & 0xf0)>>4) + 1)); + ((8/(8-((CGU_PROC>>2)& 0x3)))*(((CGU_PROC>>4)& 0xf) + 1)); default: return 0; } case CLK_EXTMEM: switch(CGU_PERI & 3) { case 0: - return CLK_MAIN/(((CGU_PERI & 0x3c)>>2)+1); + return CLK_MAIN/(((CGU_PERI>>2)& 0xf)+1); case 1: - return calc_freq(CLK_PLLA)/(((CGU_PERI & 0x3c)>>2)+1); + return calc_freq(CLK_PLLA)/(((CGU_PERI>>2)& 0xf)+1); case 2: - return calc_freq(CLK_PLLB)/(((CGU_PERI & 0x3c)>>2)+1); + return calc_freq(CLK_PLLB)/(((CGU_PERI>>2)& 0xf)+1); case 3: - return calc_freq(CLK_FCLK)/(((CGU_PERI & 0x3c)>>2)+1); + return calc_freq(CLK_FCLK)/(((CGU_PERI>>2)& 0xf)+1); default: return 0; } case CLK_PCLK: - return calc_freq(CLK_EXTMEM)/(((CGU_PERI & 0x40)>>6)+1); + return calc_freq(CLK_EXTMEM)/(((CGU_PERI>>6)& 0x1)+1); case CLK_IDE: switch(CGU_IDE & 3) { case 0: - return CLK_MAIN/(((CGU_IDE & 0x3c)>>2)+1); + return CLK_MAIN/(((CGU_IDE>>2)& 0xf)+1); case 1: - return calc_freq(CLK_PLLA)/(((CGU_IDE & 0x3c)>>2)+1);; + return calc_freq(CLK_PLLA)/(((CGU_IDE>>2)& 0xf)+1); case 2: - return calc_freq(CLK_PLLB)/(((CGU_IDE & 0x3c)>>2)+1); + return calc_freq(CLK_PLLB)/(((CGU_IDE>>2)& 0xf)+1); default: return 0; } |