Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/sparc Ensure uniqueness of EEPROM device with...



details:   https://anonhg.NetBSD.org/src/rev/2ad01069904d
branches:  trunk
changeset: 481753:2ad01069904d
user:      pk <pk%NetBSD.org@localhost>
date:      Sat Feb 05 12:32:57 2000 +0000

description:
Ensure uniqueness of EEPROM device without reference to cf_unit.

diffstat:

 sys/arch/sparc/sparc/clock.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r aea3f7e99913 -r 2ad01069904d sys/arch/sparc/sparc/clock.c
--- a/sys/arch/sparc/sparc/clock.c      Sat Feb 05 11:57:30 2000 +0000
+++ b/sys/arch/sparc/sparc/clock.c      Sat Feb 05 12:32:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.69 1998/10/14 14:53:36 pk Exp $ */
+/*     $NetBSD: clock.c,v 1.70 2000/02/05 12:32:57 pk Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -320,6 +320,9 @@
 #endif /* SUN4 */
 }
 
+/* We support only on eeprom device */
+static int eeprom_attached;
+
 /*
  * Sun 4/100, 4/200 EEPROM match routine.
  */
@@ -335,7 +338,8 @@
        if (uoba->uoba_isobio4 == 0)
                return (0);
 
-       if (cf->cf_unit != 0)
+       if (eeprom_attached)
+               /* We support only on eeprom device */
                return (0);
 
        /* Only these sun4s have oclock */
@@ -363,6 +367,7 @@
        struct obio4_attach_args *oba = &uoba->uoba_oba4;
        bus_space_handle_t bh;
 
+       eeprom_attached = 1;
        printf("\n");
 
        if (obio_bus_map(oba->oba_bustag,



Home | Main Index | Thread Index | Old Index