CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Sun Jun 14 22:30:44 UTC 2020 Modified Files: src/share/man/man4: mcp980x.4 Log Message: is -> are To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mcp980x.4 diff -u src/share/man/man4/mcp980x.4:1.6 src/share/man/man4/mcp980x.4:1.7 --- src/share/man/man4/mcp980x.4:1.6 Tue Jul 26 08:05:51 2016 +++ src/share/man/man4/mcp980x.4 Sun Jun 14 22:30:44 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: mcp980x.4,v 1.6 2016/07/26 08:05:51 rkujawa Exp $ +.\" $NetBSD: mcp980x.4,v 1.7 2020/06/14 22:30:44 rkujawa Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -71,7 +71,7 @@ The driver was written by .An Radoslaw Kujawa Aq Mt radoslaw.kuj...@gmail.com . .Sh CAVEATS -MCP9804 and MCP9805 chip are different and is supported by the +MCP9804 and MCP9805 chip are different and are supported by the .Xr sdtemp 4 driver. .Pp
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Sun Jun 14 22:30:44 UTC 2020 Modified Files: src/share/man/man4: mcp980x.4 Log Message: is -> are To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: rkujawa Date: Mon May 18 09:52:30 UTC 2020 Modified Files: src/sys/sys: scsiio.h Log Message: Remove misleading comment. I've successfully transferred 16-byte command. I've checked scsipi source and see no reason for this limitation. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/sys/scsiio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/scsiio.h diff -u src/sys/sys/scsiio.h:1.12 src/sys/sys/scsiio.h:1.13 --- src/sys/sys/scsiio.h:1.12 Sun Mar 4 06:03:41 2007 +++ src/sys/sys/scsiio.h Mon May 18 09:52:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: scsiio.h,v 1.12 2007/03/04 06:03:41 christos Exp $*/ +/* $NetBSD: scsiio.h,v 1.13 2020/05/18 09:52:30 rkujawa Exp $*/ #ifndef _SYS_SCSIIO_H_ #define _SYS_SCSIIO_H_ @@ -12,7 +12,7 @@ typedef struct scsireq { u_long flags; /* info about the request status and type */ u_long timeout; - u_char cmd[16]; /* 12 is actually the max */ + u_char cmd[16]; u_char cmdlen; void * databuf; /* address in user space of buffer */ u_long datalen; /* size of user buffer (request) */
CVS commit: src/sys/sys
Module Name:src Committed By: rkujawa Date: Mon May 18 09:52:30 UTC 2020 Modified Files: src/sys/sys: scsiio.h Log Message: Remove misleading comment. I've successfully transferred 16-byte command. I've checked scsipi source and see no reason for this limitation. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/sys/scsiio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Wed May 6 20:15:15 UTC 2020 Modified Files: src/share/man/man4: hdaudio.4 Log Message: Document the HDAUDIO_ENABLE_HDMI and HDAUDIO_ENABLE_DISPLAYPORT options. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/hdaudio.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/hdaudio.4 diff -u src/share/man/man4/hdaudio.4:1.15 src/share/man/man4/hdaudio.4:1.16 --- src/share/man/man4/hdaudio.4:1.15 Sun Feb 16 10:45:42 2020 +++ src/share/man/man4/hdaudio.4 Wed May 6 20:15:15 2020 @@ -1,4 +1,4 @@ -.\" $NetBSD: hdaudio.4,v 1.15 2020/02/16 10:45:42 jmcneill Exp $ +.\" $NetBSD: hdaudio.4,v 1.16 2020/05/06 20:15:15 rkujawa Exp $ .\" .\" Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -40,6 +40,8 @@ .Pp .Cd "options HDAUDIOVERBOSE" .Cd "options HDAUDIO_DEBUG" +.Cd "options HDAUDIO_ENABLE_DISPLAYPORT" +.Cd "options HDAUDIO_ENABLE_HDMI" .Cd "options HDAFG_DEBUG" .Sh DESCRIPTION The @@ -82,6 +84,13 @@ controls and configuring/discovering app By following the published mechanisms for common implementations of widget parsing, it is expected that nearly all High Definition Audio devices will be supported without requiring per-device quirks. +.Pp +The +.Dv HDAUDIO_ENABLE_DISPLAYPORT +and +.Dv HDAUDIO_ENABLE_HDMI +options enable support for DisplayPort and HDMI audio output, which is disabled +by default. .Sh HARDWARE In addition to many on-board sound cards included in mainboards, the following add-on card is supported:
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Wed May 6 20:15:15 UTC 2020 Modified Files: src/share/man/man4: hdaudio.4 Log Message: Document the HDAUDIO_ENABLE_HDMI and HDAUDIO_ENABLE_DISPLAYPORT options. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man4/hdaudio.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/share/man/man4
Sorry about that! Best regards, Radoslaw > On 27 Jul 2018, at 18:12, Andreas Gustafsson wrote: > > Module Name: src > Committed By: gson > Date: Fri Jul 27 16:12:40 UTC 2018 > > Modified Files: > src/share/man/man4: Makefile > > Log Message: > Add missing backslash to unbreak the build > > > To generate a diff of this commit: > cvs rdiff -u -r1.659 -r1.660 src/share/man/man4/Makefile > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. > > Modified files: > > Index: src/share/man/man4/Makefile > diff -u src/share/man/man4/Makefile:1.659 src/share/man/man4/Makefile:1.660 > --- src/share/man/man4/Makefile:1.659 Fri Jul 27 12:02:26 2018 > +++ src/share/man/man4/Makefile Fri Jul 27 16:12:40 2018 > @@ -1,4 +1,4 @@ > -#$NetBSD: Makefile,v 1.659 2018/07/27 12:02:26 rkujawa Exp $ > +#$NetBSD: Makefile,v 1.660 2018/07/27 16:12:40 gson Exp $ > # @(#)Makefile8.1 (Berkeley) 6/18/93 > > MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ > @@ -61,7 +61,7 @@ MAN=aac.4 ac97.4 acardide.4 aceride.4 a > sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 ss.4 \ > st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \ > svwsata.4 swsensor.4 swwdog.4 sysmon.4 \ > - tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 tea5767radio.4 termios.4 tfb.4 > + tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 tea5767radio.4 termios.4 tfb.4 \ > thinkpad.4 ti.4 tl.4 tlp.4 tlphy.4 tpm.4 tprof.4 tr.4 tra.4 \ > trm.4 tsllux.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \ > uark.4 ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \ >
CVS commit: src
Module Name:src Committed By: rkujawa Date: Fri Jul 27 12:02:26 UTC 2018 Modified Files: src/distrib/sets/lists/man: mi src/doc: CHANGES src/share/man/man4: Makefile src/sys/dev: DEVNAMES src/sys/dev/i2c: files.i2c Added Files: src/share/man/man4: tea5767radio.4 src/sys/dev/i2c: tea5767.c tea5767reg.h Log Message: Add TEA5767 FM radio driver. From Karuna Grewal. To generate a diff of this commit: cvs rdiff -u -r1.1601 -r1.1602 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.2414 -r1.2415 src/doc/CHANGES cvs rdiff -u -r1.658 -r1.659 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/tea5767radio.4 cvs rdiff -u -r1.311 -r1.312 src/sys/dev/DEVNAMES cvs rdiff -u -r1.93 -r1.94 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/tea5767.c src/sys/dev/i2c/tea5767reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1601 src/distrib/sets/lists/man/mi:1.1602 --- src/distrib/sets/lists/man/mi:1.1601 Tue Jul 24 15:29:05 2018 +++ src/distrib/sets/lists/man/mi Fri Jul 27 12:02:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1601 2018/07/24 15:29:05 christos Exp $ +# $NetBSD: mi,v 1.1602 2018/07/27 12:02:26 rkujawa Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1803,6 +1803,7 @@ ./usr/share/man/cat4/tcu.0 man-sys-catman .cat ./usr/share/man/cat4/tdfxdrm.0 man-sys-catman .cat ./usr/share/man/cat4/tdvfb.0 man-sys-catman .cat +./usr/share/man/cat4/tea5767radio.0 man-sys-catman .cat ./usr/share/man/cat4/termios.0 man-sys-catman .cat ./usr/share/man/cat4/tfb.0 man-sys-catman .cat ./usr/share/man/cat4/thinkpad.0 man-sys-catman .cat @@ -4875,6 +4876,7 @@ ./usr/share/man/html4/tcu.html man-sys-htmlman html ./usr/share/man/html4/tdfxdrm.html man-sys-htmlman html ./usr/share/man/html4/tdvfb.html man-sys-htmlman html +./usr/share/man/html4/tea5767radio.html man-sys-htmlman html ./usr/share/man/html4/termios.html man-sys-htmlman html ./usr/share/man/html4/tfb.html man-sys-htmlman html ./usr/share/man/html4/thinkpad.html man-sys-htmlman html @@ -7867,6 +7869,7 @@ ./usr/share/man/man4/tcu.4 man-sys-man .man ./usr/share/man/man4/tdfxdrm.4 man-sys-man .man ./usr/share/man/man4/tdvfb.4 man-sys-man .man +./usr/share/man/man4/tea5767radio.4 man-sys-man .man ./usr/share/man/man4/termios.4 man-sys-man .man ./usr/share/man/man4/tfb.4 man-sys-man .man ./usr/share/man/man4/thinkpad.4 man-sys-man .man Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2414 src/doc/CHANGES:1.2415 --- src/doc/CHANGES:1.2414 Tue Jul 24 07:59:46 2018 +++ src/doc/CHANGES Fri Jul 27 12:02:25 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2414 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2415 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -181,3 +181,6 @@ Changes from NetBSD 8.0 to NetBSD 9.0: arm: Add support for ARMv7 performance event monitoring with tprof(4). [jmcneill 20180715] dhcpcd: Import 7.0.7. [roy 20180724] + tea5767radio(4): Add Philips/NXP TEA5767 I2C-controlled stereo FM radio + driver. [rkujawa 20180727] + Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.658 src/share/man/man4/Makefile:1.659 --- src/share/man/man4/Makefile:1.658 Sun Jul 15 05:16:40 2018 +++ src/share/man/man4/Makefile Fri Jul 27 12:02:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.658 2018/07/15 05:16:40 maxv Exp $ +# $NetBSD: Makefile,v 1.659 2018/07/27 12:02:26 rkujawa Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -61,8 +61,8 @@ MAN= aac.4 ac97.4 acardide.4 aceride.4 a sm.4 smsh.4 sn.4 sony.4 spc.4 speaker.4 spif.4 sqphy.4 ss.4 \ st.4 ste.4 stge.4 sti.4 stpcide.4 sv.4 strip.4 \ svwsata.4 swsensor.4 swwdog.4 sysmon.4 \ - tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 termios.4 tfb.4 thinkpad.4 \ - ti.4 tl.4 tlp.4 tlphy.4 tpm.4 tprof.4 tr.4 tra.4 \ + tap.4 tc.4 tcds.4 tcp.4 tcu.4 tdvfb.4 tea5767radio.4 termios.4 tfb.4 + thinkpad.4 ti.4 tl.4 tlp.4 tlphy.4 tpm.4 tprof.4 tr.4 tra.4 \ trm.4 tsllux.4 tty.4 tun.4 tqphy.4 twa.4 twe.4 txp.4 \ uark.4 ubsec.4 udp.4 uep.4 ug.4 uha.4 uk.4 ukphy.4 unix.4 userconf.4 \ vald.4 valz.4 veriexec.4 vga.4 vge.4 viaide.4 video.4 vioif.4 viomb.4 \ Index: src/sys/dev/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.311 src/sys/dev/DEVNAMES:1.312 --- src/sys/dev/DEVNAMES:1.311 Tue Jun 5 08:03:29 2018 +++ src/sys/dev/DEVNAMES Fri Jul 27 12:02:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.311 2018/06/05 08:03:29 hkenken Exp $ +# $NetBSD: DEVNAMES,v 1.312 2018/07/27 12:02:26 rkujawa Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system
CVS commit: src
Module Name:src Committed By: rkujawa Date: Fri Jul 27 12:02:26 UTC 2018 Modified Files: src/distrib/sets/lists/man: mi src/doc: CHANGES src/share/man/man4: Makefile src/sys/dev: DEVNAMES src/sys/dev/i2c: files.i2c Added Files: src/share/man/man4: tea5767radio.4 src/sys/dev/i2c: tea5767.c tea5767reg.h Log Message: Add TEA5767 FM radio driver. From Karuna Grewal. To generate a diff of this commit: cvs rdiff -u -r1.1601 -r1.1602 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.2414 -r1.2415 src/doc/CHANGES cvs rdiff -u -r1.658 -r1.659 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/tea5767radio.4 cvs rdiff -u -r1.311 -r1.312 src/sys/dev/DEVNAMES cvs rdiff -u -r1.93 -r1.94 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/tea5767.c src/sys/dev/i2c/tea5767reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man9
Module Name:src Committed By: rkujawa Date: Mon Jul 9 10:36:30 UTC 2018 Modified Files: src/share/man/man9: radio.9 Log Message: Try to bring this man page up to NetBSD standards. This page is bad and we should feel bad about it. But perhaps now it is considerably less bad. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/radio.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man9/radio.9 diff -u src/share/man/man9/radio.9:1.4 src/share/man/man9/radio.9:1.5 --- src/share/man/man9/radio.9:1.4 Tue Dec 20 19:53:15 2005 +++ src/share/man/man9/radio.9 Mon Jul 9 10:36:30 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: radio.9,v 1.4 2005/12/20 19:53:15 rpaulo Exp $ +.\" $NetBSD: radio.9,v 1.5 2018/07/09 10:36:30 rkujawa Exp $ .\" $OpenBSD: radio.9,v 1.2 2001/10/08 08:52:50 mpech Exp $ .\" .\" Copyright (c) Maxim Tsyplakov @@ -24,77 +24,102 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 20, 2005 +.Dd July 9, 2018 .Dt RADIO 9 .Os .Sh NAME .Nm radio -.Nd interface between low and high level radio drivers +.Nd interface between low and high level FM radio drivers +.Sh SYNOPSIS +.In dev/radio_if.h +.Ft device_t +.Fo radio_attach_mi +.Fa "const struct radio_hw_if *rhwp" +.Fa "void *hdlp" +.Fa "device_t dev" +.Fc .Sh DESCRIPTION -The radio device driver is divided into a high level, -hardware independent layer, and a low level hardware -dependent layer. -The interface between these is the -.Va radio_hw_if -structure. -.Bd -literal -struct radio_hw_if { - int (*open)(void *, int, int, struct lwp *); - int (*close)(void *, int, int, struct lwp *); - int (*get_info)(void *, struct radio_info *); - int (*set_info)(void *, struct radio_info *); - int (*search)(void *, int); -}; -.Ed +The +.Nm +layer provides support for digitally programmable FM radio tuners. +.Pp +It is divided into a machine independent, high level part responsible for +managing device file, and low level hardware drivers. .Pp The high level radio driver attaches to the low level driver when the latter calls -.Va radio_attach_mi . -This call should be -.Bd -literal -void -radio_attach_mi(rhwp, hdlp, dev) - struct radio_hw_if *rhwp; - void *hdlp; - struct device *dev; -.Ed +.Fn radio_attach_mi . .Pp The -.Va radio_hw_if -struct is as shown above. +.Fa radio_hw_if +struct is contains pointers to functions provided by the low level driver. The -.Va hdlp -argument is a handle to some low level data structure. +.Fa hdlp +argument is a handle to a low level driver's softc structure. It is sent as the first argument to all the functions in -.Va radio_hw_if +.Fa radio_hw_if when the high level driver calls them. -.Va dev +.Fa dev is the device struct for the hardware device. .Pp The fields of -.Va radio_hw_if +.Fa radio_hw_if are described in some more detail below. .Bd -literal -int open (void *, int flags, int fmt, struct lwp *p); - Optional. - Is called when the radio device is opened. - Returns 0 on success, otherwise an error code. - -int close (void *, int flags, int fmt, struct lwp *p); - Optional. - Is called when the radio device is closed. - Returns 0 on success, otherwise an error code. - -int get_info (void *, struct radio_info *); - Fill the radio_info struct. - Returns 0 on success, otherwise an error code. - -int set_info (void *, struct radio_info *); - Set values from the radio_info struct. - Returns 0 on success, otherwise an error code. - -int search (void *, int); - Returns 0 on success, otherwise an error code. +struct radio_hw_if { + int (*open)(void *, int, int, struct lwp *); + int (*close)(void *, int, int, struct lwp *); + int (*get_info)(void *, struct radio_info *); + int (*set_info)(void *, struct radio_info *); + int (*search)(void *, int); +}; .Ed +.Pp +.Bl -tag -width +.It Fn (*open) "sc" "flags" "fmt" "lwp" +Called when the radio device is opened. +Optional, if there is no need to call a driver's function when device file is +opened, NULL should be passed in this field. +Returns 0 on success, otherwise an error code. +.It Fn (*close) "sc" "flags" "fmt" "lwp" +Called when the radio device is closed. +Optional, if there is no need to call a driver's function when device file is +closed, NULL should be passed in thie field. +Returns 0 on success, otherwise an error code. +.It Fn (*get_info) "sc" "ri" +Fills the radio_info struct. +This function is used to obtain the current state of a hardware device. +It is executed as a result of calling +.Dv RIOCGINFO +on a device file managed by the high level driver. +Returns 0 on success, otherwise an error code. +.It Fn (*set_info) "sc" "ri" +Set values from the radio_info struct. +This function is used to modify the current state of a hardware device
CVS commit: src/share/man/man9
Module Name:src Committed By: rkujawa Date: Mon Jul 9 10:36:30 UTC 2018 Modified Files: src/share/man/man9: radio.9 Log Message: Try to bring this man page up to NetBSD standards. This page is bad and we should feel bad about it. But perhaps now it is considerably less bad. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/radio.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Thu Jun 28 13:18:19 UTC 2018 Modified Files: src/share/man/man4: tps65217pmic.4 Log Message: Clarify caveats. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/tps65217pmic.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/tps65217pmic.4 diff -u src/share/man/man4/tps65217pmic.4:1.8 src/share/man/man4/tps65217pmic.4:1.9 --- src/share/man/man4/tps65217pmic.4:1.8 Sun Oct 16 05:25:52 2016 +++ src/share/man/man4/tps65217pmic.4 Thu Jun 28 13:18:19 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: tps65217pmic.4,v 1.8 2016/10/16 05:25:52 wiz Exp $ +.\" $NetBSD: tps65217pmic.4,v 1.9 2018/06/28 13:18:19 rkujawa Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 29, 2013 +.Dd June 28, 2018 .Dt TPS65217PMIC 4 .Os .Sh NAME @@ -81,10 +81,18 @@ White LED (backlight) support was added .Sh CAVEATS The driver can only report current voltage regulator settings. It can not measure the real voltage, as the TPS65217 chip lacks hardware to do -that. +that. Some boards allow voltage measurement by connecting the power output to +external sensor, or analog input of the MPU, but this is outside of the +scope of this driver. .Pp Modifying voltage regulator parameters from user space was deliberately left -unimplemented, as these parameters should only be set at the firmware level. +unimplemented, as these parameters should only be set at the firmware or +kernel level. Setting wrong parameters may result in permanent hardware damage. +.Pp +The +.Nm +driver offers a function that can be used to change the voltage from other +kernel components (currently used by AM335x support code). .Sh BUGS Battery and interrupt support is not implemented.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Thu Jun 28 13:18:19 UTC 2018 Modified Files: src/share/man/man4: tps65217pmic.4 Log Message: Clarify caveats. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/tps65217pmic.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Wed Jun 27 13:51:21 UTC 2018 Modified Files: src/share/man/man4: radio.4 Log Message: Note slurm(4) driver, improve history. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/radio.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Wed Jun 27 13:51:21 UTC 2018 Modified Files: src/share/man/man4: radio.4 Log Message: Note slurm(4) driver, improve history. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/share/man/man4/radio.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/radio.4 diff -u src/share/man/man4/radio.4:1.13 src/share/man/man4/radio.4:1.14 --- src/share/man/man4/radio.4:1.13 Mon Jul 3 21:30:58 2017 +++ src/share/man/man4/radio.4 Wed Jun 27 13:51:21 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: radio.4,v 1.13 2017/07/03 21:30:58 wiz Exp $ +.\" $NetBSD: radio.4,v 1.14 2018/06/27 13:51:21 rkujawa Exp $ .\" $RuOBSD: radio.4,v 1.4 2001/10/26 05:38:43 form Exp $ .\" $OpenBSD: radio.4,v 1.3 2001/12/05 10:58:54 mickey Exp $ .\" @@ -38,6 +38,7 @@ .Cd "radio* at rt?" .Cd "radio* at rtii?" .Cd "radio* at sf2r?" +.Cd "radio* at slurm?" .Cd "radio* at udsbr?" .Pp .In sys/types.h @@ -175,5 +176,9 @@ and .Sh AUTHORS The .Nm -driver was written by Vladimir Popov and Maxim Tsyplakov. +driver was written by Vladimir Popov and Maxim Tsyplakov for +.Ox +and ported to +.Nx +by Lennart Augustsson. The man page was written by Vladimir Popov.
Re: CVS commit: src/share/man/man4/man4.macppc
Hi. > +.An Tsubai Masanari Aq Mt tsu...@netbsd.org Tsubai is inactive, according to status file his account is suspended. Will anyone be able to reach him via this address? If not, then I am not sure if retroactively adding his address makes sense. Best regards, Radoslaw signature.asc Description: Message signed with OpenPGP
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: rkujawa Date: Wed Oct 4 09:44:09 UTC 2017 Modified Files: src/sys/arch/amiga/dev: mntva.c mntvareg.h mntvavar.h zbus.c Log Message: Update driver to support firmware v1.5+. >From Lukas F. Hartmann. With hopeful style fixes from me. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/mntva.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/dev/mntvareg.h \ src/sys/arch/amiga/dev/mntvavar.h cvs rdiff -u -r1.74 -r1.75 src/sys/arch/amiga/dev/zbus.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/arch/amiga/dev/mntva.c diff -u src/sys/arch/amiga/dev/mntva.c:1.2 src/sys/arch/amiga/dev/mntva.c:1.3 --- src/sys/arch/amiga/dev/mntva.c:1.2 Sun Oct 23 18:40:52 2016 +++ src/sys/arch/amiga/dev/mntva.c Wed Oct 4 09:44:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mntva.c,v 1.2 2016/10/23 18:40:52 phx Exp $ */ +/* $NetBSD: mntva.c,v 1.3 2017/10/04 09:44:09 rkujawa Exp $ */ /* * Copyright (c) 2012, 2016 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mntva.c,v 1.2 2016/10/23 18:40:52 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mntva.c,v 1.3 2017/10/04 09:44:09 rkujawa Exp $"); #include #include @@ -147,7 +147,7 @@ mntva_attach(device_t parent, device_t s sc->sc_isconsole = true; #endif /* MNTVA_CONSOLE */ - printf(": MNTMN VA2000"); + printf(": MNT VA2000"); if(sc->sc_isconsole) printf(" (console)"); @@ -161,16 +161,16 @@ mntva_attach(device_t parent, device_t s sc->sc_bst.absm = _bus_stride_1; sc->sc_iot = >sc_bst; - if (bus_space_map(sc->sc_iot, MNTVA_OFF_FB, sc->sc_memsize + 0x1000, - BUS_SPACE_MAP_LINEAR, >sc_fbh)) { - aprint_error_dev(sc->sc_dev, "mapping framebuffer failed\n"); - return; - } if (bus_space_map(sc->sc_iot, MNTVA_OFF_REG, MNTVA_REG_SIZE , 0, >sc_regh)) { aprint_error_dev(sc->sc_dev, "mapping registers failed\n"); return; } + if (bus_space_map(sc->sc_iot, MNTVA_OFF_FB, sc->sc_memsize, + BUS_SPACE_MAP_LINEAR, >sc_fbh)) { + aprint_error_dev(sc->sc_dev, "mapping framebuffer failed\n"); + return; + } sc->sc_regpa = (bus_addr_t) kvtop((void*) sc->sc_regh); sc->sc_fbpa = (bus_addr_t) kvtop((void*) sc->sc_fbh); @@ -223,13 +223,13 @@ mntva_attach(device_t parent, device_t s sc->sc_defaultscreen_descr.ncols = ri->ri_cols; wsdisplay_cnattach(>sc_defaultscreen_descr, ri, 0, 0, -defattr); + defattr); vcons_replay_msgbuf(>sc_console_screen); } else { - if (sc->sc_console_screen.scr_ri.ri_rows == 0) { + if (sc->sc_console_screen.scr_ri.ri_rows == 0) vcons_init_screen(>vd, >sc_console_screen, 1, - ); - } else + ); + else (*ri->ri_ops.allocattr)(ri, 0, 0, 0, ); } @@ -298,9 +298,25 @@ mntva_init_screen(void *cookie, struct v static bool mntva_mode_set(struct mntva_softc *sc) { + mntva_reg_write(sc, MNTVA_CAPTURE_MODE, 0); + + mntva_reg_write(sc, MNTVA_H_SYNC_START, 1390); + mntva_reg_write(sc, MNTVA_H_SYNC_END, 1430); + mntva_reg_write(sc, MNTVA_H_MAX, 1650); + mntva_reg_write(sc, MNTVA_V_SYNC_START, 725); + mntva_reg_write(sc, MNTVA_V_SYNC_END, 730); + mntva_reg_write(sc, MNTVA_V_MAX, 750); + mntva_reg_write(sc, MNTVA_PIXEL_CLK_SEL, MNTVA_CLK_75MHZ); + mntva_reg_write(sc, MNTVA_SCALEMODE, 0); mntva_reg_write(sc, MNTVA_SCREENW, sc->sc_width); mntva_reg_write(sc, MNTVA_SCREENH, sc->sc_height); + mntva_reg_write(sc, MNTVA_ROW_PITCH, 2048); + mntva_reg_write(sc, MNTVA_ROW_PITCH_SHIFT, 11); + mntva_reg_write(sc, MNTVA_BLITTER_ROW_PITCH, 2048); + mntva_reg_write(sc, MNTVA_BLITTER_ROW_PITCH_SHIFT, 11); + mntva_reg_write(sc, MNTVA_MARGIN_X, 8); + mntva_reg_write(sc, MNTVA_SAFE_X, 0x50); if (sc->sc_bpp == 8) mntva_reg_write(sc, MNTVA_COLORMODE, MNTVA_COLORMODE8); @@ -314,9 +330,6 @@ mntva_mode_set(struct mntva_softc *sc) mntva_reg_write(sc, MNTVA_BLITTERBASEHI, 0); mntva_reg_write(sc, MNTVA_BLITTERBASELO, 0); - /* XXX: should rectfill with bg color taken from wscons? */ - mntva_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height, 0x); - return true; } @@ -577,7 +590,7 @@ mntva_mmap(void *v, void *vs, off_t offs if (offset >= 0 && offset < sc->sc_memsize) { pa = bus_space_mmap(sc->sc_iot, sc->sc_fbpa, offset, prot, - BUS_SPACE_MAP_LINEAR); + BUS_SPACE_MAP_LINEAR); return pa; } Index: src/sys/arch/amiga/dev/mntvareg.h diff -u src/sys/arch/amiga/dev/mntvareg.h:1.1 src/sys/arch/amiga/dev/mntvareg.h:1.2 --- src/sys/arch/amiga/dev/mntvareg.h:1.1 Mon Oct 3 14:26:02 2016 +++ src/sys/arch/amiga/dev/mntvareg.h Wed Oct 4 09:44:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: mntvareg.h,v 1.1 2016/10/03 14:26:02 rkujawa Exp $ */ +/* $NetBSD: mntvareg.h,v 1.2 2017/10/04 09:44:09 rkujawa Exp $ */ /* * Copyright (c) 2012, 2016 The NetBSD Foundation, Inc. @@ -34,10 +34,10 @@ #define MNTVA2000REG_H /* address space */ -#define MNTVA_OFF_REG 0x5f /*
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: rkujawa Date: Wed Oct 4 09:44:09 UTC 2017 Modified Files: src/sys/arch/amiga/dev: mntva.c mntvareg.h mntvavar.h zbus.c Log Message: Update driver to support firmware v1.5+. >From Lukas F. Hartmann. With hopeful style fixes from me. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/mntva.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/dev/mntvareg.h \ src/sys/arch/amiga/dev/mntvavar.h cvs rdiff -u -r1.74 -r1.75 src/sys/arch/amiga/dev/zbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Sat Oct 15 19:51:48 UTC 2016 Modified Files: src/share/man/man4: tps65217pmic.4 Log Message: Note improvements by mbouyer and kiyohara. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/tps65217pmic.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/tps65217pmic.4 diff -u src/share/man/man4/tps65217pmic.4:1.6 src/share/man/man4/tps65217pmic.4:1.7 --- src/share/man/man4/tps65217pmic.4:1.6 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/tps65217pmic.4 Sat Oct 15 19:51:48 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: tps65217pmic.4,v 1.6 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: tps65217pmic.4,v 1.7 2016/10/15 19:51:48 rkujawa Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -74,13 +74,17 @@ The .Nm driver was written by .An Radoslaw Kujawa Aq Mt radoslaw.kuj...@gmail.com . +Voltage change callback for AM335x was added by +.An Manuel Bouyer . +White LED (backlight) support was added by +.An KIYOHARA Takashi . .Sh CAVEATS The driver can only report current voltage regulator settings. It can not measure the real voltage, as the TPS65217 chip lacks hardware to do that. .Pp -Modifying voltage regulator parameters was deliberately left unimplemented, as -these parameters should only be set at the firmware level. +Modifying voltage regulator parameters from user space was deliberately left +unimplemented, as these parameters should only be set at the firmware level. Setting wrong parameters may result in permanent hardware damage. .Sh BUGS -Battery, interrupt and WLED (backlight) support is not implemented. +Battery and interrupt support is not implemented.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Sat Oct 15 19:51:48 UTC 2016 Modified Files: src/share/man/man4: tps65217pmic.4 Log Message: Note improvements by mbouyer and kiyohara. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/tps65217pmic.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Mon Oct 3 21:36:33 UTC 2016 Modified Files: src/doc: CHANGES Log Message: Note mntva(4). To generate a diff of this commit: cvs rdiff -u -r1.2190 -r1.2191 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2190 src/doc/CHANGES:1.2191 --- src/doc/CHANGES:1.2190 Mon Oct 3 20:31:44 2016 +++ src/doc/CHANGES Mon Oct 3 21:36:32 2016 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2190 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2191 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -370,3 +370,6 @@ Changes from NetBSD 7.0 to NetBSD 8.0: libc: Add and . [kamil 20161002] c11: Import cc(1) wrapper for C11. [kamil 20161003] libc: Add the C11 static_assert macro in . [kamil 20161003] + mntva(4): Add driver for MNTMN VA2000 FPGA-based graphics card for + Amiga computers with Zorro slot. Supports accelerated wsdisplay + console and wsfb-based X11. [rkujawa 20161003]
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Mon Oct 3 21:36:33 UTC 2016 Modified Files: src/doc: CHANGES Log Message: Note mntva(4). To generate a diff of this commit: cvs rdiff -u -r1.2190 -r1.2191 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Mon Oct 3 18:59:41 UTC 2016 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add mntva(4) man page to dist list. To generate a diff of this commit: cvs rdiff -u -r1.1535 -r1.1536 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Mon Oct 3 18:59:41 UTC 2016 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add mntva(4) man page to dist list. To generate a diff of this commit: cvs rdiff -u -r1.1535 -r1.1536 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1535 src/distrib/sets/lists/man/mi:1.1536 --- src/distrib/sets/lists/man/mi:1.1535 Sun Oct 2 23:14:19 2016 +++ src/distrib/sets/lists/man/mi Mon Oct 3 18:59:41 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1535 2016/10/02 23:14:19 jdolecek Exp $ +# $NetBSD: mi,v 1.1536 2016/10/03 18:59:41 rkujawa Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -817,6 +817,7 @@ ./usr/share/man/cat4/amiga/mem.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/mfcs.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/mgnsc.0 man-sys-catman .cat +./usr/share/man/cat4/amiga/mntva.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/mppb.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/p5membar.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/p5pb.0 man-sys-catman .cat @@ -3943,6 +3944,7 @@ ./usr/share/man/html4/amiga/mem.html man-sys-htmlman html ./usr/share/man/html4/amiga/mfcs.html man-sys-htmlman html ./usr/share/man/html4/amiga/mgnsc.html man-sys-htmlman html +./usr/share/man/html4/amiga/mntva.html man-sys-htmlman html ./usr/share/man/html4/amiga/mppb.html man-sys-htmlman html ./usr/share/man/html4/amiga/p5membar.html man-sys-htmlman html ./usr/share/man/html4/amiga/p5pb.html man-sys-htmlman html @@ -6765,6 +6767,7 @@ ./usr/share/man/man4/amiga/mem.4 man-sys-man .man ./usr/share/man/man4/amiga/mfcs.4 man-sys-man .man ./usr/share/man/man4/amiga/mgnsc.4 man-sys-man .man +./usr/share/man/man4/amiga/mntva.4 man-sys-man .man ./usr/share/man/man4/amiga/mppb.4 man-sys-man .man ./usr/share/man/man4/amiga/p5membar.4 man-sys-man .man ./usr/share/man/man4/amiga/p5pb.4 man-sys-man .man
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Mon Oct 3 18:57:54 UTC 2016 Modified Files: src/share/man/man4/man4.amiga: Makefile Added Files: src/share/man/man4/man4.amiga: mntva.4 Log Message: Add man page for mntva(4). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/man4.amiga/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/mntva.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Mon Oct 3 18:57:54 UTC 2016 Modified Files: src/share/man/man4/man4.amiga: Makefile Added Files: src/share/man/man4/man4.amiga: mntva.4 Log Message: Add man page for mntva(4). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/man4.amiga/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/mntva.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.amiga/Makefile diff -u src/share/man/man4/man4.amiga/Makefile:1.30 src/share/man/man4/man4.amiga/Makefile:1.31 --- src/share/man/man4/man4.amiga/Makefile:1.30 Tue Dec 24 12:07:16 2013 +++ src/share/man/man4/man4.amiga/Makefile Mon Oct 3 18:57:54 2016 @@ -1,12 +1,12 @@ # from: @(#)Makefile 8.2 (Berkeley) 2/16/94 -# $NetBSD: Makefile,v 1.30 2013/12/24 12:07:16 rkujawa Exp $ +# $NetBSD: Makefile,v 1.31 2016/10/03 18:57:54 rkujawa Exp $ MAN= a1k2cp.4 acafh.4 afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 \ console.4 bah.4 bppcsc.4 clockport.4 cv3dpb.4 ed.4 efa.4 em4k.4 empb.4 \ es.4 fdc.4 grf.4 \ grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \ - gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 mppb.4 p5membar.4 p5pb.4 \ - qn.4 ser.4 wesc.4 xsh.4 xsurf.4 z3rambd.4 zssc.4 + gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 mntva.4 mppb.4 p5membar.4 \ + p5pb.4 qn.4 ser.4 wesc.4 xsh.4 xsurf.4 z3rambd.4 zssc.4 MLINKS= mem.4 kmem.4 MANSUBDIR=/amiga Added files: Index: src/share/man/man4/man4.amiga/mntva.4 diff -u /dev/null src/share/man/man4/man4.amiga/mntva.4:1.1 --- /dev/null Mon Oct 3 18:57:54 2016 +++ src/share/man/man4/man4.amiga/mntva.4 Mon Oct 3 18:57:54 2016 @@ -0,0 +1,75 @@ +.\" $NetBSD: mntva.4,v 1.1 2016/10/03 18:57:54 rkujawa Exp $ +.\" +.\" Copyright (c) 2016 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Radoslaw Kujawa. +.\" +.\" 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``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 FOUNDATION OR CONTRIBUTORS +.\" 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. +.\" +.Dd October 3, 2016 +.Dt MNTVA 4 amiga +.Os +.Sh NAME +.Nm mntva +.Nd MNTMN VA2000 graphics card driver +.Sh SYNOPSIS +.Cd "mntva* at zbus0" +.Cd "options MNTVA_CONSOLE" +.Sh DESCRIPTION +The +.Nm +driver provides support for the MNTMN VA2000 graphics card and provides an +interface for the machine independent +.Xr wscons 4 +driver. +.Pp +VA2000 integrated blitter engine is used to accelerate some of the text mode +drawing operations, like copying rows and columns. +.Pp +X11 server is supported via the wsfb driver. +.Sh SEE ALSO +.Xr wsdisplay 4 , +.Xr wscons 4 +.Sh HISTORY +The +.Nm +device first appeared in +.Nx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Lukas F. Hartmann Aq Mt lu...@mnt.mn +and +.An Radoslaw Kujawa Aq Mt radoslaw.kuj...@gmail.com . +.Sh CAVEATS +There is no way to detect whether the card is used as a console. +Therefore, the user has to explicitely set +.Dv MNTVA_CONSOLE +option in the kernel config file. +.Pp +Currently, the video mode is hard-coded to 1280x720 at 16 bpp. +.Sh BUGS +None known.
CVS commit: src/sys/arch/amiga
6 22:58:24 rkujawa Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zbus.c,v 1.74 2016/10/03 14:26:02 rkujawa Exp $"); #include #include @@ -192,7 +192,9 @@ static const struct aconfdata aconftab[] { "hyper4+", 5001, 6}, /* Hypercom4+ */ { "hyper3+", 5001, 7}, /* Hypercom3+ */ /* Matay Grzegorz Kraszewski */ - { "mppb", 44359, 1} /* Prometheus PCI bridge */ + { "mppb", 44359, 1}, /* Prometheus PCI bridge */ + /* MNTMN */ + { "mntva", 28014, 1} /* MNTMN VA2000 */ }; static int naconfent = sizeof(aconftab) / sizeof(struct aconfdata); @@ -226,6 +228,7 @@ static struct preconfdata preconftab[] = {2167, 3, 0}, /* Domino regs (proto 16M) */ {2181, 0, 0}, /* oMniBus mem or regs */ {8512, 67, 0} /* Cybervison 64/3D */ /* grf7 */ +/* {28014, 1, 0} // MNTMN VA2000 */ }; static int npreconfent = sizeof(preconftab) / sizeof(struct preconfdata); Added files: Index: src/sys/arch/amiga/dev/mntva.c diff -u /dev/null src/sys/arch/amiga/dev/mntva.c:1.1 --- /dev/null Mon Oct 3 14:26:02 2016 +++ src/sys/arch/amiga/dev/mntva.c Mon Oct 3 14:26:02 2016 @@ -0,0 +1,623 @@ +/* $NetBSD: mntva.c,v 1.1 2016/10/03 14:26:02 rkujawa Exp $ */ + +/* + * Copyright (c) 2012, 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Lukas F. Hartmann. + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * 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. + * + * 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. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: mntva.c,v 1.1 2016/10/03 14:26:02 rkujawa Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include "opt_amigacons.h" +#include "opt_wsemul.h" +#include "opt_mntva.h" +#include "opt_wsfb.h" + +#include "mntva.h" + +/* #define MNTVA_DEBUG 1 */ + +static int mntva_match(device_t, cfdata_t, void *); +static void mntva_attach(device_t, device_t, void *); + +static uint16_t mntva_reg_read(struct mntva_softc *sc, uint32_t reg); +static void mntva_reg_write(struct mntva_softc *sc, uint32_t reg, uint32_t val); + +static bool mntva_mode_set(struct mntva_softc *sc); + +static paddr_t mntva_mmap(void *v, void *vs, off_t offset, int prot); +static int mntva_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, +struct lwp *l); +static void mntva_init_screen(void *cookie, struct vcons_screen *scr, +int existing, long *defattr); +static void mntva_init_palette(struct mntva_softc *sc); +/* blitter support */ +static void mntva_rectfill(struct mntva_softc *sc, int x, int y, int wi, +int he, uint32_t color); +static void mntva_bitblt(struct mntva_softc *sc, int xs, int ys, int xd, +int yd, int wi, int he); + +/* accelerated raster ops */ +static void mntva_eraserows(void *cookie, int row, int nrows, long fillattr); +static void mntva_copyrows(void *cookie, int srcrow, int dstrow, int nrows); +static void mntva_copycols(void *cookie, int row, int srccol, int dstcol, +int ncols); +static void mntva_erasecols(void *cookie, int row, int startcol, int ncols, +long fillattr); +#if 0 +static void mntva_cursor(void *cookie, int on, int row, int col); +#endif + +/* + * XXX: these will be called by console handling code, shouldn't they be + * included from somewhere else? + */ +void mntvacninit(struct consdev *cd); +void mntvacnprobe(struct consdev *cd); +void mntvacnputc(dev_t cd, int ch); +int mntvacngetc(dev_t cd); +void mntvacnpollc(dev_t cd, int on); + +CFATTACH_DECL_NEW(mntva, sizeof(struct mntva_softc), +mntva_match, mntva_attach, NULL,
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Mon Oct 3 14:26:02 UTC 2016 Modified Files: src/sys/arch/amiga/amiga: conf.c src/sys/arch/amiga/conf: WSCONS files.amiga src/sys/arch/amiga/dev: zbus.c Added Files: src/sys/arch/amiga/dev: mntva.c mntvareg.h mntvavar.h Log Message: Add a driver for MNTMN VA2000. Supports accelerated wsdisplay console and running X via wsfb driver. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/amiga/amiga/conf.c cvs rdiff -u -r1.69 -r1.70 src/sys/arch/amiga/conf/WSCONS cvs rdiff -u -r1.177 -r1.178 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/dev/mntva.c \ src/sys/arch/amiga/dev/mntvareg.h src/sys/arch/amiga/dev/mntvavar.h cvs rdiff -u -r1.73 -r1.74 src/sys/arch/amiga/dev/zbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Jul 26 08:05:51 UTC 2016 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Note MCP9804 now also supported by sdtemp(4) - thx msaitoh. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mcp980x.4 diff -u src/share/man/man4/mcp980x.4:1.5 src/share/man/man4/mcp980x.4:1.6 --- src/share/man/man4/mcp980x.4:1.5 Tue Oct 15 14:51:58 2013 +++ src/share/man/man4/mcp980x.4 Tue Jul 26 08:05:51 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: mcp980x.4,v 1.5 2013/10/15 14:51:58 rkujawa Exp $ +.\" $NetBSD: mcp980x.4,v 1.6 2016/07/26 08:05:51 rkujawa Exp $ .\" .\" Copyright (c) 2013 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 15, 2013 +.Dd July 26, 2016 .Dt MCP980X 4 .Os .Sh NAME @@ -71,7 +71,7 @@ The driver was written by .An Radoslaw Kujawa Aq Mt radoslaw.kuj...@gmail.com . .Sh CAVEATS -MCP9805 chip is different and is supported by the +MCP9804 and MCP9805 chip are different and is supported by the .Xr sdtemp 4 driver. .Pp
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Jul 26 08:05:51 UTC 2016 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Note MCP9804 now also supported by sdtemp(4) - thx msaitoh. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/mips
Module Name:src Committed By: rkujawa Date: Sun Jun 19 10:49:34 UTC 2016 Modified Files: src/sys/arch/mips: README.models Log Message: Link to the list of MIPS Computer Systems, Inc. machines. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/README.models Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/README.models diff -u src/sys/arch/mips/README.models:1.4 src/sys/arch/mips/README.models:1.5 --- src/sys/arch/mips/README.models:1.4 Sat Jun 18 13:09:20 2016 +++ src/sys/arch/mips/README.models Sun Jun 19 10:49:34 2016 @@ -1,4 +1,4 @@ -# $NetBSD: README.models,v 1.4 2016/06/18 13:09:20 maya Exp $ +# $NetBSD: README.models,v 1.5 2016/06/19 10:49:34 rkujawa Exp $ MIPS models and architecture levels --- @@ -106,8 +106,7 @@ bi-endian but are wired up one way or th hpcmips (big-endian [buildsh]) see http://wiki.netbsd.org/ports/hpcmips/processor_comparison/ mipsco (big-endian [buildsh]) - Mips Magnum 3000 Workstation ?? - Mips 3230 Server ?? + Various MIPS Computer Systems, Inc. see [mipscolist] Bull DPX/Prostation M-20 ?? newsmips (big-endian [buildsh]) NWS-3470DR3000 (MIPS-I) [portpage] @@ -285,3 +284,7 @@ References: [portpage] The port page for this NetBSD port on wiki.netbsd.org, or a subpage. Ideally these references should be replaced with something less self-referential. + +[mipscolist] List of MIPS Computer Systems, Inc. machines hosted on the + NetBSD web server: https://www.netbsd.org/ports/mipsco/models.html +
CVS commit: src/sys/arch/mips
Module Name:src Committed By: rkujawa Date: Sun Jun 19 10:49:34 UTC 2016 Modified Files: src/sys/arch/mips: README.models Log Message: Link to the list of MIPS Computer Systems, Inc. machines. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/README.models Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
Hi Frank. > On 04 Nov 2015, at 18:06, Frank Willewrote: > > Module Name: src > Committed By: phx > Date: Wed Nov 4 17:06:23 UTC 2015 > > Modified Files: > src/distrib/sets/lists/xdebug: md.amiga > src/distrib/sets/lists/xserver: md.amiga > src/external/mit/xorg/server/drivers: Makefile > src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile > src/share/mk: bsd.own.mk > > Log Message: > Build a wsfb Xorg server for amiga. Does this result in a working X11 on NetBSD/amiga for cards which support wsdisplay? Best regards, Radoslaw signature.asc Description: Message signed with OpenPGP using GPGMail
CVS commit: src
Module Name:src Committed By: rkujawa Date: Sun Aug 23 19:09:02 UTC 2015 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man4: Makefile Added Files: src/share/man/man4: mcp48x1dac.4 Log Message: Add man page for mcp48x1dac driver. To generate a diff of this commit: cvs rdiff -u -r1.1506 -r1.1507 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.621 -r1.622 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/mcp48x1dac.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1506 src/distrib/sets/lists/man/mi:1.1507 --- src/distrib/sets/lists/man/mi:1.1506 Sun Aug 23 18:28:40 2015 +++ src/distrib/sets/lists/man/mi Sun Aug 23 19:09:02 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1506 2015/08/23 18:28:40 mrg Exp $ +# $NetBSD: mi,v 1.1507 2015/08/23 19:09:02 rkujawa Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -1392,6 +1392,7 @@ ./usr/share/man/cat4/mcd.0 man-sys-catman .cat ./usr/share/man/cat4/mcp23s17gpio.0 man-sys-catman .cat ./usr/share/man/cat4/mcp3kadc.0 man-sys-catman .cat +./usr/share/man/cat4/mcp48x1dac.0 man-sys-catman .cat ./usr/share/man/cat4/mcp980x.0 man-sys-catman .cat ./usr/share/man/cat4/md.0 man-sys-catman .cat ./usr/share/man/cat4/mfb.0 man-sys-catman .cat @@ -4417,6 +4418,7 @@ ./usr/share/man/html4/mcd.html man-sys-htmlman html ./usr/share/man/html4/mcp23s17gpio.html man-sys-htmlman html ./usr/share/man/html4/mcp3kadc.html man-sys-htmlman html +./usr/share/man/html4/mcp48x1dac.html man-sys-htmlman html ./usr/share/man/html4/mcp980x.html man-sys-htmlman html ./usr/share/man/html4/md.html man-sys-htmlman html ./usr/share/man/html4/mfb.html man-sys-htmlman html @@ -7292,6 +7294,7 @@ ./usr/share/man/man4/mcd.4 man-sys-man .man ./usr/share/man/man4/mcp23s17gpio.4 man-sys-man .man ./usr/share/man/man4/mcp3kadc.4 man-sys-man .man +./usr/share/man/man4/mcp48x1dac.4 man-sys-man .man ./usr/share/man/man4/mcp980x.4 man-sys-man .man ./usr/share/man/man4/md.4 man-sys-man .man ./usr/share/man/man4/mfb.4 man-sys-man .man Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.621 src/share/man/man4/Makefile:1.622 --- src/share/man/man4/Makefile:1.621 Tue Aug 18 15:54:20 2015 +++ src/share/man/man4/Makefile Sun Aug 23 19:09:02 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.621 2015/08/18 15:54:20 phx Exp $ +# $NetBSD: Makefile,v 1.622 2015/08/23 19:09:02 rkujawa Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -127,7 +127,7 @@ MAN+= dbcool.4 g760a.4 lmenv.4 lmtemp.4 smscmon.4 spdmem.4 tps65217pmic.4 # machine-independent SPI devices -MAN += m25p.4 mcp23s17gpio.4 mcp3kadc.4 tm121temp.4 +MAN += m25p.4 mcp23s17gpio.4 mcp3kadc.4 mcp48x1dac.4 tm121temp.4 # machine-independent SD/MMC devices MAN += sbt.4 sdhc.4 sdmmc.4 Added files: Index: src/share/man/man4/mcp48x1dac.4 diff -u /dev/null src/share/man/man4/mcp48x1dac.4:1.1 --- /dev/null Sun Aug 23 19:09:02 2015 +++ src/share/man/man4/mcp48x1dac.4 Sun Aug 23 19:09:02 2015 @@ -0,0 +1,103 @@ +.\ $NetBSD: mcp48x1dac.4,v 1.1 2015/08/23 19:09:02 rkujawa Exp $ +.\ +.\ Copyright (c) 2015 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ This code is derived from software contributed to The NetBSD Foundation +.\ by Radoslaw Kujawa. +.\ This code is derived from software contributed to The NetBSD Foundation +.\ by Frank Wille. +.\ +.\ 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. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``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 FOUNDATION OR CONTRIBUTORS +.\ 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. +.\ +.Dd August 23
CVS commit: src
Module Name:src Committed By: rkujawa Date: Sun Aug 23 19:09:02 UTC 2015 Modified Files: src/distrib/sets/lists/man: mi src/share/man/man4: Makefile Added Files: src/share/man/man4: mcp48x1dac.4 Log Message: Add man page for mcp48x1dac driver. To generate a diff of this commit: cvs rdiff -u -r1.1506 -r1.1507 src/distrib/sets/lists/man/mi cvs rdiff -u -r1.621 -r1.622 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/mcp48x1dac.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/arch/amiga/include
Hi. On 1 Jun 2015, at 19:16, Frank Wille p...@netbsd.org wrote: Module Name: src Committed By: phx Date: Mon Jun 1 17:16:57 UTC 2015 Modified Files: src/sys/arch/amiga/include: vmparam.h Log Message: Remove unused KUSER_AREA, SYSPTSIZE, USRPTSIZE. Bump MAXTSIZ and MAXDSIZ to the same values atari is using. This makes gcc 4.8 (/usr/libexec/cc1) load and execute. Shall we pull this to NetBSD 7? It also includes gcc 4.8, so has the same exact problem. -- Best regards, Radoslaw Kujawa
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Thu Jun 4 09:08:38 UTC 2015 Modified Files: src/share/man/man4/man4.amiga: xsh.4 Log Message: Name of the USB module is known, as it was already released. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/man4.amiga/xsh.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.amiga/xsh.4 diff -u src/share/man/man4/man4.amiga/xsh.4:1.5 src/share/man/man4/man4.amiga/xsh.4:1.6 --- src/share/man/man4/man4.amiga/xsh.4:1.5 Wed Aug 14 17:41:20 2013 +++ src/share/man/man4/man4.amiga/xsh.4 Thu Jun 4 09:08:38 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: xsh.4,v 1.5 2013/08/14 17:41:20 wiz Exp $ +.\ $NetBSD: xsh.4,v 1.6 2015/06/04 09:08:38 rkujawa Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -70,4 +70,4 @@ driver was written by .An Radoslaw Kujawa .Aq radoslaw.kuj...@gmail.com . .Sh CAVEATS -The planned USB module is not supported (yet). +The RapidRoad USB module is not supported (yet).
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Thu Jun 4 09:08:38 UTC 2015 Modified Files: src/share/man/man4/man4.amiga: xsh.4 Log Message: Name of the USB module is known, as it was already released. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/man4.amiga/xsh.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Thu Jun 4 09:17:52 UTC 2015 Modified Files: src/share/man/man4/man4.amiga: xsh.4 xsurf.4 Log Message: Cross-reference xsh(4) and xsurf(4). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/man4.amiga/xsh.4 cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/man4.amiga/xsurf.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.amiga/xsh.4 diff -u src/share/man/man4/man4.amiga/xsh.4:1.6 src/share/man/man4/man4.amiga/xsh.4:1.7 --- src/share/man/man4/man4.amiga/xsh.4:1.6 Thu Jun 4 09:08:38 2015 +++ src/share/man/man4/man4.amiga/xsh.4 Thu Jun 4 09:17:52 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: xsh.4,v 1.6 2015/06/04 09:08:38 rkujawa Exp $ +.\ $NetBSD: xsh.4,v 1.7 2015/06/04 09:17:52 rkujawa Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -54,7 +54,8 @@ driver supports the following hardware: .El .Sh SEE ALSO .Xr mii 4 , -.Xr ne 4 +.Xr ne 4, +.Xr xsurf 4 .Pp .Lk http://wiki.icomp.de/wiki/X-Surf-100 X-Surf 100 on Individual Computers wiki .Sh HISTORY Index: src/share/man/man4/man4.amiga/xsurf.4 diff -u src/share/man/man4/man4.amiga/xsurf.4:1.5 src/share/man/man4/man4.amiga/xsurf.4:1.6 --- src/share/man/man4/man4.amiga/xsurf.4:1.5 Fri Nov 23 07:29:52 2012 +++ src/share/man/man4/man4.amiga/xsurf.4 Thu Jun 4 09:17:52 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: xsurf.4,v 1.5 2012/11/23 07:29:52 wiz Exp $ +.\ $NetBSD: xsurf.4,v 1.6 2015/06/04 09:17:52 rkujawa Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -55,6 +55,7 @@ driver supports the following hardware: .Xr clockport 4 , .\ .Xr gencp 4 , .Xr ne 4 , +.Xr xsh 4, .Xr wdc 4 .Sh HISTORY The
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Wed Feb 11 00:11:58 UTC 2015 Modified Files: src/share/man/man4: tdvfb.4 Log Message: Don't mention the bug that was fixed by mrg. DAC detection works reliably since then. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/tdvfb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/tdvfb.4 diff -u src/share/man/man4/tdvfb.4:1.7 src/share/man/man4/tdvfb.4:1.8 --- src/share/man/man4/tdvfb.4:1.7 Fri Aug 3 21:51:11 2012 +++ src/share/man/man4/tdvfb.4 Wed Feb 11 00:11:58 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: tdvfb.4,v 1.7 2012/08/03 21:51:11 wiz Exp $ +.\ $NetBSD: tdvfb.4,v 1.8 2015/02/11 00:11:58 rkujawa Exp $ .\ .\ Copyright (c) 2012 Radoslaw Kujawa .\ All rights reserved. @@ -108,5 +108,3 @@ Graphics and Voodoo2 have no DDC interfa 16-bit depth is supported by the hardware and is the preferred depth, however it does not work correctly on big endian machines at the moment (this is a driver problem). -.Pp -Sometimes the driver fails to detect RAMDAC.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Wed Feb 11 00:11:58 UTC 2015 Modified Files: src/share/man/man4: tdvfb.4 Log Message: Don't mention the bug that was fixed by mrg. DAC detection works reliably since then. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/tdvfb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/spi
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:09:37 UTC 2014 Modified Files: src/sys/dev/spi: files.spi Added Files: src/sys/dev/spi: mcp48x1.c Log Message: Add preliminary driver for Microchip MCP48x1 family of DACs. Needs more testing and an appropriate API for such (non-audio) DACs. For now one can set the output value using sysctl node. Also sysmon(4) will conveniently report the voltage on Vout pin of the DAC. Note that this is not an actual measured voltage, but merely calculated using equation from datasheet. Real voltage might be different and depend on analog circuitry attached to the DAC. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/spi/files.spi cvs rdiff -u -r0 -r1.1 src/sys/dev/spi/mcp48x1.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/spi/files.spi diff -u src/sys/dev/spi/files.spi:1.2 src/sys/dev/spi/files.spi:1.3 --- src/sys/dev/spi/files.spi:1.2 Sat Oct 7 07:21:13 2006 +++ src/sys/dev/spi/files.spi Tue Feb 25 20:09:37 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.spi,v 1.2 2006/10/07 07:21:13 gdamore Exp $ +# $NetBSD: files.spi,v 1.3 2014/02/25 20:09:37 rkujawa Exp $ define spibus { } @@ -25,3 +25,9 @@ file dev/spi/m25p.c m25p device tmp121temp: sysmon_envsys attach tmp121temp at spi file dev/spi/tmp121.c tmp121temp + +# MCP48x1 DAC +device mcp48x1dac +attach mcp48x1dac at spi +file dev/spi/mcp48x1.c mcp48x1dac + Added files: Index: src/sys/dev/spi/mcp48x1.c diff -u /dev/null src/sys/dev/spi/mcp48x1.c:1.1 --- /dev/null Tue Feb 25 20:09:37 2014 +++ src/sys/dev/spi/mcp48x1.c Tue Feb 25 20:09:37 2014 @@ -0,0 +1,320 @@ +/* $NetBSD: mcp48x1.c,v 1.1 2014/02/25 20:09:37 rkujawa Exp $ */ + +/*- + * Copyright (c) 2014 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: mcp48x1.c,v 1.1 2014/02/25 20:09:37 rkujawa Exp $); + +/* + * Driver for Microchip MCP4801/MCP4811/MCP4821 DAC. + * + * XXX: needs more testing. + */ + +#include sys/param.h +#include sys/systm.h +#include sys/device.h +#include sys/kernel.h +#include sys/types.h +#include sys/sysctl.h + +#include dev/sysmon/sysmonvar.h + +#include dev/spi/spivar.h + +#define MCP48X1DAC_DEBUG 0 + +#define MCP48X1DAC_WRITE __BIT(15) /* active low */ +#define MCP48X1DAC_GAIN __BIT(13) /* active low */ +#define MCP48X1DAC_SHDN __BIT(12) /* active low */ +#define MCP48X1DAC_DATA __BITS(11,0) /* data */ + +struct mcp48x1dac_model { + const char *name; + uint8_t resolution; + uint8_t shift; /* data left shift during write */ +}; + +struct mcp48x1dac_softc { + device_t sc_dev; + struct spi_handle *sc_sh; + + struct mcp48x1dac_model *sc_dm; /* struct describing DAC model */ + + uint16_t sc_dac_data; + bool sc_dac_gain; + bool sc_dac_shutdown; + + struct sysmon_envsys *sc_sme; + envsys_data_t sc_sm_vo; /* envsys sensor (Vo) */ +}; + +static int mcp48x1dac_match(device_t, cfdata_t, void *); +static void mcp48x1dac_attach(device_t, device_t, void *); + +static bool mcp48x1dac_envsys_attach(struct mcp48x1dac_softc *sc); +static void mcp48x1dac_envsys_refresh(struct sysmon_envsys *, + envsys_data_t *); + +static void mcp48x1dac_write(struct mcp48x1dac_softc *); +static uint16_t mcp48x1dac_regval_to_mv(struct mcp48x1dac_softc *); + +static void mcp48x1dac_setup_sysctl(struct mcp48x1dac_softc *sc); +static int sysctl_mcp48x1dac_data(SYSCTLFN_ARGS); +static int sysctl_mcp48x1dac_gain(SYSCTLFN_ARGS
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:15:24 UTC 2014 Modified Files: src/doc: CHANGES Log Message: Note the new mcp48x1dac driver. To generate a diff of this commit: cvs rdiff -u -r1.1891 -r1.1892 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1891 src/doc/CHANGES:1.1892 --- src/doc/CHANGES:1.1891 Tue Feb 25 13:22:14 2014 +++ src/doc/CHANGES Tue Feb 25 20:15:24 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1891 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1892 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -355,3 +355,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: luna68k: Make sysinst to create a boot UFS partition and install the native bootloader during installation. [tsutsui 20140219] dhcpcd(8): Import dhcpcd-6.3.0 [roy 20140225] + mcp48x1dac: Add preliminary support for Microchip MCP48x1 family of + Digital-to-Analog converters. [rkujawa 20140225]
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:16:29 UTC 2014 Modified Files: src/doc: CHANGES Log Message: s/mcp48x1dac/mcp48x1dac(4)/ To generate a diff of this commit: cvs rdiff -u -r1.1892 -r1.1893 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1892 src/doc/CHANGES:1.1893 --- src/doc/CHANGES:1.1892 Tue Feb 25 20:15:24 2014 +++ src/doc/CHANGES Tue Feb 25 20:16:29 2014 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1892 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1893 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -355,5 +355,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: luna68k: Make sysinst to create a boot UFS partition and install the native bootloader during installation. [tsutsui 20140219] dhcpcd(8): Import dhcpcd-6.3.0 [roy 20140225] - mcp48x1dac: Add preliminary support for Microchip MCP48x1 family of + mcp48x1dac(4): Add preliminary support for Microchip MCP48x1 family of Digital-to-Analog converters. [rkujawa 20140225]
CVS commit: src/sys/dev/spi
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:09:37 UTC 2014 Modified Files: src/sys/dev/spi: files.spi Added Files: src/sys/dev/spi: mcp48x1.c Log Message: Add preliminary driver for Microchip MCP48x1 family of DACs. Needs more testing and an appropriate API for such (non-audio) DACs. For now one can set the output value using sysctl node. Also sysmon(4) will conveniently report the voltage on Vout pin of the DAC. Note that this is not an actual measured voltage, but merely calculated using equation from datasheet. Real voltage might be different and depend on analog circuitry attached to the DAC. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/spi/files.spi cvs rdiff -u -r0 -r1.1 src/sys/dev/spi/mcp48x1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:15:24 UTC 2014 Modified Files: src/doc: CHANGES Log Message: Note the new mcp48x1dac driver. To generate a diff of this commit: cvs rdiff -u -r1.1891 -r1.1892 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Tue Feb 25 20:16:29 UTC 2014 Modified Files: src/doc: CHANGES Log Message: s/mcp48x1dac/mcp48x1dac(4)/ To generate a diff of this commit: cvs rdiff -u -r1.1892 -r1.1893 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Fri Jan 3 10:30:47 UTC 2014 Modified Files: src/sys/arch/amiga/conf: files.amiga Log Message: Fix undefined reference to amiga_bus_stride_0x1000. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/amiga/conf/files.amiga Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/conf/files.amiga diff -u src/sys/arch/amiga/conf/files.amiga:1.174 src/sys/arch/amiga/conf/files.amiga:1.175 --- src/sys/arch/amiga/conf/files.amiga:1.174 Fri Jan 3 00:33:06 2014 +++ src/sys/arch/amiga/conf/files.amiga Fri Jan 3 10:30:47 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.amiga,v 1.174 2014/01/03 00:33:06 rkujawa Exp $ +# $NetBSD: files.amiga,v 1.175 2014/01/03 10:30:47 rkujawa Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -486,7 +486,7 @@ include dev/pcmcia/files.pcmcia include dev/ata/files.ata # Amiga 4000/1200 IDE using MI wdc -attach wdc at mainbus with wdc_amiga: gayle +attach wdc at mainbus with wdc_amiga: gayle, amibus_b1000 file arch/amiga/dev/wdc_amiga.c wdc_amiga # Buddha wdc @@ -494,7 +494,7 @@ attach wdc at zbus with wdc_buddha file arch/amiga/dev/wdc_buddha.c wdc_buddha # FastATA -device efa: ata,wdc_common +device efa: ata, wdc_common, amibus_b1000 attach efa at mainbus filearch/amiga/dev/efa.c efa
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Fri Jan 3 10:30:47 UTC 2014 Modified Files: src/sys/arch/amiga/conf: files.amiga Log Message: Fix undefined reference to amiga_bus_stride_0x1000. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/arch/amiga/conf/files.amiga Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Fri Jan 3 00:33:06 UTC 2014 Modified Files: src/sys/arch/amiga/amiga: gayle.c gayle.h src/sys/arch/amiga/conf: files.amiga src/sys/arch/amiga/dev: acafhreg.h efa.c efareg.h gayle_pcmcia.c wdc_acafh.c wdc_amiga.c src/sys/arch/amiga/include: bus.h Added Files: src/sys/arch/amiga/amiga: amiga_bus_simple_0x1000.c Log Message: Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce proper bus_space accesses and some abstraction layer. All drivers that utilised Gayle also had to be refactored. I tried not to break anything more, but this clearly needs more testing... To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/amiga/amiga_bus_simple_0x1000.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amiga/amiga/gayle.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/amiga/gayle.h cvs rdiff -u -r1.173 -r1.174 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/dev/acafhreg.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amiga/dev/efa.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/efareg.h \ src/sys/arch/amiga/dev/wdc_acafh.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amiga/dev/gayle_pcmcia.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/amiga/dev/wdc_amiga.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/amiga/include/bus.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/amiga/gayle.c diff -u src/sys/arch/amiga/amiga/gayle.c:1.6 src/sys/arch/amiga/amiga/gayle.c:1.7 --- src/sys/arch/amiga/amiga/gayle.c:1.6 Sun Dec 11 12:16:26 2005 +++ src/sys/arch/amiga/amiga/gayle.c Fri Jan 3 00:33:06 2014 @@ -1,30 +1,193 @@ -/* $NetBSD: gayle.c,v 1.6 2005/12/11 12:16:26 christos Exp $ */ +/* $NetBSD: gayle.c,v 1.7 2014/01/03 00:33:06 rkujawa Exp $ */ /* public domain */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gayle.c,v 1.6 2005/12/11 12:16:26 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: gayle.c,v 1.7 2014/01/03 00:33:06 rkujawa Exp $); /* - * Gayle management routines + * Gayle management - provide functions for use in the drivers that utilise + * the chip. * - * Any module that uses gayle should call gayle_init() before using anything - * related to gayle. gayle_init() can be called multiple times. + * These overly complicated routines try to deal with a few variants of + * Gayle chip that exists. */ +#include sys/bus.h +#include sys/systm.h + +#include machine/cpu.h #include amiga/amiga/gayle.h #include amiga/dev/zbusvar.h -struct gayle_struct *gayle_base_virtual_address = 0; +/* #define GAYLE_DEBUG 1 */ + +struct gayle_tag { + struct bus_space_tag gayle_io_bst; + bus_space_tag_t gayle_io_t; + bus_space_handle_t gayle_io_h; + + struct bus_space_tag gayle_isr_bst; + bus_space_tag_t gayle_isr_t; + bus_space_handle_t gayle_isr_h; +}; -#define GAYLE_PHYS_ADDRESS 0xda8000 +typedef struct gayle_tag *gayle_tag_t; +/* + * Having these as static variables is ugly, but they don't fit into + * driver's softc, as the chip might be utilised by many different drivers. + * And since we can only have one Gayle per system it should be okay. + */ +static struct gayle_tag gayle; +static gayle_tag_t gayle_t = NULL; + +/* + * Any module that uses gayle should call gayle_init() before using anything + * related to gayle. gayle_init() can be called multiple times. + */ void gayle_init(void) { + bus_addr_t gayle_vbase; - if (gayle_base_virtual_address != 0) + if (gayle_t != NULL) return; - gayle_base_virtual_address = - (struct gayle_struct *) __UNVOLATILE(ztwomap(GAYLE_PHYS_ADDRESS)); +#ifdef GAYLE_DEBUG + aprint_normal(gayle: doing init\n); +#endif /* GAYLE_DEBUG */ + + gayle_t = gayle; + + gayle_vbase = (bus_addr_t) __UNVOLATILE(ztwomap(GAYLE_REGS_BASE)); + + gayle_t-gayle_io_bst.base = gayle_vbase; + gayle_t-gayle_io_bst.absm = amiga_bus_stride_0x1000; + gayle_t-gayle_io_t = (gayle_t-gayle_io_bst); + + bus_space_map(gayle_t-gayle_io_t, 0, 0x4, 0, gayle_t-gayle_io_h); + + /* + * The A4000 variant of Gayle has interrupt status register at offset + * +0x1000 from IDE registers. + * XXX: in fact, on A4000 we should initialise only this part... + */ + if (is_a4000()) { + gayle_t-gayle_isr_bst.base = (bus_addr_t) __UNVOLATILE(ztwomap( + GAYLE_IDE_BASE_A4000+GAYLE_IDE_INTREQ_A4000)); + + gayle_t-gayle_io_bst.absm = amiga_bus_stride_1; + gayle_t-gayle_isr_t = (gayle_t-gayle_isr_bst); + } else { + bus_space_subregion(gayle_t-gayle_io_t, gayle_t-gayle_io_h, + GAYLE_INTREQ, 0x1, (gayle_t-gayle_isr_h)); + + gayle_t-gayle_isr_bst = gayle_t-gayle_io_bst; + gayle_t-gayle_isr_t = gayle_t-gayle_io_t; + } + } + +uint8_t +gayle_intr_status(void) +{ + uint8_t rv; + + rv = bus_space_read_1(gayle_t-gayle_isr_t, gayle_t-gayle_isr_h, 0); +#ifdef GAYLE_DEBUG + aprint_normal(gayle: intr status %x\n, rv); +#endif /* GAYLE_DEBUG
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Fri Jan 3 00:33:06 UTC 2014 Modified Files: src/sys/arch/amiga/amiga: gayle.c gayle.h src/sys/arch/amiga/conf: files.amiga src/sys/arch/amiga/dev: acafhreg.h efa.c efareg.h gayle_pcmcia.c wdc_acafh.c wdc_amiga.c src/sys/arch/amiga/include: bus.h Added Files: src/sys/arch/amiga/amiga: amiga_bus_simple_0x1000.c Log Message: Rework handling of Commodore Gayle chip. Avoid ugly struct casts, introduce proper bus_space accesses and some abstraction layer. All drivers that utilised Gayle also had to be refactored. I tried not to break anything more, but this clearly needs more testing... To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/amiga/amiga_bus_simple_0x1000.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/amiga/amiga/gayle.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/amiga/gayle.h cvs rdiff -u -r1.173 -r1.174 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/dev/acafhreg.h cvs rdiff -u -r1.11 -r1.12 src/sys/arch/amiga/dev/efa.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/efareg.h \ src/sys/arch/amiga/dev/wdc_acafh.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amiga/dev/gayle_pcmcia.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/amiga/dev/wdc_amiga.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/amiga/include/bus.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/amiga
Module Name:src Committed By: rkujawa Date: Sun Dec 29 18:11:15 UTC 2013 Modified Files: src/distrib/notes/amiga: hardware Log Message: Note ACA500 support. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/distrib/notes/amiga/hardware Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/amiga/hardware diff -u src/distrib/notes/amiga/hardware:1.55 src/distrib/notes/amiga/hardware:1.56 --- src/distrib/notes/amiga/hardware:1.55 Sun Aug 11 13:21:25 2013 +++ src/distrib/notes/amiga/hardware Sun Dec 29 18:11:15 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: hardware,v 1.55 2013/08/11 13:21:25 rkujawa Exp $ +.\ $NetBSD: hardware,v 1.56 2013/12/29 18:11:15 rkujawa Exp $ . .Nx \*V runs on any Amiga that has a 68020 or better CPU with @@ -41,6 +41,8 @@ A4000/A1200 IDE controller, including AT .It ELBOX FastATA 1200 Mk-III/Mk-IV .It +Individual Computers ACA500 (both CF slots) +.It Individual Computers X-Surf IDE .bullet) .It
CVS commit: src/distrib/notes/amiga
Module Name:src Committed By: rkujawa Date: Sun Dec 29 18:11:15 UTC 2013 Modified Files: src/distrib/notes/amiga: hardware Log Message: Note ACA500 support. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/distrib/notes/amiga/hardware Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Thu Dec 26 20:38:11 UTC 2013 Modified Files: src/sys/arch/amiga/amiga: autoconf.c src/sys/arch/amiga/conf: GENERIC.in files.amiga src/sys/arch/amiga/dev: acafh.c acafhreg.h acafhvar.h Log Message: Implement the probe procedure for ACA500. Now the user just needs acafh0 compiled in his kernel and it all should(tm) work. Due to lack of obio in amiga port, the probe is called directly from mbattach(). This is going to change with the introduction of obio for all non-autoconfig expansions. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/amiga/amiga/autoconf.c cvs rdiff -u -r1.122 -r1.123 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.172 -r1.173 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/acafh.c \ src/sys/arch/amiga/dev/acafhreg.h src/sys/arch/amiga/dev/acafhvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/amiga/autoconf.c diff -u src/sys/arch/amiga/amiga/autoconf.c:1.115 src/sys/arch/amiga/amiga/autoconf.c:1.116 --- src/sys/arch/amiga/amiga/autoconf.c:1.115 Sun Dec 22 02:21:51 2013 +++ src/sys/arch/amiga/amiga/autoconf.c Thu Dec 26 20:38:11 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.115 2013/12/22 02:21:51 rkujawa Exp $ */ +/* $NetBSD: autoconf.c,v 1.116 2013/12/26 20:38:11 rkujawa Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.115 2013/12/22 02:21:51 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.116 2013/12/26 20:38:11 rkujawa Exp $); #include sys/param.h #include sys/systm.h @@ -53,7 +53,10 @@ __KERNEL_RCSID(0, $NetBSD: autoconf.c,v #include amiga/pci/p5pbvar.h #endif /* P5PB_CONSOLE */ -#include opt_acafh.h +#include acafh.h +#if NACAFH 0 +#include amiga/dev/acafhvar.h +#endif /* NACAFH 0 */ static void findroot(void); void mbattach(device_t, device_t, void *); @@ -302,8 +305,10 @@ mbattach(device_t parent, device_t self, #endif config_found(self, __UNCONST(aucc), simple_devprint); -#ifdef ACA500_SUPPORT - config_found(self, __UNCONST(acafh), simple_devprint); +#if NACAFH 0 + if (!is_a600() !is_a1200() !is_a3000() !is_a4000()) + if (acafh_mbattach_probe() == true) + config_found(self, __UNCONST(acafh), simple_devprint); #endif config_found(self, __UNCONST(zbus), simple_devprint); Index: src/sys/arch/amiga/conf/GENERIC.in diff -u src/sys/arch/amiga/conf/GENERIC.in:1.122 src/sys/arch/amiga/conf/GENERIC.in:1.123 --- src/sys/arch/amiga/conf/GENERIC.in:1.122 Sun Dec 22 23:02:38 2013 +++ src/sys/arch/amiga/conf/GENERIC.in Thu Dec 26 20:38:11 2013 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.in,v 1.122 2013/12/22 23:02:38 rkujawa Exp $ +# $NetBSD: GENERIC.in,v 1.123 2013/12/26 20:38:11 rkujawa Exp $ # ## # GENERIC machine description file @@ -52,7 +52,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.122 $ +#ident GENERIC-$Revision: 1.123 $ m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl makeoptions COPTS=-Os @@ -516,10 +516,9 @@ scsibus* at cbiiisc0 empsc0 at zbus0 # Emplant scsi scsibus* at empsc0 -#acafh0 at mainbus0 # Individual Computers ACA500 -#options ACA500_SUPPORT -#wdc* at acafhbus? # CF slots on ACA500 -#gencp* at acafhbus? # clockport on ACA500 +acafh0 at mainbus0 # Individual Computers ACA500 +wdc* at acafhbus? # CF slots on ACA500 +gencp* at acafhbus? # clockport on ACA500 wdc0 at mainbus0 # A4000 A1200 IDE bus wdc* at zbus0 # Buddha / Catweasel Index: src/sys/arch/amiga/conf/files.amiga diff -u src/sys/arch/amiga/conf/files.amiga:1.172 src/sys/arch/amiga/conf/files.amiga:1.173 --- src/sys/arch/amiga/conf/files.amiga:1.172 Sun Dec 22 02:21:51 2013 +++ src/sys/arch/amiga/conf/files.amiga Thu Dec 26 20:38:11 2013 @@ -1,4 +1,4 @@ -# $NetBSD: files.amiga,v 1.172 2013/12/22 02:21:51 rkujawa Exp $ +# $NetBSD: files.amiga,v 1.173 2013/12/26 20:38:11 rkujawa Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -34,8 +34,6 @@ defflagDEVRELOAD defflag opt_p5pb.h P5PB_DEBUG P5PB_CONSOLE -defflag opt_acafh.h ACA500_SUPPORT - defparam IOBZCLOCK device mainbus {} @@ -588,7 +586,7 @@ define acafhbus {} device acafh: acafhbus, amibus_b4000 attach acafh at mainbus -file arch/amiga/dev/acafh.c acafh needs-flag +file arch/amiga/dev/acafh.c acafh needs-count attach wdc at acafhbus with wdc_acafh file arch/amiga/dev/wdc_acafh.c wdc_acafh acafh Index: src/sys/arch/amiga/dev/acafh.c diff -u src/sys/arch/amiga/dev/acafh.c:1.2 src/sys/arch/amiga/dev/acafh.c:1.3 --- src/sys/arch/amiga/dev/acafh.c:1.2 Sun Dec 22 23:02:38 2013 +++ src/sys/arch/amiga/dev/acafh.c Thu Dec 26 20:38:11 2013 @@
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Thu Dec 26 20:38:11 UTC 2013 Modified Files: src/sys/arch/amiga/amiga: autoconf.c src/sys/arch/amiga/conf: GENERIC.in files.amiga src/sys/arch/amiga/dev: acafh.c acafhreg.h acafhvar.h Log Message: Implement the probe procedure for ACA500. Now the user just needs acafh0 compiled in his kernel and it all should(tm) work. Due to lack of obio in amiga port, the probe is called directly from mbattach(). This is going to change with the introduction of obio for all non-autoconfig expansions. To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/amiga/amiga/autoconf.c cvs rdiff -u -r1.122 -r1.123 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.172 -r1.173 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/acafh.c \ src/sys/arch/amiga/dev/acafhreg.h src/sys/arch/amiga/dev/acafhvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Tue Dec 24 12:07:16 UTC 2013 Modified Files: src/share/man/man4/man4.amiga: Makefile clockport.4 Added Files: src/share/man/man4/man4.amiga: acafh.4 Log Message: Add acafh(4) page for the recently addded acafh driver. Be more precise in clockport(4). To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/man/man4/man4.amiga/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/acafh.4 cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/man4.amiga/clockport.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/man4.amiga/Makefile diff -u src/share/man/man4/man4.amiga/Makefile:1.29 src/share/man/man4/man4.amiga/Makefile:1.30 --- src/share/man/man4/man4.amiga/Makefile:1.29 Fri Aug 9 15:35:54 2013 +++ src/share/man/man4/man4.amiga/Makefile Tue Dec 24 12:07:16 2013 @@ -1,8 +1,9 @@ # from: @(#)Makefile 8.2 (Berkeley) 2/16/94 -# $NetBSD: Makefile,v 1.29 2013/08/09 15:35:54 pgoyette Exp $ +# $NetBSD: Makefile,v 1.30 2013/12/24 12:07:16 rkujawa Exp $ -MAN= a1k2cp.4 afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 console.4 \ - bah.4 bppcsc.4 clockport.4 cv3dpb.4 ed.4 efa.4 em4k.4 empb.4 es.4 fdc.4 grf.4 \ +MAN= a1k2cp.4 acafh.4 afsc.4 ahsc.4 amidisplaycc.4 atzsc.4 autoconf.4 \ + console.4 bah.4 bppcsc.4 clockport.4 cv3dpb.4 ed.4 efa.4 em4k.4 empb.4 \ + es.4 fdc.4 grf.4 \ grfcl.4 grfcv.4 grfcv3d.4 grfet.4 grfrh.4 grfrt.4 grful.4 \ gtsc.4 intro.4 ite.4 mem.4 mfcs.4 mgnsc.4 mppb.4 p5membar.4 p5pb.4 \ qn.4 ser.4 wesc.4 xsh.4 xsurf.4 z3rambd.4 zssc.4 Index: src/share/man/man4/man4.amiga/clockport.4 diff -u src/share/man/man4/man4.amiga/clockport.4:1.8 src/share/man/man4/man4.amiga/clockport.4:1.9 --- src/share/man/man4/man4.amiga/clockport.4:1.8 Sat Jul 20 21:39:59 2013 +++ src/share/man/man4/man4.amiga/clockport.4 Tue Dec 24 12:07:16 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: clockport.4,v 1.8 2013/07/20 21:39:59 wiz Exp $ +.\ $NetBSD: clockport.4,v 1.9 2013/12/24 12:07:16 rkujawa Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -52,7 +52,7 @@ Individual Computers SilverSurfer 16C550 .Sh CODE REFERENCES The .Nm -interface is implemented within the +interface and drivers for it are implemented within the .Pa sys/arch/amiga/clockport directory. .Sh SEE ALSO Added files: Index: src/share/man/man4/man4.amiga/acafh.4 diff -u /dev/null src/share/man/man4/man4.amiga/acafh.4:1.1 --- /dev/null Tue Dec 24 12:07:16 2013 +++ src/share/man/man4/man4.amiga/acafh.4 Tue Dec 24 12:07:16 2013 @@ -0,0 +1,67 @@ +.\ $NetBSD: acafh.4,v 1.1 2013/12/24 12:07:16 rkujawa Exp $ +.\ +.\ Copyright (c) 2013 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ This code is derived from software contributed to The NetBSD Foundation +.\ by Radoslaw Kujawa. +.\ +.\ 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. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``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 FOUNDATION OR CONTRIBUTORS +.\ 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. +.\ +.Dd December 23, 2013 +.Dt ACAFH 4 amiga +.Os +.Sh NAME +.Nm acafh +.Nd Individual Computers ACA500 driver +.Sh SYNOPSIS +.Cd acafh0 at mainbus0 +.Cd gencp* at acafhbus? +.Cd wdc* at acafhbus? +.Sh DESCRIPTION +The +.Nm +driver provides support for CompactFlash interface (both slots) and clockport +present on the Individual Computers ACA500 board. +.Sh HARDWARE +The +.Nm +driver supports the following hardware: +.Bl -tag -offset indent +.It Individual Computers ACA500 +.El +.Sh SEE ALSO +.Xr clockport 4 , +.\ .Xr gencp 4 , +.Xr wdc 4 +.Sh HISTORY +The +.Nm +device first appeared in +.Nx 7.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Radoslaw Kujawa +.Aq radoslaw.kuj...@gmail.com .
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Tue Dec 24 12:09:19 UTC 2013 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add acafh(4) to man dist list. To generate a diff of this commit: cvs rdiff -u -r1.1452 -r1.1453 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/man/mi diff -u src/distrib/sets/lists/man/mi:1.1452 src/distrib/sets/lists/man/mi:1.1453 --- src/distrib/sets/lists/man/mi:1.1452 Tue Dec 17 08:46:37 2013 +++ src/distrib/sets/lists/man/mi Tue Dec 24 12:09:19 2013 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1452 2013/12/17 08:46:37 njoly Exp $ +# $NetBSD: mi,v 1.1453 2013/12/24 12:09:19 rkujawa Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -768,6 +768,7 @@ ./usr/share/man/cat4/amdtemp.0 man-sys-catman .cat ./usr/share/man/cat4/amhphy.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/a1k2cp.0 man-sys-catman .cat +./usr/share/man/cat4/amiga/acafh.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/afsc.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/ahsc.0 man-sys-catman .cat ./usr/share/man/cat4/amiga/amidisplaycc.0 man-sys-catman .cat @@ -3809,6 +3810,7 @@ ./usr/share/man/html4/amdtemp.html man-sys-htmlman html ./usr/share/man/html4/amhphy.html man-sys-htmlman html ./usr/share/man/html4/amiga/a1k2cp.html man-sys-htmlman html +./usr/share/man/html4/amiga/acafh.html man-sys-htmlman html ./usr/share/man/html4/amiga/afsc.html man-sys-htmlman html ./usr/share/man/html4/amiga/ahsc.html man-sys-htmlman html ./usr/share/man/html4/amiga/amidisplaycc.html man-sys-htmlman html @@ -6542,6 +6544,7 @@ ./usr/share/man/man4/amdtemp.4 man-sys-man .man ./usr/share/man/man4/amhphy.4 man-sys-man .man ./usr/share/man/man4/amiga/a1k2cp.4 man-sys-man .man +./usr/share/man/man4/amiga/acafh.4 man-sys-man .man ./usr/share/man/man4/amiga/afsc.4 man-sys-man .man ./usr/share/man/man4/amiga/ahsc.4 man-sys-man .man ./usr/share/man/man4/amiga/amidisplaycc.4 man-sys-man .man
CVS commit: src/share/man/man4/man4.amiga
Module Name:src Committed By: rkujawa Date: Tue Dec 24 12:07:16 UTC 2013 Modified Files: src/share/man/man4/man4.amiga: Makefile clockport.4 Added Files: src/share/man/man4/man4.amiga: acafh.4 Log Message: Add acafh(4) page for the recently addded acafh driver. Be more precise in clockport(4). To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/share/man/man4/man4.amiga/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.amiga/acafh.4 cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/man4.amiga/clockport.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Tue Dec 24 12:09:19 UTC 2013 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add acafh(4) to man dist list. To generate a diff of this commit: cvs rdiff -u -r1.1452 -r1.1453 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Sun Dec 22 11:36:12 UTC 2013 Modified Files: src/doc: CHANGES Log Message: Note ACA500 support. To generate a diff of this commit: cvs rdiff -u -r1.1866 -r1.1867 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1866 src/doc/CHANGES:1.1867 --- src/doc/CHANGES:1.1866 Thu Dec 19 19:40:59 2013 +++ src/doc/CHANGES Sun Dec 22 11:36:12 2013 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1866 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1867 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -314,3 +314,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: GMP: Updated to GMP 5.1.3. [mrg 20131129] file(1): Updated to 5.16. [christos 20131201] librt: Added shm_open(3) and shm_unlink(3). [rmind 20131219] + acafh(4): Added driver for Individual Computers ACA500. Enjoy NetBSD + on an Amiga 500. [rkujawa 20131222]
CVS commit: src/sys/arch/amiga
-sc_slots[chnum].channel; + memset(sc-sc_slots[chnum],0,sizeof(struct wdc_acafh_slot)); + sc-sc_slots[chnum].channel.ch_channel = chnum; + sc-sc_slots[chnum].channel.ch_atac = sc-sc_wdcdev.sc_atac; + sc-sc_slots[chnum].channel.ch_queue = sc-sc_slots[chnum].chqueue; + + wdc_acafh_map_channel(sc, chnum); + + wdc_init_shadow_regs(sc-sc_slots[chnum].channel); + wdcattach(sc-sc_slots[chnum].channel); + +#ifdef WDC_ACAFH_DEBUG + aprint_normal_dev(sc-sc_dev, done init for channel %d\n, chnum); +#endif /* WDC_ACAFH_DEBUG */ + +} + +void +wdc_acafh_map_channel(struct wdc_acafh_softc *sc, int chnum) +{ + struct wdc_regs *wdr; + int i; + bus_addr_t off; + + wdr = CHAN_TO_WDC_REGS(sc-sc_slots[chnum].channel); wdr-cmd_iot = sc-cmd_iot; - wdr-ctl_iot = sc-ctl_iot; - if (bus_space_map(wdr-cmd_iot, 0, 0x40, 0, + if (chnum == 0) + off = 0; + else + off = 0x400; + + if (bus_space_map(wdr-cmd_iot, off, 0x40, 0, wdr-cmd_baseioh)) { - aprint_error_dev(self, couldn't map registers\n); + aprint_error_dev(sc-sc_dev, couldn't map regs\n); return; } @@ -122,35 +195,11 @@ wdc_acafh_attach(device_t parent, device bus_space_unmap(wdr-cmd_iot, wdr-cmd_baseioh, 0x40); - aprint_error_dev(self, couldn't map registers\n); + aprint_error_dev(sc-sc_dev, couldn't map regs\n); return; } } - if (bus_space_subregion(wdr-cmd_iot, - wdr-cmd_baseioh, 0x406, 1, wdr-ctl_ioh)) - return; - - sc-sc_wdcdev.sc_atac.atac_cap = ATAC_CAP_DATA16; - sc-sc_wdcdev.sc_atac.atac_pio_cap = 0; - sc-sc_chanlist[0] = sc-sc_channel; - sc-sc_wdcdev.sc_atac.atac_channels = sc-sc_chanlist; - sc-sc_wdcdev.sc_atac.atac_nchannels = 1; - sc-sc_wdcdev.wdc_maxdrives = 2; - sc-sc_channel.ch_channel = 0; - sc-sc_channel.ch_atac = sc-sc_wdcdev.sc_atac; - sc-sc_channel.ch_queue = sc-sc_chqueue; - - wdc_init_shadow_regs(sc-sc_channel); - - sc-sc_isr.isr_intr = wdc_acafh_intr; - sc-sc_isr.isr_arg = sc; - sc-sc_isr.isr_ipl = 2; - add_isr (sc-sc_isr); - - gayle.intena |= GAYLE_INT_IDE; - - wdcattach(sc-sc_channel); } int @@ -161,13 +210,12 @@ wdc_acafh_intr(void *arg) u_char intreq = *sc-sc_intreg; if (intreq GAYLE_INT_IDE) { -/* - if (acafh_cf_intr_status(sc-aca_sc, 1) == 1) - aprint_normal_dev(sc-aca_sc-sc_dev, intr at slot 1\n); - if (acafh_cf_intr_status(sc-aca_sc, 0) == 1) - aprint_normal_dev(sc-aca_sc-sc_dev, intr at slot 0\n); -*/ - ret = wdcintr(sc-sc_channel); + if (acafh_cf_intr_status(sc-aca_sc, 1) == 1) { + ret = wdcintr(sc-sc_slots[1].channel); + } + if (acafh_cf_intr_status(sc-aca_sc, 0) == 1) { + ret = wdcintr(sc-sc_slots[0].channel); + } gayle.intreq = 0x7c | (intreq 0x03); } Added files: Index: src/sys/arch/amiga/clockport/gencp_acafh.c diff -u /dev/null src/sys/arch/amiga/clockport/gencp_acafh.c:1.1 --- /dev/null Sun Dec 22 23:02:38 2013 +++ src/sys/arch/amiga/clockport/gencp_acafh.c Sun Dec 22 23:02:38 2013 @@ -0,0 +1,98 @@ +/* $NetBSD: gencp_acafh.c,v 1.1 2013/12/22 23:02:38 rkujawa Exp $ */ + +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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. + */ + +/* Clockport on ACA500. */ + +#include sys/cdefs.h + +#include sys/systm.h +#include sys/types.h +#include sys/device.h +#include sys/bus.h +#include sys/conf.h +#include sys/kmem.h + +#include machine/cpu.h + +#include amiga/amiga/device.h + +#include amiga/dev/acafhvar.h +#include amiga/dev/zbusvar.h + +#include amiga/clockport/clockportvar.h + +static int gencp_acafh_match(device_t, cfdata_t, void *); +static void gencp_acafh_attach(device_t, device_t, void *); + +CFATTACH_DECL_NEW
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Sun Dec 22 11:36:12 UTC 2013 Modified Files: src/doc: CHANGES Log Message: Note ACA500 support. To generate a diff of this commit: cvs rdiff -u -r1.1866 -r1.1867 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Sun Dec 22 23:02:38 UTC 2013 Modified Files: src/sys/arch/amiga/clockport: files.clockport src/sys/arch/amiga/conf: GENERIC.in src/sys/arch/amiga/dev: acafh.c acafhreg.h acafhvar.h wdc_acafh.c Added Files: src/sys/arch/amiga/clockport: gencp_acafh.c Log Message: Changes to ACA500 support: - Add support for second (aux) CF slot. - Rework wdc attachment to be more sane. - Add support for clockport on ACA500. - Fix style where appropriate. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amiga/clockport/files.clockport cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/clockport/gencp_acafh.c cvs rdiff -u -r1.121 -r1.122 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/dev/acafh.c \ src/sys/arch/amiga/dev/acafhreg.h src/sys/arch/amiga/dev/acafhvar.h \ src/sys/arch/amiga/dev/wdc_acafh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga
/z3rambd.c z3rambd ne attach slhci at zbus with slhci_zbus file arch/amiga/dev/slhci_zbus.c slhci_zbus +define acafhbus {} + +device acafh: acafhbus, amibus_b4000 +attach acafh at mainbus +file arch/amiga/dev/acafh.c acafh needs-flag + +attach wdc at acafhbus with wdc_acafh +file arch/amiga/dev/wdc_acafh.c wdc_acafh acafh + include arch/amiga/clockport/files.clockport include arch/amiga/conf/majors.amiga Index: src/sys/arch/amiga/include/bus.h diff -u src/sys/arch/amiga/include/bus.h:1.27 src/sys/arch/amiga/include/bus.h:1.28 --- src/sys/arch/amiga/include/bus.h:1.27 Fri Jun 1 09:41:35 2012 +++ src/sys/arch/amiga/include/bus.h Sun Dec 22 02:21:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.27 2012/06/01 09:41:35 rkujawa Exp $ */ +/* $NetBSD: bus.h,v 1.28 2013/12/22 02:21:51 rkujawa Exp $ */ /* * Copyright (c) 1996 Leo Weppelman. All rights reserved. @@ -279,6 +279,7 @@ extern const struct amiga_bus_space_meth extern const struct amiga_bus_space_methods amiga_bus_stride_4; extern const struct amiga_bus_space_methods amiga_bus_stride_4swap; extern const struct amiga_bus_space_methods amiga_bus_stride_16; +extern const struct amiga_bus_space_methods amiga_bus_stride_0x4000; extern const struct amiga_bus_space_methods empb_bus_swap; /* Added files: Index: src/sys/arch/amiga/amiga/amiga_bus_simple_0x4000.c diff -u /dev/null src/sys/arch/amiga/amiga/amiga_bus_simple_0x4000.c:1.1 --- /dev/null Sun Dec 22 02:21:51 2013 +++ src/sys/arch/amiga/amiga/amiga_bus_simple_0x4000.c Sun Dec 22 02:21:51 2013 @@ -0,0 +1,38 @@ +/* $NetBSD: amiga_bus_simple_0x4000.c,v 1.1 2013/12/22 02:21:51 rkujawa Exp $ */ + +/*- + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Ignatios Souvatzis. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(1, $NetBSD: amiga_bus_simple_0x4000.c,v 1.1 2013/12/22 02:21:51 rkujawa Exp $); + +#define AMIGA_SIMPLE_BUS_STRIDE 0x4000 /* 1 byte per 0x4000 bytes */ +#define AMIGA_SIMPLE_BUS_WORD_METHODS + +#include simple_busfuncs.c Index: src/sys/arch/amiga/dev/acafh.c diff -u /dev/null src/sys/arch/amiga/dev/acafh.c:1.1 --- /dev/null Sun Dec 22 02:21:51 2013 +++ src/sys/arch/amiga/dev/acafh.c Sun Dec 22 02:21:51 2013 @@ -0,0 +1,185 @@ +/* $NetBSD: acafh.c,v 1.1 2013/12/22 02:21:51 rkujawa Exp $ */ + +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: rkujawa Date: Sun Dec 22 02:21:51 UTC 2013 Modified Files: src/sys/arch/amiga/amiga: autoconf.c src/sys/arch/amiga/conf: GENERIC.in files.amiga src/sys/arch/amiga/include: bus.h Added Files: src/sys/arch/amiga/amiga: amiga_bus_simple_0x4000.c src/sys/arch/amiga/dev: acafh.c acafhreg.h acafhvar.h wdc_acafh.c Log Message: Add preliminary support for the Individual Computers ACA500 in the form of acahf driver. If ACA500 is equipped with supported accelerator with MMU, it allows running NetBSD on an Amiga 500. Since ACA is not autoconf-aware, and the probe procedure does not exist yet, the driver is activated with the ACA500_SUPPORT kernel option. The acahf driver is commented out in the GENERIC kernel for now (at least until it stops being very experimental and hackish). When it comes to ACA-specific hardware, for now the boot CF slot works. Support for everything else is incoming... To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/amiga/amiga_bus_simple_0x4000.c cvs rdiff -u -r1.114 -r1.115 src/sys/arch/amiga/amiga/autoconf.c cvs rdiff -u -r1.120 -r1.121 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.171 -r1.172 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/dev/acafh.c \ src/sys/arch/amiga/dev/acafhreg.h src/sys/arch/amiga/dev/acafhvar.h \ src/sys/arch/amiga/dev/wdc_acafh.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amiga/include/bus.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: rkujawa Date: Wed Dec 4 07:48:59 UTC 2013 Modified Files: src/sys/dev/ic: msm6242b.c Log Message: Fix RTC going backwards a year when saving time, because dt_mon != dt_year. Patch by Roc Valles. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/msm6242b.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/msm6242b.c diff -u src/sys/dev/ic/msm6242b.c:1.2 src/sys/dev/ic/msm6242b.c:1.3 --- src/sys/dev/ic/msm6242b.c:1.2 Wed Nov 14 17:15:25 2012 +++ src/sys/dev/ic/msm6242b.c Wed Dec 4 07:48:59 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: msm6242b.c,v 1.2 2012/11/14 17:15:25 rkujawa Exp $ */ +/* $NetBSD: msm6242b.c,v 1.3 2013/12/04 07:48:59 rkujawa Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: msm6242b.c,v 1.2 2012/11/14 17:15:25 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: msm6242b.c,v 1.3 2013/12/04 07:48:59 rkujawa Exp $); /* * Driver for OKI MSM6242B Real Time Clock. Somewhat based on an ancient, amiga @@ -243,8 +243,8 @@ msm6242b_settime_ymdhms(todr_chip_handle msm6242b_write(sc, MSM6242B_1DAY, dt-dt_day % 10); msm6242b_write(sc, MSM6242B_10MONTH, dt-dt_mon / 10); msm6242b_write(sc, MSM6242B_1MONTH, dt-dt_mon % 10); - msm6242b_write(sc, MSM6242B_10YEAR, (dt-dt_mon / 10) % 10); - msm6242b_write(sc, MSM6242B_1YEAR, dt-dt_mon % 10); + msm6242b_write(sc, MSM6242B_10YEAR, (dt-dt_year / 10) % 10); + msm6242b_write(sc, MSM6242B_1YEAR, dt-dt_year % 10); msm6242b_write(sc, MSM6242B_WEEK, dt-dt_wday); msm6242b_free(sc);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: rkujawa Date: Wed Dec 4 07:48:59 UTC 2013 Modified Files: src/sys/dev/ic: msm6242b.c Log Message: Fix RTC going backwards a year when saving time, because dt_mon != dt_year. Patch by Roc Valles. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/msm6242b.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Mon Oct 28 11:24:08 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Fix name of sysctl setup function. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/mcp980x.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/i2c/mcp980x.c diff -u src/sys/dev/i2c/mcp980x.c:1.4 src/sys/dev/i2c/mcp980x.c:1.5 --- src/sys/dev/i2c/mcp980x.c:1.4 Tue Oct 15 13:42:52 2013 +++ src/sys/dev/i2c/mcp980x.c Mon Oct 28 11:24:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mcp980x.c,v 1.4 2013/10/15 13:42:52 rkujawa Exp $ */ +/* $NetBSD: mcp980x.c,v 1.5 2013/10/28 11:24:08 rkujawa Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.4 2013/10/15 13:42:52 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.5 2013/10/28 11:24:08 rkujawa Exp $); #include sys/param.h #include sys/systm.h @@ -380,7 +380,7 @@ mcp980x_setup_sysctl(struct mcp980x_soft } -SYSCTL_SETUP(sysctl_lmtemp_setup, sysctl mcp980x subtree setup) +SYSCTL_SETUP(sysctl_mcp980x_setup, sysctl mcp980x subtree setup) { sysctl_createv(NULL, 0, NULL, NULL, CTLFLAG_PERMANENT, CTLTYPE_NODE, machdep, NULL, NULL, 0, NULL, 0,
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Mon Oct 28 11:24:08 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Fix name of sysctl setup function. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/mcp980x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/spi
Module Name:src Committed By: rkujawa Date: Sat Oct 26 15:18:21 UTC 2013 Modified Files: src/sys/dev/spi: m25p.c Log Message: Add support for M25P16, tested on Raspberry PI with Digilent PmodSF. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/spi/m25p.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/spi/m25p.c diff -u src/sys/dev/spi/m25p.c:1.3 src/sys/dev/spi/m25p.c:1.4 --- src/sys/dev/spi/m25p.c:1.3 Sun Apr 21 08:38:16 2013 +++ src/sys/dev/spi/m25p.c Sat Oct 26 15:18:21 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: m25p.c,v 1.3 2013/04/21 08:38:16 rkujawa Exp $ */ +/* $NetBSD: m25p.c,v 1.4 2013/10/26 15:18:21 rkujawa Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: m25p.c,v 1.3 2013/04/21 08:38:16 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: m25p.c,v 1.4 2013/10/26 15:18:21 rkujawa Exp $); #include sys/param.h #include sys/systm.h @@ -92,6 +92,7 @@ static const struct m25p_info { uint16_t mhz; } m25p_infos[] = { { 0x16, 0x20, 0x2017, STMicro M25P64, 8192, 64 }, /* 64Mbit */ + { 0x14, 0x20, 0x2015, STMicro M25P16, 2048, 64 }, /* 16Mbit */ { 0x12, 0x20, 0x2013, STMicro M25P40, 512, 64 }, /* 4Mbit */ { 0xc0, 0x20, 0x7117, STMicro M25PX64, 8192, 64 }, /* 64Mbit */ { 0x0, 0x20, 0xBB18, Numonyx N25Q128, 16384, 64 }, /* 128Mbit */
CVS commit: src/sys/dev/spi
Module Name:src Committed By: rkujawa Date: Sat Oct 26 15:18:21 UTC 2013 Modified Files: src/sys/dev/spi: m25p.c Log Message: Add support for M25P16, tested on Raspberry PI with Digilent PmodSF. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/spi/m25p.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 10:18:49 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Clean up register read and write functions, add functions for 8-bit read and write (needed to access config register). Add sysctl knob to set resolution from user space. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/mcp980x.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/i2c/mcp980x.c diff -u src/sys/dev/i2c/mcp980x.c:1.1 src/sys/dev/i2c/mcp980x.c:1.2 --- src/sys/dev/i2c/mcp980x.c:1.1 Mon May 6 22:04:12 2013 +++ src/sys/dev/i2c/mcp980x.c Tue Oct 15 10:18:49 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mcp980x.c,v 1.1 2013/05/06 22:04:12 rkujawa Exp $ */ +/* $NetBSD: mcp980x.c,v 1.2 2013/10/15 10:18:49 rkujawa Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -31,13 +31,12 @@ /* * Microchip MCP9800/1/2/3 2-Wire High-Accuracy Temperature Sensor driver. - * TODO: everything besides simple temperature read with default configuration. * * Note: MCP9805 is different and is supported by the sdtemp(4) driver. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.1 2013/05/06 22:04:12 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.2 2013/10/15 10:18:49 rkujawa Exp $); #include sys/param.h #include sys/systm.h @@ -45,6 +44,7 @@ __KERNEL_RCSID(0, $NetBSD: mcp980x.c,v #include sys/kernel.h #include sys/mutex.h #include sys/endian.h +#include sys/sysctl.h #include sys/bus.h #include dev/i2c/i2cvar.h @@ -59,6 +59,8 @@ struct mcp980x_softc { i2c_tag_t sc_tag; i2c_addr_t sc_addr; + int sc_res; + /* envsys(4) stuff */ struct sysmon_envsys *sc_sme; envsys_data_t sc_sensor; @@ -69,14 +71,21 @@ struct mcp980x_softc { static int mcp980x_match(device_t, cfdata_t, void *); static void mcp980x_attach(device_t, device_t, void *); -/*static uint8_t mcp980x_reg_read_1(struct mcp980x_softc *sc, uint8_t);*/ -static uint16_t mcp980x_reg_read_2(struct mcp980x_softc *sc, uint8_t reg); +static uint8_t mcp980x_reg_read_1(struct mcp980x_softc *, uint8_t); +static uint16_t mcp980x_reg_read_2(struct mcp980x_softc *, uint8_t); +static void mcp980x_reg_write_1(struct mcp980x_softc *, uint8_t, uint8_t); + +static uint8_t mcp980x_resolution_get(struct mcp980x_softc *); +static void mcp980x_resolution_set(struct mcp980x_softc *, uint8_t); -static uint32_t mcp980x_temperature(struct mcp980x_softc *sc); +static uint32_t mcp980x_temperature(struct mcp980x_softc *); static void mcp980x_envsys_register(struct mcp980x_softc *); static void mcp980x_envsys_refresh(struct sysmon_envsys *, envsys_data_t *); +static void mcp980x_setup_sysctl(struct mcp980x_softc *); +static int sysctl_mcp980x_res(SYSCTLFN_ARGS); + CFATTACH_DECL_NEW(mcp980x, sizeof (struct mcp980x_softc), mcp980x_match, mcp980x_attach, NULL, NULL); @@ -103,15 +112,18 @@ mcp980x_attach(device_t parent, device_t aprint_normal(: Microchip MCP980x Temperature Sensor\n); + sc-sc_res = MCP980X_CONFIG_ADC_RES_12BIT; + mcp980x_resolution_set(sc, sc-sc_res); + mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_NONE); + mcp980x_setup_sysctl(sc); mcp980x_envsys_register(sc); } static uint16_t mcp980x_reg_read_2(struct mcp980x_softc *sc, uint8_t reg) { - uint8_t wbuf[2]; uint16_t rv; if (iic_acquire_bus(sc-sc_tag, I2C_F_POLL) != 0) { @@ -119,9 +131,7 @@ mcp980x_reg_read_2(struct mcp980x_softc return 0; } - wbuf[0] = reg; - - if (iic_exec(sc-sc_tag, I2C_OP_READ_WITH_STOP, sc-sc_addr, wbuf, + if (iic_exec(sc-sc_tag, I2C_OP_READ_WITH_STOP, sc-sc_addr, reg, 1, rv, 2, I2C_F_POLL)) { aprint_error_dev(sc-sc_dev, cannot execute operation\n); iic_release_bus(sc-sc_tag, I2C_F_POLL); @@ -132,21 +142,17 @@ mcp980x_reg_read_2(struct mcp980x_softc return be16toh(rv); } -/* Will need that later for reading config register. */ -/* static uint8_t mcp980x_reg_read_1(struct mcp980x_softc *sc, uint8_t reg) { - uint8_t rv, wbuf[2]; + uint8_t rv; if (iic_acquire_bus(sc-sc_tag, I2C_F_POLL) != 0) { aprint_error_dev(sc-sc_dev, cannot acquire bus for read\n); return 0; } - wbuf[0] = reg; - - if (iic_exec(sc-sc_tag, I2C_OP_READ_WITH_STOP, sc-sc_addr, wbuf, + if (iic_exec(sc-sc_tag, I2C_OP_READ_WITH_STOP, sc-sc_addr, reg, 1, rv, 1, I2C_F_POLL)) { aprint_error_dev(sc-sc_dev, cannot execute operation\n); iic_release_bus(sc-sc_tag, I2C_F_POLL); @@ -155,7 +161,49 @@ mcp980x_reg_read_1(struct mcp980x_softc iic_release_bus(sc-sc_tag, I2C_F_POLL); return rv; -}*/ +} + +static void +mcp980x_reg_write_1(struct mcp980x_softc *sc, uint8_t reg, uint8_t val) +{ +if (iic_acquire_bus(sc-sc_tag, I2C_F_POLL) != 0) { + aprint_error_dev(sc-sc_dev, cannot acquire bus for write\n); + return; + } + +if (iic_exec(sc-sc_tag, I2C_OP_WRITE_WITH_STOP, sc-sc_addr, reg, + 1, val, 1,
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 10:27:55 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Simplify sysctl handling. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/mcp980x.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/i2c/mcp980x.c diff -u src/sys/dev/i2c/mcp980x.c:1.2 src/sys/dev/i2c/mcp980x.c:1.3 --- src/sys/dev/i2c/mcp980x.c:1.2 Tue Oct 15 10:18:49 2013 +++ src/sys/dev/i2c/mcp980x.c Tue Oct 15 10:27:55 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mcp980x.c,v 1.2 2013/10/15 10:18:49 rkujawa Exp $ */ +/* $NetBSD: mcp980x.c,v 1.3 2013/10/15 10:27:55 rkujawa Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.2 2013/10/15 10:18:49 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.3 2013/10/15 10:27:55 rkujawa Exp $); #include sys/param.h #include sys/systm.h @@ -308,25 +308,24 @@ sysctl_mcp980x_res(SYSCTLFN_ARGS) { struct sysctlnode node = *rnode; struct mcp980x_softc *sc = node.sysctl_data; - int newres; + int newres, err; + + node.sysctl_data = sc-sc_res; + if ((err = (sysctl_lookup(SYSCTLFN_CALL(node != 0) + return err; if (newp) { - node.sysctl_data = sc-sc_res; - if (sysctl_lookup(SYSCTLFN_CALL(node)) == 0) { - newres = *(int *)node.sysctl_data; - if (newres MCP980X_CONFIG_ADC_RES_12BIT) -return EINVAL; - sc-sc_res = (uint8_t) newres; - mcp980x_resolution_set(sc, sc-sc_res); - return 0; - } + newres = *(int *)node.sysctl_data; + if (newres MCP980X_CONFIG_ADC_RES_12BIT) + return EINVAL; + sc-sc_res = (uint8_t) newres; + mcp980x_resolution_set(sc, sc-sc_res); + return 0; } else { sc-sc_res = mcp980x_resolution_get(sc); - node.sysctl_data = sc-sc_res; node.sysctl_size = 4; - return (sysctl_lookup(SYSCTLFN_CALL(node))); } - return EINVAL; + return err; }
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Oct 15 11:22:58 UTC 2013 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Add information about user settable resolution via sysctl. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mcp980x.4 diff -u src/share/man/man4/mcp980x.4:1.2 src/share/man/man4/mcp980x.4:1.3 --- src/share/man/man4/mcp980x.4:1.2 Sat Jul 20 21:39:58 2013 +++ src/share/man/man4/mcp980x.4 Tue Oct 15 11:22:58 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mcp980x.4,v 1.2 2013/07/20 21:39:58 wiz Exp $ +.\ $NetBSD: mcp980x.4,v 1.3 2013/10/15 11:22:58 rkujawa Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd May 8, 2013 +.Dd October 15, 2013 .Dt MCP980X 4 .Os .Sh NAME @@ -38,10 +38,19 @@ .Sh DESCRIPTION The .Nm -driver provides minimal support for the MCP980x series of temperature sensors. +driver provides support for the MCP980x series of temperature sensors. It allows reporting ambient temperature through the .Xr envsys 4 API. +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 3 +variable are provided: +.Bl -tag -width machdep.mcp980x0.res +.It Va machdep.mcp980x0.res +ADC resolution (integer). +Valid values are 0-3, where 0 is 9-bit (0.5 Celsius degree) and 3 is 12-bit +(0.0625 Celsius degree) resolution. .Sh SEE ALSO .Xr envsys 4 .Sh HISTORY
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 13:42:53 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Add sysctl knobs to set temperature limit and hysteresis. Reaching the limit causes alert line of the chip to be asserted. These limits could be tied to critical limit set in envsys, but it's more versatile to keep it as separate value. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/mcp980x.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/i2c/mcp980x.c diff -u src/sys/dev/i2c/mcp980x.c:1.3 src/sys/dev/i2c/mcp980x.c:1.4 --- src/sys/dev/i2c/mcp980x.c:1.3 Tue Oct 15 10:27:55 2013 +++ src/sys/dev/i2c/mcp980x.c Tue Oct 15 13:42:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mcp980x.c,v 1.3 2013/10/15 10:27:55 rkujawa Exp $ */ +/* $NetBSD: mcp980x.c,v 1.4 2013/10/15 13:42:52 rkujawa Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -32,11 +32,13 @@ /* * Microchip MCP9800/1/2/3 2-Wire High-Accuracy Temperature Sensor driver. * + * TODO: better error checking, particurarly in user settable limits. + * * Note: MCP9805 is different and is supported by the sdtemp(4) driver. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.3 2013/10/15 10:27:55 rkujawa Exp $); +__KERNEL_RCSID(0, $NetBSD: mcp980x.c,v 1.4 2013/10/15 13:42:52 rkujawa Exp $); #include sys/param.h #include sys/systm.h @@ -60,6 +62,8 @@ struct mcp980x_softc { i2c_addr_t sc_addr; int sc_res; + int sc_hyst; + int sc_limit; /* envsys(4) stuff */ struct sysmon_envsys *sc_sme; @@ -78,6 +82,14 @@ static void mcp980x_reg_write_1(struct m static uint8_t mcp980x_resolution_get(struct mcp980x_softc *); static void mcp980x_resolution_set(struct mcp980x_softc *, uint8_t); +static int8_t mcp980x_hysteresis_get(struct mcp980x_softc *); +static void mcp980x_hysteresis_set(struct mcp980x_softc *, int8_t); +static int8_t mcp980x_templimit_get(struct mcp980x_softc *); +static void mcp980x_templimit_set(struct mcp980x_softc *, int8_t); + +static int8_t mcp980x_s8b_get(struct mcp980x_softc *, uint8_t); +static void mcp980x_s8b_set(struct mcp980x_softc *, uint8_t, int8_t); + static uint32_t mcp980x_temperature(struct mcp980x_softc *); static void mcp980x_envsys_register(struct mcp980x_softc *); @@ -85,6 +97,8 @@ static void mcp980x_envsys_refresh(struc static void mcp980x_setup_sysctl(struct mcp980x_softc *); static int sysctl_mcp980x_res(SYSCTLFN_ARGS); +static int sysctl_mcp980x_hysteresis(SYSCTLFN_ARGS); +static int sysctl_mcp980x_templimit(SYSCTLFN_ARGS); CFATTACH_DECL_NEW(mcp980x, sizeof (struct mcp980x_softc), mcp980x_match, mcp980x_attach, NULL, NULL); @@ -115,6 +129,9 @@ mcp980x_attach(device_t parent, device_t sc-sc_res = MCP980X_CONFIG_ADC_RES_12BIT; mcp980x_resolution_set(sc, sc-sc_res); + sc-sc_hyst = mcp980x_hysteresis_get(sc); + sc-sc_limit = mcp980x_templimit_get(sc); + mutex_init(sc-sc_lock, MUTEX_DEFAULT, IPL_NONE); mcp980x_setup_sysctl(sc); @@ -164,6 +181,27 @@ mcp980x_reg_read_1(struct mcp980x_softc } static void +mcp980x_reg_write_2(struct mcp980x_softc *sc, uint8_t reg, uint16_t val) +{ + uint16_t beval; + + beval = htobe16(val); + +if (iic_acquire_bus(sc-sc_tag, I2C_F_POLL) != 0) { + aprint_error_dev(sc-sc_dev, cannot acquire bus for write\n); + return; + } + +if (iic_exec(sc-sc_tag, I2C_OP_WRITE_WITH_STOP, sc-sc_addr, reg, + 1, beval, 2, I2C_F_POLL)) { + aprint_error_dev(sc-sc_dev, cannot execute operation\n); +} + + iic_release_bus(sc-sc_tag, I2C_F_POLL); + +} + +static void mcp980x_reg_write_1(struct mcp980x_softc *sc, uint8_t reg, uint8_t val) { if (iic_acquire_bus(sc-sc_tag, I2C_F_POLL) != 0) { @@ -180,6 +218,42 @@ mcp980x_reg_write_1(struct mcp980x_softc } +static int8_t +mcp980x_templimit_get(struct mcp980x_softc *sc) +{ + return mcp980x_s8b_get(sc, MCP980X_TEMP_LIMIT); +} + +static void +mcp980x_templimit_set(struct mcp980x_softc *sc, int8_t val) +{ + mcp980x_s8b_set(sc, MCP980X_TEMP_LIMIT, val); +} + +static int8_t +mcp980x_hysteresis_get(struct mcp980x_softc *sc) +{ + return mcp980x_s8b_get(sc, MCP980X_TEMP_HYSTERESIS); +} + +static void +mcp980x_hysteresis_set(struct mcp980x_softc *sc, int8_t val) +{ + mcp980x_s8b_set(sc, MCP980X_TEMP_HYSTERESIS, val); +} + +static int8_t +mcp980x_s8b_get(struct mcp980x_softc *sc, uint8_t reg) +{ + return mcp980x_reg_read_2(sc, reg) MCP980X_TEMP_HYSTLIMIT_INT_SHIFT; +} + +static void +mcp980x_s8b_set(struct mcp980x_softc *sc, uint8_t reg, int8_t val) +{ + mcp980x_reg_write_2(sc, reg, val MCP980X_TEMP_HYSTLIMIT_INT_SHIFT); +} + static uint8_t mcp980x_resolution_get(struct mcp980x_softc *sc) { @@ -292,6 +366,17 @@ mcp980x_setup_sysctl(struct mcp980x_soft sysctl_mcp980x_res, 1, (void *)sc, 0, CTL_MACHDEP, me-sysctl_num, CTL_CREATE, CTL_EOL); + sysctl_createv(NULL, 0,
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 13:43:51 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980xreg.h Log Message: Add forgotten register definitions for previous commit. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/mcp980xreg.h 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/i2c/mcp980xreg.h diff -u src/sys/dev/i2c/mcp980xreg.h:1.1 src/sys/dev/i2c/mcp980xreg.h:1.2 --- src/sys/dev/i2c/mcp980xreg.h:1.1 Mon May 6 22:04:12 2013 +++ src/sys/dev/i2c/mcp980xreg.h Tue Oct 15 13:43:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mcp980xreg.h,v 1.1 2013/05/06 22:04:12 rkujawa Exp $ */ +/* $NetBSD: mcp980xreg.h,v 1.2 2013/10/15 13:43:51 rkujawa Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -54,4 +54,8 @@ #define MCP980X_CONFIG_ADC_RES_11BIT 2 #define MCP980X_CONFIG_ADC_RES_12BIT 3 +#define MCP980X_TEMP_HYSTERESIS 0x2 +#define MCP980X_TEMP_LIMIT 0x3 +#define MCP980X_TEMP_HYSTLIMIT_INT_SHIFT 8 + #endif /* _MCP980XREG_H_ */
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Oct 15 13:45:09 UTC 2013 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Update man page to reflect latest changes (added sysctl knobs for temperature limit and hysteresis). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mcp980x.4 diff -u src/share/man/man4/mcp980x.4:1.3 src/share/man/man4/mcp980x.4:1.4 --- src/share/man/man4/mcp980x.4:1.3 Tue Oct 15 11:22:58 2013 +++ src/share/man/man4/mcp980x.4 Tue Oct 15 13:45:09 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mcp980x.4,v 1.3 2013/10/15 11:22:58 rkujawa Exp $ +.\ $NetBSD: mcp980x.4,v 1.4 2013/10/15 13:45:09 rkujawa Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -46,11 +46,17 @@ API. The following .Xr sysctl 3 variable are provided: -.Bl -tag -width machdep.mcp980x0.res +.Bl -tag -width machdep.mcp980x0.hysteresis .It Va machdep.mcp980x0.res ADC resolution (integer). Valid values are 0-3, where 0 is 9-bit (0.5 Celsius degree) and 3 is 12-bit (0.0625 Celsius degree) resolution. +.It Va machdep.mcp980x0.templimit +If the ambient temperature exceeds this limit, the chip asserts an alert line +(integer). +.It Va machdep.mcp980x0.hysteresis +Hysteresis for temperature limit (integer). +.El .Sh SEE ALSO .Xr envsys 4 .Sh HISTORY @@ -68,3 +74,8 @@ driver was written by MCP9805 chip is different and is supported by the .Xr sdtemp 4 driver. +.Pp +The MCP980x chip supports hysteresis and temperature limit values with +resolution of 0.5 Celsius degree, however the +.Nm +driver supports setting only integer values.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Oct 15 14:51:58 UTC 2013 Modified Files: src/share/man/man4: mcp980x.4 Log Message: s/with resolution/with a resolution/ Noticed by mbalmer@. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mcp980x.4 diff -u src/share/man/man4/mcp980x.4:1.4 src/share/man/man4/mcp980x.4:1.5 --- src/share/man/man4/mcp980x.4:1.4 Tue Oct 15 13:45:09 2013 +++ src/share/man/man4/mcp980x.4 Tue Oct 15 14:51:58 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mcp980x.4,v 1.4 2013/10/15 13:45:09 rkujawa Exp $ +.\ $NetBSD: mcp980x.4,v 1.5 2013/10/15 14:51:58 rkujawa Exp $ .\ .\ Copyright (c) 2013 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -75,7 +75,7 @@ MCP9805 chip is different and is support .Xr sdtemp 4 driver. .Pp -The MCP980x chip supports hysteresis and temperature limit values with +The MCP980x chip supports hysteresis and temperature limit values with a resolution of 0.5 Celsius degree, however the .Nm driver supports setting only integer values.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 10:18:49 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Clean up register read and write functions, add functions for 8-bit read and write (needed to access config register). Add sysctl knob to set resolution from user space. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/mcp980x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 10:27:55 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Simplify sysctl handling. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/mcp980x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Oct 15 11:22:58 UTC 2013 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Add information about user settable resolution via sysctl. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 13:42:53 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980x.c Log Message: Add sysctl knobs to set temperature limit and hysteresis. Reaching the limit causes alert line of the chip to be asserted. These limits could be tied to critical limit set in envsys, but it's more versatile to keep it as separate value. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/mcp980x.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Tue Oct 15 13:43:51 UTC 2013 Modified Files: src/sys/dev/i2c: mcp980xreg.h Log Message: Add forgotten register definitions for previous commit. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/mcp980xreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Oct 15 13:45:09 UTC 2013 Modified Files: src/share/man/man4: mcp980x.4 Log Message: Update man page to reflect latest changes (added sysctl knobs for temperature limit and hysteresis). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Tue Oct 15 14:51:58 UTC 2013 Modified Files: src/share/man/man4: mcp980x.4 Log Message: s/with resolution/with a resolution/ Noticed by mbalmer@. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/mcp980x.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Fri Oct 4 15:13:51 UTC 2013 Modified Files: src/sys/arch/amiga/conf: DRACO GENERIC GENERIC.in INSTALL MDINSTALL Log Message: Nuke long dead NKPTADD and NKPTADDSHIFT options from config files. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/arch/amiga/conf/DRACO cvs rdiff -u -r1.304 -r1.305 src/sys/arch/amiga/conf/GENERIC cvs rdiff -u -r1.119 -r1.120 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.122 -r1.123 src/sys/arch/amiga/conf/INSTALL cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amiga/conf/MDINSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/conf/DRACO diff -u src/sys/arch/amiga/conf/DRACO:1.172 src/sys/arch/amiga/conf/DRACO:1.173 --- src/sys/arch/amiga/conf/DRACO:1.172 Mon Sep 2 07:24:17 2013 +++ src/sys/arch/amiga/conf/DRACO Fri Oct 4 15:13:51 2013 @@ -1,4 +1,4 @@ -# $NetBSD: DRACO,v 1.172 2013/09/02 07:24:17 skrll Exp $ +# $NetBSD: DRACO,v 1.173 2013/10/04 15:13:51 rkujawa Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. @@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.172 $ +#ident GENERIC-$Revision: 1.173 $ maxusers 8 @@ -186,12 +186,6 @@ options DDB # Kernel debugger # #options LIMITMEM=24 # Do not use more than LIMITMEM MB of the # first bank of RAM. (default: unlimited) -#options NKPTADD=4 # set this for 4 additional KPT pages -#options NKPTADDSHIFT=24 # set this for 1 additional KPT page -# per 16 MB (124 bytes) of RAM -# uncomment and decrease this, or uncomment and -# increase NKPTADD if you get out of PT pages -# panics. # ATTENTION: There is NO WARRANTY AT ALL that the sync will be complete # before the 10 secondinterval ends, or that KBDRESET does work at all. Index: src/sys/arch/amiga/conf/GENERIC diff -u src/sys/arch/amiga/conf/GENERIC:1.304 src/sys/arch/amiga/conf/GENERIC:1.305 --- src/sys/arch/amiga/conf/GENERIC:1.304 Mon Sep 2 07:24:17 2013 +++ src/sys/arch/amiga/conf/GENERIC Fri Oct 4 15:13:51 2013 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.304 2013/09/02 07:24:17 skrll Exp $ +# $NetBSD: GENERIC,v 1.305 2013/10/04 15:13:51 rkujawa Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. @@ -29,7 +29,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.304 $ +#ident GENERIC-$Revision: 1.305 $ maxusers 8 @@ -198,12 +198,6 @@ options DDB # Kernel debugger # #options LIMITMEM=24 # Do not use more than LIMITMEM MB of the # first bank of RAM. (default: unlimited) -#options NKPTADD=4 # set this for 4 additional KPT pages -#options NKPTADDSHIFT=24 # set this for 1 additional KPT page -# per 16 MB (124 bytes) of RAM -# uncomment and decrease this, or uncomment and -# increase NKPTADD if you get out of PT pages -# panics. # ATTENTION: There is NO WARRANTY AT ALL that the sync will be complete # before the 10 secondinterval ends, or that KBDRESET does work at all. Index: src/sys/arch/amiga/conf/GENERIC.in diff -u src/sys/arch/amiga/conf/GENERIC.in:1.119 src/sys/arch/amiga/conf/GENERIC.in:1.120 --- src/sys/arch/amiga/conf/GENERIC.in:1.119 Sun Aug 11 16:15:52 2013 +++ src/sys/arch/amiga/conf/GENERIC.in Fri Oct 4 15:13:51 2013 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.in,v 1.119 2013/08/11 16:15:52 rkujawa Exp $ +# $NetBSD: GENERIC.in,v 1.120 2013/10/04 15:13:51 rkujawa Exp $ # ## # GENERIC machine description file @@ -52,7 +52,7 @@ include arch/amiga/conf/std.amiga options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.119 $ +#ident GENERIC-$Revision: 1.120 $ m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl makeoptions COPTS=-Os @@ -249,12 +249,6 @@ options DDB # Kernel debugger # #options LIMITMEM=24 # Do not use more than LIMITMEM MB of the # first bank of RAM. (default: unlimited) -#options NKPTADD=4 # set this for 4 additional KPT pages -#options NKPTADDSHIFT=24 # set this for 1 additional KPT page -# per 16 MB (124 bytes) of RAM -# uncomment and decrease this, or uncomment and -# increase NKPTADD if you get out of PT pages -# panics. # ATTENTION: There is NO WARRANTY AT ALL that the sync will be complete # before the 10 secondinterval ends, or that KBDRESET does work at all. Index: src/sys/arch/amiga/conf/INSTALL diff -u src/sys/arch/amiga/conf/INSTALL:1.122 src/sys/arch/amiga/conf/INSTALL:1.123 --- src/sys/arch/amiga/conf/INSTALL:1.122 Mon Sep 2 07:24:17 2013 +++ src/sys/arch/amiga/conf/INSTALL Fri Oct 4 15:13:51 2013 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.122 2013/09/02 07:24:17 skrll Exp $ +# $NetBSD: INSTALL,v 1.123
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Fri Oct 4 15:15:39 UTC 2013 Modified Files: src/share/man/man4: options.4 Log Message: Remove long dead options NKPTADD, NKPTADDSHIT. To generate a diff of this commit: cvs rdiff -u -r1.427 -r1.428 src/share/man/man4/options.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/options.4 diff -u src/share/man/man4/options.4:1.427 src/share/man/man4/options.4:1.428 --- src/share/man/man4/options.4:1.427 Thu Aug 22 07:17:11 2013 +++ src/share/man/man4/options.4 Fri Oct 4 15:15:39 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: options.4,v 1.427 2013/08/22 07:17:11 wiz Exp $ +.\ $NetBSD: options.4,v 1.428 2013/10/04 15:15:39 rkujawa Exp $ .\ .\ Copyright (c) 1996 .\ Perry E. Metzger. All rights reserved. @@ -2345,36 +2345,6 @@ If there, limit the part of the first me .Nx to value megabytes. Default is unlimited. -.It Cd options NKPTADD=addvalue -.It Cd options NKPTADDSHIFT=shiftvalue -The -.Tn CPU -specific -.Tn MMU -table for the kernel is pre-allocated at kernel startup time. -Part of it is scaled with -.Va maxproc , -to have enough room to hold the user program -.Tn MMU -tables; the second part is a fixed amount for the kernel itself. -.Pp -The third part accounts for the size of the file buffer cache. -Its size is either -.Dv NKPTADD -pages (if defined) or memory size in bytes divided by two to -the power of -.Dv NKPTADDSHIFT . -The default is undefined -.Dv NKPTADD -and -.Dv NKPTADDSHIFT=24 , -allowing for 16 buffers per megabyte of main memory (while -a GENERIC kernel allocates about half of that). -When you get can't get KPT page panics, you should increase -.Dv NKPTADD -(if defined), or decrease -.Dv NKPTADDSHIFT -by one. .It Cd options P5PPC68KBOARD Add special support for Phase5 mixed 68k+PPC boards. Currently, this only affects rebooting from
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Fri Oct 4 15:13:51 UTC 2013 Modified Files: src/sys/arch/amiga/conf: DRACO GENERIC GENERIC.in INSTALL MDINSTALL Log Message: Nuke long dead NKPTADD and NKPTADDSHIFT options from config files. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/arch/amiga/conf/DRACO cvs rdiff -u -r1.304 -r1.305 src/sys/arch/amiga/conf/GENERIC cvs rdiff -u -r1.119 -r1.120 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.122 -r1.123 src/sys/arch/amiga/conf/INSTALL cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amiga/conf/MDINSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Fri Oct 4 15:15:39 UTC 2013 Modified Files: src/share/man/man4: options.4 Log Message: Remove long dead options NKPTADD, NKPTADDSHIT. To generate a diff of this commit: cvs rdiff -u -r1.427 -r1.428 src/share/man/man4/options.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Thu Oct 3 13:40:26 UTC 2013 Modified Files: src/sys/arch/amiga/conf: WSCONS Log Message: Enable USB keyboard and mouse in the WSCONS kernel. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/amiga/conf/WSCONS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/conf/WSCONS diff -u src/sys/arch/amiga/conf/WSCONS:1.66 src/sys/arch/amiga/conf/WSCONS:1.67 --- src/sys/arch/amiga/conf/WSCONS:1.66 Fri Aug 17 20:11:38 2012 +++ src/sys/arch/amiga/conf/WSCONS Thu Oct 3 13:40:26 2013 @@ -1,4 +1,4 @@ -# $NetBSD: WSCONS,v 1.66 2012/08/17 20:11:38 abs Exp $ +# $NetBSD: WSCONS,v 1.67 2013/10/03 13:40:26 rkujawa Exp $ # GENERIC with wscons(4) # @@ -15,8 +15,14 @@ options FONT_VT220ISO8x16 wskbd0 at kbd0 console ? +ukbd* at uhidev? reportid ? +wskbd* at ukbd? console ? + wsmouse* at ms? +ums* at uhidev? reportid ? +wsmouse* at ums? + no grfcc0 at mainbus0 no grfrt0 at zbus0 no grfrh0 at zbus0
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: rkujawa Date: Thu Oct 3 13:40:26 UTC 2013 Modified Files: src/sys/arch/amiga/conf: WSCONS Log Message: Enable USB keyboard and mouse in the WSCONS kernel. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/amiga/conf/WSCONS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Sun Sep 8 14:59:42 UTC 2013 Modified Files: src/sys/dev/i2c: files.i2c Added Files: src/sys/dev/i2c: mpl115a.c mpl115areg.h Log Message: Preliminary support for MPL115A2 pressure sensor. It works, but accurracy is awful. I should add presure as a new type of sensor to envsys at some point... To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/mpl115a.c src/sys/dev/i2c/mpl115areg.h 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/i2c/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.51 src/sys/dev/i2c/files.i2c:1.52 --- src/sys/dev/i2c/files.i2c:1.51 Fri Sep 6 00:56:12 2013 +++ src/sys/dev/i2c/files.i2c Sun Sep 8 14:59:42 2013 @@ -1,4 +1,4 @@ -# $NetBSD: files.i2c,v 1.51 2013/09/06 00:56:12 matt Exp $ +# $NetBSD: files.i2c,v 1.52 2013/09/08 14:59:42 rkujawa Exp $ obsolete defflag opt_i2cbus.h I2C_SCAN define i2cbus { } @@ -198,3 +198,9 @@ file dev/i2c/mcp980x.c mcp980x device w83795g: gpiobus, sysmon_envsys, sysmon_wdog attach w83795g at iic file dev/i2c/w83795g.c w83795g + +# Freescale MPL115A2 +device mpl115a: sysmon_envsys +attach mpl115a at iic +filedev/i2c/mpl115a.c mpl115a + Added files: Index: src/sys/dev/i2c/mpl115a.c diff -u /dev/null src/sys/dev/i2c/mpl115a.c:1.1 --- /dev/null Sun Sep 8 14:59:42 2013 +++ src/sys/dev/i2c/mpl115a.c Sun Sep 8 14:59:42 2013 @@ -0,0 +1,303 @@ +/* $NetBSD: mpl115a.c,v 1.1 2013/09/08 14:59:42 rkujawa Exp $ */ + +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Radoslaw Kujawa. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION OR CONTRIBUTORS + * 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. + */ + +/* + * Freescale MPL115A2 miniature digital barometer driver. + * + * This driver could be split into bus-indepented driver and I2C-specific + * attachment, as SPI variant of this chip also exist. + */ + +#include sys/cdefs.h +__KERNEL_RCSID(0, $NetBSD: mpl115a.c,v 1.1 2013/09/08 14:59:42 rkujawa Exp $); + +#include sys/param.h +#include sys/systm.h +#include sys/device.h +#include sys/kernel.h +#include sys/mutex.h +#include sys/endian.h + +#include sys/bus.h +#include dev/i2c/i2cvar.h + +#include dev/sysmon/sysmonvar.h + +#include dev/i2c/mpl115areg.h + +#define MPL115A_DEBUG 1 + +struct mpl115a_softc { + device_t sc_dev; + + i2c_tag_t sc_tag; + i2c_addr_t sc_addr; + + /* raw coefficients */ + int16_t sc_a0; + int16_t sc_b1; + int16_t sc_b2; + int16_t sc_c12; + + /* envsys(4) stuff */ + struct sysmon_envsys *sc_sme; + envsys_data_t sc_sensor; + kmutex_t sc_lock; +}; + + +static int mpl115a_match(device_t, cfdata_t, void *); +static void mpl115a_attach(device_t, device_t, void *); + +static uint8_t mpl115a_reg_read_1(struct mpl115a_softc *sc, uint8_t); +static void mpl115a_reg_write_1(struct mpl115a_softc *sc, uint8_t, uint8_t); + +static void mpl115a_load_coeffs(struct mpl115a_softc *sc); +static uint16_t mpl115a_make_coeff(uint8_t msb, uint8_t lsb); +static uint32_t mpl115a_pressure(struct mpl115a_softc *sc); +static uint32_t mpl115a_calc(struct mpl115a_softc *sc, uint16_t padc, uint16_t tadc) ; + +static void mpl115a_envsys_register(struct mpl115a_softc *); +static void mpl115a_envsys_refresh(struct sysmon_envsys *, envsys_data_t *); + +CFATTACH_DECL_NEW(mpl115a, sizeof (struct mpl115a_softc), +mpl115a_match, mpl115a_attach, NULL, NULL); + +static int +mpl115a_match(device_t parent, cfdata_t cf, void *aux) +{ + struct i2c_attach_args *ia = aux; + + if (ia-ia_addr
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Sun Sep 8 15:57:39 UTC 2013 Modified Files: src/share/man/man4: Makefile Added Files: src/share/man/man4: mpl115a.4 Log Message: Add mpl115a(4) man page for the new MPL115A2 pressure sensor driver. To generate a diff of this commit: cvs rdiff -u -r1.601 -r1.602 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/mpl115a.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/Makefile diff -u src/share/man/man4/Makefile:1.601 src/share/man/man4/Makefile:1.602 --- src/share/man/man4/Makefile:1.601 Tue Aug 6 22:33:59 2013 +++ src/share/man/man4/Makefile Sun Sep 8 15:57:39 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.601 2013/08/06 22:33:59 soren Exp $ +# $NetBSD: Makefile,v 1.602 2013/09/08 15:57:39 rkujawa Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \ @@ -121,8 +121,8 @@ MAN+= sc.4 si.4 MAN+= fwohci.4 fwip.4 sbp.4 # machine-independent I2C devices -MAN+= dbcool.4 g760a.4 lmtemp.4 mcp980x.4 sdtemp.4 smscmon.4 spdmem.4 \ - tps65217pmic.4 +MAN+= dbcool.4 g760a.4 lmtemp.4 mcp980x.4 mpl115a.4 sdtemp.4 smscmon.4 \ + spdmem.4 tps65217pmic.4 # machine-independent SPI devices MAN += m25p.4 tm121temp.4 Added files: Index: src/share/man/man4/mpl115a.4 diff -u /dev/null src/share/man/man4/mpl115a.4:1.1 --- /dev/null Sun Sep 8 15:57:39 2013 +++ src/share/man/man4/mpl115a.4 Sun Sep 8 15:57:39 2013 @@ -0,0 +1,67 @@ +.\ $NetBSD: mpl115a.4,v 1.1 2013/09/08 15:57:39 rkujawa Exp $ +.\ +.\ Copyright (c) 2013 The NetBSD Foundation, Inc. +.\ All rights reserved. +.\ +.\ This code is derived from software contributed to The NetBSD Foundation +.\ by Radoslaw Kujawa. +.\ +.\ 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. +.\ +.\ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\ ``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 FOUNDATION OR CONTRIBUTORS +.\ 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. +.\ +.Dd September 8, 2013 +.Dt MPL115A 4 +.Os +.Sh NAME +.Nm mpl115a +.Nd Freescale MPL115A2 absolute pressure sensor driver +.Sh SYNOPSIS +.Cd mpl115a* at iic? addr 0x60 +.Sh DESCRIPTION +The +.Nm +driver provides support for the MPL115A2 pressure sensor. +It allows reporting absolute pressure through the +.Xr envsys 4 +API. +.Sh SEE ALSO +.Xr envsys 4 +.Sh HISTORY +The +.Nm +device first appeared in +.Nx 7.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Radoslaw Kujawa Aq radoslaw.kuj...@gmail.com . +The fixed-point pressure calculation algorithm was suggested by +.An Matt Thomas . +.Sh CAVEATS +The MPL115A2 chip has an accuracy of +/- 1 kPa, which makes it not very useful +for weather-related applications. +.Pp +The +.Xr envsys 4 +API does not support pressure reporting yet, so the result is reported just as +integer number.
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Sun Sep 8 16:04:21 UTC 2013 Modified Files: src/doc: CHANGES Log Message: Note the new driver for MPL115A2. To generate a diff of this commit: cvs rdiff -u -r1.1846 -r1.1847 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1846 src/doc/CHANGES:1.1847 --- src/doc/CHANGES:1.1846 Wed Sep 4 19:51:37 2013 +++ src/doc/CHANGES Sun Sep 8 16:04:21 2013 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1846 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.1847 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -279,3 +279,5 @@ Changes from NetBSD 6.0 to NetBSD 7.0: card. [rkujawa 20130808] postfix(1): Import version 2.9.7 [tron 20130821] less(1): Import version 458 [tron 20130804] + mpl115a(4): Add driver for Freescale MPL115A2 I2C absolute pressure + sensor. [rkujawa 20130908]
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: rkujawa Date: Sun Sep 8 14:59:42 UTC 2013 Modified Files: src/sys/dev/i2c: files.i2c Added Files: src/sys/dev/i2c: mpl115a.c mpl115areg.h Log Message: Preliminary support for MPL115A2 pressure sensor. It works, but accurracy is awful. I should add presure as a new type of sensor to envsys at some point... To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/mpl115a.c src/sys/dev/i2c/mpl115areg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: rkujawa Date: Sun Sep 8 15:57:39 UTC 2013 Modified Files: src/share/man/man4: Makefile Added Files: src/share/man/man4: mpl115a.4 Log Message: Add mpl115a(4) man page for the new MPL115A2 pressure sensor driver. To generate a diff of this commit: cvs rdiff -u -r1.601 -r1.602 src/share/man/man4/Makefile cvs rdiff -u -r0 -r1.1 src/share/man/man4/mpl115a.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/man
Module Name:src Committed By: rkujawa Date: Sun Sep 8 16:01:47 UTC 2013 Modified Files: src/distrib/sets/lists/man: mi Log Message: Add mpl115a(4) man page to dist list. To generate a diff of this commit: cvs rdiff -u -r1.1435 -r1.1436 src/distrib/sets/lists/man/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: rkujawa Date: Sun Sep 8 16:04:21 UTC 2013 Modified Files: src/doc: CHANGES Log Message: Note the new driver for MPL115A2. To generate a diff of this commit: cvs rdiff -u -r1.1846 -r1.1847 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: rkujawa Date: Sat Sep 7 17:23:55 UTC 2013 Modified Files: src/sys/dev: DEVNAMES Log Message: Add forgotten xsh device. To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 src/sys/dev/DEVNAMES 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/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.284 src/sys/dev/DEVNAMES:1.285 --- src/sys/dev/DEVNAMES:1.284 Tue Jan 29 00:54:13 2013 +++ src/sys/dev/DEVNAMES Sat Sep 7 17:23:55 2013 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.284 2013/01/29 00:54:13 rkujawa Exp $ +# $NetBSD: DEVNAMES,v 1.285 2013/09/07 17:23:55 rkujawa Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system somewhere should first @@ -1531,6 +1531,8 @@ xge MI xhci MI xi MI xmi MI +xsh amiga +xsh amigappc xsii pmax xvif xen xy MI
CVS commit: src/sys/dev
Module Name:src Committed By: rkujawa Date: Sat Sep 7 17:23:55 UTC 2013 Modified Files: src/sys/dev: DEVNAMES Log Message: Add forgotten xsh device. To generate a diff of this commit: cvs rdiff -u -r1.284 -r1.285 src/sys/dev/DEVNAMES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.