public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix i8042 PS/2 mouse on ARM
@ 2004-03-04 19:22 Russell King
  2004-03-04 22:22 ` Woody Suwalski
  2004-03-05  8:26 ` Vojtech Pavlik
  0 siblings, 2 replies; 5+ messages in thread
From: Russell King @ 2004-03-04 19:22 UTC (permalink / raw)
  To: Linux Kernel List, Vojtech Pavlik

Vojtech,

This patch is required on ARM so that we pick up the correct AUX
interrupt number.  Some machines (eg, NetWinders) use IRQ5 instead
of IRQ12 for the PS/2 mouse.

Please comment, and let me know if you're happy to apply it, or
whether you're happy for me to do so.

Thanks.

--- orig/drivers/input/serio/i8042-io.h	Tue Jun 17 12:56:28 2003
+++ linux/drivers/input/serio/i8042-io.h	Thu Mar  4 19:21:28 2004
@@ -25,6 +25,8 @@
 #elif defined(__ia64__)
 # define I8042_KBD_IRQ isa_irq_to_vector(1)
 # define I8042_AUX_IRQ isa_irq_to_vector(12)
+#elif defined(__arm__)
+/* defined in include/asm-arm/arch-*/irqs.h */
 #else
 # define I8042_KBD_IRQ	1
 # define I8042_AUX_IRQ	12
--- orig/include/asm-arm/arch-ebsa285/irqs.h	Mon May  5 17:40:03 2003
+++ linux/include/asm-arm/arch-ebsa285/irqs.h	Thu Mar  4 19:20:22 2004
@@ -91,8 +91,8 @@
 
 #undef RTC_IRQ
 #define RTC_IRQ		IRQ_ISA_RTC_ALARM
-#undef AUX_IRQ
-#define AUX_IRQ		(machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
+#define I8042_KBD_IRQ	IRQ_ISA_KEYBOARD
+#define I8042_AUX_IRQ	(machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
 #define IRQ_FLOPPYDISK	IRQ_ISA_FLOPPY
 
 #define irq_canonicalize(_i)	(((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
--- orig/include/asm-arm/arch-shark/irqs.h	Thu Nov 28 16:45:28 2002
+++ linux/include/asm-arm/arch-shark/irqs.h	Thu Mar  4 19:21:02 2004
@@ -8,5 +8,6 @@
 
 #define IRQ_ISA_KEYBOARD	 1
 #define RTC_IRQ			 8
-#define AUX_IRQ			12
+#define I8042_KBD_IRQ		 1
+#define I8042_AUX_IRQ		12
 #define IRQ_HARDDISK            14

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix i8042 PS/2 mouse on ARM
  2004-03-04 19:22 [PATCH] Fix i8042 PS/2 mouse on ARM Russell King
@ 2004-03-04 22:22 ` Woody Suwalski
  2004-03-04 22:45   ` Russell King
  2004-03-05  8:26 ` Vojtech Pavlik
  1 sibling, 1 reply; 5+ messages in thread
From: Woody Suwalski @ 2004-03-04 22:22 UTC (permalink / raw)
  To: Russell King; +Cc: Linux Kernel List, Vojtech Pavlik

Almost works.

Somehow the expectations of the line

/* defined in include/asm-arm/arch-*/irqs.h */

fails - the arch-ebsa285/irgs.h is not pulled in in time when compiling 
i8042.
Temporary hardcoded the I8042_KBD_IRQ and I8042_AUX_IRQ to test out, 
mouse works OK (good news!!!)

So small tweak to the build include sequence is still needed...

Woody


Russell King wrote:

>Vojtech,
>
>This patch is required on ARM so that we pick up the correct AUX
>interrupt number.  Some machines (eg, NetWinders) use IRQ5 instead
>of IRQ12 for the PS/2 mouse.
>
>Please comment, and let me know if you're happy to apply it, or
>whether you're happy for me to do so.
>
>Thanks.
>
>--- orig/drivers/input/serio/i8042-io.h	Tue Jun 17 12:56:28 2003
>+++ linux/drivers/input/serio/i8042-io.h	Thu Mar  4 19:21:28 2004
>@@ -25,6 +25,8 @@
> #elif defined(__ia64__)
> # define   isa_irq_to_vector(1)
> # define I8042_AUX_IRQ isa_irq_to_vector(12)
>+#elif defined(__arm__)
>+/* defined in include/asm-arm/arch-*/irqs.h */
> #else
> # define I8042_KBD_IRQ	1
> # define I8042_AUX_IRQ	12
>--- orig/include/asm-arm/arch-ebsa285/irqs.h	Mon May  5 17:40:03 2003
>+++ linux/include/asm-arm/arch-ebsa285/irqs.h	Thu Mar  4 19:20:22 2004
>@@ -91,8 +91,8 @@
> 
> #undef RTC_IRQ
> #define RTC_IRQ		IRQ_ISA_RTC_ALARM
>-#undef AUX_IRQ
>-#define AUX_IRQ		(machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
>+#define I8042_KBD_IRQ	IRQ_ISA_KEYBOARD
>+#define I8042_AUX_IRQ	(machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
> #define IRQ_FLOPPYDISK	IRQ_ISA_FLOPPY
> 
> #define irq_canonicalize(_i)	(((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
>--- orig/include/asm-arm/arch-shark/irqs.h	Thu Nov 28 16:45:28 2002
>+++ linux/include/asm-arm/arch-shark/irqs.h	Thu Mar  4 19:21:02 2004
>@@ -8,5 +8,6 @@
> 
> #define IRQ_ISA_KEYBOARD	 1
> #define RTC_IRQ			 8
>-#define AUX_IRQ			12
>+#define I8042_KBD_IRQ		 1
>+#define I8042_AUX_IRQ		12
> #define IRQ_HARDDISK            14
>
>  
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix i8042 PS/2 mouse on ARM
  2004-03-04 22:22 ` Woody Suwalski
@ 2004-03-04 22:45   ` Russell King
  2004-03-05  8:30     ` Vojtech Pavlik
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King @ 2004-03-04 22:45 UTC (permalink / raw)
  To: Woody Suwalski; +Cc: Linux Kernel List, Vojtech Pavlik

On Thu, Mar 04, 2004 at 05:22:25PM -0500, Woody Suwalski wrote:
> So small tweak to the build include sequence is still needed...

Ok, here's the updated (and tested) patch.

--- orig/drivers/input/serio/i8042-io.h	Tue Jun 17 12:56:28 2003
+++ linux/drivers/input/serio/i8042-io.h	Thu Mar  4 22:39:44 2004
@@ -25,6 +25,9 @@
 #elif defined(__ia64__)
 # define I8042_KBD_IRQ isa_irq_to_vector(1)
 # define I8042_AUX_IRQ isa_irq_to_vector(12)
+#elif defined(__arm__)
+/* defined in include/asm-arm/arch-xxx/irqs.h */
+#include <asm/irq.h>
 #else
 # define I8042_KBD_IRQ	1
 # define I8042_AUX_IRQ	12
--- orig/include/asm-arm/arch-ebsa285/irqs.h	Mon May  5 17:40:03 2003
+++ linux/include/asm-arm/arch-ebsa285/irqs.h	Thu Mar  4 19:20:22 2004
@@ -91,8 +91,8 @@
 
 #undef RTC_IRQ
 #define RTC_IRQ		IRQ_ISA_RTC_ALARM
-#undef AUX_IRQ
-#define AUX_IRQ		(machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
+#define I8042_KBD_IRQ	IRQ_ISA_KEYBOARD
+#define I8042_AUX_IRQ	(machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE)
 #define IRQ_FLOPPYDISK	IRQ_ISA_FLOPPY
 
 #define irq_canonicalize(_i)	(((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i)
--- orig/include/asm-arm/arch-shark/irqs.h	Thu Nov 28 16:45:28 2002
+++ linux/include/asm-arm/arch-shark/irqs.h	Thu Mar  4 19:21:02 2004
@@ -8,5 +8,6 @@
 
 #define IRQ_ISA_KEYBOARD	 1
 #define RTC_IRQ			 8
-#define AUX_IRQ			12
+#define I8042_KBD_IRQ		 1
+#define I8042_AUX_IRQ		12
 #define IRQ_HARDDISK            14


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix i8042 PS/2 mouse on ARM
  2004-03-04 19:22 [PATCH] Fix i8042 PS/2 mouse on ARM Russell King
  2004-03-04 22:22 ` Woody Suwalski
@ 2004-03-05  8:26 ` Vojtech Pavlik
  1 sibling, 0 replies; 5+ messages in thread
From: Vojtech Pavlik @ 2004-03-05  8:26 UTC (permalink / raw)
  To: Linux Kernel List

On Thu, Mar 04, 2004 at 07:22:57PM +0000, Russell King wrote:
> Vojtech,
> 
> This patch is required on ARM so that we pick up the correct AUX
> interrupt number.  Some machines (eg, NetWinders) use IRQ5 instead
> of IRQ12 for the PS/2 mouse.
> 
> Please comment, and let me know if you're happy to apply it, or
> whether you're happy for me to do so.
> 
> Thanks.

Applied to my tree, thanks.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix i8042 PS/2 mouse on ARM
  2004-03-04 22:45   ` Russell King
@ 2004-03-05  8:30     ` Vojtech Pavlik
  0 siblings, 0 replies; 5+ messages in thread
From: Vojtech Pavlik @ 2004-03-05  8:30 UTC (permalink / raw)
  To: Woody Suwalski, Linux Kernel List

On Thu, Mar 04, 2004 at 10:45:36PM +0000, Russell King wrote:

> On Thu, Mar 04, 2004 at 05:22:25PM -0500, Woody Suwalski wrote:
> > So small tweak to the build include sequence is still needed...
> 
> Ok, here's the updated (and tested) patch.

In my tree now, thanks.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-05  8:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-04 19:22 [PATCH] Fix i8042 PS/2 mouse on ARM Russell King
2004-03-04 22:22 ` Woody Suwalski
2004-03-04 22:45   ` Russell King
2004-03-05  8:30     ` Vojtech Pavlik
2004-03-05  8:26 ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox