Path: blob/master/arch/arm/mach-clps711x/include/mach/time.h
17633 views
/*1* arch/arm/mach-clps711x/include/mach/time.h2*3* Copyright (C) 2000 Deep Blue Solutions Ltd.4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/19#include <asm/leds.h>20#include <asm/hardware/clps7111.h>2122extern void clps711x_setup_timer(void);2324/*25* IRQ handler for the timer26*/27static irqreturn_t28p720t_timer_interrupt(int irq, void *dev_id)29{30struct pt_regs *regs = get_irq_regs();31do_leds();32xtime_update(1);33#ifndef CONFIG_SMP34update_process_times(user_mode(regs));35#endif36do_profile(regs);37return IRQ_HANDLED;38}3940/*41* Set up timer interrupt, and return the current time in seconds.42*/43void __init time_init(void)44{45clps711x_setup_timer();46timer_irq.handler = p720t_timer_interrupt;47setup_irq(IRQ_TC2OI, &timer_irq);48}495051