1*a4145534SPeter Tyser /*
2*a4145534SPeter Tyser  *
3*a4145534SPeter Tyser  * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
4*a4145534SPeter Tyser  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
5*a4145534SPeter Tyser  *
6*a4145534SPeter Tyser  * See file CREDITS for list of people who contributed to this
7*a4145534SPeter Tyser  * project.
8*a4145534SPeter Tyser  *
9*a4145534SPeter Tyser  * This program is free software; you can redistribute it and/or
10*a4145534SPeter Tyser  * modify it under the terms of the GNU General Public License as
11*a4145534SPeter Tyser  * published by the Free Software Foundation; either version 2 of
12*a4145534SPeter Tyser  * the License, or (at your option) any later version.
13*a4145534SPeter Tyser  *
14*a4145534SPeter Tyser  * This program is distributed in the hope that it will be useful,
15*a4145534SPeter Tyser  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16*a4145534SPeter Tyser  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17*a4145534SPeter Tyser  * GNU General Public License for more details.
18*a4145534SPeter Tyser  *
19*a4145534SPeter Tyser  * You should have received a copy of the GNU General Public License
20*a4145534SPeter Tyser  * along with this program; if not, write to the Free Software
21*a4145534SPeter Tyser  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22*a4145534SPeter Tyser  * MA 02111-1307 USA
23*a4145534SPeter Tyser  */
24*a4145534SPeter Tyser 
25*a4145534SPeter Tyser /* CPU specific interrupt routine */
26*a4145534SPeter Tyser #include <common.h>
27*a4145534SPeter Tyser #include <asm/immap.h>
28*a4145534SPeter Tyser 
29*a4145534SPeter Tyser int interrupt_init(void)
30*a4145534SPeter Tyser {
31*a4145534SPeter Tyser 	volatile int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
32*a4145534SPeter Tyser 
33*a4145534SPeter Tyser 	/* Make sure all interrupts are disabled */
34*a4145534SPeter Tyser 	intp->imrh0 |= 0xFFFFFFFF;
35*a4145534SPeter Tyser 	intp->imrl0 |= 0xFFFFFFFF;
36*a4145534SPeter Tyser 
37*a4145534SPeter Tyser 	enable_interrupts();
38*a4145534SPeter Tyser 
39*a4145534SPeter Tyser 	return 0;
40*a4145534SPeter Tyser }
41*a4145534SPeter Tyser 
42*a4145534SPeter Tyser #if defined(CONFIG_SLTTMR)
43*a4145534SPeter Tyser void dtimer_intr_setup(void)
44*a4145534SPeter Tyser {
45*a4145534SPeter Tyser 	volatile int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
46*a4145534SPeter Tyser 
47*a4145534SPeter Tyser 	intp->icr0[CONFIG_SYS_TMRINTR_NO] = CONFIG_SYS_TMRINTR_PRI;
48*a4145534SPeter Tyser 	intp->imrh0 &= ~CONFIG_SYS_TMRINTR_MASK;
49*a4145534SPeter Tyser }
50*a4145534SPeter Tyser #endif
51