Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/iomd None of the children of vidc now use their...



details:   https://anonhg.NetBSD.org/src/rev/4af143c545ec
branches:  trunk
changeset: 532847:4af143c545ec
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sun Jun 16 13:20:14 2002 +0000

description:
None of the children of vidc now use their aux pointer, so there's no need
to set it, and vidcprint isn't needed to print it.  G/C all that code, and
most of the rest of vidcsearch too.
This also means that the locators on vidc's children are unused, so G/C them
as well.

diffstat:

 sys/arch/arm/iomd/files.iomd |   4 +-
 sys/arch/arm/iomd/vidc20.c   |  56 +++----------------------------------------
 2 files changed, 6 insertions(+), 54 deletions(-)

diffs (102 lines):

diff -r fca57b012e48 -r 4af143c545ec sys/arch/arm/iomd/files.iomd
--- a/sys/arch/arm/iomd/files.iomd      Sun Jun 16 12:38:11 2002 +0000
+++ b/sys/arch/arm/iomd/files.iomd      Sun Jun 16 13:20:14 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.iomd,v 1.1 2002/06/16 12:11:24 bjh21 Exp $
+#      $NetBSD: files.iomd,v 1.2 2002/06/16 13:20:14 bjh21 Exp $
 #
 # IOMD-specific configuration data
 #
@@ -66,7 +66,7 @@
 
 # VIDC device
 # parent to vidcconsole, vidcaudio, beep
-device vidc { [base = -1], [dack = -1], [irq = -1] }
+device vidc { }
 attach vidc at mainbus
 file   arch/arm/iomd/vidc20.c                  vidc            needs-count
 
diff -r fca57b012e48 -r 4af143c545ec sys/arch/arm/iomd/vidc20.c
--- a/sys/arch/arm/iomd/vidc20.c        Sun Jun 16 12:38:11 2002 +0000
+++ b/sys/arch/arm/iomd/vidc20.c        Sun Jun 16 13:20:14 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vidc20.c,v 1.2 2002/06/06 21:03:28 bjh21 Exp $ */
+/*     $NetBSD: vidc20.c,v 1.3 2002/06/16 13:20:15 bjh21 Exp $ */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe
@@ -63,7 +63,6 @@
 
 static int  vidcmatch  __P((struct device *self, struct cfdata *cf, void *aux));
 static void vidcattach __P((struct device *parent, struct device *self, void *aux));
-static int  vidcprint  __P((void *aux, const char *name));
 static int  vidcsearch __P((struct device *, struct cfdata *, void *));
 
 /*
@@ -102,32 +101,6 @@
 }
 
 /*
- * vidcprint()
- *
- * print routine used during config of children
- */
-
-static int
-vidcprint(aux, name)
-       void *aux;
-       const char *name;
-{
-       struct mainbus_attach_args *mb = aux;
-
-       if (mb->mb_iobase != MAINBUSCF_BASE_DEFAULT)
-               printf(" base 0x%x", mb->mb_iobase);
-       if (mb->mb_iosize > 1)
-               printf("-0x%x", mb->mb_iobase + mb->mb_iosize - 1);
-       if (mb->mb_irq != -1)
-               printf(" irq %d", mb->mb_irq);
-       if (mb->mb_drq != -1)
-               printf(" drq 0x%08x", mb->mb_drq);
-
-/* XXXX print flags */
-       return (QUIET);
-}
-
-/*
  * vidcsearch()
  *
  * search routine used during the config of children
@@ -139,30 +112,9 @@
        struct cfdata *cf;
        void *aux;
 {
-       struct vidc20_softc *sc = (struct vidc20_softc *)parent;
-       struct mainbus_attach_args mb;
-       int tryagain;
-
-       do {
-               if (cf->cf_loc[MAINBUSCF_BASE] == MAINBUSCF_BASE_DEFAULT) {
-                       mb.mb_iobase = MAINBUSCF_BASE_DEFAULT;
-                       mb.mb_iosize = 0;
-                       mb.mb_drq = MAINBUSCF_DACK_DEFAULT;
-                       mb.mb_irq = MAINBUSCF_IRQ_DEFAULT;
-               } else {
-                       mb.mb_iobase = cf->cf_loc[MAINBUSCF_BASE] + IO_CONF_BASE;
-                       mb.mb_iosize = 0;
-                       mb.mb_drq = cf->cf_loc[MAINBUSCF_DACK];
-                       mb.mb_irq = cf->cf_loc[MAINBUSCF_IRQ];
-               }
-               mb.mb_iot = sc->sc_iot;
-
-               tryagain = 0;
-               if ((*cf->cf_attach->ca_match)(parent, cf, &mb) > 0) {
-                       config_attach(parent, cf, &mb, vidcprint);
-/*                     tryagain = (cf->cf_fstate == FSTATE_STAR);*/
-               }
-       } while (tryagain);
+       
+       if ((*cf->cf_attach->ca_match)(parent, cf, NULL) > 0)
+               config_attach(parent, cf, NULL, NULL);
 
        return (0);
 }



Home | Main Index | Thread Index | Old Index