Fix thinko.

This commit is contained in:
tsutsui 2008-03-29 07:35:04 +00:00
parent 33ce2fbee5
commit 92c1d7b259
1 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkclock_sbdio.c,v 1.4 2008/03/29 05:47:53 tsutsui Exp $ */
/* $NetBSD: mkclock_sbdio.c,v 1.5 2008/03/29 07:35:04 tsutsui Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mkclock_sbdio.c,v 1.4 2008/03/29 05:47:53 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: mkclock_sbdio.c,v 1.5 2008/03/29 07:35:04 tsutsui Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -84,14 +84,7 @@ mkclock_sbdio_attach(device_t parent, device_t self, void *aux)
bus_size_t size;
sc->sc_dev = self;
aprint_normal(" at %p", (void *)sa->sa_addr1);
sc->sc_bst = sa->sa_bust;
if (bus_space_map(sc->sc_bst, sa->sa_addr1, size, 0,
&sc->sc_bsh) != 0) {
aprint_error(": can't map device space\n");
return;
}
aprint_normal(" at 0x%p", (void *)sa->sa_addr1);
switch (sa->sa_flags) {
case 0x0000:
@ -105,12 +98,19 @@ mkclock_sbdio_attach(device_t parent, device_t self, void *aux)
break;
default:
aprint_normal(": unknown model, assume");
/* assume MK48T18 */
sc->sc_model = "mk48t18";
size = MK48T18_CLKSZ;
break;
}
sc->sc_bst = sa->sa_bust;
if (bus_space_map(sc->sc_bst, sa->sa_addr1, size, 0,
&sc->sc_bsh) != 0) {
aprint_error(": can't map device space\n");
return;
}
sc->sc_year0 = 2000; /* XXX Is this OK? */
sc->sc_nvrd = mkclock_sbdio_nvrd;
sc->sc_nvwr = mkclock_sbdio_nvwr;