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