diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-06-28 19:53:41 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-06-28 19:53:41 +0000 |
commit | f5345b1aabed2f76933ba40b9be672f639a62b5c (patch) | |
tree | a2b20d7ed8890acb2de9a5436db408b52a2f1aac /target/linux/ifxmips/image/u-boot/files/cpu/mips/danube/ifx_clock.c | |
parent | 68f8bcd23666dd5ad3e58e2fe9a79ff1d57e0746 (diff) | |
download | master-187ad058-f5345b1aabed2f76933ba40b9be672f639a62b5c.tar.gz master-187ad058-f5345b1aabed2f76933ba40b9be672f639a62b5c.tar.bz2 master-187ad058-f5345b1aabed2f76933ba40b9be672f639a62b5c.zip |
move ifxmips uboot to package/
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11601 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ifxmips/image/u-boot/files/cpu/mips/danube/ifx_clock.c')
-rw-r--r-- | target/linux/ifxmips/image/u-boot/files/cpu/mips/danube/ifx_clock.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/target/linux/ifxmips/image/u-boot/files/cpu/mips/danube/ifx_clock.c b/target/linux/ifxmips/image/u-boot/files/cpu/mips/danube/ifx_clock.c deleted file mode 100644 index 0a1cdacdc3..0000000000 --- a/target/linux/ifxmips/image/u-boot/files/cpu/mips/danube/ifx_clock.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ - -#include <common.h> -#include <asm-mips/danube.h> - - - -/******************************************************************************* -* -* get_cpuclk - returns the frequency of the CPU. -* -* NOTE: -* This functions should be used by the hardware driver to get the correct -* frequency of the CPU. -*/ - -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; - } -} - - -uint danube_get_cpuclk(void) -{ -#ifdef CONFIG_USE_EMULATOR - 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*/ - } -#endif - -} - - -uint danube_get_fpiclk(void) -{ -#ifdef CONFIG_USE_EMULATOR - 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; -#endif - -} - - |