Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/omap Add omapmputmr0 to critical_devs[].



details:   https://anonhg.NetBSD.org/src/rev/6fa2ce50a97c
branches:  trunk
changeset: 756272:6fa2ce50a97c
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Sat Jul 10 08:48:47 2010 +0000

description:
Add omapmputmr0 to critical_devs[].
  delay(9) must require clock_sc (softc for omapmputmr0@obio2).  Also com@obio2
  calls delay in com_attach_subr().

diffstat:

 sys/arch/arm/omap/omap2_obio.c |  20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diffs (54 lines):

diff -r 43468ca03c86 -r 6fa2ce50a97c sys/arch/arm/omap/omap2_obio.c
--- a/sys/arch/arm/omap/omap2_obio.c    Sat Jul 10 08:31:34 2010 +0000
+++ b/sys/arch/arm/omap/omap2_obio.c    Sat Jul 10 08:48:47 2010 +0000
@@ -1,7 +1,7 @@
-/*     $Id: omap2_obio.c,v 1.9 2010/07/07 22:55:03 macallan Exp $      */
+/*     $Id: omap2_obio.c,v 1.10 2010/07/10 08:48:47 kiyohara Exp $     */
 
 /* adapted from: */
-/*     $NetBSD: omap2_obio.c,v 1.9 2010/07/07 22:55:03 macallan Exp $ */
+/*     $NetBSD: omap2_obio.c,v 1.10 2010/07/10 08:48:47 kiyohara Exp $ */
 
 
 /*
@@ -103,7 +103,7 @@
 
 #include "opt_omap.h"
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.9 2010/07/07 22:55:03 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omap2_obio.c,v 1.10 2010/07/10 08:48:47 kiyohara Exp $");
 
 #include "locators.h"
 #include "obio.h"
@@ -359,6 +359,7 @@
 #if 0
        { .name = "dmac", .addr = DMAC_BASE, .required = true },
 #endif
+       { .name = "omapmputmr0", .addr = GPT2_BASE, .required = true },
 };
 
 static void
@@ -387,15 +388,18 @@
                cf = config_search_ia(obio_find, sc->sc_dev, "obio", &oa);
                if (cf == NULL) {
                        if (critical_devs[i].required)
-                               panic("obio_attach_critical: failed to find %s!",
+                               panic(
+                                   "obio_attach_critical: failed to find %s!",
                                    critical_devs[i].name);
                        continue;
                }
 
-               oa.obio_addr = cf->cf_loc[OBIOCF_ADDR];
-               oa.obio_size = cf->cf_loc[OBIOCF_SIZE];
-               oa.obio_intr = cf->cf_loc[OBIOCF_INTR];
-               oa.obio_intrbase = cf->cf_loc[OBIOCF_INTRBASE];
+               if (oa.obio_size == OBIOCF_SIZE_DEFAULT)
+                       oa.obio_size = cf->cf_loc[OBIOCF_SIZE];
+               if (oa.obio_intr == OBIOCF_INTR_DEFAULT)
+                       oa.obio_intr = cf->cf_loc[OBIOCF_INTR];
+               if (oa.obio_intrbase == OBIOCF_INTRBASE_DEFAULT)
+                       oa.obio_intrbase = cf->cf_loc[OBIOCF_INTRBASE];
                config_attach(sc->sc_dev, cf, &oa, obio_print);
        }
 }



Home | Main Index | Thread Index | Old Index