diff options
author | OpenWrt Developers <openwrt-devel@openwrt.org> | 2008-11-19 17:40:05 +0000 |
---|---|---|
committer | OpenWrt Developers <openwrt-devel@openwrt.org> | 2008-11-19 17:40:05 +0000 |
commit | 7931f01fd898dab7002a601a92173b4ed2bd96dd (patch) | |
tree | 82989cd5ea141baf9cdc51d0578368e36cd15a67 /package/uboot-ifxmips/files/cpu/mips/danube/ifx_clock.c | |
parent | b0f5f9729a310db2950ed84b8c7387cb7aa69494 (diff) | |
download | master-187ad058-7931f01fd898dab7002a601a92173b4ed2bd96dd.tar.gz master-187ad058-7931f01fd898dab7002a601a92173b4ed2bd96dd.tar.bz2 master-187ad058-7931f01fd898dab7002a601a92173b4ed2bd96dd.zip |
[ifxmips] cleanup uboot package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13291 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uboot-ifxmips/files/cpu/mips/danube/ifx_clock.c')
-rw-r--r-- | package/uboot-ifxmips/files/cpu/mips/danube/ifx_clock.c | 63 |
1 files changed, 30 insertions, 33 deletions
diff --git a/package/uboot-ifxmips/files/cpu/mips/danube/ifx_clock.c b/package/uboot-ifxmips/files/cpu/mips/danube/ifx_clock.c index 0a1cdacdc3..c67cf15eb3 100644 --- a/package/uboot-ifxmips/files/cpu/mips/danube/ifx_clock.c +++ b/package/uboot-ifxmips/files/cpu/mips/danube/ifx_clock.c @@ -37,55 +37,52 @@ unsigned int danube_get_ddr_hz(void) { - switch((*DANUBE_CGU_SYS) & 0x3){ - case 0: - return 166666667; - case 1: - return 133333333; - case 2: - return 111111111; - case 3: - return 83333333; - } + switch((*DANUBE_CGU_SYS) & 0x3){ + case 0: + default: + return 166666667; + case 1: + return 133333333; + case 2: + return 111111111; + case 3: + return 83333333; + } } uint danube_get_cpuclk(void) { #ifdef CONFIG_USE_EMULATOR - return EMULATOR_CPU_SPEED; + return EMULATOR_CPU_SPEED; #else //NOT CONFIG_USE_EMULATOR - unsigned int ddr_clock=danube_get_ddr_hz(); - switch((*DANUBE_CGU_SYS) & 0xc){ - case 0: - return 333333333; - case 4: - return ddr_clock; - case 8: - return ddr_clock << 1; - default: - break; - /*reserved*/ - } + unsigned int ddr_clock=danube_get_ddr_hz(); + switch((*DANUBE_CGU_SYS) & 0xc){ + case 0: + default: + return 333333333; + case 4: + return ddr_clock; + case 8: + return ddr_clock << 1; + } #endif - } uint danube_get_fpiclk(void) { #ifdef CONFIG_USE_EMULATOR - unsigned int clkCPU; - clkCPU = danube_get_cpu_hz(); - return clkCPU >> 2; + unsigned int clkCPU; + clkCPU = danube_get_cpu_hz(); + return clkCPU >> 2; #else //NOT CONFIG_USE_EMULATOR - unsigned int ddr_clock=danube_get_ddr_hz(); - if ((*DANUBE_CGU_SYS) & 0x40){ - return ddr_clock >> 1; - } - return ddr_clock; + unsigned int ddr_clock=danube_get_ddr_hz(); + if ((*DANUBE_CGU_SYS) & 0x40){ + return ddr_clock >> 1; + } + return ddr_clock; #endif - } |