Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src adjust soekrisgpio driver to NetBSD
details: https://anonhg.NetBSD.org/src/rev/fdf59143fad8
branches: trunk
changeset: 787309:fdf59143fad8
user: kardel <kardel%NetBSD.org@localhost>
date: Mon Jun 10 07:14:01 2013 +0000
description:
adjust soekrisgpio driver to NetBSD
diffstat:
distrib/sets/lists/man/mi | 5 +-
doc/CHANGES | 4 +-
share/man/man4/gpio.4 | 3 +-
share/man/man4/isa.4 | 5 +-
share/man/man4/man4.x86/Makefile | 4 +-
share/man/man4/man4.x86/soekrisgpio.4 | 26 ++++--
sys/arch/amd64/conf/GENERIC | 7 +-
sys/arch/i386/conf/ALL | 7 +-
sys/arch/i386/conf/GENERIC | 7 +-
sys/dev/isa/files.isa | 7 +-
sys/dev/isa/soekrisgpio.c | 117 ++++++++++++++++++++-------------
11 files changed, 123 insertions(+), 69 deletions(-)
diffs (truncated from 506 to 300 lines):
diff -r 69de5144ec5f -r fdf59143fad8 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Mon Jun 10 06:41:58 2013 +0000
+++ b/distrib/sets/lists/man/mi Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1429 2013/06/09 18:40:50 christos Exp $
+# $NetBSD: mi,v 1.1430 2013/06/10 07:14:01 kardel Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -1910,6 +1910,7 @@
./usr/share/man/cat4/x86/mem.0 man-sys-catman .cat
./usr/share/man/cat4/x86/odcm.0 man-sys-catman .cat
./usr/share/man/cat4/x86/powernow.0 man-sys-catman .cat
+./usr/share/man/cat4/x86/soekrisgpio.0 man-sys-catman .cat
./usr/share/man/cat4/x86/tprof_pmi.0 man-sys-catman .cat
./usr/share/man/cat4/x86/tprof_amdpmi.0 man-sys-catman .cat
./usr/share/man/cat4/x86/vmt.0 man-sys-catman .cat
@@ -4795,6 +4796,7 @@
./usr/share/man/html4/x86/mem.html man-sys-htmlman html
./usr/share/man/html4/x86/odcm.html man-sys-htmlman html
./usr/share/man/html4/x86/powernow.html man-sys-htmlman html
+./usr/share/man/html4/x86/soekrisgpio.html man-sys-htmlman html
./usr/share/man/html4/x86/tprof_amdpmi.html man-sys-htmlman html
./usr/share/man/html4/x86/tprof_pmi.html man-sys-htmlman html
./usr/share/man/html4/x86/vmt.html man-sys-htmlman html
@@ -7610,6 +7612,7 @@
./usr/share/man/man4/x86/mem.4 man-sys-man .man
./usr/share/man/man4/x86/odcm.4 man-sys-man .man
./usr/share/man/man4/x86/powernow.4 man-sys-man .man
+./usr/share/man/man4/x86/soekrisgpio.4 man-sys-man .man
./usr/share/man/man4/x86/tprof_amdpmi.4 man-sys-man .man
./usr/share/man/man4/x86/tprof_pmi.4 man-sys-man .man
./usr/share/man/man4/x86/vmt.4 man-sys-man .man
diff -r 69de5144ec5f -r fdf59143fad8 doc/CHANGES
--- a/doc/CHANGES Mon Jun 10 06:41:58 2013 +0000
+++ b/doc/CHANGES Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1826 $>
+# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1827 $>
#
#
# [Note: This file does not mention every change made to the NetBSD source tree.
@@ -247,3 +247,5 @@
wm(4): Add support for I217 and I218 [msaitoh 20130602]
X11: Updated all Xorg packages that could be, for Xorg SA 2003-05-23,
and general. [mrg 20130605]
+ kernel: Add driver soekrisgpio for Soekris net6501
+ Ported by kardel@ from a patch for OpenBSD. [kardel 20130609]
diff -r 69de5144ec5f -r fdf59143fad8 share/man/man4/gpio.4
--- a/share/man/man4/gpio.4 Mon Jun 10 06:41:58 2013 +0000
+++ b/share/man/man4/gpio.4 Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpio.4,v 1.24 2012/12/16 13:13:35 mbalmer Exp $
+.\" $NetBSD: gpio.4,v 1.25 2013/06/10 07:14:01 kardel Exp $
.\" $OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $
.\"
.\" Copyright (c) 2004 Alexander Yurchenko <grange%openbsd.org@localhost>
@@ -29,6 +29,7 @@
.Cd "gpio* at gscpcib?"
.Cd "gpio* at ichlpcib?"
.Cd "gpio* at nsclpcsio?"
+.Cd "gpio* at soekrisgpio?"
.Cd "gpio* at ppbus?"
.Cd "gpio* at ptcd?"
.Pp
diff -r 69de5144ec5f -r fdf59143fad8 share/man/man4/isa.4
--- a/share/man/man4/isa.4 Mon Jun 10 06:41:58 2013 +0000
+++ b/share/man/man4/isa.4 Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: isa.4,v 1.42 2010/02/21 09:02:19 wiz Exp $
+.\" $NetBSD: isa.4,v 1.43 2013/06/10 07:14:01 kardel Exp $
.\"
.\" Copyright (c) 1997 Jason R. Thorpe. All rights reserved.
.\" Copyright (c) 1997 Jonathan Stone
@@ -271,6 +271,8 @@
AIMS Lab Radiotrack II FM radio.
.It sf2r
SoundForte RadioLink SF16-FMR2 FM radio.
+.It soekrisgpio
+Soekris net6501 GPIO and LEDs driver
.It tcic
Databook DB86082, DB86084, DB86184, and DB86072
.Tn PCMCIA
@@ -367,6 +369,7 @@
.Xr sb 4 ,
.Xr sea 4 ,
.Xr sf2r 4 ,
+.Xr soekrisgpio 4 ,
.Xr sm 4 ,
.Xr tcic 4 ,
.Xr tcom 4 ,
diff -r 69de5144ec5f -r fdf59143fad8 share/man/man4/man4.x86/Makefile
--- a/share/man/man4/man4.x86/Makefile Mon Jun 10 06:41:58 2013 +0000
+++ b/share/man/man4/man4.x86/Makefile Mon Jun 10 07:14:01 2013 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2012/01/04 16:25:17 yamt Exp $
+# $NetBSD: Makefile,v 1.14 2013/06/10 07:14:01 kardel Exp $
MAN= amdpcib.4 apic.4 balloon.4 coretemp.4 est.4 fdc.4 \
fwhrng.4 hpet.4 ichlpcib.4 lpt.4 mem.4 odcm.4 powernow.4 \
- tprof_amdpmi.4 tprof_pmi.4 vmt.4
+ soekrisgpio.4 tprof_amdpmi.4 tprof_pmi.4 vmt.4
MLINKS+=apic.4 ioapic.4 \
apic.4 lapic.4
diff -r 69de5144ec5f -r fdf59143fad8 share/man/man4/man4.x86/soekrisgpio.4
--- a/share/man/man4/man4.x86/soekrisgpio.4 Mon Jun 10 06:41:58 2013 +0000
+++ b/share/man/man4/man4.x86/soekrisgpio.4 Mon Jun 10 07:14:01 2013 +0000
@@ -1,6 +1,7 @@
-.\" $OpenBSD$
+.\" $NetBSD: soekrisgpio.4,v 1.2 2013/06/10 07:14:01 kardel Exp $
+.\" from OpenBSD
.\"
-.\" Copyright (c) 2013 Matt Dainty <matt@...>
+.\" Copyright (c) 2013 Matt Dainty <matt <at> bodgit-n-scarper.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -15,14 +16,14 @@
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate$
-.Dt SOEKRIS 4 amd64
+.Dt SOEKRIS 4 x86
.Os
.Sh NAME
-.Nm soekris
+.Nm soekrisgpio
.Nd Soekris net6501 GPIO and LEDs
.Sh SYNOPSIS
-.Cd "soekris0 at isa? port 0x680"
-.Cd "gpio* at soekris?"
+.Cd "soekrisgpio0 at isa? port 0x680"
+.Cd "gpio* at soekrisgpio?"
.Sh DESCRIPTION
The
.Nm
@@ -46,12 +47,17 @@
The
.Nm
driver first appeared in
-.Ox 5.3 .
+.Nx
+7.0 .
.Sh AUTHORS
The
.Nm
driver was written by
-.An Matt Dainty Aq matt@... .
+.An Matt Dainty Aq matt@...
+and imported from a patch for OpenBSD to
+.Nx
+by
+.An Frank Kardel Aq kardel%NetBSD.org@localhost .
.Sh BUGS
-If the Xilinx FPGA is programmed with a different bistream, the driver will
-likely not function.
+If the Xilinx FPGA is programmed with a different bitstream, the driver will
+likely not function.
\ No newline at end of file
diff -r 69de5144ec5f -r fdf59143fad8 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC Mon Jun 10 06:41:58 2013 +0000
+++ b/sys/arch/amd64/conf/GENERIC Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.377 2013/06/05 23:08:00 christos Exp $
+# $NetBSD: GENERIC,v 1.378 2013/06/10 07:14:01 kardel Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.377 $"
+#ident "GENERIC-$Revision: 1.378 $"
maxusers 64 # estimated number of users
@@ -532,6 +532,9 @@
# Pulsing GPIO pins in software
#gpiopwm* at gpio?
+# Soekris 6501 GPIO/LED driver (provides gpiobus, needs gpio)
+#soekrisgpio0 at isa? port 0x680
+
# SCSI Controllers and Devices
# PCI SCSI controllers
diff -r 69de5144ec5f -r fdf59143fad8 sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Mon Jun 10 06:41:58 2013 +0000
+++ b/sys/arch/i386/conf/ALL Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.359 2013/06/08 02:43:10 dholland Exp $
+# $NetBSD: ALL,v 1.360 2013/06/10 07:14:01 kardel Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.359 $"
+#ident "ALL-$Revision: 1.360 $"
maxusers 64 # estimated number of users
@@ -777,6 +777,9 @@
# Keylock support
gpiolock* at gpio?
+# Soekris 6501 GPIO/LED driver (provides gpiobus, needs gpio)
+soekrisgpio0 at isa? port 0x680
+
# SCSI Controllers and Devices
# PCI SCSI controllers
diff -r 69de5144ec5f -r fdf59143fad8 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Mon Jun 10 06:41:58 2013 +0000
+++ b/sys/arch/i386/conf/GENERIC Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1094 2013/06/05 23:08:01 christos Exp $
+# $NetBSD: GENERIC,v 1.1095 2013/06/10 07:14:01 kardel Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.1094 $"
+#ident "GENERIC-$Revision: 1.1095 $"
maxusers 64 # estimated number of users
@@ -732,6 +732,9 @@
# Software pulsing GPIO pins
gpiopwm* at gpio?
+# Soekris 6501 GPIO/LED driver (provides gpiobus, needs gpio)
+#soekrisgpio0 at isa? port 0x680
+
# SCSI Controllers and Devices
# PCI SCSI controllers
diff -r 69de5144ec5f -r fdf59143fad8 sys/dev/isa/files.isa
--- a/sys/dev/isa/files.isa Mon Jun 10 06:41:58 2013 +0000
+++ b/sys/dev/isa/files.isa Mon Jun 10 07:14:01 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.isa,v 1.162 2012/01/22 06:44:28 christos Exp $
+# $NetBSD: files.isa,v 1.163 2013/06/10 07:14:02 kardel Exp $
#
# Config file and device description for machine-independent ISA code.
# Included by ports that need it. Requires that the SCSI files be
@@ -527,6 +527,11 @@
attach tpm at isa with tpm_isa
file dev/isa/tpm_isa.c tpm_isa needs-flag
+# Soekris GPIO & LEDs driver
+device soekrisgpio: gpiobus
+attach soekrisgpio at isa
+file dev/isa/soekrisgpio.c soekrisgpio
+
#
# ISA Plug 'n Play autoconfiguration glue.
# THIS MUST COME AFTER ALL MI ISA DEVICES ARE DEFINED. This is because
diff -r 69de5144ec5f -r fdf59143fad8 sys/dev/isa/soekrisgpio.c
--- a/sys/dev/isa/soekrisgpio.c Mon Jun 10 06:41:58 2013 +0000
+++ b/sys/dev/isa/soekrisgpio.c Mon Jun 10 07:14:01 2013 +0000
@@ -1,6 +1,9 @@
-/* $OpenBSD$ */
+/* from $OpenBSD$ */
/*
+ * ported to NetBSD by Frank Kardel
+ * (http://permalink.gmane.org/gmane.os.openbsd.tech/31317)
+ *
* Copyright (c) 2013 Matt Dainty <matt <at> bodgit-n-scarper.com>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -20,18 +23,24 @@
* Soekris net6501 GPIO and LEDs as implemented by the onboard Xilinx FPGA
*/
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: soekrisgpio.c,v 1.2 2013/06/10 07:14:02 kardel Exp $");
+
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/types.h>
#include <sys/device.h>
-#include <sys/gpio.h>
-#include <machine/bus.h>
-#include <machine/intr.h>
+#include <sys/bus.h>
+#include <machine/autoconf.h>
#include <dev/isa/isavar.h>
+#include <sys/gpio.h>
Home |
Main Index |
Thread Index |
Old Index