summaryrefslogtreecommitdiff
path: root/arch/m68k/cpu/mcf530x/interrupts.c
diff options
context:
space:
mode:
authorangelo@sysam.it <angelo@sysam.it>2015-02-12 01:40:00 +0100
committerTom Rini <trini@konsulko.com>2015-03-05 20:13:21 -0500
commite77e65dfc2f803e7dd78f5bb2bc6b3750635cedd (patch)
treeb2bd4bce76fb02f4756c977d966b35def10ba234 /arch/m68k/cpu/mcf530x/interrupts.c
parent06fd66a4aa8f0bdb0e78072593728fa31be8dadf (diff)
downloadu-boot-e77e65dfc2f803e7dd78f5bb2bc6b3750635cedd.tar.gz
m68k: add mcf5307 cpu support
Add Freescale MCF5307 cpu support. Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Diffstat (limited to 'arch/m68k/cpu/mcf530x/interrupts.c')
-rw-r--r--arch/m68k/cpu/mcf530x/interrupts.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/m68k/cpu/mcf530x/interrupts.c b/arch/m68k/cpu/mcf530x/interrupts.c
new file mode 100644
index 0000000000..bf4038dff8
--- /dev/null
+++ b/arch/m68k/cpu/mcf530x/interrupts.c
@@ -0,0 +1,29 @@
+/*
+ * (C) Copyright 2014 Angelo Dureghello <angelo@sysam.it>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ *
+ */
+
+#include <common.h>
+#include <asm/immap.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_M5307
+int interrupt_init(void)
+{
+ enable_interrupts();
+
+ return 0;
+}
+
+void dtimer_intr_setup(void)
+{
+ intctrl_t *icr = (intctrl_t *)(MMAP_INTC);
+
+ /* clearing TIMER2 mask, so enabling the related interrupt */
+ out_be32(&icr->imr, in_be32(&icr->imr) & ~0x00000400);
+ /* set TIMER2 interrupt priority */
+ out_8(&icr->icr2, CONFIG_SYS_TMRINTR_PRI);
+}
+#endif