m68k: rename CONFIG_MCFTMR to CFG_MCFTMR
[platform/kernel/u-boot.git] / arch / m68k / cpu / mcf523x / interrupts.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  *
4  * Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
5  * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
6  */
7
8 /* CPU specific interrupt routine */
9 #include <common.h>
10 #include <irq_func.h>
11 #include <asm/immap.h>
12 #include <asm/io.h>
13
14 int interrupt_init(void)
15 {
16         int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE);
17
18         /* Make sure all interrupts are disabled */
19         setbits_be32(&intp->imrl0, 0x1);
20
21         enable_interrupts();
22         return 0;
23 }
24
25 #if defined(CFG_MCFTMR)
26 void dtimer_intr_setup(void)
27 {
28         int0_t *intp = (int0_t *) (CFG_SYS_INTR_BASE);
29
30         out_8(&intp->icr0[CFG_SYS_TMRINTR_NO], CFG_SYS_TMRINTR_PRI);
31         clrbits_be32(&intp->imrl0, INTC_IPRL_INT0);
32         clrbits_be32(&intp->imrl0, CFG_SYS_TMRINTR_MASK);
33 }
34 #endif