2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2008-01-15 19:37:34 +00:00
|
|
|
/*
|
|
|
|
*
|
2012-03-26 21:49:07 +00:00
|
|
|
* Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
|
2008-01-15 19:37:34 +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:07 +00:00
|
|
|
#include <asm/io.h>
|
2008-01-15 19:37:34 +00:00
|
|
|
|
|
|
|
int interrupt_init(void)
|
|
|
|
{
|
2012-03-26 21:49:07 +00:00
|
|
|
int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
|
2008-01-15 19:37:34 +00:00
|
|
|
|
|
|
|
/* Make sure all interrupts are disabled */
|
2012-03-26 21:49:07 +00:00
|
|
|
setbits_be32(&intp->imrh0, 0xffffffff);
|
|
|
|
setbits_be32(&intp->imrl0, 0xffffffff);
|
2008-01-15 19:37:34 +00:00
|
|
|
|
|
|
|
enable_interrupts();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(CONFIG_SLTTMR)
|
|
|
|
void dtimer_intr_setup(void)
|
|
|
|
{
|
2012-03-26 21:49:07 +00:00
|
|
|
int0_t *intp = (int0_t *) (CONFIG_SYS_INTR_BASE);
|
2008-01-15 19:37:34 +00:00
|
|
|
|
2012-03-26 21:49:07 +00:00
|
|
|
out_8(&intp->icr0[CONFIG_SYS_TMRINTR_NO], CONFIG_SYS_TMRINTR_PRI);
|
|
|
|
clrbits_be32(&intp->imrh0, CONFIG_SYS_TMRINTR_MASK);
|
2008-01-15 19:37:34 +00:00
|
|
|
}
|
|
|
|
#endif
|