On Sun, May 23, 2004 at 11:33:15PM +0200, Jens Schmalzing wrote:
> Someone had to write that patch in the first place.  That's what all
> this is about, and when I asked on debian-powerpc nobody cared to
> answer, so I kludged around it as well as I could.  Thanks to
> Christoph, who dug up an ugly but working patch, the g5 flavour is now
> history.  Meaning, I finished building, testing, and uploading new
> kernel-image packages less than an hour ago.

There's a few more patches of that style in SuSE's tree.  I've attached
them, but if you don't actually need them I'd say hide them in your
closet for the time beeing :)

diff -purNX /home/olaf/kernel/kernel_exclude.txt 
linux-2.6.0-test11.orig/drivers/input/serio/i8042-ppcio.h 
linux-2.6.0-test11.SuSE/drivers/input/serio/i8042-ppcio.h
--- linux-2.6.0-test11.orig/drivers/input/serio/i8042-ppcio.h   2003-11-26 
20:43:24.000000000 +0000
+++ linux-2.6.0-test11.SuSE/drivers/input/serio/i8042-ppcio.h   2003-11-29 
16:07:15.000000000 +0000
@@ -127,6 +127,73 @@ static inline void i8042_platform_exit(v
 {
 }
 
+#elif defined(CONFIG_PPC_MULTIPLATFORM)
+
+#include <asm/processor.h>
+
+/*
+ * Names.
+ */
+
+#define I8042_KBD_PHYS_DESC "isa0060/serio0"
+#define I8042_AUX_PHYS_DESC "isa0060/serio1"
+#define I8042_MUX_PHYS_DESC "isa0060/serio%d"
+
+/*
+ * IRQs.
+ */
+
+# define I8042_KBD_IRQ 1
+# define I8042_AUX_IRQ 12
+
+/*
+ * Register numbers.
+ */
+
+#define I8042_COMMAND_REG      0x64    
+#define I8042_STATUS_REG       0x64    
+#define I8042_DATA_REG         0x60
+
+static inline int i8042_read_data(void)
+{
+       return inb(I8042_DATA_REG);
+}
+
+static inline int i8042_read_status(void)
+{
+       return inb(I8042_STATUS_REG);
+}
+
+static inline void i8042_write_data(int val)
+{
+       outb(val, I8042_DATA_REG);
+       return;
+}
+
+static inline void i8042_write_command(int val)
+{
+       outb(val, I8042_COMMAND_REG);
+       return;
+}
+
+static inline int i8042_platform_init(void)
+{
+       if(_machine == _MACH_Pmac) {
+               printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
+               return -ENODEV;
+       }
+       if (!request_region(I8042_DATA_REG, 16, "i8042"))
+               return -1;
+
+        i8042_reset = 1;
+       return 0;
+}
+
+static inline void i8042_platform_exit(void)
+{
+       release_region(I8042_DATA_REG, 16);
+}
+
 #else
 
 #include "i8042-io.h"
diff -purNX /home/olaf/kernel/kernel_exclude.txt 
linux-2.6.0-test11.orig/drivers/pnp/isapnp/core.c 
linux-2.6.0-test11.SuSE/drivers/pnp/isapnp/core.c
--- linux-2.6.0-test11.orig/drivers/pnp/isapnp/core.c   2003-11-26 
20:44:19.000000000 +0000
+++ linux-2.6.0-test11.SuSE/drivers/pnp/isapnp/core.c   2003-11-29 
16:24:39.000000000 +0000
@@ -1081,6 +1081,11 @@ int __init isapnp_init(void)
        struct pnp_card *card;
        struct pnp_dev *dev;
 
+#if defined(CONFIG_PPC_MULTIPLATFORM)
+#include <asm/processor.h>
+       if(_machine == _MACH_Pmac)
+               isapnp_disable = 1;
+#endif
        if (isapnp_disable) {
                isapnp_detected = 0;
                printk(KERN_INFO "isapnp: ISA Plug & Play support disabled\n");
diff -p -purN linux-2.6.2/drivers/block/floppy.c 
linux-2.6.2.pc_floppy/drivers/block/floppy.c
--- linux-2.6.2/drivers/block/floppy.c  2004-02-10 16:20:24.000000000 +0100
+++ linux-2.6.2.pc_floppy/drivers/block/floppy.c        2004-02-10 
16:33:11.000000000 +0100
@@ -182,6 +182,9 @@ static int print_unex=1;
 #include <linux/device.h>
 #include <linux/buffer_head.h>         /* for invalidate_buffers() */
 
+#ifdef CONFIG_PPC_PMAC
+#include <asm/processor.h>
+#endif
 /*
  * PS/2 floppies have much slower step rates than regular floppies.
  * It's been recommended that take about 1/4 of the default speed
@@ -4236,6 +4239,12 @@ int __init floppy_init(void)
        int i,unit,drive;
        int err;
 
+#ifdef CONFIG_PPC_PMAC
+       if(_machine == _MACH_Pmac) {
+               printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
+               return -ENODEV;
+       }
+#endif
        raw_cmd = NULL;
 
        for (i=0; i<N_DRIVE; i++) {
--- linux-2.6.4.vanilla/drivers/input/misc/pcspkr.c     2003-12-18 
03:58:57.000000000 +0100
+++ ./drivers/input/misc/pcspkr.c       2004-03-27 12:09:43.864500707 +0100
@@ -17,6 +17,9 @@
 #include <linux/init.h>
 #include <linux/input.h>
 #include <asm/io.h>
+#ifdef CONFIG_PPC_PMAC
+#include <asm/processor.h>
+#endif
 
 MODULE_AUTHOR("Vojtech Pavlik <[EMAIL PROTECTED]>");
 MODULE_DESCRIPTION("PC Speaker beeper driver");
@@ -67,6 +70,12 @@ static int pcspkr_event(struct input_dev
 
 static int __init pcspkr_init(void)
 {
+#ifdef CONFIG_PPC_PMAC
+       if(_machine == _MACH_Pmac) {
+               printk("%s: nothing to do on PowerMac\n",__FUNCTION__);
+               return -ENODEV;
+       }
+#endif
        pcspkr_dev.evbit[0] = BIT(EV_SND);
        pcspkr_dev.sndbit[0] = BIT(SND_BELL) | BIT(SND_TONE);
        pcspkr_dev.event = pcspkr_event;

Reply via email to