Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/vme Remove sparc specific code, use device propertie...
details: https://anonhg.NetBSD.org/src/rev/e6d07c69a4c7
branches: trunk
changeset: 751030:e6d07c69a4c7
user: martin <martin%NetBSD.org@localhost>
date: Fri Jan 22 16:12:41 2010 +0000
description:
Remove sparc specific code, use device properties instead.
diffstat:
sys/dev/vme/if_ie_vme.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (52 lines):
diff -r e14492eff77e -r e6d07c69a4c7 sys/dev/vme/if_ie_vme.c
--- a/sys/dev/vme/if_ie_vme.c Fri Jan 22 16:11:26 2010 +0000
+++ b/sys/dev/vme/if_ie_vme.c Fri Jan 22 16:12:41 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ie_vme.c,v 1.27 2009/05/12 14:47:27 cegger Exp $ */
+/* $NetBSD: if_ie_vme.c,v 1.28 2010/01/22 16:12:41 martin Exp $ */
/*-
* Copyright (c) 1995 Charles D. Cranor
@@ -145,7 +145,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ie_vme.c,v 1.27 2009/05/12 14:47:27 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ie_vme.c,v 1.28 2010/01/22 16:12:41 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -162,9 +162,6 @@
#include <sys/bus.h>
#include <sys/intr.h>
-#ifdef __sparc__
-#include <machine/autoconf.h>
-#endif
#include <dev/vme/vmevar.h>
#include <dev/ic/i82586reg.h>
@@ -476,7 +473,7 @@
vme_size_t memsize;
vme_mapresc_t resc;
int lcv;
-
+ prop_data_t eaddrprop;
vme_am_t mod;
/*
@@ -567,9 +564,11 @@
printf("\n%s:", device_xname(self));
-#ifdef __sparc__
- prom_getether(0, myaddr);
-#endif
+ eaddrprop = prop_dictionary_get(device_properties(self), "mac-address");
+ if (eaddrprop != NULL && prop_data_size(eaddrprop) == ETHER_ADDR_LEN)
+ memcpy(myaddr, prop_data_data_nocopy(eaddrprop),
+ ETHER_ADDR_LEN);
+
i82586_attach(sc, "multibus/vme", myaddr, media, NMEDIA, media[0]);
vme_intr_map(ct, va->ilevel, va->ivector, &ih);
Home |
Main Index |
Thread Index |
Old Index