Module Name: src Committed By: nonaka Date: Fri Mar 2 12:56:51 UTC 2012
Modified Files: src/sys/dev/ic: gcscpcib.c Log Message: fix attach message if wdt isn't attach. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/gcscpcib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/gcscpcib.c diff -u src/sys/dev/ic/gcscpcib.c:1.2 src/sys/dev/ic/gcscpcib.c:1.3 --- src/sys/dev/ic/gcscpcib.c:1.2 Mon Aug 29 18:34:42 2011 +++ src/sys/dev/ic/gcscpcib.c Fri Mar 2 12:56:51 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: gcscpcib.c,v 1.2 2011/08/29 18:34:42 bouyer Exp $ */ +/* $NetBSD: gcscpcib.c,v 1.3 2012/03/02 12:56:51 nonaka Exp $ */ /* $OpenBSD: gcscpcib.c,v 1.6 2007/11/17 17:02:47 mbalmer Exp $ */ /* @@ -24,7 +24,7 @@ * AMD CS5535/CS5536 series LPC bridge also containing timer, watchdog and GPIO. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gcscpcib.c,v 1.2 2011/08/29 18:34:42 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gcscpcib.c,v 1.3 2012/03/02 12:56:51 nonaka Exp $"); #include "gpio.h" @@ -88,11 +88,11 @@ gcscpcib_attach(device_t self, struct gc { struct timecounter *tc = &sc->sc_timecounter; bus_addr_t wdtbase; - int wdt = 0; + int wdt = 0, gpio = 0; #if NGPIO > 0 struct gpiobus_attach_args gba; bus_addr_t gpiobase; - int i, gpio; + int i; #endif sc->sc_iot = iot; @@ -153,7 +153,10 @@ gpio: gpiobase = gcsc_rdmsr(MSR_LBAR_GPIO) & 0xffff; if (!bus_space_map(sc->sc_gpio_iot, gpiobase, 0xff, 0, &sc->sc_gpio_ioh)) { - aprint_normal(", GPIO"); + if (wdt) + aprint_normal(", GPIO"); + else + aprint_normal_dev(self, "GPIO"); /* initialize pin array */ for (i = 0; i < AMD553X_GPIO_NPINS; i++) { @@ -181,7 +184,8 @@ gpio: gpio = 1; } #endif - aprint_normal("\n"); + if (wdt || gpio) + aprint_normal("\n"); #if NGPIO > 0 /* Attach GPIO framework */