4 * ADM5120 specific hooks for MIPS CPU Counter/Compare timer
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
9 * This file was based on: arch/mips/gt64120/wrppmc/time.c
10 * Original author: Mark.Zhan
11 * Copyright (C) 1996, 1997, 2004 by Ralf Baechle
12 * Copyright (C) 2006, Wind River System Inc.
14 * This program is free software; you can redistribute it and/or modify it
15 * under the terms of the GNU General Public License version 2 as published
16 * by the Free Software Foundation.
20 #include <linux/types.h>
21 #include <linux/init.h>
22 #include <linux/interrupt.h>
23 #include <linux/timex.h>
24 #include <linux/version.h>
30 #include <adm5120_info.h>
31 #include <adm5120_irq.h>
33 void __init plat_time_init(void)
35 mips_hpt_frequency = adm5120_speed / 2;
38 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
39 void __init plat_timer_setup(struct irqaction *irq)
41 clear_c0_status(ST0_BEV);
43 /* Install ISR for CPU Counter interrupt */
44 setup_irq(ADM5120_IRQ_COUNTER, irq);