1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2000-2002
4  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5  *
6  * Copyright 2004 Freescale Semiconductor, Inc.
7  */
8 
9 #include <common.h>
10 #include <command.h>
11 #include <irq_func.h>
12 #include <mpc83xx.h>
13 #include <asm/global_data.h>
14 #include <asm/processor.h>
15 #include <asm/ptrace.h>
16 
17 DECLARE_GLOBAL_DATA_PTR;
18 
19 struct irq_action {
20 	interrupt_handler_t *handler;
21 	void *arg;
22 	ulong count;
23 };
24 
interrupt_init_cpu(unsigned * decrementer_count)25 void interrupt_init_cpu (unsigned *decrementer_count)
26 {
27 	volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
28 
29 	*decrementer_count = (gd->bus_clk / 4) / CONFIG_SYS_HZ;
30 
31 	/* Enable e300 time base */
32 
33 	immr->sysconf.spcr |= 0x00400000;
34 }
35 
36 
37 /*
38  * Handle external interrupts
39  */
40 
external_interrupt(struct pt_regs * regs)41 void external_interrupt(struct pt_regs *regs)
42 {
43 }
44 
45 
46 /*
47  * Install and free an interrupt handler.
48  */
49 
50 void
irq_install_handler(int irq,interrupt_handler_t * handler,void * arg)51 irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
52 {
53 }
54 
55 
irq_free_handler(int irq)56 void irq_free_handler(int irq)
57 {
58 }
59 
60 
timer_interrupt_cpu(struct pt_regs * regs)61 void timer_interrupt_cpu (struct pt_regs *regs)
62 {
63 	/* nothing to do here */
64 	return;
65 }
66 
67 
68 #if defined(CONFIG_CMD_IRQ)
69 
70 /* ripped this out of ppc4xx/interrupts.c */
71 
72 /*
73  * irqinfo - print information about PCI devices
74  */
75 
do_irqinfo(struct cmd_tbl * cmdtp,struct bd_info * bd,int flag,int argc,char * const argv[])76 void do_irqinfo(struct cmd_tbl *cmdtp, struct bd_info *bd, int flag, int argc,
77 		char *const argv[])
78 {
79 }
80 
81 #endif
82