2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
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:08 +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)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* CPU specific interrupt routine */
|
|
|
|
#include <common.h>
|
2019-11-14 19:57:41 +00:00
|
|
|
#include <irq_func.h>
|
2008-01-14 23:46:19 +00:00
|
|
|
#include <asm/immap.h>
|
2012-03-26 21:49:08 +00:00
|
|
|
#include <asm/io.h>
|
2008-01-14 23:46:19 +00:00
|
|
|
|
|
|
|
int interrupt_init(void)
|
|
|
|
{
|
2023-01-10 16:19:45 +00:00
|
|
|
int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE);
|
2008-01-14 23:46:19 +00:00
|
|
|
|
|
|
|
/* Make sure all interrupts are disabled */
|
2012-03-26 21:49:08 +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)
|
|
|
|
{
|
2023-01-10 16:19:45 +00:00
|
|
|
int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE);
|
2008-01-14 23:46:19 +00:00
|
|
|
|
2023-01-10 16:19:45 +00:00
|
|
|
out_8(&intp->icr0[CFG_SYS_TMRINTR_NO], CFG_SYS_TMRINTR_PRI);
|
|
|
|
clrbits_be32(&intp->imrh0, CFG_SYS_TMRINTR_MASK);
|
2008-01-14 23:46:19 +00:00
|
|
|
}
|
|
|
|
#endif
|