2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2005-07-28 15:08:46 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2000-2002
|
|
|
|
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
*
|
|
|
|
* Copyright 2004 Freescale Semiconductor, Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
2019-11-14 19:57:41 +00:00
|
|
|
#include <irq_func.h>
|
2005-07-28 15:08:46 +00:00
|
|
|
#include <mpc83xx.h>
|
|
|
|
#include <asm/processor.h>
|
2020-05-10 17:40:06 +00:00
|
|
|
#include <asm/ptrace.h>
|
2005-07-28 15:08:46 +00:00
|
|
|
|
2006-03-31 16:32:53 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2005-07-28 15:08:46 +00:00
|
|
|
struct irq_action {
|
|
|
|
interrupt_handler_t *handler;
|
|
|
|
void *arg;
|
|
|
|
ulong count;
|
|
|
|
};
|
|
|
|
|
2017-08-14 02:44:37 +00:00
|
|
|
void interrupt_init_cpu (unsigned *decrementer_count)
|
2005-07-28 15:08:46 +00:00
|
|
|
{
|
2008-10-16 13:01:15 +00:00
|
|
|
volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
|
2006-01-11 17:19:12 +00:00
|
|
|
|
2008-10-16 13:01:15 +00:00
|
|
|
*decrementer_count = (gd->bus_clk / 4) / CONFIG_SYS_HZ;
|
2006-01-11 17:19:12 +00:00
|
|
|
|
|
|
|
/* Enable e300 time base */
|
|
|
|
|
|
|
|
immr->sysconf.spcr |= 0x00400000;
|
2005-07-28 15:08:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Handle external interrupts
|
|
|
|
*/
|
|
|
|
|
2019-11-14 19:57:40 +00:00
|
|
|
void external_interrupt(struct pt_regs *regs)
|
2005-07-28 15:08:46 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Install and free an interrupt handler.
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
2019-11-14 19:57:40 +00:00
|
|
|
irq_install_handler(int irq, interrupt_handler_t * handler, void *arg)
|
2005-07-28 15:08:46 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-11-14 19:57:40 +00:00
|
|
|
void irq_free_handler(int irq)
|
2005-07-28 15:08:46 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void timer_interrupt_cpu (struct pt_regs *regs)
|
|
|
|
{
|
|
|
|
/* nothing to do here */
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-07-10 00:06:00 +00:00
|
|
|
#if defined(CONFIG_CMD_IRQ)
|
2005-07-28 15:08:46 +00:00
|
|
|
|
|
|
|
/* ripped this out of ppc4xx/interrupts.c */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* irqinfo - print information about PCI devices
|
|
|
|
*/
|
|
|
|
|
2020-05-10 17:40:03 +00:00
|
|
|
void do_irqinfo(struct cmd_tbl *cmdtp, bd_t *bd, int flag, int argc,
|
|
|
|
char *const argv[])
|
2005-07-28 15:08:46 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2007-07-10 00:06:00 +00:00
|
|
|
#endif
|