From 42dd4ac5f0d25d070b888dae143e0987f46826c3 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 15 Nov 2008 11:21:42 +0000 Subject: Delete old brcm63xx files git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13210 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../linux/brcm63xx/files/arch/mips/bcm963xx/time.c | 118 --------------------- 1 file changed, 118 deletions(-) delete mode 100644 target/linux/brcm63xx/files/arch/mips/bcm963xx/time.c (limited to 'target/linux/brcm63xx/files/arch/mips/bcm963xx/time.c') diff --git a/target/linux/brcm63xx/files/arch/mips/bcm963xx/time.c b/target/linux/brcm63xx/files/arch/mips/bcm963xx/time.c deleted file mode 100644 index fa0fa71a7..000000000 --- a/target/linux/brcm63xx/files/arch/mips/bcm963xx/time.c +++ /dev/null @@ -1,118 +0,0 @@ -/* -<:copyright-gpl - Copyright 2004 Broadcom Corp. All Rights Reserved. - - This program is free software; you can distribute it and/or modify it - under the terms of the GNU General Public License (Version 2) as - published by the Free Software Foundation. - - This program is distributed in the hope 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. -:> -*/ -/* - * Setup time for Broadcom 963xx MIPS boards - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include <6348_map_part.h> -#include <6348_intr.h> -#include -#include - -static unsigned long r4k_offset; /* Amount to increment compare reg each time */ -static unsigned long r4k_cur; /* What counter should be at next timer irq */ - -/* ********************************************************************* - * calculateCpuSpeed() - * Calculate the BCM6348 CPU speed by reading the PLL strap register - * and applying the following formula: - * cpu_clk = (.25 * 64MHz freq) * (N1 + 1) * (N2 + 2) / (M1_CPU + 1) - * Input parameters: - * none - * Return value: - * none - ********************************************************************* */ - -static inline unsigned long __init calculateCpuSpeed(void) -{ - u32 pllStrap = PERF->PllStrap; - int n1 = (pllStrap & PLL_N1_MASK) >> PLL_N1_SHFT; - int n2 = (pllStrap & PLL_N2_MASK) >> PLL_N2_SHFT; - int m1cpu = (pllStrap & PLL_M1_CPU_MASK) >> PLL_M1_CPU_SHFT; - - return (16 * (n1 + 1) * (n2 + 2) / (m1cpu + 1)) * 1000000; -} - - -static inline unsigned long __init cal_r4koff(void) -{ - mips_hpt_frequency = calculateCpuSpeed() / 2; - return (mips_hpt_frequency / HZ); -} - - -/* - * There are a lot of conceptually broken versions of the MIPS timer interrupt - * handler floating around. This one is rather different, but the algorithm - * is provably more robust. - */ -#if 0 -irqreturn_t brcm_timer_interrupt(struct pt_regs *regs) -{ - int irq = MIPS_TIMER_INT; - - irq_enter(); - kstat_this_cpu.irqs[irq]++; - - timer_interrupt(irq, regs); - irq_exit(); - return IRQ_HANDLED; -} -#endif - -void __init plat_time_init(void) -{ - unsigned int est_freq, flags; - local_irq_save(flags); - - printk("calculating r4koff... "); - r4k_offset = cal_r4koff(); - printk("%08lx(%d)\n", r4k_offset, (int)r4k_offset); - - est_freq = 2 * r4k_offset * HZ; - est_freq += 5000; /* round */ - est_freq -= est_freq % 10000; - printk("CPU frequency %d.%02d MHz\n", est_freq / 1000000, - (est_freq % 1000000) * 100 / 1000000); - local_irq_restore(flags); -} - -#if 0 -void __init plat_timer_setup(struct irqaction *irq) -{ - r4k_cur = (read_c0_count() + r4k_offset); - write_c0_compare(r4k_cur); - set_c0_status(IE_IRQ5); -} -#endif -- cgit v1.2.3