Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Use the PROM mapping for the clock, if ...



details:   https://anonhg.NetBSD.org/src/rev/e26e25fe6bb5
branches:  trunk
changeset: 781640:e26e25fe6bb5
user:      jdc <jdc%NetBSD.org@localhost>
date:      Wed Sep 19 20:34:57 2012 +0000

description:
Use the PROM mapping for the clock, if it exists.
Allows the clock on the Tadpole SPARCle to attach.
Idea from r1.43 of OpenBSD sys/arch/sparc64/sparc64/clock.c

diffstat:

 sys/arch/sparc64/dev/mkclock.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 236994a85700 -r e26e25fe6bb5 sys/arch/sparc64/dev/mkclock.c
--- a/sys/arch/sparc64/dev/mkclock.c    Wed Sep 19 15:38:09 2012 +0000
+++ b/sys/arch/sparc64/dev/mkclock.c    Wed Sep 19 20:34:57 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkclock.c,v 1.10 2012/08/11 21:48:30 mrg Exp $ */
+/*     $NetBSD: mkclock.c,v 1.11 2012/09/19 20:34:57 jdc Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mkclock.c,v 1.10 2012/08/11 21:48:30 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mkclock.c,v 1.11 2012/09/19 20:34:57 jdc Exp $");
 
 /*    
  * Clock driver for 'mkclock' - Mostek MK48Txx TOD clock.
@@ -204,7 +204,11 @@
        /* hard code to 8K? */
        sz = ea->ea_reg[0].size;
 
-       if (bus_space_map(sc->sc_bst,
+       /* Use the PROM address if there. */
+       if (ea->ea_nvaddr)
+               sparc_promaddr_to_handle(sc->sc_bst, ea->ea_vaddr[0],
+                       &sc->sc_bsh);
+       else if (bus_space_map(sc->sc_bst,
                         EBUS_ADDR_FROM_REG(&ea->ea_reg[0]),
                         sz,
                         BUS_SPACE_MAP_LINEAR,



Home | Main Index | Thread Index | Old Index