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