2 * (C) Copyright 2000-2002
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4 * Rob Taylor, Flying Pig Systems. robt@flyingpig.com
6 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/processor.h>
12 #include <asm/pci_io.h>
14 #include "drivers/epic.h"
16 int interrupt_init_cpu (unsigned *decrementer_count)
18 *decrementer_count = (get_bus_freq (0) / 4) / CONFIG_SYS_HZ;
21 * It's all broken at the moment and I currently don't need
22 * interrupts. If you want to fix it, have a look at the epic
23 * drivers in dink32 v12. They do everthing and Motorola said
24 * I could use the dink source in this project as long as
25 * copyright notices remain intact.
28 epicInit (EPIC_DIRECT_IRQ, 0);
29 /* EPIC won't generate INT unless Current Task Pri < 15 */
30 epicCurTaskPrioSet(0);
35 /****************************************************************************/
38 * Handle external interrupts
40 void external_interrupt (struct pt_regs *regs)
42 register unsigned long temp;
44 pci_readl (CONFIG_SYS_EUMB_ADDR + EPIC_PROC_INT_ACK_REG, temp);
45 sync (); /* i'm not convinced this is needed, but dink source has it */
46 temp &= 0xff; /*get vector */
48 /*TODO: handle them -... */
52 /****************************************************************************/
59 irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
63 void irq_free_handler (int vec)
68 /*TODO: some handlers for winbond and 87308 interrupts
69 and what about generic pci inteerupts?
73 void timer_interrupt_cpu (struct pt_regs *regs)
75 /* nothing to do here */