]> git.ipfire.org Git - people/ms/u-boot.git/blob - arch/powerpc/cpu/74xx_7xx/interrupts.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / arch / powerpc / cpu / 74xx_7xx / interrupts.c
1 /*
2 * (C) Copyright 2001
3 * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8 /*
9 * interrupts.c - just enough support for the decrementer/timer
10 */
11
12 #include <common.h>
13 #include <mpc8xx.h>
14 #include <mpc8xx_irq.h>
15 #include <asm/processor.h>
16 #include <commproc.h>
17 #include <command.h>
18
19 int interrupt_init_cpu (unsigned *decrementer_count)
20 {
21 debug("interrupt_init: GT main cause reg: %08x:%08x\n",
22 GTREGREAD(LOW_INTERRUPT_CAUSE_REGISTER),
23 GTREGREAD(HIGH_INTERRUPT_CAUSE_REGISTER));
24 debug("interrupt_init: ethernet cause regs: %08x %08x %08x\n",
25 GTREGREAD(ETHERNET0_INTERRUPT_CAUSE_REGISTER),
26 GTREGREAD(ETHERNET1_INTERRUPT_CAUSE_REGISTER),
27 GTREGREAD(ETHERNET2_INTERRUPT_CAUSE_REGISTER));
28 debug("interrupt_init: ethernet mask regs: %08x %08x %08x\n",
29 GTREGREAD(ETHERNET0_INTERRUPT_MASK_REGISTER),
30 GTREGREAD(ETHERNET1_INTERRUPT_MASK_REGISTER),
31 GTREGREAD(ETHERNET2_INTERRUPT_MASK_REGISTER));
32 debug("interrupt_init: setting decrementer_count\n");
33
34 *decrementer_count = get_tbclk() / CONFIG_SYS_HZ;
35
36 return (0);
37 }
38
39 /****************************************************************************/
40
41 /*
42 * Handle external interrupts
43 */
44 void
45 external_interrupt(struct pt_regs *regs)
46 {
47 puts("external_interrupt (oops!)\n");
48 }
49
50 volatile ulong timestamp = 0;
51
52 /*
53 * timer_interrupt - gets called when the decrementer overflows,
54 * with interrupts disabled.
55 * Trivial implementation - no need to be really accurate.
56 */
57 void
58 timer_interrupt_cpu (struct pt_regs *regs)
59 {
60 /* nothing to do here */
61 return;
62 }
63
64 /****************************************************************************/
65
66 /*
67 * Install and free a interrupt handler.
68 */
69
70 void
71 irq_install_handler(int vec, interrupt_handler_t *handler, void *arg)
72 {
73
74 }
75
76 void
77 irq_free_handler(int vec)
78 {
79
80 }
81
82 /****************************************************************************/
83
84 void
85 do_irqinfo(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char * const argv[])
86 {
87 puts("IRQ related functions are unimplemented currently.\n");
88 }