]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/powerpc/cpu/mpc824x/interrupts.c
karo: tx51: justify and adjust the delay required before releasing the ETN PHY strap...
[karo-tx-uboot.git] / arch / powerpc / cpu / mpc824x / interrupts.c
1 /*
2  * (C) Copyright 2000-2002
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4  * Rob Taylor, Flying Pig Systems. robt@flyingpig.com
5  *
6  * SPDX-License-Identifier:     GPL-2.0+
7  */
8
9 #include <common.h>
10 #include <mpc824x.h>
11 #include <asm/processor.h>
12 #include <asm/pci_io.h>
13 #include <commproc.h>
14 #include "drivers/epic.h"
15
16 int interrupt_init_cpu (unsigned *decrementer_count)
17 {
18         *decrementer_count = (get_bus_freq (0) / 4) / CONFIG_SYS_HZ;
19
20         /*
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.
26          */
27
28         epicInit (EPIC_DIRECT_IRQ, 0);
29         /* EPIC won't generate INT unless Current Task Pri < 15 */
30         epicCurTaskPrioSet(0);
31
32         return (0);
33 }
34
35 /****************************************************************************/
36
37 /*
38  * Handle external interrupts
39  */
40 void external_interrupt (struct pt_regs *regs)
41 {
42         register unsigned long temp;
43
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 */
47
48         /*TODO: handle them -... */
49         epicEOI ();
50 }
51
52 /****************************************************************************/
53
54 /*
55  * blank int handlers.
56  */
57
58 void
59 irq_install_handler (int vec, interrupt_handler_t * handler, void *arg)
60 {
61 }
62
63 void irq_free_handler (int vec)
64 {
65
66 }
67
68 /*TODO: some handlers for winbond and 87308 interrupts
69  and what about generic pci inteerupts?
70  vga?
71  */
72
73 void timer_interrupt_cpu (struct pt_regs *regs)
74 {
75         /* nothing to do here */
76         return;
77 }