summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/auxio.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-09-12 01:29:55 +0000
commit545f435ebcfd94a1e7c20b46efe81b4d6ac4e698 (patch)
treee9ce4bc598d06374bda906f18365984bf22a526a /arch/sparc64/kernel/auxio.c
parent4291a610eef89d0d5c69d9a10ee6560e1aa36c74 (diff)
Merge with Linux 2.1.55. More bugfixes and goodies from my private
CVS archive.
Diffstat (limited to 'arch/sparc64/kernel/auxio.c')
-rw-r--r--arch/sparc64/kernel/auxio.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/auxio.c b/arch/sparc64/kernel/auxio.c
index 00e5f2722..91365af85 100644
--- a/arch/sparc64/kernel/auxio.c
+++ b/arch/sparc64/kernel/auxio.c
@@ -3,15 +3,21 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/
+#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/smp.h>
#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+
#include <asm/oplib.h>
#include <asm/io.h>
#include <asm/auxio.h>
#include <asm/sbus.h>
+#include <asm/ebus.h>
+#include <asm/fhc.h>
/* Probe and map in the Auxiliary I/O register */
unsigned char *auxio_register;
@@ -31,9 +37,39 @@ __initfunc(void auxio_probe(void))
}
if (!sdev) {
+#ifdef CONFIG_PCI
+ struct linux_ebus *ebus;
+ struct linux_ebus_device *edev = 0;
+ unsigned long led_auxio;
+
+ for_all_ebusdev(edev, ebus)
+ if (!strcmp(edev->prom_name, "auxio"))
+ break;
+
+ if (edev) {
+ if (check_region(edev->base_address[0],
+ sizeof(unsigned int))) {
+ prom_printf("%s: Can't get region %lx, %d\n",
+ __FUNCTION__, edev->base_address[0],
+ sizeof(unsigned int));
+ prom_halt();
+ }
+ request_region(edev->base_address[0],
+ sizeof(unsigned int), "LED auxio");
+
+ led_auxio = edev->base_address[0];
+ outl(0x01, led_auxio);
+ return;
+ }
+#endif
+ if(central_bus) {
+ auxio_register = NULL;
+ return;
+ }
prom_printf("Cannot find auxio node, cannot continue...\n");
prom_halt();
}
+
prom_getproperty(sdev->prom_node, "reg", (char *) auxregs, sizeof(auxregs));
prom_apply_sbus_ranges(sdev->my_bus, auxregs, 0x1, sdev);
/* Map the register both read and write */