diff -ruP linux-2.6.0-test3.orig/sound/sparc/cs4231.c linux-2.6.0-test3/sound/sparc/cs4231.c
--- linux-2.6.0-test3.orig/sound/sparc/cs4231.c	Sat Aug  9 06:31:52 2003
+++ linux-2.6.0-test3/sound/sparc/cs4231.c	Wed Sep 17 19:05:08 2003
@@ -37,7 +37,7 @@
 #include <asm/sbus.h>
 #endif
 
-#if defined(CONFIG_PCI) && defined(CONFIG_SPARC64)
+#if defined(CONFIG_PCI) && (defined(CONFIG_SPARC64) || defined(CONFIG_SPARC32))
 #define EBUS_SUPPORT
 #endif
 
@@ -380,11 +380,13 @@
 {
 #ifdef EBUS_SUPPORT
 	if (cp->flags & CS4231_FLAG_EBUS) {
-		return writeb(val, reg_addr);
+//		return writeb(val, reg_addr);
+		writeb(val, reg_addr);
 	} else {
 #endif
 #ifdef SBUS_SUPPORT
-		return sbus_writeb(val, reg_addr);
+//		return sbus_writeb(val, reg_addr);
+		sbus_writeb(val, reg_addr);
 #endif
 #ifdef EBUS_SUPPORT
 	}
@@ -1231,7 +1233,7 @@
 #ifdef SBUS_SUPPORT
 static irqreturn_t snd_cs4231_sbus_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
-	cs4231_t *chip = snd_magic_cast(cs4231_t, dev_id, return);
+	cs4231_t *chip = snd_magic_cast(cs4231_t, dev_id, return IRQ_NONE);
 	u32 csr;
 
 	csr = sbus_readl(chip->port + APCCSR);
@@ -2049,15 +2051,18 @@
 {
 	if (chip->eb2c.regs) {
 		ebus_dma_unregister(&chip->eb2c);
-		iounmap(chip->eb2c.regs);
+		iounmap((void *) chip->eb2c.regs);
 	}
 	if (chip->eb2p.regs) {
 		ebus_dma_unregister(&chip->eb2p);
-		iounmap(chip->eb2p.regs);
+		iounmap((void *) chip->eb2p.regs);
 	}
 
+#ifndef __sparc__
 	if (chip->port)
-		iounmap(chip->port);
+		iounmap((void *) chip->port);
+#endif
+
 	if (chip->timer)
 		snd_device_free(chip->card, chip->timer);
 
@@ -2104,16 +2109,26 @@
 	chip->eb2c.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER;
 	chip->eb2c.callback = snd_cs4231_ebus_capture_callback;
 	chip->eb2c.client_cookie = chip;
-	chip->eb2c.irq = edev->irqs[0];
 	strcpy(chip->eb2p.name, "cs4231(play)");
 	chip->eb2p.flags = EBUS_DMA_FLAG_USE_EBDMA_HANDLER;
 	chip->eb2p.callback = snd_cs4231_ebus_play_callback;
 	chip->eb2p.client_cookie = chip;
+
+#ifndef __sparc__
+	chip->eb2c.irq = edev->irqs[0];
 	chip->eb2p.irq = edev->irqs[1];
 
 	chip->port = (unsigned long) ioremap(edev->resource[0].start, 0x10);
 	chip->eb2p.regs = (unsigned long) ioremap(edev->resource[1].start, 0x10);
 	chip->eb2c.regs = (unsigned long) ioremap(edev->resource[2].start, 0x10);
+#else
+	chip->eb2c.irq = 5;
+	chip->eb2p.irq = 3;
+
+	chip->port = edev->resource[0].start;
+	chip->eb2p.regs = (unsigned long) ioremap(0x38800000 + 0x702000, 0x10);
+	chip->eb2c.regs = (unsigned long) ioremap(0x38800000 + 0x704000, 0x10);
+#endif
 	if (!chip->port || !chip->eb2p.regs || !chip->eb2c.regs) {
 		snd_cs4231_ebus_free(chip);
 		snd_printk("cs4231-%d: Unable to map chip registers.\n", dev);
@@ -2218,6 +2233,14 @@
 					       compat, sizeof(compat));
 				compat[15] = '\0';
 				if (!strcmp(compat, "SUNW,CS4231"))
+					match = 1;
+			} else 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"))
 					match = 1;
 			}
 
