blob: f9486678af33bf2c36901adf619dbe2c0c627f58 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Eran Libertyf046ccd2005-07-28 10:08:46 -05002/*
3 * (C) Copyright 2000-2002
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 *
6 * Copyright 2004 Freescale Semiconductor, Inc.
Eran Libertyf046ccd2005-07-28 10:08:46 -05007 */
8
9#include <common.h>
10#include <command.h>
Simon Glassc30b7ad2019-11-14 12:57:41 -070011#include <irq_func.h>
Eran Libertyf046ccd2005-07-28 10:08:46 -050012#include <mpc83xx.h>
Simon Glass401d1c42020-10-30 21:38:53 -060013#include <asm/global_data.h>
Eran Libertyf046ccd2005-07-28 10:08:46 -050014#include <asm/processor.h>
Simon Glass25a58182020-05-10 11:40:06 -060015#include <asm/ptrace.h>
Eran Libertyf046ccd2005-07-28 10:08:46 -050016
Wolfgang Denkd87080b2006-03-31 18:32:53 +020017DECLARE_GLOBAL_DATA_PTR;
18
Eran Libertyf046ccd2005-07-28 10:08:46 -050019struct irq_action {
20 interrupt_handler_t *handler;
21 void *arg;
22 ulong count;
23};
24
Tom Rinideff9b12017-08-13 22:44:37 -040025void interrupt_init_cpu (unsigned *decrementer_count)
Eran Libertyf046ccd2005-07-28 10:08:46 -050026{
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020027 volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
Kumar Galace574ff2006-01-11 11:19:12 -060028
Jean-Christophe PLAGNIOL-VILLARD6d0f6bc2008-10-16 15:01:15 +020029 *decrementer_count = (gd->bus_clk / 4) / CONFIG_SYS_HZ;
Kumar Galace574ff2006-01-11 11:19:12 -060030
31 /* Enable e300 time base */
32
33 immr->sysconf.spcr |= 0x00400000;
Eran Libertyf046ccd2005-07-28 10:08:46 -050034}
35
36
37/*
38 * Handle external interrupts
39 */
40
Simon Glass9d3915b2019-11-14 12:57:40 -070041void external_interrupt(struct pt_regs *regs)
Eran Libertyf046ccd2005-07-28 10:08:46 -050042{
43}
44
45
46/*
47 * Install and free an interrupt handler.
48 */
49
50void
Simon Glass9d3915b2019-11-14 12:57:40 -070051irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
Eran Libertyf046ccd2005-07-28 10:08:46 -050052{
53}
54
55
Simon Glass9d3915b2019-11-14 12:57:40 -070056void irq_free_handler(int irq)
Eran Libertyf046ccd2005-07-28 10:08:46 -050057{
58}
59
60
61void timer_interrupt_cpu (struct pt_regs *regs)
62{
63 /* nothing to do here */
64 return;
65}
66
67
Jon Loeliger44312832007-07-09 19:06:00 -050068#if defined(CONFIG_CMD_IRQ)
Eran Libertyf046ccd2005-07-28 10:08:46 -050069
70/* ripped this out of ppc4xx/interrupts.c */
71
72/*
73 * irqinfo - print information about PCI devices
74 */
75
Masahiro Yamadab75d8dc2020-06-26 15:13:33 +090076void do_irqinfo(struct cmd_tbl *cmdtp, struct bd_info *bd, int flag, int argc,
Simon Glass09140112020-05-10 11:40:03 -060077 char *const argv[])
Eran Libertyf046ccd2005-07-28 10:08:46 -050078{
79}
80
Jon Loeliger44312832007-07-09 19:06:00 -050081#endif