CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Sun Aug 27 05:46:11 UTC 2017 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.1 Log Message: one more update to 1493 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-7.1.1 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-7.1.1 diff -u src/doc/CHANGES-7.1.1:1.1.2.28 src/doc/CHANGES-7.1.1:1.1.2.29 --- src/doc/CHANGES-7.1.1:1.1.2.28 Fri Aug 25 03:51:30 2017 +++ src/doc/CHANGES-7.1.1 Sun Aug 27 05:46:11 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.1,v 1.1.2.28 2017/08/25 03:51:30 snj Exp $ +# $NetBSD: CHANGES-7.1.1,v 1.1.2.29 2017/08/27 05:46:11 snj Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.1.1 release: @@ -3618,6 +3618,7 @@ distrib/sets/lists/debug/md.amd64 patch distrib/sets/lists/debug/md.sparc64 patch distrib/sets/lists/debug/shl.mi 1.157 via patch external/bsd/dhcp/Makefile.inc 1.17 +external/gpl2/xcvs/bin/xcvs/Makefile 1.5 libexec/telnetd/Makefile 1.50 share/mk/bsd.prog.mk1.301 usr.bin/passwd/Makefile1.45
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: snj Date: Sun Aug 27 05:46:11 UTC 2017 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.1 Log Message: one more update to 1493 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-7.1.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Sun Aug 27 05:45:27 UTC 2017 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: one more update to 1493 To generate a diff of this commit: cvs rdiff -u -r1.1.2.60 -r1.1.2.61 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: snj Date: Sun Aug 27 05:45:27 UTC 2017 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: one more update to 1493 To generate a diff of this commit: cvs rdiff -u -r1.1.2.60 -r1.1.2.61 src/doc/CHANGES-7.0.3 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-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.60 src/doc/CHANGES-7.0.3:1.1.2.61 --- src/doc/CHANGES-7.0.3:1.1.2.60 Fri Aug 25 05:33:40 2017 +++ src/doc/CHANGES-7.0.3 Sun Aug 27 05:45:27 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.60 2017/08/25 05:33:40 snj Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.61 2017/08/27 05:45:27 snj Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -4908,6 +4908,7 @@ distrib/sets/lists/debug/md.amd64 patch distrib/sets/lists/debug/md.sparc64 patch distrib/sets/lists/debug/shl.mi 1.157 via patch external/bsd/dhcp/Makefile.inc 1.17 +external/gpl2/xcvs/bin/xcvs/Makefile 1.5 libexec/telnetd/Makefile 1.50 share/mk/bsd.prog.mk1.301 usr.bin/passwd/Makefile1.45
CVS commit: [netbsd-7-1] src/external/gpl2/xcvs/bin/xcvs
Module Name:src Committed By: snj Date: Sun Aug 27 05:45:46 UTC 2017 Modified Files: src/external/gpl2/xcvs/bin/xcvs [netbsd-7-1]: Makefile Log Message: Pull up following revision(s) (requested by mrg in ticket #1493): external/gpl2/xcvs/bin/xcvs/Makefile: revision 1.5 add sqlite3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.20.1 src/external/gpl2/xcvs/bin/xcvs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/bin/xcvs/Makefile diff -u src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4 src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4.20.1 --- src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4 Fri Mar 9 00:14:16 2012 +++ src/external/gpl2/xcvs/bin/xcvs/Makefile Sun Aug 27 05:45:46 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2012/03/09 00:14:16 christos Exp $ +# $NetBSD: Makefile,v 1.4.20.1 2017/08/27 05:45:46 snj Exp $ .include "${.CURDIR}/../../Makefile.inc" PROG= xcvs @@ -47,8 +47,8 @@ LDADD+= -lasn1 # libcrypto is required by libgssapi, libkrb5, and libhx509 # libwind is required by libhx509 CPPFLAGS+= -DENCRYPTION -DPADD+= ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBCRYPTO} -LDADD+= -lcom_err -lroken -lwind -lcrypto +DPADD+= ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBCRYPTO} ${LIBSQLITE3} +LDADD+= -lcom_err -lroken -lwind -lcrypto -lsqlite3 # libutil is required by libroken
CVS commit: [netbsd-7-0] src/external/gpl2/xcvs/bin/xcvs
Module Name:src Committed By: snj Date: Sun Aug 27 05:44:57 UTC 2017 Modified Files: src/external/gpl2/xcvs/bin/xcvs [netbsd-7-0]: Makefile Log Message: Pull up following revision(s) (requested by mrg in ticket #1493): external/gpl2/xcvs/bin/xcvs/Makefile: revision 1.5 add sqlite3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.12.1 src/external/gpl2/xcvs/bin/xcvs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-1] src/external/gpl2/xcvs/bin/xcvs
Module Name:src Committed By: snj Date: Sun Aug 27 05:45:46 UTC 2017 Modified Files: src/external/gpl2/xcvs/bin/xcvs [netbsd-7-1]: Makefile Log Message: Pull up following revision(s) (requested by mrg in ticket #1493): external/gpl2/xcvs/bin/xcvs/Makefile: revision 1.5 add sqlite3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.20.1 src/external/gpl2/xcvs/bin/xcvs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7-0] src/external/gpl2/xcvs/bin/xcvs
Module Name:src Committed By: snj Date: Sun Aug 27 05:44:57 UTC 2017 Modified Files: src/external/gpl2/xcvs/bin/xcvs [netbsd-7-0]: Makefile Log Message: Pull up following revision(s) (requested by mrg in ticket #1493): external/gpl2/xcvs/bin/xcvs/Makefile: revision 1.5 add sqlite3 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.12.1 src/external/gpl2/xcvs/bin/xcvs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl2/xcvs/bin/xcvs/Makefile diff -u src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4 src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4.12.1 --- src/external/gpl2/xcvs/bin/xcvs/Makefile:1.4 Fri Mar 9 00:14:16 2012 +++ src/external/gpl2/xcvs/bin/xcvs/Makefile Sun Aug 27 05:44:57 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2012/03/09 00:14:16 christos Exp $ +# $NetBSD: Makefile,v 1.4.12.1 2017/08/27 05:44:57 snj Exp $ .include "${.CURDIR}/../../Makefile.inc" PROG= xcvs @@ -47,8 +47,8 @@ LDADD+= -lasn1 # libcrypto is required by libgssapi, libkrb5, and libhx509 # libwind is required by libhx509 CPPFLAGS+= -DENCRYPTION -DPADD+= ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBCRYPTO} -LDADD+= -lcom_err -lroken -lwind -lcrypto +DPADD+= ${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBCRYPTO} ${LIBSQLITE3} +LDADD+= -lcom_err -lroken -lwind -lcrypto -lsqlite3 # libutil is required by libroken
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:22:17 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: Add PocketCHIP display and input support. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/conf/SUNXI 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/evbarm/conf/SUNXI diff -u src/sys/arch/evbarm/conf/SUNXI:1.23 src/sys/arch/evbarm/conf/SUNXI:1.24 --- src/sys/arch/evbarm/conf/SUNXI:1.23 Fri Aug 25 00:07:03 2017 +++ src/sys/arch/evbarm/conf/SUNXI Sun Aug 27 02:22:17 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.23 2017/08/25 00:07:03 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.24 2017/08/27 02:22:17 jmcneill Exp $ # # Allwinner sunxi family # @@ -23,6 +23,7 @@ makeoptions DTS=" sun5i-gr8-chip-pro.dts sun5i-r8-chip.dts + sun5i-r8-pocketchip.dts sun6i-a31-app4-evb1.dts sun6i-a31-colombus.dts @@ -135,6 +136,8 @@ sunxitwi* at fdt? # TWI options GTTWSI_ALLWINNER # XXX this should be a driver flag sunxirsb* at fdt? # P2WI/RSB iic* at i2cbus? +tcakp* at iic? # TI TCA8418 Keypad Scan IC +wskbd* at tcakp? console ? # RTC sunxirtc* at fdt? # RTC @@ -154,6 +157,29 @@ ld2 at sdmmc2 ld3 at sdmmc3 ld* at sdmmc? +# Display +genfb* at fdt? +wsdisplay* at genfb? +options VCONS_DRAW_INTR +options WSEMUL_VT100 +options WS_DEFAULT_FG=WSCOL_WHITE +options WS_DEFAULT_BG=WSCOL_BLACK +options WS_KERNEL_FG=WSCOL_GREEN +options WS_KERNEL_BG=WSCOL_BLACK +options WSDISPLAY_COMPAT_PCVT +options WSDISPLAY_COMPAT_SYSCONS +options WSDISPLAY_COMPAT_USL +options WSDISPLAY_COMPAT_RAWKBD +options WSDISPLAY_DEFAULTSCREENS=4 + +# Touch Screen controller +sunxits* at fdt? # Touch Screen controller +wsmouse* at sunxits? mux 0 + +# wscons pseudo-devices +pseudo-device wsfont +pseudo-device wsmux + # USB 2.0 sunxiusbphy* at fdt? pass 9 # USB PHY ehci* at fdt? # EHCI
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:22:17 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: Add PocketCHIP display and input support. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/conf/SUNXI Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/dts
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:20:50 UTC 2017 Added Files: src/sys/arch/arm/dts: sun5i-r8-pocketchip.dts Log Message: Add a PocketCHIP -specific dts with information about the keyboard and touch screen. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/dts/sun5i-r8-pocketchip.dts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/arm/dts/sun5i-r8-pocketchip.dts diff -u /dev/null src/sys/arch/arm/dts/sun5i-r8-pocketchip.dts:1.1 --- /dev/null Sun Aug 27 02:20:50 2017 +++ src/sys/arch/arm/dts/sun5i-r8-pocketchip.dts Sun Aug 27 02:20:49 2017 @@ -0,0 +1,123 @@ +/* $NetBSD: sun5i-r8-pocketchip.dts,v 1.1 2017/08/27 02:20:49 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * 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 "../../../external/gpl2/dts/dist/arch/arm/boot/dts/sun5i-r8-chip.dts" + +#include +#include +#include + +/ { + model = "NextThing PocketC.H.I.P."; + compatible = "nextthing,chip", "allwinner,sun5i-r8", "allwinner,sun5i-a13"; +}; + +/* Keyboard */ + { + status = "okay"; + + keyboard: keyboard@34 { + compatible = "ti,tca8418"; + reg = <0x34>; + interrupt-parent = <>; + interrupts = <6 1 IRQ_TYPE_EDGE_FALLING>; + + keypad,num-rows = <6>; + keypad,num-columns = <10>; + keypad,autorepeat; + + linux,keymap = < + MATRIX_KEY(0, 0, 13) + MATRIX_KEY(0, 1, KEY_1) + MATRIX_KEY(0, 2, KEY_2) + MATRIX_KEY(0, 3, KEY_3) + MATRIX_KEY(0, 4, KEY_4) + MATRIX_KEY(0, 5, KEY_5) + MATRIX_KEY(0, 6, KEY_6) + MATRIX_KEY(0, 7, KEY_7) + MATRIX_KEY(0, 8, KEY_8) + MATRIX_KEY(0, 9, KEY_9) + + MATRIX_KEY(1, 0, KEY_Q) + MATRIX_KEY(1, 1, KEY_W) + MATRIX_KEY(1, 2, KEY_E) + MATRIX_KEY(1, 3, KEY_R) + MATRIX_KEY(1, 4, KEY_T) + MATRIX_KEY(1, 5, KEY_Y) + MATRIX_KEY(1, 6, KEY_U) + MATRIX_KEY(1, 7, KEY_I) + MATRIX_KEY(1, 8, KEY_O) + MATRIX_KEY(1, 9, KEY_P) + + MATRIX_KEY(2, 0, KEY_A) + MATRIX_KEY(2, 1, KEY_S) + MATRIX_KEY(2, 2, KEY_D) + MATRIX_KEY(2, 3, KEY_F) + MATRIX_KEY(2, 4, KEY_G) + MATRIX_KEY(2, 5, KEY_H) + MATRIX_KEY(2, 6, KEY_J) + MATRIX_KEY(2, 7, KEY_K) + MATRIX_KEY(2, 8, KEY_L) + MATRIX_KEY(2, 9, KEY_ENTER) + + MATRIX_KEY(3, 0, KEY_TAB) + MATRIX_KEY(3, 1, KEY_Z) + MATRIX_KEY(3, 2, KEY_X) + MATRIX_KEY(3, 3, KEY_C) + MATRIX_KEY(3, 4, KEY_V) + MATRIX_KEY(3, 5, KEY_B) + MATRIX_KEY(3, 6, KEY_N) + MATRIX_KEY(3, 7, KEY_M) + MATRIX_KEY(3, 8, KEY_UP) + MATRIX_KEY(3, 9, KEY_DOWN) + + MATRIX_KEY(4, 0, KEY_ESC) + MATRIX_KEY(4, 1, KEY_RIGHTALT) + MATRIX_KEY(4, 2, KEY_LEFTALT) + MATRIX_KEY(4, 3, KEY_SPACE) + MATRIX_KEY(4, 4, KEY_RIGHTCTRL) + MATRIX_KEY(4, 5, KEY_SLASH) + MATRIX_KEY(4, 6, KEY_RIGHTSHIFT) + MATRIX_KEY(4, 8, KEY_LEFT) + MATRIX_KEY(4, 9, KEY_RIGHT) + + MATRIX_KEY(5, 0, KEY_LEFTSHIFT) + MATRIX_KEY(5, 1, KEY_0) + MATRIX_KEY(5, 2, KEY_KPMINUS) + MATRIX_KEY(5, 3, KEY_BACKSPACE) + MATRIX_KEY(5, 4, KEY_DOT) + >; + }; +}; + +/* Touchscreen */ + { + touchscreen-inverted-x; + touchscreen-inverted-y; + allwinner,ts-attached; +};
CVS commit: src/sys/arch/arm/dts
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:20:50 UTC 2017 Added Files: src/sys/arch/arm/dts: sun5i-r8-pocketchip.dts Log Message: Add a PocketCHIP -specific dts with information about the keyboard and touch screen. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/dts/sun5i-r8-pocketchip.dts Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:19:46 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sunxi_ts.c Log Message: Add sun5i touchscreen driver. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_ts.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/arm/sunxi/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.18 src/sys/arch/arm/sunxi/files.sunxi:1.19 --- src/sys/arch/arm/sunxi/files.sunxi:1.18 Sat Aug 26 22:24:50 2017 +++ src/sys/arch/arm/sunxi/files.sunxi Sun Aug 27 02:19:46 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.18 2017/08/26 22:24:50 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.19 2017/08/27 02:19:46 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -143,6 +143,11 @@ file arch/arm/sunxi/sun8i_h3_codec.c h3 attach genfb at fdt with sunxi_debe file arch/arm/sunxi/sunxi_debe.c sunxi_debe +# Touch Screen controller +device sunxits: wsmousedev, tpcalib +attach sunxits at fdt with sunxi_ts +file arch/arm/sunxi/sunxi_ts.c sunxi_ts + # SOC parameters defflag opt_soc.h SOC_SUNXI defflag opt_soc.h SOC_SUN5I: SOC_SUNXI Added files: Index: src/sys/arch/arm/sunxi/sunxi_ts.c diff -u /dev/null src/sys/arch/arm/sunxi/sunxi_ts.c:1.1 --- /dev/null Sun Aug 27 02:19:46 2017 +++ src/sys/arch/arm/sunxi/sunxi_ts.c Sun Aug 27 02:19:46 2017 @@ -0,0 +1,343 @@ +/* $NetBSD: sunxi_ts.c,v 1.1 2017/08/27 02:19:46 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * 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 + +__KERNEL_RCSID(0, "$NetBSD: sunxi_ts.c,v 1.1 2017/08/27 02:19:46 jmcneill Exp $"); + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#define TS_TP_SENSITIVITY_ADJUST_DEFAULT 15 +#define TS_FILTER_TYPE_DEFAULT 1 + +#define TP_CTRL0 0x00 +#define TP_CTRL0_ADC_FIRST_DLY __BITS(31,24) +#define TP_CTRL0_ADC_FIRST_DLY_MODE __BIT(23) +#define TP_CTRL0_ADC_CLK_SELECT __BIT(22) +#define TP_CTRL0_ADC_CLK_DIVIDER __BITS(21,20) +#define TP_CTRL0_FS_DIV __BITS(19,16) +#define TP_CTRL0_T_ACQ __BITS(15,0) +#define TP_CTRL1 0x04 +#define TP_CTRL1_STYLUS_UP_DEBOUNCE __BITS(19,12) +#define TP_CTRL1_STYLUS_UP_DEBOUNCE_EN __BIT(9) +#define TP_CTRL1_TOUCH_PAN_CALI_EN __BIT(6) +#define TP_CTRL1_TP_DUAL_EN __BIT(5) +#define TP_CTRL1_TP_MODE_EN __BIT(4) +#define TP_CTRL1_TP_ADC_SELECT __BIT(3) +#define TP_CTRL1_ADC_CHAN_SELECT __BITS(2,0) +#define TP_CTRL2 0x08 +#define TP_CTRL2_SENSITIVE_ADJUST __BITS(31,28) +#define TP_CTRL2_MODE_SELECT __BITS(27,26) +#define TP_CTRL2_PRE_MEA_EN __BIT(24) +#define TP_CTRL2_PRE_MEA_THRE_CNT __BITS(23,0) +#define TP_CTRL3 0x0c +#define TP_CTRL3_FILTER_EN __BIT(2) +#define TP_CTRL3_FILTER_TYPE __BITS(1,0) +#define TP_INT 0x10 +#define TP_INT_OVERRUN_IRQ_EN __BIT(17) +#define TP_INT_DATA_IRQ_EN __BIT(16) +#define TP_INT_DATA_XY_CHANGE __BIT(13) +#define TP_INT_FIFO_TRIG_LEVEL __BITS(12,8) +#define TP_INT_DATA_DRQ_EN __BIT(7) +#define TP_INT_FIFO_FLUSH __BIT(4) +#define TP_INT_UP_IRQ_EN __BIT(1) +#define TP_INT_DOWN_IRQ_EN __BIT(0) +#define TP_FIFOCS 0x14 +#define TP_FIFOCS_OVERRUN_PENDING __BIT(17) +#define TP_FIFOCS_DATA_PENDING __BIT(16) +#define TP_FIFOCS_RXA_CNT __BITS(12,8) +#define TP_FIFOCS_IDLE_FLG __BIT(2) +#define TP_FIFOCS_UP_PENDING __BIT(1) +#define TP_FIFOCS_DOWN_PENDING __BIT(0) +#define
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:19:46 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sunxi_ts.c Log Message: Add sun5i touchscreen driver. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_ts.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/tpctl
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:19:08 UTC 2017 Modified Files: src/usr.sbin/tpctl: fb.c Log Message: Try to use standard wsdisplay ioctls when HPCFBIO_GCONF is not available. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/tpctl/fb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/tpctl/fb.c diff -u src/usr.sbin/tpctl/fb.c:1.4 src/usr.sbin/tpctl/fb.c:1.5 --- src/usr.sbin/tpctl/fb.c:1.4 Sat May 10 15:31:05 2008 +++ src/usr.sbin/tpctl/fb.c Sun Aug 27 02:19:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fb.c,v 1.4 2008/05/10 15:31:05 martin Exp $ */ +/* $NetBSD: fb.c,v 1.5 2017/08/27 02:19:08 jmcneill Exp $ */ /*- * Copyright (c) 2002 TAKEMRUA Shin @@ -41,7 +41,7 @@ #ifndef lint #include -__RCSID("$NetBSD: fb.c,v 1.4 2008/05/10 15:31:05 martin Exp $"); +__RCSID("$NetBSD: fb.c,v 1.5 2017/08/27 02:19:08 jmcneill Exp $"); #endif /* not lint */ #define INVALID_CACHE -1 @@ -69,6 +69,8 @@ fb_dispmode(struct fb *fb, int dispmode) int fb_init(struct fb *fb, int fd) { + struct wsdisplay_fbinfo fbinfo; + u_int linebytes; int y; size_t size; @@ -77,8 +79,22 @@ fb_init(struct fb *fb, int fd) fb->conf.hf_conf_index = HPCFB_CURRENT_CONFIG; if (ioctl(fb->fd, WSDISPLAYIO_GMODE, >dispmode) < 0) return (-1); - if (ioctl(fb->fd, HPCFBIO_GCONF, >conf) < 0) - return (-1); + if (ioctl(fb->fd, HPCFBIO_GCONF, >conf) < 0) { + if (ioctl(fb->fd, WSDISPLAYIO_GINFO, ) < 0 || + ioctl(fb->fd, WSDISPLAYIO_LINEBYTES, ) < 0) + return (-1); + memset(>conf, 0, sizeof(fb->conf)); + fb->conf.hf_width = fbinfo.width; + fb->conf.hf_height = fbinfo.height; + fb->conf.hf_bytes_per_line = linebytes; + fb->conf.hf_nplanes = 1; + fb->conf.hf_bytes_per_plane = fbinfo.height * linebytes; + fb->conf.hf_pack_width = fbinfo.depth; + fb->conf.hf_pixels_per_pack = 1; + fb->conf.hf_pixel_width = 1; + fb->conf.hf_access_flags = HPCFB_ACCESS_STATIC | + HPCFB_ACCESS_BYTE | HPCFB_ACCESS_WORD | HPCFB_ACCESS_DWORD; + } if (fb_dispmode(fb, WSDISPLAYIO_MODE_MAPPED) < 0) return (-1);
CVS commit: src/usr.sbin/tpctl
Module Name:src Committed By: jmcneill Date: Sun Aug 27 02:19:08 UTC 2017 Modified Files: src/usr.sbin/tpctl: fb.c Log Message: Try to use standard wsdisplay ioctls when HPCFBIO_GCONF is not available. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/tpctl/fb.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/aarch64/aarch64
Module Name:src Committed By: ryo Date: Sun Aug 27 00:29:57 UTC 2017 Modified Files: src/sys/arch/aarch64/aarch64: pmap_page.S Log Message: DCZID_EL0:BS[0:3] is log2 of the block size in *words*, or 4. Not 16. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/aarch64/pmap_page.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/aarch64
Module Name:src Committed By: ryo Date: Sun Aug 27 00:29:57 UTC 2017 Modified Files: src/sys/arch/aarch64/aarch64: pmap_page.S Log Message: DCZID_EL0:BS[0:3] is log2 of the block size in *words*, or 4. Not 16. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/aarch64/aarch64/pmap_page.S 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/aarch64/aarch64/pmap_page.S diff -u src/sys/arch/aarch64/aarch64/pmap_page.S:1.1 src/sys/arch/aarch64/aarch64/pmap_page.S:1.2 --- src/sys/arch/aarch64/aarch64/pmap_page.S:1.1 Sun Aug 10 05:47:37 2014 +++ src/sys/arch/aarch64/aarch64/pmap_page.S Sun Aug 27 00:29:57 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_page.S,v 1.1 2014/08/10 05:47:37 matt Exp $ */ +/* $NetBSD: pmap_page.S,v 1.2 2017/08/27 00:29:57 ryo Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include "assym.h" -RCSID("$NetBSD: pmap_page.S,v 1.1 2014/08/10 05:47:37 matt Exp $"); +RCSID("$NetBSD: pmap_page.S,v 1.2 2017/08/27 00:29:57 ryo Exp $"); /* LINTSTUB: void pmap_zero_page(paddr_t pa); */ ENTRY(pmap_zero_page) @@ -42,7 +42,7 @@ ENTRY(pmap_zero_page) mrs x2, dczid_el0 tbnz x2, #4, 2f - mov x3, #16 + mov x3, #4 lsl x3, x3, x2 1: dc zva, x0
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Aug 26 22:31:02 UTC 2017 Modified Files: src/sys/dev/i2c: tcakp.c Log Message: wscons is not mpsafe, so take kernel lock for intr handler To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/tcakp.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: jmcneill Date: Sat Aug 26 22:31:02 UTC 2017 Modified Files: src/sys/dev/i2c: tcakp.c Log Message: wscons is not mpsafe, so take kernel lock for intr handler To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/i2c/tcakp.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/tcakp.c diff -u src/sys/dev/i2c/tcakp.c:1.1 src/sys/dev/i2c/tcakp.c:1.2 --- src/sys/dev/i2c/tcakp.c:1.1 Sat Aug 26 21:02:35 2017 +++ src/sys/dev/i2c/tcakp.c Sat Aug 26 22:31:02 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: tcakp.c,v 1.1 2017/08/26 21:02:35 jmcneill Exp $ */ +/* $NetBSD: tcakp.c,v 1.2 2017/08/26 22:31:02 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -29,7 +29,7 @@ #include "opt_fdt.h" #include -__KERNEL_RCSID(0, "$NetBSD: tcakp.c,v 1.1 2017/08/26 21:02:35 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcakp.c,v 1.2 2017/08/26 22:31:02 jmcneill Exp $"); #include #include @@ -348,8 +348,8 @@ tcakp_attach(device_t parent, device_t s aprint_normal(": TCA8418\n"); #ifdef FDT - sc->sc_ih = fdtbus_intr_establish(sc->sc_phandle, 0, IPL_VM, - FDT_INTR_MPSAFE, tcakp_intr, sc); + sc->sc_ih = fdtbus_intr_establish(sc->sc_phandle, 0, IPL_VM, 0, + tcakp_intr, sc); tcakp_configure_fdt(sc); #endif
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Aug 26 22:24:50 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sunxi_debe.c Log Message: Add a basic sun5i FB driver. This assumes that firmware (U-Boot) has already setup the chip and re-uses the same settings / FB memory. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_debe.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/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Aug 26 22:24:50 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sunxi_debe.c Log Message: Add a basic sun5i FB driver. This assumes that firmware (U-Boot) has already setup the chip and re-uses the same settings / FB memory. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_debe.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/arm/sunxi/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.17 src/sys/arch/arm/sunxi/files.sunxi:1.18 --- src/sys/arch/arm/sunxi/files.sunxi:1.17 Fri Aug 25 00:07:03 2017 +++ src/sys/arch/arm/sunxi/files.sunxi Sat Aug 26 22:24:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.17 2017/08/25 00:07:03 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.18 2017/08/26 22:24:50 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -139,6 +139,10 @@ device h3codec attach h3codec at fdt with h3_codec file arch/arm/sunxi/sun8i_h3_codec.c h3_codec needs-flag +# Display controller +attach genfb at fdt with sunxi_debe +file arch/arm/sunxi/sunxi_debe.c sunxi_debe + # SOC parameters defflag opt_soc.h SOC_SUNXI defflag opt_soc.h SOC_SUN5I: SOC_SUNXI Added files: Index: src/sys/arch/arm/sunxi/sunxi_debe.c diff -u /dev/null src/sys/arch/arm/sunxi/sunxi_debe.c:1.1 --- /dev/null Sat Aug 26 22:24:50 2017 +++ src/sys/arch/arm/sunxi/sunxi_debe.c Sat Aug 26 22:24:50 2017 @@ -0,0 +1,259 @@ +/* $NetBSD: sunxi_debe.c,v 1.1 2017/08/26 22:24:50 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * 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: sunxi_debe.c,v 1.1 2017/08/26 22:24:50 jmcneill Exp $"); + +#include +#include +#include +#include + +#include + +#include + +#define SUNXI_SDRAM_BASE 0x4000 + +#define DEBE_MAX_LAYER 4 + +#define DEBE_MODCTL_REG 0x800 +#define DEBE_MODCTL_LAYn_EN(n) __BIT(8 + (n)) +#define DEBE_MODCTL_EN __BIT(0) +#define DEBE_LAYSIZE_REG(n) (0x810 + (n) * 0x10) +#define DEBE_LAYSIZE_HEIGHT __BITS(28,16) +#define DEBE_LAYSIZE_WIDTH __BITS(12,0) +#define DEBE_LAYCOOR_REG(n) (0x820 + (n) * 0x4) +#define DEBE_LAYLINEWIDTH_REG(n) (0x840 + (n) * 0x4) +#define DEBE_L32ADD_REG(n) (0x850 + (n) * 0x4) +#define DEBE_H4ADD_REG 0x860 +#define DEBE_H4ADD(n) __BITS((n) * 8 + 3, (n) * 8) + +static const char * const compatible[] = { + "allwinner,sun5i-a13-display-backend", + NULL +}; + +struct sunxi_debe_softc { + struct genfb_softc sc_gen; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + int sc_phandle; + + bus_space_handle_t sc_fb_bsh; + bus_addr_t sc_fb_paddr; +}; + +#define BE_READ(sc, reg) \ +bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg)) +#define BE_WRITE(sc, reg, val) \ +bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val)) + +static bool +sunxi_debe_shutdown(device_t self, int flags) +{ + genfb_enable_polling(self); + return true; +} + +static int +sunxi_debe_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, lwp_t *l) +{ + struct sunxi_debe_softc * const sc = v; + struct wsdisplayio_bus_id *busid; + struct wsdisplayio_fbinfo *fbi; + struct rasops_info *ri; + int error; + + switch (cmd) { + case WSDISPLAYIO_GTYPE: + *(u_int *)data = WSDISPLAY_TYPE_ALLWINNER; + return 0; + case WSDISPLAYIO_GET_BUSID: + busid = data; + busid->bus_type = WSDISPLAYIO_BUS_SOC; + return 0; + case WSDISPLAYIO_GET_FBINFO: + fbi = data; + ri = >sc_gen.vd.active->scr_ri; +
CVS commit: src/share/man/man9
Module Name:src Committed By: joerg Date: Sat Aug 26 21:58:31 UTC 2017 Modified Files: src/share/man/man9: kmem.9 Log Message: Drop stray .El. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/kmem.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/kmem.9 diff -u src/share/man/man9/kmem.9:1.21 src/share/man/man9/kmem.9:1.22 --- src/share/man/man9/kmem.9:1.21 Mon Jul 3 21:28:48 2017 +++ src/share/man/man9/kmem.9 Sat Aug 26 21:58:31 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: kmem.9,v 1.21 2017/07/03 21:28:48 wiz Exp $ +.\" $NetBSD: kmem.9,v 1.22 2017/08/26 21:58:31 joerg Exp $ .\" .\" Copyright (c)2006 YAMAMOTO Takashi, .\" All rights reserved. @@ -311,7 +311,6 @@ It is best used on a 64-bit machine with .Dv KMEM_GUARD is enabled by default on .Dv DEBUG . -.El .Sh RETURN VALUES On success, .Fn kmem_alloc
CVS commit: src/share/man/man9
Module Name:src Committed By: joerg Date: Sat Aug 26 21:58:31 UTC 2017 Modified Files: src/share/man/man9: kmem.9 Log Message: Drop stray .El. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/kmem.9 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Sat Aug 26 21:16:54 UTC 2017 Modified Files: src/sys/dev/wscons: wsconsio.h Log Message: add WSKBD_TYPE_TCAKP for Texas Instruments TCA8418 To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/dev/wscons/wsconsio.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/wscons/wsconsio.h diff -u src/sys/dev/wscons/wsconsio.h:1.119 src/sys/dev/wscons/wsconsio.h:1.120 --- src/sys/dev/wscons/wsconsio.h:1.119 Sun Jun 11 03:55:56 2017 +++ src/sys/dev/wscons/wsconsio.h Sat Aug 26 21:16:54 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wsconsio.h,v 1.119 2017/06/11 03:55:56 nat Exp $ */ +/* $NetBSD: wsconsio.h,v 1.120 2017/08/26 21:16:54 jmcneill Exp $ */ /* * Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved. @@ -109,6 +109,7 @@ struct wscons_event { #define WSKBD_TYPE_LUNA 23 /* OMRON SX-9100 LUNA */ #define WSKBD_TYPE_RFB 24 /* Usermode vnc remote keyboard */ #define WSKBD_TYPE_EPOC 25 /* Psion EPOC machine keyboard */ +#define WSKBD_TYPE_TCAKP 26 /* TI TCA8418 keypad */ /* Manipulate the keyboard bell. */ struct wskbd_bell_data {
CVS commit: src/sys/dev/wscons
Module Name:src Committed By: jmcneill Date: Sat Aug 26 21:16:54 UTC 2017 Modified Files: src/sys/dev/wscons: wsconsio.h Log Message: add WSKBD_TYPE_TCAKP for Texas Instruments TCA8418 To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/dev/wscons/wsconsio.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/i2c
Module Name:src Committed By: jmcneill Date: Sat Aug 26 21:02:35 UTC 2017 Modified Files: src/sys/dev/i2c: files.i2c Added Files: src/sys/dev/i2c: tcakp.c Log Message: Add driver for Texas Instruments TCA8418 I2C Controller Keypad Scan IC. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/tcakp.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/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.73 src/sys/dev/i2c/files.i2c:1.74 --- src/sys/dev/i2c/files.i2c:1.73 Sat Apr 22 21:48:56 2017 +++ src/sys/dev/i2c/files.i2c Sat Aug 26 21:02:35 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.i2c,v 1.73 2017/04/22 21:48:56 jmcneill Exp $ +# $NetBSD: files.i2c,v 1.74 2017/08/26 21:02:35 jmcneill Exp $ obsolete defflag opt_i2cbus.h I2C_SCAN define i2cbus { } @@ -262,3 +262,8 @@ device as3722reg: as3722pmic attach as3722pmic at iic attach as3722reg at as3722pmic file dev/i2c/as3722.c as3722pmic needs-flag + +# Texas Instruments TCA8418 Keypad Scan IC +device tcakp: wskbddev +attach tcakp at iic +file dev/i2c/tcakp.ctcakp Added files: Index: src/sys/dev/i2c/tcakp.c diff -u /dev/null src/sys/dev/i2c/tcakp.c:1.1 --- /dev/null Sat Aug 26 21:02:35 2017 +++ src/sys/dev/i2c/tcakp.c Sat Aug 26 21:02:35 2017 @@ -0,0 +1,382 @@ +/* $NetBSD: tcakp.c,v 1.1 2017/08/26 21:02:35 jmcneill Exp $ */ + +/*- + * Copyright (c) 2017 Jared McNeill+ * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * 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 "opt_fdt.h" + +#include +__KERNEL_RCSID(0, "$NetBSD: tcakp.c,v 1.1 2017/08/26 21:02:35 jmcneill Exp $"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +/* XXX keymap */ +#include + +#ifdef FDT +#include +#endif + +#define TCA_MAX_ROWS 8 +#define TCA_MAX_COLS 10 + +#define TCA_CFG 0x01 +#define CFG_AI __BIT(7) +#define CFG_GPI_E_CFG __BIT(6) +#define CFG_OVR_FLOW_M __BIT(5) +#define CFG_INT_CFG __BIT(4) +#define CFG_OVR_FLOW_IEN __BIT(3) +#define CFG_K_LCK_IEN __BIT(2) +#define CFG_GPI_IEN __BIT(1) +#define CFG_KE_IEN __BIT(0) +#define TCA_INT_STAT 0x02 +#define INT_STAT_CAD_INT __BIT(4) +#define INT_STAT_OVR_FLOW_INT __BIT(3) +#define INT_STAT_K_LCD_INT __BIT(2) +#define INT_STAT_GPI_INT __BIT(1) +#define INT_STAT_K_INT __BIT(0) +#define TCA_KEY_LCK_EC 0x03 +#define KEY_LCK_EC_K_LCK_EN __BIT(6) +#define KEY_LCK_EC_LCK2 __BIT(5) +#define KEY_LCK_EC_LCK1 __BIT(4) +#define KEY_LCK_EC_KEC __BITS(3,0) +#define TCA_EVENT(c) (0x04 + (c) - 'A') +#define TCA_EVENT_STATE __BIT(7) +#define TCA_EVENT_CODE __BITS(6,0) +#define TCA_KP_GPIO1 0x1d +#define TCA_KP_GPIO2 0x1e +#define TCA_KP_GPIO3 0x1f +#define TCA_DEBOUNCE_DIS1 0x29 +#define TCA_DEBOUNCE_DIS2 0x2a +#define TCA_DEBOUNCE_DIS3 0x2b + +#ifdef FDT +#define KC(n) KS_KEYCODE(n) +static const keysym_t tcakp_linux_event_keydesc[] = { + KC(1), +}; +#undef KC +#endif + +struct tcakp_softc { + device_t sc_dev; + i2c_tag_t sc_i2c; + i2c_addr_t sc_addr; + int sc_phandle; + + u_int sc_rows; + u_int sc_cols; + bool sc_autorepeat; + u_int sc_row_shift; + + uint16_t sc_keymap[128]; + + void *sc_ih; + + int sc_enabled; + device_t sc_wskbddev; +}; + +static int tcakp_match(device_t, cfdata_t, void *); +static void tcakp_attach(device_t, device_t, void *); + +static int tcakp_read(struct tcakp_softc *, uint8_t, uint8_t *); +static int tcakp_write(struct tcakp_softc *, uint8_t, uint8_t); + +CFATTACH_DECL_NEW(tcakp, sizeof(struct
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Aug 26 21:02:35 UTC 2017 Modified Files: src/sys/dev/i2c: files.i2c Added Files: src/sys/dev/i2c: tcakp.c Log Message: Add driver for Texas Instruments TCA8418 I2C Controller Keypad Scan IC. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/i2c/files.i2c cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/tcakp.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/sparc64/sparc64
Module Name:src Committed By: palle Date: Sat Aug 26 20:25:00 UTC 2017 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: sun4v: Avoid touching the %tick_cmpr register which is not present on never systems (Oracle SPARC Architecture 2011 and beyond). Based on code from OpenBSD locore.s revision 1.177. Tested on both sun4u (qemu and USIII) and sun4v (qemu and T5-2). ok martin@ To generate a diff of this commit: cvs rdiff -u -r1.411 -r1.412 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.411 src/sys/arch/sparc64/sparc64/locore.s:1.412 --- src/sys/arch/sparc64/sparc64/locore.s:1.411 Sat May 6 21:46:31 2017 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Aug 26 20:25:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.411 2017/05/06 21:46:31 palle Exp $ */ +/* $NetBSD: locore.s,v 1.412 2017/08/26 20:25:00 palle Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -5119,9 +5119,6 @@ _C_LABEL(endtrapcode): .align 8 start: dostart: - mov 1, %g1 - sllx %g1, 63, %g1 - wr %g1, TICK_CMPR ! XXX clear and disable %tick_cmpr for now /* * Startup. *
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: palle Date: Sat Aug 26 20:25:00 UTC 2017 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: sun4v: Avoid touching the %tick_cmpr register which is not present on never systems (Oracle SPARC Architecture 2011 and beyond). Based on code from OpenBSD locore.s revision 1.177. Tested on both sun4u (qemu and USIII) and sun4v (qemu and T5-2). ok martin@ To generate a diff of this commit: cvs rdiff -u -r1.411 -r1.412 src/sys/arch/sparc64/sparc64/locore.s Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/rdate
Module Name:src Committed By: ginsbach Date: Sat Aug 26 19:26:32 UTC 2017 Modified Files: src/usr.sbin/rdate: rdate.8 rdate.c Log Message: Support -4 and -6. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/rdate/rdate.8 cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/rdate/rdate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/rdate
Module Name:src Committed By: ginsbach Date: Sat Aug 26 19:26:32 UTC 2017 Modified Files: src/usr.sbin/rdate: rdate.8 rdate.c Log Message: Support -4 and -6. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.sbin/rdate/rdate.8 cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/rdate/rdate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/rdate/rdate.8 diff -u src/usr.sbin/rdate/rdate.8:1.12 src/usr.sbin/rdate/rdate.8:1.13 --- src/usr.sbin/rdate/rdate.8:1.12 Sat Aug 26 18:16:05 2017 +++ src/usr.sbin/rdate/rdate.8 Sat Aug 26 19:26:32 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: rdate.8,v 1.12 2017/08/26 18:16:05 ginsbach Exp $ +.\" $NetBSD: rdate.8,v 1.13 2017/08/26 19:26:32 ginsbach Exp $ .\" .\" Copyright (c) 1994 Christos Zoulas .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (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 April 30, 1994 +.Dd August 26, 2017 .Dt RDATE 8 .Os .Sh NAME @@ -31,7 +31,7 @@ .Nd set the system's date from a remote host .Sh SYNOPSIS .Nm -.Op Fl aps +.Op Fl 46aps .Ar host .Sh DESCRIPTION .Nm @@ -43,6 +43,14 @@ protocol which is usually implemented as Available options: .Pp .Bl -tag -width indent +.It Fl 4 +Forces +.Nm +to use IPv4 addresses only. +.It Fl 6 +Forces +.Nm +to use IPv6 addresses only. .It Fl a Use the .Xr adjtime 2 Index: src/usr.sbin/rdate/rdate.c diff -u src/usr.sbin/rdate/rdate.c:1.21 src/usr.sbin/rdate/rdate.c:1.22 --- src/usr.sbin/rdate/rdate.c:1.21 Sat Aug 26 18:16:05 2017 +++ src/usr.sbin/rdate/rdate.c Sat Aug 26 19:26:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $ */ +/* $NetBSD: rdate.c,v 1.22 2017/08/26 19:26:32 ginsbach Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -34,7 +34,7 @@ */ #include #ifndef lint -__RCSID("$NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $"); +__RCSID("$NetBSD: rdate.c,v 1.22 2017/08/26 19:26:32 ginsbach Exp $"); #endif /* lint */ #include @@ -59,7 +59,9 @@ static void usage(void); static void usage(void) { - (void) fprintf(stderr, "usage: %s [-aps] host\n", getprogname()); + (void) fprintf(stderr, "usage: %s [-46aps] host\n", getprogname()); + (void) fprintf(stderr, " -4: use IPv4 addresses only\n"); + (void) fprintf(stderr, " -6: use IPv6 addresses only\n"); (void) fprintf(stderr, " -a: use adjtime instead of instant change\n"); (void) fprintf(stderr, " -p: just print, don't set\n"); (void) fprintf(stderr, " -s: just set, don't print\n"); @@ -78,22 +80,31 @@ main(int argc, char *argv[]) struct addrinfo hints, *res, *res0; int c; int error; + int family = AF_UNSPEC; adjustment = 0; - while ((c = getopt(argc, argv, "psa")) != -1) + while ((c = getopt(argc, argv, "46aps")) != -1) switch (c) { - case 'p': - pr++; + case '4': + family = AF_INET; break; - case 's': - silent++; + case '6': + family = AF_INET6; break; case 'a': slidetime++; break; + case 'p': + pr++; + break; + + case 's': + silent++; + break; + default: usage(); return 1; @@ -106,7 +117,7 @@ main(int argc, char *argv[]) hname = argv[optind]; memset(, 0, sizeof (hints)); - hints.ai_family = PF_UNSPEC; + hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_CANONNAME; error = getaddrinfo(hname, "time", , );
CVS commit: src/usr.sbin/rdate
Module Name:src Committed By: ginsbach Date: Sat Aug 26 18:16:06 UTC 2017 Modified Files: src/usr.sbin/rdate: rdate.8 rdate.c Log Message: Sort options alphabetically. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/rdate/rdate.8 cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/rdate/rdate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/rdate/rdate.8 diff -u src/usr.sbin/rdate/rdate.8:1.11 src/usr.sbin/rdate/rdate.8:1.12 --- src/usr.sbin/rdate/rdate.8:1.11 Wed Oct 21 01:07:47 2009 +++ src/usr.sbin/rdate/rdate.8 Sat Aug 26 18:16:05 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: rdate.8,v 1.11 2009/10/21 01:07:47 snj Exp $ +.\" $NetBSD: rdate.8,v 1.12 2017/08/26 18:16:05 ginsbach Exp $ .\" .\" Copyright (c) 1994 Christos Zoulas .\" All rights reserved. @@ -31,7 +31,7 @@ .Nd set the system's date from a remote host .Sh SYNOPSIS .Nm -.Op Fl psa +.Op Fl aps .Ar host .Sh DESCRIPTION .Nm @@ -43,15 +43,15 @@ protocol which is usually implemented as Available options: .Pp .Bl -tag -width indent -.It Fl p -Do not set, just print the remote time -.It Fl s -Do not print the time. .It Fl a Use the .Xr adjtime 2 call to gradually skew the local time to the remote time rather than just hopping. +.It Fl p +Do not set, just print the remote time +.It Fl s +Do not print the time. .El .Sh FILES .Bl -tag -width /var/log/wtmp -compact Index: src/usr.sbin/rdate/rdate.c diff -u src/usr.sbin/rdate/rdate.c:1.20 src/usr.sbin/rdate/rdate.c:1.21 --- src/usr.sbin/rdate/rdate.c:1.20 Thu May 4 16:26:09 2017 +++ src/usr.sbin/rdate/rdate.c Sat Aug 26 18:16:05 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rdate.c,v 1.20 2017/05/04 16:26:09 sevan Exp $ */ +/* $NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -34,7 +34,7 @@ */ #include #ifndef lint -__RCSID("$NetBSD: rdate.c,v 1.20 2017/05/04 16:26:09 sevan Exp $"); +__RCSID("$NetBSD: rdate.c,v 1.21 2017/08/26 18:16:05 ginsbach Exp $"); #endif /* lint */ #include @@ -59,10 +59,10 @@ static void usage(void); static void usage(void) { - (void) fprintf(stderr, "usage: %s [-psa] host\n", getprogname()); + (void) fprintf(stderr, "usage: %s [-aps] host\n", getprogname()); + (void) fprintf(stderr, " -a: use adjtime instead of instant change\n"); (void) fprintf(stderr, " -p: just print, don't set\n"); (void) fprintf(stderr, " -s: just set, don't print\n"); - (void) fprintf(stderr, " -a: use adjtime instead of instant change\n"); } int
CVS commit: src/usr.sbin/rdate
Module Name:src Committed By: ginsbach Date: Sat Aug 26 18:16:06 UTC 2017 Modified Files: src/usr.sbin/rdate: rdate.8 rdate.c Log Message: Sort options alphabetically. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/rdate/rdate.8 cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/rdate/rdate.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/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Aug 26 17:59:24 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_gpio.c Log Message: Add support for interrupt pins. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/sunxi/sunxi_gpio.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/arm/sunxi/sunxi_gpio.c diff -u src/sys/arch/arm/sunxi/sunxi_gpio.c:1.11 src/sys/arch/arm/sunxi/sunxi_gpio.c:1.12 --- src/sys/arch/arm/sunxi/sunxi_gpio.c:1.11 Fri Aug 25 00:07:03 2017 +++ src/sys/arch/arm/sunxi/sunxi_gpio.c Sat Aug 26 17:59:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_gpio.c,v 1.11 2017/08/25 00:07:03 jmcneill Exp $ */ +/* $NetBSD: sunxi_gpio.c,v 1.12 2017/08/26 17:59:24 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -29,7 +29,7 @@ #include "opt_soc.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.11 2017/08/25 00:07:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c,v 1.12 2017/08/26 17:59:24 jmcneill Exp $"); #include #include @@ -39,12 +39,15 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c #include #include #include +#include #include #include #include +#define SUNXI_GPIO_MAX_EINT 32 + #define SUNXI_GPIO_PORT(port) (0x24 * (port)) #define SUNXI_GPIO_CFG(port, pin) (SUNXI_GPIO_PORT(port) + 0x00 + (0x4 * ((pin) / 8))) #define SUNXI_GPIO_CFG_PINMASK(pin) (0x7 << (((pin) % 8) * 4)) @@ -56,6 +59,15 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_gpio.c #define SUNXI_GPIO_PULL_UP 1 #define SUNXI_GPIO_PULL_DOWN 2 #define SUNXI_GPIO_PULL_PINMASK(pin) (0x3 << (((pin) % 16) * 2)) +#define SUNXI_GPIO_INT_CFG(eint) (0x200 + (0x4 * ((eint) / 8))) +#define SUNXI_GPIO_INT_MODEMASK(eint) (0xf << (((eint) % 8) * 4)) +#define SUNXI_GPIO_INT_MODE_POS_EDGE 0x0 +#define SUNXI_GPIO_INT_MODE_NEG_EDGE 0x1 +#define SUNXI_GPIO_INT_MODE_HIGH_LEVEL 0x2 +#define SUNXI_GPIO_INT_MODE_LOW_LEVEL 0x3 +#define SUNXI_GPIO_INT_MODE_DOUBLE_EDGE 0x4 +#define SUNXI_GPIO_INT_CTL 0x210 +#define SUNXI_GPIO_INT_STATUS 0x214 static const struct of_compat_data compat_data[] = { #ifdef SOC_SUN5I_A13 @@ -80,6 +92,13 @@ static const struct of_compat_data compa { NULL } }; +struct sunxi_gpio_eint { + int (*eint_func)(void *); + void *eint_arg; + int eint_flags; + int eint_num; +}; + struct sunxi_gpio_softc { device_t sc_dev; bus_space_tag_t sc_bst; @@ -90,6 +109,9 @@ struct sunxi_gpio_softc { struct gpio_chipset_tag sc_gp; gpio_pin_t *sc_pins; device_t sc_gpiodev; + + void *sc_ih; + struct sunxi_gpio_eint sc_eint[SUNXI_GPIO_MAX_EINT]; }; struct sunxi_gpio_pin { @@ -353,6 +375,175 @@ static struct fdtbus_gpio_controller_fun .write = sunxi_gpio_write, }; +static int +sunxi_gpio_intr(void *priv) +{ + struct sunxi_gpio_softc * const sc = priv; + struct sunxi_gpio_eint *eint; + uint32_t status, bit; + int ret = 0; + + status = GPIO_READ(sc, SUNXI_GPIO_INT_STATUS); + GPIO_WRITE(sc, SUNXI_GPIO_INT_STATUS, status); + + while ((bit = ffs32(status)) != 0) { + status &= ~__BIT(bit - 1); + eint = >sc_eint[bit - 1]; + if (eint->eint_func == NULL) + continue; + const bool mpsafe = (eint->eint_flags & FDT_INTR_MPSAFE) != 0; + if (!mpsafe) + KERNEL_LOCK(1, curlwp); + ret |= eint->eint_func(eint->eint_arg); + if (!mpsafe) + KERNEL_UNLOCK_ONE(curlwp); + } + + return ret; +} + +static void * +sunxi_gpio_establish(device_t dev, u_int *specifier, int ipl, int flags, +int (*func)(void *), void *arg) +{ + struct sunxi_gpio_softc * const sc = device_private(dev); + const struct sunxi_gpio_pins *pin_def; + struct sunxi_gpio_eint *eint; + uint32_t val; + u_int mode; + + if (ipl != IPL_VM) { + aprint_error_dev(dev, "%s: wrong IPL %d (expected %d)\n", + __func__, ipl, IPL_VM); + return NULL; + } + + /* 1st cell is the bank */ + /* 2nd cell is the pin */ + /* 3rd cell is flags */ + const u_int port = be32toh(specifier[0]); + const u_int pin = be32toh(specifier[1]); + const u_int type = be32toh(specifier[2]) & 0xf; + + switch (type) { + case 0x1: + mode = SUNXI_GPIO_INT_MODE_POS_EDGE; + break; + case 0x2: + mode = SUNXI_GPIO_INT_MODE_NEG_EDGE; + break; + case 0x3: + mode = SUNXI_GPIO_INT_MODE_DOUBLE_EDGE; + break; + case 0x4: + mode = SUNXI_GPIO_INT_MODE_HIGH_LEVEL; + break; + case 0x8: + mode = SUNXI_GPIO_INT_MODE_LOW_LEVEL; + break; + default: + aprint_error_dev(dev, "%s: unsupported irq type 0x%x\n", + __func__, type); + return NULL; + } + + pin_def = sunxi_gpio_lookup(sc, port, pin); + if (pin_def == NULL) + return NULL; + if (pin_def->functions[pin_def->eint_func] == NULL || + strcmp(pin_def->functions[pin_def->eint_func], "eint") != 0) + return NULL; + + KASSERT(pin_def->eint_num < SUNXI_GPIO_MAX_EINT); + + mutex_enter(>sc_lock); + + eint = >sc_eint[pin_def->eint_num]; + if (eint->eint_func != NULL) { + mutex_exit(>sc_lock); + return NULL;
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Aug 26 17:59:24 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_gpio.c Log Message: Add support for interrupt pins. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/sunxi/sunxi_gpio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sat Aug 26 16:37:50 UTC 2017 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1466 To generate a diff of this commit: cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-6.0.7 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-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.111 src/doc/CHANGES-6.0.7:1.1.2.112 --- src/doc/CHANGES-6.0.7:1.1.2.111 Wed Aug 23 19:37:05 2017 +++ src/doc/CHANGES-6.0.7 Sat Aug 26 16:37:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.111 2017/08/23 19:37:05 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.112 2017/08/26 16:37:50 snj Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -12861,3 +12861,8 @@ sys/compat/linux/common/linux_time.c 1. missing cred check in linux_sys_settimeofday() [mrg, ticket #1489] +sys/arch/i386/conf/GENERIC patch + + i386 GENERIC: disable VM86 by default. + [maxv, ticket #1466] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sat Aug 26 16:37:14 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1466, 1460 To generate a diff of this commit: cvs rdiff -u -r1.1.2.303 -r1.1.2.304 src/doc/CHANGES-6.2 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-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.303 src/doc/CHANGES-6.2:1.1.2.304 --- src/doc/CHANGES-6.2:1.1.2.303 Wed Aug 23 19:38:31 2017 +++ src/doc/CHANGES-6.2 Sat Aug 26 16:37:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.303 2017/08/23 19:38:31 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.304 2017/08/26 16:37:14 snj Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -18587,3 +18587,19 @@ bin/rmdir/rmdir.c1.27 PR/48182: Fix rmdir -p handling of top-level (root) directory. [ginsbach, ticket #1490] +sys/arch/i386/conf/GENERIC patch + + i386 GENERIC: disable VM86 by default. + [maxv, ticket #1466] + +common/lib/libc/stdlib/_strtol.h 1.11 via patch +common/lib/libc/stdlib/_strtoul.h 1.11 via patch +tests/lib/libc/stdlib/t_strtol.c 1.6, 1.7 + + Fix testing of returned entptr, and fix three affected + tests. PR lib/49632 + + Fix ISO C compliance: strtol of "0xX" should give the + largest valid numeric prefix, which is 0. + [joerg, ticket #1460] +
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sat Aug 26 16:37:36 UTC 2017 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1466 To generate a diff of this commit: cvs rdiff -u -r1.1.2.108 -r1.1.2.109 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: snj Date: Sat Aug 26 16:37:50 UTC 2017 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: 1466 To generate a diff of this commit: cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: snj Date: Sat Aug 26 16:37:36 UTC 2017 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: 1466 To generate a diff of this commit: cvs rdiff -u -r1.1.2.108 -r1.1.2.109 src/doc/CHANGES-6.1.6 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-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.108 src/doc/CHANGES-6.1.6:1.1.2.109 --- src/doc/CHANGES-6.1.6:1.1.2.108 Wed Aug 23 19:37:48 2017 +++ src/doc/CHANGES-6.1.6 Sat Aug 26 16:37:36 2017 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.108 2017/08/23 19:37:48 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.109 2017/08/26 16:37:36 snj Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -12534,3 +12534,8 @@ sys/compat/linux/common/linux_time.c 1. missing cred check in linux_sys_settimeofday() [mrg, ticket #1489] +sys/arch/i386/conf/GENERIC patch + + i386 GENERIC: disable VM86 by default. + [maxv, ticket #1466] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: snj Date: Sat Aug 26 16:37:14 UTC 2017 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: 1466, 1460 To generate a diff of this commit: cvs rdiff -u -r1.1.2.303 -r1.1.2.304 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src
Module Name:src Committed By: snj Date: Sat Aug 26 16:36:19 UTC 2017 Modified Files: src/common/lib/libc/stdlib [netbsd-6]: _strtol.h _strtoul.h src/tests/lib/libc/stdlib [netbsd-6]: t_strtol.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1460): common/lib/libc/stdlib/_strtol.h: 1.11 via patch common/lib/libc/stdlib/_strtoul.h: 1.11 via patch tests/lib/libc/stdlib/t_strtol.c: 1.6-1.7 Fix testing of returned entptr, and fix three affected tests. >From kamil@ via PR lib/49632 -- Fix ISO C compliance: strtol of "0xX" should give the largest valid numeric prefix, which is 0. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.8.1 src/common/lib/libc/stdlib/_strtol.h cvs rdiff -u -r1.1.22.1 -r1.1.22.2 src/common/lib/libc/stdlib/_strtoul.h cvs rdiff -u -r1.5 -r1.5.6.1 src/tests/lib/libc/stdlib/t_strtol.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src
Module Name:src Committed By: snj Date: Sat Aug 26 16:36:19 UTC 2017 Modified Files: src/common/lib/libc/stdlib [netbsd-6]: _strtol.h _strtoul.h src/tests/lib/libc/stdlib [netbsd-6]: t_strtol.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1460): common/lib/libc/stdlib/_strtol.h: 1.11 via patch common/lib/libc/stdlib/_strtoul.h: 1.11 via patch tests/lib/libc/stdlib/t_strtol.c: 1.6-1.7 Fix testing of returned entptr, and fix three affected tests. >From kamil@ via PR lib/49632 -- Fix ISO C compliance: strtol of "0xX" should give the largest valid numeric prefix, which is 0. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.8.1 src/common/lib/libc/stdlib/_strtol.h cvs rdiff -u -r1.1.22.1 -r1.1.22.2 src/common/lib/libc/stdlib/_strtoul.h cvs rdiff -u -r1.5 -r1.5.6.1 src/tests/lib/libc/stdlib/t_strtol.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/stdlib/_strtol.h diff -u src/common/lib/libc/stdlib/_strtol.h:1.2 src/common/lib/libc/stdlib/_strtol.h:1.2.8.1 --- src/common/lib/libc/stdlib/_strtol.h:1.2 Wed May 20 22:03:29 2009 +++ src/common/lib/libc/stdlib/_strtol.h Sat Aug 26 16:36:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: _strtol.h,v 1.2 2009/05/20 22:03:29 christos Exp $ */ +/* $NetBSD: _strtol.h,v 1.2.8.1 2017/08/26 16:36:19 snj Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -84,7 +84,10 @@ _FUNCNAME(const char *nptr, char **endpt c = *s++; } if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'a' && s[1] <= 'f') || + (s[1] >= 'A' && s[1] <= 'F'))) { c = s[1]; s += 2; base = 16; Index: src/common/lib/libc/stdlib/_strtoul.h diff -u src/common/lib/libc/stdlib/_strtoul.h:1.1.22.1 src/common/lib/libc/stdlib/_strtoul.h:1.1.22.2 --- src/common/lib/libc/stdlib/_strtoul.h:1.1.22.1 Tue Jul 11 21:09:29 2017 +++ src/common/lib/libc/stdlib/_strtoul.h Sat Aug 26 16:36:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: _strtoul.h,v 1.1.22.1 2017/07/11 21:09:29 snj Exp $ */ +/* $NetBSD: _strtoul.h,v 1.1.22.2 2017/08/26 16:36:19 snj Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -83,7 +83,10 @@ _FUNCNAME(const char *nptr, char **endpt c = *s++; } if ((base == 0 || base == 16) && - c == '0' && (*s == 'x' || *s == 'X')) { + c == '0' && (*s == 'x' || *s == 'X') && + ((s[1] >= '0' && s[1] <= '9') || + (s[1] >= 'a' && s[1] <= 'f') || + (s[1] >= 'A' && s[1] <= 'F'))) { c = s[1]; s += 2; base = 16; Index: src/tests/lib/libc/stdlib/t_strtol.c diff -u src/tests/lib/libc/stdlib/t_strtol.c:1.5 src/tests/lib/libc/stdlib/t_strtol.c:1.5.6.1 --- src/tests/lib/libc/stdlib/t_strtol.c:1.5 Tue Jun 14 02:45:58 2011 +++ src/tests/lib/libc/stdlib/t_strtol.c Sat Aug 26 16:36:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strtol.c,v 1.5 2011/06/14 02:45:58 jruoho Exp $ */ +/* $NetBSD: t_strtol.c,v 1.5.6.1 2017/08/26 16:36:19 snj Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: t_strtol.c,v 1.5 2011/06/14 02:45:58 jruoho Exp $"); +__RCSID("$NetBSD: t_strtol.c,v 1.5.6.1 2017/08/26 16:36:19 snj Exp $"); #include #include @@ -59,9 +59,10 @@ check(struct test *t, long int li, long atf_tc_fail_nonfatal("strtoll(%s, NULL, %d) failed " "(rv = %lld)", t->str, t->base, lli); - if (t->end != NULL && strcmp(t->end, end) != 0) - atf_tc_fail_nonfatal("invalid end pointer ('%s') from " - "strtol(%s, , %d)", end, t->str, t->base); + if ((t->end != NULL && strcmp(t->end, end) != 0) || + (t->end == NULL && *end != '\0')) + atf_tc_fail_nonfatal("invalid end pointer (%p) from " + "strtol(%p, , %d)", end, t->str, t->base); } ATF_TC(strtol_base); @@ -89,15 +90,21 @@ ATF_TC_BODY(strtol_base, tc) { "12579781", 123456789, 14, NULL }, { "AC89BC9", 123456789, 15, NULL }, { "75BCD15", 123456789, 16, NULL }, - { "123456789", 342391, 8, NULL }, - { "0123456789", 342391, 0, NULL }, + { "1234567", 342391, 8, NULL }, + { "01234567", 342391, 0, NULL }, { "0123456789", 123456789, 10, NULL }, - { "0x75bcd15", 123456789, 0, NULL }, + { "0x75bcd15", 123456789, 0, NULL }, + { " 0xX", 0, 0, "xX" }, + { " 0xX", 0, 16, "xX" }, + { " 0XX", 0, 0, "XX" }, + { " 0XX", 0, 16, "XX" }, }; long long int lli; long int li; - char *end; + long long int ulli; + long int uli; + char *end, *end2; size_t i; for (i = 0; i < __arraycount(t); i++) { @@ -105,7 +112,20 @@ ATF_TC_BODY(strtol_base, tc) li = strtol(t[i].str, , t[i].base); lli = strtoll(t[i].str, NULL, t[i].base); + uli = strtoul(t[i].str, , t[i].base); + ulli = strtoull(t[i].str, NULL, t[i].base); + check([i], li, lli,
CVS commit: [netbsd-6] src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Sat Aug 26 16:26:46 UTC 2017 Modified Files: src/sys/arch/i386/conf [netbsd-6]: GENERIC Log Message: Apply patch (requested by maxv in ticket #1466): Disable vm86 by default. The use case is limited, and the potential for damage is too high. To generate a diff of this commit: cvs rdiff -u -r1.1066.2.7 -r1.1066.2.8 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6] src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Sat Aug 26 16:26:46 UTC 2017 Modified Files: src/sys/arch/i386/conf [netbsd-6]: GENERIC Log Message: Apply patch (requested by maxv in ticket #1466): Disable vm86 by default. The use case is limited, and the potential for damage is too high. To generate a diff of this commit: cvs rdiff -u -r1.1066.2.7 -r1.1066.2.8 src/sys/arch/i386/conf/GENERIC 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/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1066.2.7 src/sys/arch/i386/conf/GENERIC:1.1066.2.8 --- src/sys/arch/i386/conf/GENERIC:1.1066.2.7 Wed Aug 15 15:33:00 2012 +++ src/sys/arch/i386/conf/GENERIC Sat Aug 26 16:26:46 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1066.2.7 2012/08/15 15:33:00 sborrill Exp $ +# $NetBSD: GENERIC,v 1.1066.2.8 2017/08/26 16:26:46 snj Exp $ # # GENERIC machine description file # @@ -22,12 +22,12 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1066.2.7 $" +#ident "GENERIC-$Revision: 1.1066.2.8 $" maxusers 64 # estimated number of users # CPU-related options. -options VM86 # virtual 8086 emulation +#options VM86 # virtual 8086 emulation options USER_LDT # user-settable LDT; used by WINE #options PAE # PAE mode (36 bits physical addressing)
CVS commit: [netbsd-6-0] src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Sat Aug 26 16:26:06 UTC 2017 Modified Files: src/sys/arch/i386/conf [netbsd-6-0]: GENERIC Log Message: Apply patch (requested by maxv in ticket #1466): Disable vm86 by default. The use case is limited, and the potential for damage is too high. To generate a diff of this commit: cvs rdiff -u -r1.1066.2.7 -r1.1066.2.7.4.1 src/sys/arch/i386/conf/GENERIC 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/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1066.2.7 src/sys/arch/i386/conf/GENERIC:1.1066.2.7.4.1 --- src/sys/arch/i386/conf/GENERIC:1.1066.2.7 Wed Aug 15 15:33:00 2012 +++ src/sys/arch/i386/conf/GENERIC Sat Aug 26 16:26:06 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1066.2.7 2012/08/15 15:33:00 sborrill Exp $ +# $NetBSD: GENERIC,v 1.1066.2.7.4.1 2017/08/26 16:26:06 snj Exp $ # # GENERIC machine description file # @@ -22,12 +22,12 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1066.2.7 $" +#ident "GENERIC-$Revision: 1.1066.2.7.4.1 $" maxusers 64 # estimated number of users # CPU-related options. -options VM86 # virtual 8086 emulation +#options VM86 # virtual 8086 emulation options USER_LDT # user-settable LDT; used by WINE #options PAE # PAE mode (36 bits physical addressing)
CVS commit: [netbsd-6-1] src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Sat Aug 26 16:26:29 UTC 2017 Modified Files: src/sys/arch/i386/conf [netbsd-6-1]: GENERIC Log Message: Apply patch (requested by maxv in ticket #1466): Disable vm86 by default. The use case is limited, and the potential for damage is too high. To generate a diff of this commit: cvs rdiff -u -r1.1066.2.7 -r1.1066.2.7.6.1 src/sys/arch/i386/conf/GENERIC 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/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1066.2.7 src/sys/arch/i386/conf/GENERIC:1.1066.2.7.6.1 --- src/sys/arch/i386/conf/GENERIC:1.1066.2.7 Wed Aug 15 15:33:00 2012 +++ src/sys/arch/i386/conf/GENERIC Sat Aug 26 16:26:29 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1066.2.7 2012/08/15 15:33:00 sborrill Exp $ +# $NetBSD: GENERIC,v 1.1066.2.7.6.1 2017/08/26 16:26:29 snj Exp $ # # GENERIC machine description file # @@ -22,12 +22,12 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1066.2.7 $" +#ident "GENERIC-$Revision: 1.1066.2.7.6.1 $" maxusers 64 # estimated number of users # CPU-related options. -options VM86 # virtual 8086 emulation +#options VM86 # virtual 8086 emulation options USER_LDT # user-settable LDT; used by WINE #options PAE # PAE mode (36 bits physical addressing)
CVS commit: [netbsd-6-1] src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Sat Aug 26 16:26:29 UTC 2017 Modified Files: src/sys/arch/i386/conf [netbsd-6-1]: GENERIC Log Message: Apply patch (requested by maxv in ticket #1466): Disable vm86 by default. The use case is limited, and the potential for damage is too high. To generate a diff of this commit: cvs rdiff -u -r1.1066.2.7 -r1.1066.2.7.6.1 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-6-0] src/sys/arch/i386/conf
Module Name:src Committed By: snj Date: Sat Aug 26 16:26:06 UTC 2017 Modified Files: src/sys/arch/i386/conf [netbsd-6-0]: GENERIC Log Message: Apply patch (requested by maxv in ticket #1466): Disable vm86 by default. The use case is limited, and the potential for damage is too high. To generate a diff of this commit: cvs rdiff -u -r1.1066.2.7 -r1.1066.2.7.4.1 src/sys/arch/i386/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Aug 26 15:06:53 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun5i_a13_gpio.c Log Message: Add missing eint mappings To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sun5i_a13_gpio.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/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Aug 26 15:06:53 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun5i_a13_gpio.c Log Message: Add missing eint mappings To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sun5i_a13_gpio.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/arm/sunxi/sun5i_a13_gpio.c diff -u src/sys/arch/arm/sunxi/sun5i_a13_gpio.c:1.1 src/sys/arch/arm/sunxi/sun5i_a13_gpio.c:1.2 --- src/sys/arch/arm/sunxi/sun5i_a13_gpio.c:1.1 Fri Aug 25 00:07:03 2017 +++ src/sys/arch/arm/sunxi/sun5i_a13_gpio.c Sat Aug 26 15:06:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sun5i_a13_gpio.c,v 1.1 2017/08/25 00:07:03 jmcneill Exp $ */ +/* $NetBSD: sun5i_a13_gpio.c,v 1.2 2017/08/26 15:06:53 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sun5i_a13_gpio.c,v 1.1 2017/08/25 00:07:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sun5i_a13_gpio.c,v 1.2 2017/08/26 15:06:53 jmcneill Exp $"); #include #include @@ -41,10 +41,10 @@ __KERNEL_RCSID(0, "$NetBSD: sun5i_a13_gp static const struct sunxi_gpio_pins a13_pins[] = { { "PB0", 1, 0, { "gpio_in", "gpio_out", "i2c0" } }, { "PB1", 1, 1, { "gpio_in", "gpio_out", "i2c0" } }, - { "PB2", 1, 2, { "gpio_in", "gpio_out", "pwm", NULL, NULL, NULL, "eint" } }, - { "PB3", 1, 3, { "gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "eint" } }, - { "PB4", 1, 4, { "gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "eint" } }, - { "PB10", 1, 10, { "gpio_in", "gpio_out", "spi2", NULL, NULL, NULL, "eint" } }, + { "PB2", 1, 2, { "gpio_in", "gpio_out", "pwm", NULL, NULL, NULL, "eint" }, 6, 16 }, + { "PB3", 1, 3, { "gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "eint" }, 6, 17 }, + { "PB4", 1, 4, { "gpio_in", "gpio_out", "ir0", NULL, NULL, NULL, "eint" }, 6, 18 }, + { "PB10", 1, 10, { "gpio_in", "gpio_out", "spi2", NULL, NULL, NULL, "eint" }, 6, 24 }, { "PB15", 1, 15, { "gpio_in", "gpio_out", "i2c1" } }, { "PB16", 1, 16, { "gpio_in", "gpio_out", "i2c1" } }, { "PB17", 1, 17, { "gpio_in", "gpio_out", "i2c2" } }, @@ -91,8 +91,8 @@ static const struct sunxi_gpio_pins a13_ { "PD26", 3, 26, { "gpio_in", "gpio_out", "lcd0", "emac" } }, { "PD27", 3, 27, { "gpio_in", "gpio_out", "lcd0", "emac" } }, - { "PE0", 4, 0, { "gpio_in", NULL, "ts0", "csi0", "spi2", NULL, "eint" } }, - { "PE1", 4, 1, { "gpio_in", NULL, "ts0", "csi0", "spi2", NULL, "eint" } }, + { "PE0", 4, 0, { "gpio_in", NULL, "ts0", "csi0", "spi2", NULL, "eint" }, 6, 14 }, + { "PE1", 4, 1, { "gpio_in", NULL, "ts0", "csi0", "spi2", NULL, "eint" }, 6, 15 }, { "PE2", 4, 2, { "gpio_in", NULL, "ts0", "csi0", "spi2" } }, { "PE3", 4, 3, { "gpio_in", "gpio_out", "ts0", "csi0", "spi2" } }, { "PE4", 4, 4, { "gpio_in", "gpio_out", "ts0", "csi0", "mmc2" } }, @@ -111,15 +111,15 @@ static const struct sunxi_gpio_pins a13_ { "PF4", 5, 4, { "gpio_in", "gpio_out", "mmc0", "uart0" } }, { "PF5", 5, 5, { "gpio_in", "gpio_out", "mmc0", "jtag" } }, - { "PG0", 6, 0, { "gpio_in", NULL, "gps", NULL, NULL, NULL, "eint" } }, - { "PG1", 6, 1, { "gpio_in", NULL, "gps", NULL, NULL, NULL, "eint" } }, - { "PG2", 6, 2, { "gpio_in", NULL, "gps", NULL, NULL, NULL, "eint" } }, - { "PG3", 6, 3, { "gpio_in", "gpio_out", NULL, NULL, "uart1", NULL, "eint" } }, - { "PG4", 6, 4, { "gpio_in", "gpio_out", NULL, NULL, "uart1", NULL, "eint" } }, - { "PG9", 6, 9, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" } }, - { "PG10", 6, 10, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" } }, - { "PG11", 6, 11, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" } }, - { "PG12", 6, 12, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" } }, + { "PG0", 6, 0, { "gpio_in", NULL, "gps", NULL, NULL, NULL, "eint" }, 6, 0 }, + { "PG1", 6, 1, { "gpio_in", NULL, "gps", NULL, NULL, NULL, "eint" }, 6, 1 }, + { "PG2", 6, 2, { "gpio_in", NULL, "gps", NULL, NULL, NULL, "eint" }, 6, 2 }, + { "PG3", 6, 3, { "gpio_in", "gpio_out", NULL, NULL, "uart1", NULL, "eint" }, 6, 3 }, + { "PG4", 6, 4, { "gpio_in", "gpio_out", NULL, NULL, "uart1", NULL, "eint" }, 6, 4 }, + { "PG9", 6, 9, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" }, 6, 9 }, + { "PG10", 6, 10, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" }, 6, 10 }, + { "PG11", 6, 11, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" }, 6, 11 }, + { "PG12", 6, 12, { "gpio_in", "gpio_out", "spi1", "uart3", NULL, NULL, "eint" }, 6, 12 }, }; const struct sunxi_gpio_padconf sun5i_a13_padconf = {
CVS commit: src/sys/arch/arm
Module Name:src Committed By: jmcneill Date: Sat Aug 26 15:05:48 UTC 2017 Modified Files: src/sys/arch/arm/fdt: files.fdt src/sys/arch/arm/vexpress: files.vexpress Log Message: Until config supports multiple 'attach driver at bus with ' lines, move plfb from common files.fdt to files.vexpress To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/fdt/files.fdt cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/vexpress/files.vexpress 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/arm/fdt/files.fdt diff -u src/sys/arch/arm/fdt/files.fdt:1.12 src/sys/arch/arm/fdt/files.fdt:1.13 --- src/sys/arch/arm/fdt/files.fdt:1.12 Wed Jun 28 23:48:22 2017 +++ src/sys/arch/arm/fdt/files.fdt Sat Aug 26 15:05:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.12 2017/06/28 23:48:22 jmcneill Exp $ +# $NetBSD: files.fdt,v 1.13 2017/08/26 15:05:48 jmcneill Exp $ include "dev/pckbport/files.pckbport" @@ -20,9 +20,6 @@ filearch/arm/fdt/gic_fdt.c attach plcom at fdt with plcom_fdt file arch/arm/fdt/plcom_fdt.c plcom_fdt -attach genfb at fdt with plfb_fdt: fdt_display_timing -file arch/arm/fdt/plfb_fdt.c plfb_fdt - attach plkmi at fdt with plkmi_fdt file arch/arm/fdt/plkmi_fdt.c plkmi_fdt Index: src/sys/arch/arm/vexpress/files.vexpress diff -u src/sys/arch/arm/vexpress/files.vexpress:1.2 src/sys/arch/arm/vexpress/files.vexpress:1.3 --- src/sys/arch/arm/vexpress/files.vexpress:1.2 Fri Jun 2 21:16:42 2017 +++ src/sys/arch/arm/vexpress/files.vexpress Sat Aug 26 15:05:48 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.vexpress,v 1.2 2017/06/02 21:16:42 jmcneill Exp $ +# $NetBSD: files.vexpress,v 1.3 2017/08/26 15:05:48 jmcneill Exp $ # # Configuration info for ARM Ltd. Versatile Express peripherals # @@ -20,3 +20,6 @@ file arch/arm/vexpress/vexpress_platform device vxsysreg attach vxsysreg at fdt with vexpress_sysreg file arch/arm/vexpress/vexpress_sysreg.c vexpress_sysreg + +attach genfb at fdt with plfb_fdt: fdt_display_timing +file arch/arm/fdt/plfb_fdt.c plfb_fdt
CVS commit: src/sys/arch/arm
Module Name:src Committed By: jmcneill Date: Sat Aug 26 15:05:48 UTC 2017 Modified Files: src/sys/arch/arm/fdt: files.fdt src/sys/arch/arm/vexpress: files.vexpress Log Message: Until config supports multiple 'attach driver at bus with ' lines, move plfb from common files.fdt to files.vexpress To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/fdt/files.fdt cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/vexpress/files.vexpress Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Sat Aug 26 07:17:12 UTC 2017 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: Fixup CPU_PJ4B for recent armv7 tlb operation changes. To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/arch/arm/arm/cpufunc.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/arm/arm/cpufunc.c diff -u src/sys/arch/arm/arm/cpufunc.c:1.164 src/sys/arch/arm/arm/cpufunc.c:1.165 --- src/sys/arch/arm/arm/cpufunc.c:1.164 Thu Aug 24 14:19:36 2017 +++ src/sys/arch/arm/arm/cpufunc.c Sat Aug 26 07:17:12 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cpufunc.c,v 1.164 2017/08/24 14:19:36 jmcneill Exp $ */ +/* $NetBSD: cpufunc.c,v 1.165 2017/08/26 07:17:12 skrll Exp $ */ /* * arm7tdmi support code Copyright (c) 2001 John Fremlin @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.164 2017/08/24 14:19:36 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.165 2017/08/26 07:17:12 skrll Exp $"); #include "opt_compat_netbsd.h" #include "opt_cpuoptions.h" @@ -1364,12 +1364,12 @@ struct cpu_functions pj4bv7_cpufuncs = { /* TLB functions */ - .cf_tlb_flushID = armv7_tlb_flushID, - .cf_tlb_flushID_SE = armv7_tlb_flushID_SE, - .cf_tlb_flushI = armv7_tlb_flushID, - .cf_tlb_flushI_SE = armv7_tlb_flushID_SE, - .cf_tlb_flushD = armv7_tlb_flushID, - .cf_tlb_flushD_SE = armv7_tlb_flushID_SE, + .cf_tlb_flushID = armv7up_tlb_flushID, + .cf_tlb_flushID_SE = armv7up_tlb_flushID_SE, + .cf_tlb_flushI = armv7up_tlb_flushID, + .cf_tlb_flushI_SE = armv7up_tlb_flushID_SE, + .cf_tlb_flushD = armv7up_tlb_flushID, + .cf_tlb_flushD_SE = armv7up_tlb_flushID_SE, /* Cache operations (see also pj4bv7_setup) */ .cf_icache_sync_all = armv7_idcache_wbinv_all, @@ -1763,6 +1763,24 @@ get_cachetype_table(void) #endif /* ARM2 || ARM250 || ARM3 || ARM6 || ARM7 || SA110 || SA1100 || SA || IXP12X0 */ + +static inline void +set_cpufuncs_mpfixup(void) +{ +#ifdef MULTIPROCESSOR + /* If MP extensions are present, patch in MP TLB ops */ + const uint32_t mpidr = armreg_mpidr_read(); + if ((mpidr & (MPIDR_MP|MPIDR_U)) == MPIDR_MP) { + cpufuncs.cf_tlb_flushID = armv7mp_tlb_flushID; + cpufuncs.cf_tlb_flushID_SE = armv7mp_tlb_flushID_SE; + cpufuncs.cf_tlb_flushI = armv7mp_tlb_flushI; + cpufuncs.cf_tlb_flushI_SE = armv7mp_tlb_flushI_SE; + cpufuncs.cf_tlb_flushD = armv7mp_tlb_flushD; + cpufuncs.cf_tlb_flushD_SE = armv7mp_tlb_flushD_SE; + } +#endif +} + /* * Cannot panic here as we may not have a console yet ... */ @@ -2134,18 +2152,7 @@ set_cpufuncs(void) #if defined(CPU_CORTEX) if (CPU_ID_CORTEX_P(cputype)) { cpufuncs = armv7_cpufuncs; -#ifdef MULTIPROCESSOR - /* If MP extensions are present, patch in MP TLB ops */ - const uint32_t mpidr = armreg_mpidr_read(); - if ((mpidr & (MPIDR_MP|MPIDR_U)) == MPIDR_MP) { - cpufuncs.cf_tlb_flushID = armv7mp_tlb_flushID; - cpufuncs.cf_tlb_flushID_SE = armv7mp_tlb_flushID_SE; - cpufuncs.cf_tlb_flushI = armv7mp_tlb_flushI; - cpufuncs.cf_tlb_flushI_SE = armv7mp_tlb_flushI_SE; - cpufuncs.cf_tlb_flushD = armv7mp_tlb_flushD; - cpufuncs.cf_tlb_flushD_SE = armv7mp_tlb_flushD_SE; - } -#endif + set_cpufuncs_mpfixup(); cpu_do_powersave = 1; /* Enable powersave */ #if defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6) cpu_armv7_p = true; @@ -2171,6 +2178,7 @@ set_cpufuncs(void) cputype == CPU_ID_ARM_88SV581X_V7) && (armreg_pfr0_read() & ARM_PFR0_THUMBEE_MASK)) { cpufuncs = pj4bv7_cpufuncs; + set_cpufuncs_mpfixup(); #if defined(CPU_ARMV6) || defined(CPU_PRE_ARMV6) cpu_armv7_p = true; #endif
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Sat Aug 26 07:17:12 UTC 2017 Modified Files: src/sys/arch/arm/arm: cpufunc.c Log Message: Fixup CPU_PJ4B for recent armv7 tlb operation changes. To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/arch/arm/arm/cpufunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.