summaryrefslogtreecommitdiff
path: root/cpu/mpc5xx/interrupts.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-01-02 16:05:07 +0000
committerwdenk <wdenk>2004-01-02 16:05:07 +0000
commitb6e4c4033c4f889c452c511d38c77808c67f9cf7 (patch)
tree73a39833805f4cf47588dd1616a1b479ab58a418 /cpu/mpc5xx/interrupts.c
parent63f3491242df8e6bd1b5df7296f28959989e2eaf (diff)
downloadu-boot-imx-b6e4c4033c4f889c452c511d38c77808c67f9cf7.zip
u-boot-imx-b6e4c4033c4f889c452c511d38c77808c67f9cf7.tar.gz
u-boot-imx-b6e4c4033c4f889c452c511d38c77808c67f9cf7.tar.bz2
* Patch by Denis Peter, 8 Dec 2003
- add support for the PATI board (MPC555) - add SPI support for the MPC5xx * Patch by Anders Larsen, 08 Dec 2003: add configuration options CONFIG_SERIAL_TAG and CONFIG_REVISION_TAG to pass ATAG_SERIAL and ATAG_REVISION, resp., to the ARM target; cleanup some redundand #defines
Diffstat (limited to 'cpu/mpc5xx/interrupts.c')
-rw-r--r--cpu/mpc5xx/interrupts.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/cpu/mpc5xx/interrupts.c b/cpu/mpc5xx/interrupts.c
index 3678b5b..7f6e136 100644
--- a/cpu/mpc5xx/interrupts.c
+++ b/cpu/mpc5xx/interrupts.c
@@ -28,12 +28,20 @@
*/
#include <common.h>
+#include <command.h>
#include <mpc5xx.h>
#include <asm/processor.h>
+#if defined(CONFIG_PATI)
+/* PATI uses IRQs for PCI doorbell */
+#undef NR_IRQS
+#define NR_IRQS 16
+#endif
+
struct interrupt_action {
interrupt_handler_t *handler;
void *arg;
+ int count;
};
static struct interrupt_action irq_vecs[NR_IRQS];
@@ -45,12 +53,18 @@ static struct interrupt_action irq_vecs[NR_IRQS];
int interrupt_init_cpu (ulong *decrementer_count)
{
volatile immap_t *immr = (immap_t *) CFG_IMMR;
+ int vec;
/* Decrementer used here for status led */
*decrementer_count = get_tbclk () / CFG_HZ;
/* Disable all interrupts */
immr->im_siu_conf.sc_simask = 0;
+ for (vec=0; vec<NR_IRQS; vec++) {
+ irq_vecs[vec].handler = NULL;
+ irq_vecs[vec].arg = NULL;
+ irq_vecs[vec].count = 0;
+ }
return (0);
}
@@ -163,3 +177,31 @@ void timer_interrupt_cpu (struct pt_regs *regs)
return;
}
+
+#if (CONFIG_COMMANDS & CFG_CMD_IRQ)
+/*******************************************************************************
+ *
+ * irqinfo - print information about IRQs
+ *
+ */
+int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+ int vec;
+
+ printf ("\nInterrupt-Information:\n");
+ printf ("Nr Routine Arg Count\n");
+
+ for (vec=0; vec<NR_IRQS; vec++) {
+ if (irq_vecs[vec].handler != NULL) {
+ printf ("%02d %08lx %08lx %d\n",
+ vec,
+ (ulong)irq_vecs[vec].handler,
+ (ulong)irq_vecs[vec].arg,
+ irq_vecs[vec].count);
+ }
+ }
+ return 0;
+}
+
+
+#endif /* CONFIG_COMMANDS & CFG_CMD_IRQ */