--- linux-2.4.20.orig/drivers/sbus/audio/cs4231.c
+++ linux-2.4.20/drivers/sbus/audio/cs4231.c
@@ -35,7 +35,7 @@
 #include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/sbus.h>
-#if defined(CONFIG_PCI) && defined(CONFIG_SPARC64)
+#if defined(CONFIG_PCI) && (defined(CONFIG_SPARC64) || defined(CONFIG_SPARC32))
 #define EB4231_SUPPORT
 #include <asm/ebus.h>
 #include <asm/pbm.h>
@@ -2283,15 +2283,30 @@
         }
 
         nregs = len / sizeof(regs[0]);
+
+#ifndef __sparc__
         cs4231_chip->regs = (unsigned long)ioremap(edev->resource[0].start, 0x10);
         cs4231_chip->eb2p = (unsigned long)ioremap(edev->resource[1].start, 0x10);
         cs4231_chip->eb2c = (unsigned long)ioremap(edev->resource[2].start, 0x10);
+#else
+	/* Uh oh... On sparc64 resources aren't mapped, but on sparc they are???
+	   and the eb2p, eb2c is missing from PROM too???
+	 */
+	cs4231_chip->regs = edev->resource[0].start;
+        cs4231_chip->eb2p = (unsigned long)ioremap(0x38800000 + 0x702000, 0x10);
+        cs4231_chip->eb2c = (unsigned long)ioremap(0x38800000 + 0x704000, 0x10);
+#endif
 
         cs4231_chip->status |= CS_STATUS_IS_EBUS;
 
+#ifndef __sparc__
         /* Attach the interrupt handler to the audio interrupt. */
         cs4231_chip->irq = edev->irqs[0];
         cs4231_chip->irq2 = edev->irqs[1];
+#else
+        cs4231_chip->irq = 5; /* FIXME set correct pin to irq map somewhere in the proll */
+        cs4231_chip->irq2 = 3; /* We 'know' the playback-irq */
+#endif
 
         if(request_irq(cs4231_chip->irq, eb4231_cinterrupt, SA_SHIRQ, "cs4231", drv) ||
            request_irq(cs4231_chip->irq2, eb4231_pinterrupt, SA_SHIRQ, "cs4231", drv))
@@ -2356,6 +2371,19 @@
                         return 1;
         }
 
+        /* Krups. For some reason the audio alias is not found??? */
+        if (!strcmp(edev->prom_name, "sound")) {
+                char compat[16];
+
+                prom_getstring(edev->prom_node, "compatible",
+                               compat, sizeof(compat));
+                compat[15] = '\0';
+                if (!strcmp(compat, "cs4231"))
+                        return 1;
+
+		return 1;
+        }
+
         return 0;
 }
 #endif
--- linux-2.4.20.orig/arch/sparc/kernel/sparc_ksyms.c
+++ linux-2.4.20/arch/sparc/kernel/sparc_ksyms.c
@@ -20,6 +20,7 @@
 #include <linux/spinlock.h>
 #include <linux/mm.h>
 #ifdef CONFIG_PCI
+#include <asm/ebus.h>
 #include <linux/pci.h>
 #endif
 #include <linux/pm.h>
@@ -194,6 +195,7 @@
 EXPORT_SYMBOL(sbus_ioremap);
 #endif
 #if CONFIG_PCI
+EXPORT_SYMBOL(ebus_chain);
 /* Actually, ioremap/iounmap are not PCI specific. But it is ok for drivers. */
 EXPORT_SYMBOL(ioremap);
 EXPORT_SYMBOL(iounmap);
