Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / powerpc / cpu / mpc83xx / interrupts.c
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/processor.h>
14 #include <asm/ptrace.h>
15
16 DECLARE_GLOBAL_DATA_PTR;
17
18 struct irq_action {
19         interrupt_handler_t *handler;
20         void *arg;
21         ulong count;
22 };
23
24 void interrupt_init_cpu (unsigned *decrementer_count)
25 {
26         volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
27
28         *decrementer_count = (gd->bus_clk / 4) / CONFIG_SYS_HZ;
29
30         /* Enable e300 time base */
31
32         immr->sysconf.spcr |= 0x00400000;
33 }
34
35
36 /*
37  * Handle external interrupts
38  */
39
40 void external_interrupt(struct pt_regs *regs)
41 {
42 }
43
44
45 /*
46  * Install and free an interrupt handler.
47  */
48
49 void
50 irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
51 {
52 }
53
54
55 void irq_free_handler(int irq)
56 {
57 }
58
59
60 void timer_interrupt_cpu (struct pt_regs *regs)
61 {
62         /* nothing to do here */
63         return;
64 }
65
66
67 #if defined(CONFIG_CMD_IRQ)
68
69 /* ripped this out of ppc4xx/interrupts.c */
70
71 /*
72  * irqinfo - print information about PCI devices
73  */
74
75 void do_irqinfo(struct cmd_tbl *cmdtp, bd_t *bd, int flag, int argc,
76                 char *const argv[])
77 {
78 }
79
80 #endif