Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Do ess_config_addr() in the ofisa front end, rather ...



details:   https://anonhg.NetBSD.org/src/rev/5f99bc3cb900
branches:  trunk
changeset: 501742:5f99bc3cb900
user:      nathanw <nathanw%NetBSD.org@localhost>
date:      Sat Jan 06 22:50:00 2001 +0000

description:
Do ess_config_addr() in the ofisa front end, rather than in the match
routine. Prevents problems with non-SCR ess chips, as described in
PR 11630.

diffstat:

 sys/dev/isa/ess.c         |  7 +------
 sys/dev/isa/essvar.h      |  5 +++--
 sys/dev/ofisa/ess_ofisa.c |  9 ++++++++-
 3 files changed, 12 insertions(+), 9 deletions(-)

diffs (75 lines):

diff -r ac9932c50653 -r 5f99bc3cb900 sys/dev/isa/ess.c
--- a/sys/dev/isa/ess.c Sat Jan 06 17:16:19 2001 +0000
+++ b/sys/dev/isa/ess.c Sat Jan 06 22:50:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ess.c,v 1.52 2000/06/26 04:56:20 simonb Exp $  */
+/*     $NetBSD: ess.c,v 1.53 2001/01/06 22:50:02 nathanw Exp $ */
 
 /*
  * Copyright 1997
@@ -156,7 +156,6 @@
 void   ess_speaker_on __P((struct ess_softc *));
 void   ess_speaker_off __P((struct ess_softc *));
 
-int    ess_config_addr __P((struct ess_softc *));
 void   ess_config_irq __P((struct ess_softc *));
 void   ess_config_drq __P((struct ess_softc *));
 void   ess_setup __P((struct ess_softc *));
@@ -807,10 +806,6 @@
                return (0);
        }
 
-       /* Configure the ESS chip for the desired audio base address. */
-       if (ess_config_addr(sc))
-               return (0);
-
        if (ess_setup_sc(sc, 1)) 
                return (0);
 
diff -r ac9932c50653 -r 5f99bc3cb900 sys/dev/isa/essvar.h
--- a/sys/dev/isa/essvar.h      Sat Jan 06 17:16:19 2001 +0000
+++ b/sys/dev/isa/essvar.h      Sat Jan 06 22:50:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: essvar.h,v 1.17 2000/03/23 07:01:34 thorpej Exp $      */
+/*     $NetBSD: essvar.h,v 1.18 2001/01/06 22:50:02 nathanw Exp $      */
 /*
  * Copyright 1997
  * Digital Equipment Corporation. All rights reserved.
@@ -33,7 +33,7 @@
  */
 
 /*
-** @(#) $RCSfile: essvar.h,v $ $Revision: 1.17 $ (SHARK) $Date: 2000/03/23 07:01:34 $
+** @(#) $RCSfile: essvar.h,v $ $Revision: 1.18 $ (SHARK) $Date: 2001/01/06 22:50:02 $
 **
 **++
 **
@@ -165,4 +165,5 @@
 
 int    essmatch __P((struct ess_softc *));
 void   essattach __P((struct ess_softc *));
+int    ess_config_addr __P((struct ess_softc *));
 
diff -r ac9932c50653 -r 5f99bc3cb900 sys/dev/ofisa/ess_ofisa.c
--- a/sys/dev/ofisa/ess_ofisa.c Sat Jan 06 17:16:19 2001 +0000
+++ b/sys/dev/ofisa/ess_ofisa.c Sat Jan 06 22:50:00 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ess_ofisa.c,v 1.5 1999/03/16 13:07:45 mycroft Exp $    */
+/*     $NetBSD: ess_ofisa.c,v 1.6 2001/01/06 22:50:00 nathanw Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -158,6 +158,13 @@
                return;
        }
 
+       /* 
+        * The Shark firmware doesn't program the ESS ISA address registers.
+        * Do that here instead of inside essmatch() since we want to defer
+        * to the firmware on other platforms.
+        */
+       if (ess_config_addr(sc))
+               return;
        if (essmatch(sc) == 0) {
                printf(": essmatch failed\n");
                return;



Home | Main Index | Thread Index | Old Index