3 * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
5 * SPDX-License-Identifier: GPL-2.0+
9 * interrupts.c - just enough support for the decrementer/timer
14 #include <mpc8xx_irq.h>
15 #include <asm/processor.h>
19 int interrupt_init_cpu (unsigned *decrementer_count
)
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");
34 *decrementer_count
= get_tbclk() / CONFIG_SYS_HZ
;
39 /****************************************************************************/
42 * Handle external interrupts
45 external_interrupt(struct pt_regs
*regs
)
47 puts("external_interrupt (oops!)\n");
50 volatile ulong timestamp
= 0;
53 * timer_interrupt - gets called when the decrementer overflows,
54 * with interrupts disabled.
55 * Trivial implementation - no need to be really accurate.
58 timer_interrupt_cpu (struct pt_regs
*regs
)
60 /* nothing to do here */
64 /****************************************************************************/
67 * Install and free a interrupt handler.
71 irq_install_handler(int vec
, interrupt_handler_t
*handler
, void *arg
)
77 irq_free_handler(int vec
)
82 /****************************************************************************/
85 do_irqinfo(cmd_tbl_t
*cmdtp
, bd_t
*bd
, int flag
, int argc
, char * const argv
[])
87 puts("IRQ related functions are unimplemented currently.\n");