2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2007-07-06 04:10:40 +00:00
|
|
|
/*
|
|
|
|
*
|
2012-03-26 21:49:05 +00:00
|
|
|
* Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
|
2007-07-06 04:10:40 +00:00
|
|
|
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* CPU specific interrupt routine */
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/immap.h>
|
2012-03-26 21:49:05 +00:00
|
|
|
#include <asm/io.h>
|
2007-07-06 04:10:40 +00:00
|
|
|
|
|
|
|
int interrupt_init(void)
|
|
|
|
{
|
2012-03-26 21:49:05 +00:00
|
|
|
int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
|
2007-07-06 04:10:40 +00:00
|
|
|
|
|
|
|
/* Make sure all interrupts are disabled */
|
2012-03-26 21:49:05 +00:00
|
|
|
setbits_be32(&intp->imrh0, 0xffffffff);
|
|
|
|
setbits_be32(&intp->imrl0, 0xffffffff);
|
2007-07-06 04:10:40 +00:00
|
|
|
|
|
|
|
enable_interrupts();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(CONFIG_MCFTMR)
|
|
|
|
void dtimer_intr_setup(void)
|
|
|
|
{
|
2012-03-26 21:49:05 +00:00
|
|
|
int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
|
2007-07-06 04:10:40 +00:00
|
|
|
|
2012-03-26 21:49:05 +00:00
|
|
|
out_8(&intp->icr0[CONFIG_SYS_TMRINTR_NO], CONFIG_SYS_TMRINTR_PRI);
|
|
|
|
clrbits_be32(&intp->imrh0, CONFIG_SYS_TMRINTR_MASK);
|
2007-07-06 04:10:40 +00:00
|
|
|
}
|
|
|
|
#endif
|