From 4736ba78c3fbf37d4bcbbce296f533f126a6fb1f Mon Sep 17 00:00:00 2001 From: Thomas Bogendoerfer Date: Wed, 26 Aug 1998 21:45:45 +0000 Subject: added code again, which got removed my big merge:-( --- arch/mips/jazz/hw-access.c | 23 ++++++++++++++++++++++- arch/mips/jazz/int-handler.S | 10 +++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/mips/jazz/hw-access.c b/arch/mips/jazz/hw-access.c index ea95aa03a..3888806b5 100644 --- a/arch/mips/jazz/hw-access.c +++ b/arch/mips/jazz/hw-access.c @@ -1,4 +1,4 @@ -/* $Id: hw-access.c,v 1.10 1998/07/13 23:32:11 tsbogend Exp $ +/* $Id: hw-access.c,v 1.12 1998/08/26 21:39:02 tsbogend Exp $ * * Low-level hardware access stuff for Jazz family machines. * @@ -65,3 +65,24 @@ __initfunc(void jazz_keyboard_setup(void)) r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | JAZZ_IE_KEYBOARD); } + +int jazz_ps2_request_irq(void) +{ + extern void aux_interrupt(int, void *, struct pt_regs *); + int ret; + + ret = request_irq(JAZZ_MOUSE_IRQ, aux_interrupt, 0, "PS/2 Mouse", NULL); + if (!ret) + r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, + r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | + JAZZ_IE_MOUSE); + return ret; +} + +void jazz_ps2_free_irq(void) +{ + r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, + r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | + JAZZ_IE_MOUSE); + free_irq(JAZZ_MOUSE_IRQ, NULL); +} diff --git a/arch/mips/jazz/int-handler.S b/arch/mips/jazz/int-handler.S index f8e75bc28..100e8fe58 100644 --- a/arch/mips/jazz/int-handler.S +++ b/arch/mips/jazz/int-handler.S @@ -1,9 +1,8 @@ -/* $Id: int-handler.S,v 1.5 1998/05/07 14:17:39 ralf Exp $ +/* $Id: int-handler.S,v 1.11 1998/08/26 21:39:03 tsbogend Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. - * arch/mips/jazz/pica.S * * Copyright (C) 1995, 1996, 1997, 1998 by Ralf Baechle and Andreas Busse * @@ -262,7 +261,12 @@ loc_keyboard: li s1,~JAZZ_IE_KEYBOARD li a0,JAZZ_KEYBOARD_IRQ b loc_call -loc_mouse: PANIC("Unimplemented loc_mouse handler") +/* + * Mouse interrupt handler + */ +loc_mouse: li s1,~JAZZ_IE_MOUSE + li a0,JAZZ_MOUSE_IRQ + b loc_call /* * Serial port 1 IRQ -- cgit v1.2.3