Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/dev revert previous version, will create a de...
details: https://anonhg.NetBSD.org/src/rev/17c015fb4217
branches: trunk
changeset: 583567:17c015fb4217
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Aug 12 16:28:14 2005 +0000
description:
revert previous version, will create a device node in the boot loader instead
diffstat:
sys/arch/sparc/dev/ebus.c | 48 ++--------------------------------------------
1 files changed, 3 insertions(+), 45 deletions(-)
diffs (94 lines):
diff -r e58ed2ed763a -r 17c015fb4217 sys/arch/sparc/dev/ebus.c
--- a/sys/arch/sparc/dev/ebus.c Fri Aug 12 16:22:05 2005 +0000
+++ b/sys/arch/sparc/dev/ebus.c Fri Aug 12 16:28:14 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ebus.c,v 1.19 2005/08/12 12:46:17 macallan Exp $ */
+/* $NetBSD: ebus.c,v 1.20 2005/08/12 16:28:14 macallan Exp $ */
/*
* Copyright (c) 1999, 2000 Matthew R. Green
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ebus.c,v 1.19 2005/08/12 12:46:17 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ebus.c,v 1.20 2005/08/12 16:28:14 macallan Exp $");
#if defined(DEBUG) && !defined(EBUS_DEBUG)
#define EBUS_DEBUG
@@ -243,15 +243,6 @@
bus_dma_tag_t dmatag;
int node, error;
char devinfo[256];
-#ifdef MSIIEP
- /*
- * some Krups OF doesn't have a node for the audio chip, so we
- * just check if there's a 'sound' node and if not we fill in the
- * ebus_attach_args by hand and hope nobody cares about the invalid
- * node number
- */
- int found_sound=0;
-#endif
pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo, sizeof(devinfo));
printf(": %s, revision 0x%02x\n",
@@ -296,10 +287,6 @@
for (node = firstchild(node); node; node = nextsibling(node)) {
char *name = prom_getpropstring(node, "name");
-#ifdef MSIIEP
- if (strcmp(name, "sound") == 0)
- found_sound = 1;
-#endif
if (ebus_setup_attach_args(sc, sbt, dmatag, node, &ea) != 0) {
printf("ebus_attach: %s: incomplete\n", name);
continue;
@@ -309,34 +296,6 @@
(void)config_found(self, &ea, ebus_print);
ebus_destroy_attach_args(&ea);
}
-#ifdef MSIIEP
- if (found_sound == 0) {
- /* no sound node - make up an attachment */
-
- char name[8] = "sound";
- struct ebus_regs reg;
- uint32_t vaddr;
- uint32_t intr;
-
- memset(&ea, 0, sizeof(struct ebus_attach_args));
- ea.ea_name = name;
- ea.ea_node = ~0;
- ea.ea_bustag = sbt;
- ea.ea_dmatag = dmatag;
- ea.ea_reg = ®
- ea.ea_nreg = 1;
- ea.ea_intr = &intr;
- ea.ea_nintr = 1;
- ea.ea_vaddr = &vaddr;
- ea.ea_nvaddr = 0;
- /* we Just Know(tm) thesa values ;) */
- ea.ea_reg[0].hi = 0x14;
- ea.ea_reg[0].lo = 0x200000;
- ea.ea_reg[0].size = 0x1000; /* XXX */
- ea.ea_intr[0] = 3;
- config_found(self, &ea, ebus_print);
- }
-#endif
}
int
@@ -371,12 +330,11 @@
* _number_ of the BAR - e.g. BAR1 is represented by 1 in
* Krups PROM, while on Ultra it's 0x14. Fix it here.
*/
- for (n = 0; n < ea->ea_nreg; ++n) {
+ for (n = 0; n < ea->ea_nreg; ++n)
if (ea->ea_reg[n].hi < PCI_MAPREG_START) {
ea->ea_reg[n].hi = PCI_MAPREG_START
+ ea->ea_reg[n].hi * sizeof(pcireg_t);
}
- }
err = prom_getprop(node, "address", sizeof(u_int32_t),
&ea->ea_nvaddr, &ea->ea_vaddr);
Home |
Main Index |
Thread Index |
Old Index