2008-01-14 23:46:19 +00:00
|
|
|
/*
|
|
|
|
*
|
|
|
|
* (C) Copyright 2000-2004
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
2012-03-26 21:49:03 +00:00
|
|
|
* Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
|
2008-01-14 23:46:19 +00:00
|
|
|
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2008-01-14 23:46:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* CPU specific interrupt routine */
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/immap.h>
|
2012-03-26 21:49:03 +00:00
|
|
|
#include <asm/io.h>
|
2008-01-14 23:46:19 +00:00
|
|
|
|
|
|
|
int interrupt_init(void)
|
|
|
|
{
|
2012-03-26 21:49:03 +00:00
|
|
|
int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
|
2008-01-14 23:46:19 +00:00
|
|
|
|
|
|
|
/* Make sure all interrupts are disabled */
|
2012-03-26 21:49:03 +00:00
|
|
|
setbits_be32(&intp->imrh0, 0xffffffff);
|
|
|
|
setbits_be32(&intp->imrl0, 0xffffffff);
|
2008-01-14 23:46:19 +00:00
|
|
|
|
|
|
|
enable_interrupts();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(CONFIG_MCFTMR)
|
|
|
|
void dtimer_intr_setup(void)
|
|
|
|
{
|
2012-03-26 21:49:03 +00:00
|
|
|
int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
|
2008-01-14 23:46:19 +00:00
|
|
|
|
2012-03-26 21:49:03 +00:00
|
|
|
out_8(&intp->icr0[CONFIG_SYS_TMRINTR_NO], CONFIG_SYS_TMRINTR_PRI);
|
|
|
|
clrbits_be32(&intp->imrh0, CONFIG_SYS_TMRINTR_MASK);
|
2008-01-14 23:46:19 +00:00
|
|
|
}
|
|
|
|
#endif
|