diff --git a/sys/arch/hpcsh/dev/j6x0pwr.c b/sys/arch/hpcsh/dev/j6x0pwr.c index f25f1423d185..d406766bce50 100644 --- a/sys/arch/hpcsh/dev/j6x0pwr.c +++ b/sys/arch/hpcsh/dev/j6x0pwr.c @@ -1,4 +1,4 @@ -/* $NetBSD: j6x0pwr.c,v 1.2 2003/10/19 02:23:51 uwe Exp $ */ +/* $NetBSD: j6x0pwr.c,v 1.3 2003/10/22 23:52:46 uwe Exp $ */ /* * Copyright (c) 2003 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: j6x0pwr.c,v 1.2 2003/10/19 02:23:51 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: j6x0pwr.c,v 1.3 2003/10/22 23:52:46 uwe Exp $"); #include #include @@ -40,12 +40,14 @@ __KERNEL_RCSID(0, "$NetBSD: j6x0pwr.c,v 1.2 2003/10/19 02:23:51 uwe Exp $"); #include #endif +#include +#include + #include #include #include -#include -#include +#include /* SH7709_PGDR bits pertinent to Jornada 6x0 power */ @@ -61,8 +63,6 @@ __KERNEL_RCSID(0, "$NetBSD: j6x0pwr.c,v 1.2 2003/10/19 02:23:51 uwe Exp $"); #define J6X0PWR_BATTERY_WARNING_THRESHOLD 200 -extern int adc_sample_channel(int); /* XXX: adcvar.h */ - struct j6x0pwr_softc { struct device sc_dev; @@ -163,7 +163,7 @@ j6x0pwr_poll_callout(void *self) pgdr = _reg_read_1(SH7709_PGDR); - /* just check main battery charge it not verbose and battery is in */ + /* just check main battery charge if not verbose and battery is in */ if (!j6x0pwr_poll_verbose) { if (pgdr & PGDR_MAIN_BATTERY_OUT) goto reschedule; diff --git a/sys/arch/hpcsh/dev/j6x0tp.c b/sys/arch/hpcsh/dev/j6x0tp.c index cdf6b08a7a78..ea26dd66477b 100644 --- a/sys/arch/hpcsh/dev/j6x0tp.c +++ b/sys/arch/hpcsh/dev/j6x0tp.c @@ -1,4 +1,4 @@ -/* $NetBSD: j6x0tp.c,v 1.1 2003/10/19 02:20:25 uwe Exp $ */ +/* $NetBSD: j6x0tp.c,v 1.2 2003/10/22 23:52:46 uwe Exp $ */ /* * Copyright (c) 2003 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: j6x0tp.c,v 1.1 2003/10/19 02:20:25 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: j6x0tp.c,v 1.2 2003/10/22 23:52:46 uwe Exp $"); #include #include @@ -54,6 +54,9 @@ __KERNEL_RCSID(0, "$NetBSD: j6x0tp.c,v 1.1 2003/10/19 02:20:25 uwe Exp $"); #include #include +#include + + #define J6X0TP_DEBUG #if 0 /* XXX: disabled in favor of local version that uses printf_nolog */ #define DPRINTF_ENABLE @@ -83,8 +86,6 @@ volatile int j6x0tp_debug = 0; #define ADC_CHANNEL_TP_Y 1 #define ADC_CHANNEL_TP_X 2 -extern int adc_sample_channel(int); /* XXX: adcvar.h */ - struct j6x0tp_softc { struct device sc_dev; diff --git a/sys/arch/sh3/dev/adc.c b/sys/arch/sh3/dev/adc.c index 1e4c41e44978..756a2b4a2ef2 100644 --- a/sys/arch/sh3/dev/adc.c +++ b/sys/arch/sh3/dev/adc.c @@ -1,4 +1,4 @@ -/* $NetBSD: adc.c,v 1.2 2003/10/19 02:22:56 uwe Exp $ */ +/* $NetBSD: adc.c,v 1.3 2003/10/22 23:52:46 uwe Exp $ */ /* * Copyright (c) 2003 Valeriy E. Ushakov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adc.c,v 1.2 2003/10/19 02:22:56 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adc.c,v 1.3 2003/10/22 23:52:46 uwe Exp $"); #include #include @@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: adc.c,v 1.2 2003/10/19 02:22:56 uwe Exp $"); #endif #include +#include #define ADC_(x) (*((volatile uint8_t *)SH7709_AD ## x)) @@ -57,8 +58,6 @@ CFATTACH_DECL(adc, sizeof(struct adc_softc), static int adc_search(struct device *, struct cfdata *, void *); static int adc_print(void *, const char *); -extern int adc_sample_channel(int); /* XXX: adcvar.h */ - static int adc_match(struct device *parent, struct cfdata *cfp, void *aux) diff --git a/sys/arch/sh3/dev/adcvar.h b/sys/arch/sh3/dev/adcvar.h new file mode 100644 index 000000000000..9f0ee63a124c --- /dev/null +++ b/sys/arch/sh3/dev/adcvar.h @@ -0,0 +1,35 @@ +/* $NetBSD: adcvar.h,v 1.1 2003/10/22 23:52:46 uwe Exp $ */ + +/* + * Copyright (c) 2003 Valeriy E. Ushakov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SH3_DEV_ADCVAR_H_ +#define _SH3_DEV_ADCVAR_H_ + +extern int adc_sample_channel(int); + +#endif /* _SH3_DEV_ADCVAR_H_ */