2 * Copyright (C) 2004-2006 Atmel Corporation
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 #include <asm/sysreg.h>
23 #include <asm/ptrace.h>
25 .section .text.exception,"ax"
30 .irp x,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
32 rjmp unknown_exception
35 .global timer_interrupt_handler
36 .type timer_interrupt_handler,@function
38 timer_interrupt_handler:
40 * Increment timer_overflow and re-write COMPARE with 0xffffffff.
42 * We're running at interrupt level 3, so we don't need to save
43 * r8-r12 or lr to the stack.
45 mov r8, lo(timer_overflow)
46 orh r8, hi(timer_overflow)
49 mtsr SYSREG_COMPARE, r10
54 .type unknown_exception, @function
57 sub r8, sp, REG_R12 - REG_R0 - 4
59 mfsr r10, SYSREG_RAR_EX
60 mfsr r11, SYSREG_RSR_EX
64 rcall do_unknown_exception