diff --git a/sys/arch/mips/alchemy/dev/aurtc.c b/sys/arch/mips/alchemy/dev/aurtc.c index e57c70f6067f..dd234d36e43a 100644 --- a/sys/arch/mips/alchemy/dev/aurtc.c +++ b/sys/arch/mips/alchemy/dev/aurtc.c @@ -1,4 +1,4 @@ -/* $NetBSD: aurtc.c,v 1.9 2006/03/28 03:43:58 gdamore Exp $ */ +/* $NetBSD: aurtc.c,v 1.10 2006/03/28 16:52:35 gdamore Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -68,7 +68,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: aurtc.c,v 1.9 2006/03/28 03:43:58 gdamore Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aurtc.c,v 1.10 2006/03/28 16:52:35 gdamore Exp $"); #include #include @@ -84,9 +84,6 @@ __KERNEL_RCSID(0, "$NetBSD: aurtc.c,v 1.9 2006/03/28 03:43:58 gdamore Exp $"); #include #include -/* provided in machdep code */ -extern todr_chip_handle_t todr_handle; - #define REGVAL(x) (*(volatile uint32_t *)(MIPS_PHYS_TO_KSEG1(PC_BASE + (x)))) #define GETREG(x) (REGVAL(x)) #define PUTREG(x,v) (REGVAL(x) = (v)) @@ -124,15 +121,8 @@ aurtc_attach(struct device *parent, struct device *self, void *aux) { struct aurtc_softc *sc = (struct aurtc_softc *)self; - if (todr_handle != NULL) { - printf(": another TOD clock is already registered\n"); - return; - } - printf(": Au1X00 programmable clock\n"); - todr_handle = &sc->sc_tch; - sc->sc_tch.cookie = sc; sc->sc_tch.bus_cookie = NULL; sc->sc_tch.todr_gettime = aurtc_gettime; @@ -142,6 +132,8 @@ aurtc_attach(struct device *parent, struct device *self, void *aux) sc->sc_tch.todr_setwen = NULL; sc->sc_shutdownhook = shutdownhook_establish(aurtc_shutdown, NULL); + + todr_attach(&sc->sc_tch); } /*