Skip to content

Commit

Permalink
[MIPS] Fix the build error of Wind River PPMC board, rewrite irq code…
Browse files Browse the repository at this point in the history
… to C

 o Fix the build error Wind River PPMC board caused by the change of
   plat_setup hook interface.
 o Rewrite first level interrupt dispatch code to C.

Signed-off-by: Rongkai.Zhan <rongkai.zhan@windriver.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Mark.Zhan authored and Ralf Baechle committed Jun 29, 2006
1 parent 0a6047e commit 9247857
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 66 deletions.
2 changes: 1 addition & 1 deletion arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ config MIPS_SEAD
board.

config WR_PPMC
bool "Support for Wind River PPMC board"
bool "Wind River PPMC board"
select IRQ_CPU
select BOOT_ELF32
select DMA_NONCOHERENT
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/gt64120/wrppmc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
# Makefile for the Wind River MIPS 4KC PPMC Eval Board
#

obj-y += int-handler.o irq.o reset.o setup.o time.o pci.o
obj-y += irq.o reset.o setup.o time.o pci.o

EXTRA_AFLAGS := $(CFLAGS)
59 changes: 0 additions & 59 deletions arch/mips/gt64120/wrppmc/int-handler.S

This file was deleted.

17 changes: 13 additions & 4 deletions arch/mips/gt64120/wrppmc/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,19 @@
#include <asm/irq_cpu.h>
#include <asm/gt64120.h>

extern asmlinkage void handle_IRQ(void);
asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
{
unsigned int pending = read_c0_status() & read_c0_cause();

if (pending & STATUSF_IP7)
do_IRQ(WRPPMC_MIPS_TIMER_IRQ, regs); /* CPU Compare/Count internal timer */
else if (pending & STATUSF_IP6)
do_IRQ(WRPPMC_UART16550_IRQ, regs); /* UART 16550 port */
else if (pending & STATUSF_IP3)
do_IRQ(WRPPMC_PCI_INTA_IRQ, regs); /* PCI INT_A */
else
spurious_interrupt(regs);
}

/**
* Initialize GT64120 Interrupt Controller
Expand All @@ -53,9 +65,6 @@ void __init arch_init_irq(void)
/* enable all CPU interrupt bits. */
set_c0_status(ST0_IM); /* IE bit is still 0 */

/* Install MIPS Interrupt Trap Vector */
set_except_vector(0, handle_IRQ);

/* IRQ 0 - 7 are for MIPS common irq_cpu controller */
mips_cpu_irq_init(0);

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/gt64120/wrppmc/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static void wrppmc_setup_serial(void)
}
#endif

void __init plat_setup(void)
void __init plat_mem_setup(void)
{
extern void wrppmc_time_init(void);
extern void wrppmc_timer_setup(struct irqaction *);
Expand Down

0 comments on commit 9247857

Please sign in to comment.