Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Use adcvar.h.
details: https://anonhg.NetBSD.org/src/rev/a943d4ed4135
branches: trunk
changeset: 553918:a943d4ed4135
user: uwe <uwe%NetBSD.org@localhost>
date: Wed Oct 22 23:52:46 2003 +0000
description:
Use adcvar.h.
diffstat:
sys/arch/hpcsh/dev/j6x0pwr.c | 14 +++++++-------
sys/arch/hpcsh/dev/j6x0tp.c | 9 +++++----
sys/arch/sh3/dev/adc.c | 7 +++----
sys/arch/sh3/dev/adcvar.h | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 50 insertions(+), 15 deletions(-)
diffs (164 lines):
diff -r 5d8220471054 -r a943d4ed4135 sys/arch/hpcsh/dev/j6x0pwr.c
--- a/sys/arch/hpcsh/dev/j6x0pwr.c Wed Oct 22 23:50:47 2003 +0000
+++ b/sys/arch/hpcsh/dev/j6x0pwr.c Wed Oct 22 23:52:46 2003 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
#include <sys/kernel.h>
@@ -40,12 +40,14 @@
#include <sys/gmon.h>
#endif
+#include <machine/platid.h>
+#include <machine/platid_mask.h>
+
#include <sh3/exception.h>
#include <sh3/intcreg.h>
#include <sh3/pfcreg.h>
-#include <machine/platid.h>
-#include <machine/platid_mask.h>
+#include <sh3/dev/adcvar.h>
/* SH7709_PGDR bits pertinent to Jornada 6x0 power */
@@ -61,8 +63,6 @@
#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 @@
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 -r 5d8220471054 -r a943d4ed4135 sys/arch/hpcsh/dev/j6x0tp.c
--- a/sys/arch/hpcsh/dev/j6x0tp.c Wed Oct 22 23:50:47 2003 +0000
+++ b/sys/arch/hpcsh/dev/j6x0tp.c Wed Oct 22 23:52:46 2003 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
#include <sys/kernel.h>
@@ -54,6 +54,9 @@
#include <sh3/pfcreg.h>
#include <sh3/adcreg.h>
+#include <sh3/dev/adcvar.h>
+
+
#define J6X0TP_DEBUG
#if 0 /* XXX: disabled in favor of local version that uses printf_nolog */
#define DPRINTF_ENABLE
@@ -83,8 +86,6 @@
#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 -r 5d8220471054 -r a943d4ed4135 sys/arch/sh3/dev/adc.c
--- a/sys/arch/sh3/dev/adc.c Wed Oct 22 23:50:47 2003 +0000
+++ b/sys/arch/sh3/dev/adc.c Wed Oct 22 23:52:46 2003 +0000
@@ -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 <sys/cdefs.h>
-__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 <sys/param.h>
#include <sys/kernel.h>
@@ -40,6 +40,7 @@
#endif
#include <sh3/adcreg.h>
+#include <sh3/dev/adcvar.h>
#define ADC_(x) (*((volatile uint8_t *)SH7709_AD ## x))
@@ -57,8 +58,6 @@
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 -r 5d8220471054 -r a943d4ed4135 sys/arch/sh3/dev/adcvar.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/sh3/dev/adcvar.h Wed Oct 22 23:52:46 2003 +0000
@@ -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_ */
Home |
Main Index |
Thread Index |
Old Index