CVS commit: src/sys/dev/ata
Module Name:src Committed By: mlelstv Date: Sun Oct 8 04:52:33 UTC 2017 Modified Files: src/sys/dev/ata: ata.c Log Message: Don't assert channel lock in polled mode. ahcisata (and maybe others) use ata_delay during initialization where lock isn't taken. To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/dev/ata/ata.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/ata
Module Name:src Committed By: mlelstv Date: Sun Oct 8 04:52:33 UTC 2017 Modified Files: src/sys/dev/ata: ata.c Log Message: Don't assert channel lock in polled mode. ahcisata (and maybe others) use ata_delay during initialization where lock isn't taken. To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/sys/dev/ata/ata.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/ata/ata.c diff -u src/sys/dev/ata/ata.c:1.133 src/sys/dev/ata/ata.c:1.134 --- src/sys/dev/ata/ata.c:1.133 Sat Oct 7 16:05:32 2017 +++ src/sys/dev/ata/ata.c Sun Oct 8 04:52:33 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ata.c,v 1.133 2017/10/07 16:05:32 jdolecek Exp $ */ +/* $NetBSD: ata.c,v 1.134 2017/10/08 04:52:33 mlelstv Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.133 2017/10/07 16:05:32 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.134 2017/10/08 04:52:33 mlelstv Exp $"); #include "opt_ata.h" @@ -2503,7 +2503,6 @@ atabus_rescan(device_t self, const char void ata_delay(struct ata_channel *chp, int ms, const char *msg, int flags) { - KASSERT(mutex_owned(>ch_lock)); if ((flags & (AT_WAIT | AT_POLL)) == AT_POLL) { /* @@ -2513,6 +2512,8 @@ ata_delay(struct ata_channel *chp, int m delay(ms * 1000); } else { int pause = mstohz(ms); + + KASSERT(mutex_owned(>ch_lock)); kpause(msg, false, pause > 0 ? pause : 1, >ch_lock); } }
CVS commit: src/share/man/man4
Module Name:src Committed By: sevan Date: Sun Oct 8 03:39:50 UTC 2017 Modified Files: src/share/man/man4: u3g.4 Log Message: u3ginit was split out and became umodeswitch. Update the kernel configuration declaration. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/u3g.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: sevan Date: Sun Oct 8 03:39:50 UTC 2017 Modified Files: src/share/man/man4: u3g.4 Log Message: u3ginit was split out and became umodeswitch. Update the kernel configuration declaration. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/u3g.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/u3g.4 diff -u src/share/man/man4/u3g.4:1.8 src/share/man/man4/u3g.4:1.9 --- src/share/man/man4/u3g.4:1.8 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/u3g.4 Sun Oct 8 03:39:50 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: u3g.4,v 1.8 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: u3g.4,v 1.9 2017/10/08 03:39:50 sevan Exp $ .\" .\" Copyright (c) 2008 AnyWi Technologies .\" All rights reserved. @@ -17,7 +17,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd March 14, 2013 +.Dd October 8, 2017 .Dt U3G 4 .Os .Sh NAME @@ -28,7 +28,7 @@ To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent -.Cd "u3ginit* at uhub? port ?" +.Cd "umodeswitch* at uhub? port ?" .Cd "u3g* at uhub? port ?" .Cd "ucom* at u3g?" .Ed
CVS commit: src
Module Name:src Committed By: kre Date: Sun Oct 8 01:05:13 UTC 2017 Modified Files: src: build.sh Log Message: Better validation of var name args to -V and -Z, in a way that makes it trivial to add a list of banned var names for either of those args should that ever be considered desireable (as the XXX suggests it might.) I've had this mod locked in my tree for (at least) months - time to set it free. To generate a diff of this commit: cvs rdiff -u -r1.320 -r1.321 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.320 src/build.sh:1.321 --- src/build.sh:1.320 Sun Oct 8 00:45:25 2017 +++ src/build.sh Sun Oct 8 01:05:13 2017 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.320 2017/10/08 00:45:25 kre Exp $ +# $NetBSD: build.sh,v 1.321 2017/10/08 01:05:13 kre Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -952,12 +952,35 @@ setmakeenv() eval "$1='$2'; export $1" makeenv="${makeenv} $1" } +safe_setmakeenv() +{ + case "$1" in + + # Look for any vars we want to prohibit here, like: + # Bad | Dangerous) usage "Cannot override $1 with -V";; + + # That first char is OK has already been verified. + *[!A-Za-z0-9_]*) usage "Bad variable name (-V): '$1'";; + esac + setmakeenv "$@" +} unsetmakeenv() { eval "unset $1" makeenv="${makeenv} $1" } +safe_unsetmakeenv() +{ + case "$1" in + + # Look for any vars user should not be able to unset + # Needed | Must_Have) usage "Variable $1 cannot be unset";; + + [!A-Za-z_]* | *[!A-Za-z0-9_]*) usage "Bad variable name (-Z): '$1'";; + esac + unsetmakeenv "$1" +} # Given a variable name in $1, modify the variable in place as follows: # For each space-separated word in the variable, call resolvepath. @@ -1259,8 +1282,11 @@ parseoptions() eval ${optargcmd} case "${OPTARG}" in # XXX: consider restricting which variables can be changed? - [a-zA-Z_][a-zA-Z_0-9]*=*) -setmakeenv "${OPTARG%%=*}" "${OPTARG#*=}" + [a-zA-Z_]*=*) +safe_setmakeenv "${OPTARG%%=*}" "${OPTARG#*=}" +;; + [a-zA-Z_]*) +safe_setmakeenv "${OPTARG}" "" ;; *) usage "-V argument must be of the form 'var=[value]'" @@ -1294,7 +1320,7 @@ parseoptions() -Z) eval ${optargcmd} # XXX: consider restricting which variables can be unset? - unsetmakeenv "${OPTARG}" + safe_unsetmakeenv "${OPTARG}" ;; --) @@ -1912,7 +1938,7 @@ createmakewrapper() eval cat <
CVS commit: src
Module Name:src Committed By: kre Date: Sun Oct 8 01:05:13 UTC 2017 Modified Files: src: build.sh Log Message: Better validation of var name args to -V and -Z, in a way that makes it trivial to add a list of banned var names for either of those args should that ever be considered desireable (as the XXX suggests it might.) I've had this mod locked in my tree for (at least) months - time to set it free. To generate a diff of this commit: cvs rdiff -u -r1.320 -r1.321 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: kre Date: Sun Oct 8 00:45:25 UTC 2017 Modified Files: src: build.sh Log Message: If we're going xsrc hunting, lets's do it properly. In particular it is not "good" just because ../xsrc or /usr/xsrc exists, if the user said -X /no/xsrc/here ... Further, when we find it, remember it. While here, also look in my favourite place: .../src/xsrc - src/x would be better (or src/x11) but that's too hard given the cvs module name and src tarball format. To generate a diff of this commit: cvs rdiff -u -r1.319 -r1.320 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.319 src/build.sh:1.320 --- src/build.sh:1.319 Tue Oct 3 11:02:36 2017 +++ src/build.sh Sun Oct 8 00:45:25 2017 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.319 2017/10/03 11:02:36 maya Exp $ +# $NetBSD: build.sh,v 1.320 2017/10/08 00:45:25 kre Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -1442,12 +1442,23 @@ sanitycheck() ;; esac - if [ ${MKX11-no} = "yes" ]; then - test -d ../xsrc || \ - test -d /usr/xsrc || \ - test -d "${X11SRCDIR}" || \ + while [ ${MKX11-no} = "yes" ]; do # not really a loop + test -n "${X11SRCDIR}" && { + test -d "${X11SRCDIR}" || + bomb "X11SRCDIR (${X11SRCDIR}) does not exist (with -x)" + break + } + for _xd in \ + "${NETBSDSRCDIR%/*}/xsrc" \ + "${NETBSDSRCDIR}/xsrc" \ + /usr/xsrc + do + test -d "${_xd}" && + setmakeenv X11SRCDIR "${_xd}" && + break 2 + done bomb "Asked to build X11 but no xsrc" - fi + done } # print_tooldir_make -- @@ -1901,7 +1912,7 @@ createmakewrapper() eval cat <
CVS commit: src
Module Name:src Committed By: kre Date: Sun Oct 8 00:45:25 UTC 2017 Modified Files: src: build.sh Log Message: If we're going xsrc hunting, lets's do it properly. In particular it is not "good" just because ../xsrc or /usr/xsrc exists, if the user said -X /no/xsrc/here ... Further, when we find it, remember it. While here, also look in my favourite place: .../src/xsrc - src/x would be better (or src/x11) but that's too hard given the cvs module name and src tarball format. To generate a diff of this commit: cvs rdiff -u -r1.319 -r1.320 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/utils/embedded/files
Module Name:src Committed By: sevan Date: Sun Oct 8 00:35:26 UTC 2017 Modified Files: src/distrib/utils/embedded/files: armv7_boot.cmd Log Message: Fix test otherwise we try to load a fdtfile for boards which do not have use_fdt set. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/embedded/files/armv7_boot.cmd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/files/armv7_boot.cmd diff -u src/distrib/utils/embedded/files/armv7_boot.cmd:1.1 src/distrib/utils/embedded/files/armv7_boot.cmd:1.2 --- src/distrib/utils/embedded/files/armv7_boot.cmd:1.1 Sat Oct 7 23:40:00 2017 +++ src/distrib/utils/embedded/files/armv7_boot.cmd Sun Oct 8 00:35:26 2017 @@ -23,7 +23,7 @@ if test "${kernel}" = "" ; then exit fi -if test "1" -eq ${use_fdt} ; then +if test "${use_fdt}" = "1" ; then fatload mmc ${mmcpart} ${kernel_addr_r} ${kernel} fatload mmc ${mmcpart} ${fdt_addr_r} ${fdtfile} fdt addr ${fdt_addr_r}
CVS commit: src/distrib/utils/embedded/files
Module Name:src Committed By: sevan Date: Sun Oct 8 00:35:26 UTC 2017 Modified Files: src/distrib/utils/embedded/files: armv7_boot.cmd Log Message: Fix test otherwise we try to load a fdtfile for boards which do not have use_fdt set. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/embedded/files/armv7_boot.cmd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: jmcneill Date: Sun Oct 8 00:15:13 UTC 2017 Modified Files: src/distrib/utils/embedded/conf: armv7.conf Log Message: Don't install uEnv.txt for beagle; boot.scr handles this now. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/embedded/conf/armv7.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/conf/armv7.conf diff -u src/distrib/utils/embedded/conf/armv7.conf:1.17 src/distrib/utils/embedded/conf/armv7.conf:1.18 --- src/distrib/utils/embedded/conf/armv7.conf:1.17 Sat Oct 7 23:40:00 2017 +++ src/distrib/utils/embedded/conf/armv7.conf Sun Oct 8 00:15:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: armv7.conf,v 1.17 2017/10/07 23:40:00 jmcneill Exp $ +# $NetBSD: armv7.conf,v 1.18 2017/10/08 00:15:13 jmcneill Exp $ # ARMv7 customization script used by mkimage # board=armv7 @@ -38,15 +38,7 @@ populate_common() { } populate_beagle() { - bboard_kernelimg=netbsd-BEAGLEBOARD.ub - bboard_loadaddr=8100 - bbone_kernelimg=netbsd-BEAGLEBONE.ub - bbone_loadaddr=8200 - - # Create a uEnv.txt to auto boot the correct kernel - cat >> "${mnt}/boot/uEnv.txt" << EOF -loaduimage=if test \$board = am335x; then fatload mmc 0 ${bbone_loadaddr} ${bbone_kernelimg}; bootm ${bbone_loadaddr} root=ld0a; else fatload mmc 0 ${bboard_loadaddr} ${bboard_kernelimg}; bootm ${bboard_loadaddr} root=ld0a; fi -EOF + : } populate_awin() {
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: jmcneill Date: Sun Oct 8 00:15:13 UTC 2017 Modified Files: src/distrib/utils/embedded/conf: armv7.conf Log Message: Don't install uEnv.txt for beagle; boot.scr handles this now. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/embedded/conf/armv7.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/utils/embedded
Module Name:src Committed By: jmcneill Date: Sat Oct 7 23:40:00 UTC 2017 Modified Files: src/distrib/utils/embedded/conf: armv7.conf Added Files: src/distrib/utils/embedded/files: armv7_boot.cmd Log Message: Install a boot.scr on armv7.img that detects the running board and selects the correct kernel and boot protocol. Should work on tegra, sunxi, and am335x boards for now. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/distrib/utils/embedded/conf/armv7.conf cvs rdiff -u -r0 -r1.1 src/distrib/utils/embedded/files/armv7_boot.cmd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/utils/embedded
Module Name:src Committed By: jmcneill Date: Sat Oct 7 23:40:00 UTC 2017 Modified Files: src/distrib/utils/embedded/conf: armv7.conf Added Files: src/distrib/utils/embedded/files: armv7_boot.cmd Log Message: Install a boot.scr on armv7.img that detects the running board and selects the correct kernel and boot protocol. Should work on tegra, sunxi, and am335x boards for now. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/distrib/utils/embedded/conf/armv7.conf cvs rdiff -u -r0 -r1.1 src/distrib/utils/embedded/files/armv7_boot.cmd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/conf/armv7.conf diff -u src/distrib/utils/embedded/conf/armv7.conf:1.16 src/distrib/utils/embedded/conf/armv7.conf:1.17 --- src/distrib/utils/embedded/conf/armv7.conf:1.16 Mon Jul 31 16:34:22 2017 +++ src/distrib/utils/embedded/conf/armv7.conf Sat Oct 7 23:40:00 2017 @@ -1,4 +1,4 @@ -# $NetBSD: armv7.conf,v 1.16 2017/07/31 16:34:22 jmcneill Exp $ +# $NetBSD: armv7.conf,v 1.17 2017/10/07 23:40:00 jmcneill Exp $ # ARMv7 customization script used by mkimage # board=armv7 @@ -31,6 +31,12 @@ devpubd=YES EOF } +populate_common() { + # Install boot script + cp ${DIR}/files/armv7_boot.cmd ${mnt}/boot/boot.cmd + "${MKUBOOTIMAGE}" -A arm -C none -O netbsd -T script -a 0 -n "NetBSD/armv7 boot" "${mnt}/boot/boot.cmd" "${mnt}/boot/boot.scr" +} + populate_beagle() { bboard_kernelimg=netbsd-BEAGLEBOARD.ub bboard_loadaddr=8100 @@ -44,10 +50,7 @@ EOF } populate_awin() { - cat >> "${mnt}/boot/uEnv.txt" << EOF -bootargs=root=ld0a console=${console} -uenvcmd=mmc dev 0; mmc rescan; if test \$fdtfile = sun7i-a20-cubieboard2.dtb; then setenv kernel netbsd-CUBIEBOARD.ub; elif test \$fdtfile = sun7i-a20-cubietruck.dtb; then setenv kernel netbsd-CUBIETRUCK.ub; elif test \$fdtfile = sun6i-a31-hummingbird.dtb; then setenv kernel netbsd-HUMMINGBIRD_A31.ub; elif test \$fdtfile = sun7i-a20-bananapi.dtb; then setenv kernel netbsd-BPI.ub; fi; fatload mmc 0:1 8200 \$kernel; bootm 8200 -EOF + : } populate_rpi() { @@ -117,18 +120,7 @@ populate_sunxi() { } populate_tegra() { - tegra_kernelimg=netbsd-TEGRA.ub - tegra_loadaddr=0x9000 - - # Create a boot.scr for Tegra U-Boot - cat > "${mnt}/boot/boot-TEGRA.txt" << EOF -setenv bootargs root=ld0a -fatload mmc 1:1 ${tegra_loadaddr} ${tegra_kernelimg} -fatload mmc 1:1 \${fdt_addr_r} tegra124-\${board}.dtb -fdt addr \${fdt_addr_r} -bootm ${tegra_loadaddr} - \${fdt_addr_r} -EOF - "${MKUBOOTIMAGE}" -A arm -C none -O netbsd -T script -a 0 -n "NetBSD/tegra boot" "${mnt}/boot/boot-TEGRA.txt" "${mnt}/boot/boot.scr" + : } populate() { @@ -176,4 +168,7 @@ populate() { populate_amlogic populate_tegra populate_sunxi + + # common configuration + populate_common } Added files: Index: src/distrib/utils/embedded/files/armv7_boot.cmd diff -u /dev/null src/distrib/utils/embedded/files/armv7_boot.cmd:1.1 --- /dev/null Sat Oct 7 23:40:00 2017 +++ src/distrib/utils/embedded/files/armv7_boot.cmd Sat Oct 7 23:40:00 2017 @@ -0,0 +1,34 @@ +if test "${soc}" = "sunxi" ; then + setenv kernel netbsd-SUNXI.ub + setenv bootargs root=ld0a + setenv mmcpart 0:1 + setenv use_fdt 1 +fi +if test "${soc}" = "tegra" ; then + setenv kernel netbsd-TEGRA.ub + setenv bootargs root=ld1a + setenv mmcpart 1:1 + setenv use_fdt 1 +fi +if test "${board}" = "am335x" ; then + setenv kernel netbsd-BEAGLEBONE.ub + setenv mmcpart 0:1 + setenv bootargs root=ld0a +fi + +if test "${kernel}" = "" ; then + echo '>>>' + echo '>>> Target device is not supported by this script.' + echo '>>>' + exit +fi + +if test "1" -eq ${use_fdt} ; then + fatload mmc ${mmcpart} ${kernel_addr_r} ${kernel} + fatload mmc ${mmcpart} ${fdt_addr_r} ${fdtfile} + fdt addr ${fdt_addr_r} + bootm ${kernel_addr_r} - ${fdt_addr_r} +else + fatload mmc ${mmcpart} ${kernel_addr_r} ${kernel} + bootm ${kernel_addr_r} ${bootargs} +fi
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 21:53:16 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi sunxi_codec.c sunxi_codec.h Added Files: src/sys/arch/arm/sunxi: sun6i_a31_codec.c Log Message: Add A31 audio codec support. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sun6i_a31_codec.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_codec.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_codec.h 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 Oct 7 21:52:53 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun6i_a31_ccu.c Log Message: add audio pll and codec clocks To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sun6i_a31_ccu.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/sun6i_a31_ccu.c diff -u src/sys/arch/arm/sunxi/sun6i_a31_ccu.c:1.3 src/sys/arch/arm/sunxi/sun6i_a31_ccu.c:1.4 --- src/sys/arch/arm/sunxi/sun6i_a31_ccu.c:1.3 Sat Oct 7 19:41:51 2017 +++ src/sys/arch/arm/sunxi/sun6i_a31_ccu.c Sat Oct 7 21:52:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sun6i_a31_ccu.c,v 1.3 2017/10/07 19:41:51 jmcneill Exp $ */ +/* $NetBSD: sun6i_a31_ccu.c,v 1.4 2017/10/07 21:52:53 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -29,7 +29,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun6i_a31_ccu.c,v 1.3 2017/10/07 19:41:51 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun6i_a31_ccu.c,v 1.4 2017/10/07 21:52:53 jmcneill Exp $"); #include #include @@ -41,6 +41,7 @@ __KERNEL_RCSID(1, "$NetBSD: sun6i_a31_cc #include #include +#define PLL2_CFG_REG 0x008 #define PLL_PERIPH_CTRL_REG 0x028 #define AHB1_APB1_CFG_REG 0x054 #define APB2_CLK_DIV_REG 0x058 @@ -53,6 +54,7 @@ __KERNEL_RCSID(1, "$NetBSD: sun6i_a31_cc #define SD2_CLK_REG 0x090 #define SD3_CLK_REG 0x094 #define USBPHY_CFG_REG 0x0cc +#define AUDIO_CODEC_CLK_REG 0x140 #define BUS_SOFT_RST_REG0 0x2c0 #define BUS_SOFT_RST_REG1 0x2c4 #define BUS_SOFT_RST_REG2 0x2c8 @@ -140,7 +142,23 @@ static const char *apb1_parents[] = { "a static const char *apb2_parents[] = { "losc", "hosc", "pll_periph", "pll_periph" }; static const char *mod_parents[] = { "hosc", "pll_periph" }; +static const struct sunxi_ccu_nkmp_tbl sun6i_a31_pll_audio_table[] = { + { 24576000, 85, 0, 20, 3 }, + { 0 } +}; + static struct sunxi_ccu_clk sun6i_a31_ccu_clks[] = { + SUNXI_CCU_NKMP_TABLE(A31_CLK_PLL_AUDIO_BASE, "pll_audio", "hosc", + PLL2_CFG_REG, /* reg */ + __BITS(14,8), /* n */ + 0,/* k */ + __BITS(4,0), /* m */ + __BITS(19,16), /* p */ + __BIT(31), /* enable */ + __BIT(28), /* lock */ + sun6i_a31_pll_audio_table, /* table */ + 0), + SUNXI_CCU_NKMP(A31_CLK_PLL_PERIPH, "pll_periph", "hosc", PLL_PERIPH_CTRL_REG, /* reg */ __BITS(12,8), /* n */ @@ -248,6 +266,9 @@ static struct sunxi_ccu_clk sun6i_a31_cc USBPHY_CFG_REG, 17), SUNXI_CCU_GATE(A31_CLK_USB_OHCI2, "usb-ohci2", "hosc", USBPHY_CFG_REG, 18), + + SUNXI_CCU_GATE(A31_CLK_CODEC, "codec", "pll_audio", + AUDIO_CODEC_CLK_REG, 31), }; static int
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 21:53:16 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi sunxi_codec.c sunxi_codec.h Added Files: src/sys/arch/arm/sunxi: sun6i_a31_codec.c Log Message: Add A31 audio codec support. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sun6i_a31_codec.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_codec.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_codec.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/arm/sunxi/files.sunxi diff -u src/sys/arch/arm/sunxi/files.sunxi:1.30 src/sys/arch/arm/sunxi/files.sunxi:1.31 --- src/sys/arch/arm/sunxi/files.sunxi:1.30 Sat Oct 7 15:12:35 2017 +++ src/sys/arch/arm/sunxi/files.sunxi Sat Oct 7 21:53:16 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.30 2017/10/07 15:12:35 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.31 2017/10/07 21:53:16 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -166,6 +166,7 @@ device sunxicodec: audiobus, auconv, mul attach sunxicodec at fdt with sunxi_codec file arch/arm/sunxi/sunxi_codec.c sunxi_codec file arch/arm/sunxi/sun4i_a10_codec.c sunxi_codec +file arch/arm/sunxi/sun6i_a31_codec.c sunxi_codec # H3 Audio codec (analog part) device h3codec Index: src/sys/arch/arm/sunxi/sunxi_codec.c diff -u src/sys/arch/arm/sunxi/sunxi_codec.c:1.2 src/sys/arch/arm/sunxi/sunxi_codec.c:1.3 --- src/sys/arch/arm/sunxi/sunxi_codec.c:1.2 Sun Aug 27 16:05:26 2017 +++ src/sys/arch/arm/sunxi/sunxi_codec.c Sat Oct 7 21:53:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_codec.c,v 1.2 2017/08/27 16:05:26 jmcneill Exp $ */ +/* $NetBSD: sunxi_codec.c,v 1.3 2017/10/07 21:53:16 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill@@ -29,7 +29,7 @@ #include "opt_ddb.h" #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_codec.c,v 1.2 2017/08/27 16:05:26 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_codec.c,v 1.3 2017/10/07 21:53:16 jmcneill Exp $"); #include #include @@ -91,6 +91,7 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_codec. static const struct of_compat_data compat_data[] = { A10_CODEC_COMPATDATA, + A31_CODEC_COMPATDATA, H3_CODEC_COMPATDATA, { NULL } }; Index: src/sys/arch/arm/sunxi/sunxi_codec.h diff -u src/sys/arch/arm/sunxi/sunxi_codec.h:1.3 src/sys/arch/arm/sunxi/sunxi_codec.h:1.4 --- src/sys/arch/arm/sunxi/sunxi_codec.h:1.3 Sat Oct 7 14:11:11 2017 +++ src/sys/arch/arm/sunxi/sunxi_codec.h Sat Oct 7 21:53:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_codec.h,v 1.3 2017/10/07 14:11:11 jmcneill Exp $ */ +/* $NetBSD: sunxi_codec.h,v 1.4 2017/10/07 21:53:16 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill @@ -131,4 +131,8 @@ extern const struct sunxi_codec_conf sun { "allwinner,sun4i-a10-codec", (uintptr_t)_a10_codecconf }, \ { "allwinner,sun7i-a20-codec", (uintptr_t)_a10_codecconf } +extern const struct sunxi_codec_conf sun6i_a31_codecconf; +#define A31_CODEC_COMPATDATA \ + { "allwinner,sun6i-a31-codec", (uintptr_t)_a31_codecconf } + #endif /* !_ARM_SUNXI_CODEC_H */ Added files: Index: src/sys/arch/arm/sunxi/sun6i_a31_codec.c diff -u /dev/null src/sys/arch/arm/sunxi/sun6i_a31_codec.c:1.1 --- /dev/null Sat Oct 7 21:53:16 2017 +++ src/sys/arch/arm/sunxi/sun6i_a31_codec.c Sat Oct 7 21:53:16 2017 @@ -0,0 +1,310 @@ +/* $NetBSD: sun6i_a31_codec.c,v 1.1 2017/10/07 21:53:16 jmcneill Exp $ */ + +/*- + * Copyright (c) 2014-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 + *
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 21:52:53 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun6i_a31_ccu.c Log Message: add audio pll and codec clocks To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sun6i_a31_ccu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/etc/rc.d
Module Name:src Committed By: sevan Date: Sat Oct 7 21:41:51 UTC 2017 Modified Files: src/etc/rc.d: sshd Log Message: With the new version of OpenSSH, SSHv1 is no longer supported server-side. Along with that rsa1 type keys are no longer supported. Don't try to generate such keys on new systems. ok christos To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/etc/rc.d/sshd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/sshd diff -u src/etc/rc.d/sshd:1.23 src/etc/rc.d/sshd:1.24 --- src/etc/rc.d/sshd:1.23 Sun Oct 19 16:33:01 2014 +++ src/etc/rc.d/sshd Sat Oct 7 21:41:51 2017 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: sshd,v 1.23 2014/10/19 16:33:01 christos Exp $ +# $NetBSD: sshd,v 1.24 2017/10/07 21:41:51 sevan Exp $ # # PROVIDE: sshd @@ -35,7 +35,6 @@ sshd_keygen() "${keygen}" -t "${type}" ${bitarg} -f "${f}" -N '' fi done << _EOF -rsa1 0 ssh_host_key 1 RSA dsa 1024 ssh_host_dsa_key 2 DSA ecdsa 521 ssh_host_ecdsa_key 1 ECDSA ed25519 -1 ssh_host_ed25519_key 1 ED25519 @@ -46,8 +45,7 @@ _EOF sshd_precmd() { - if [ ! -f /etc/ssh/ssh_host_key -o \ - ! -f /etc/ssh/ssh_host_dsa_key -o \ + if [ ! -f /etc/ssh/ssh_host_dsa_key -o \ ! -f /etc/ssh/ssh_host_ecdsa_key -o \ ! -f /etc/ssh/ssh_host_ed25519_key -o \ ! -f /etc/ssh/ssh_host_rsa_key ]; then
CVS commit: src/etc/rc.d
Module Name:src Committed By: sevan Date: Sat Oct 7 21:41:51 UTC 2017 Modified Files: src/etc/rc.d: sshd Log Message: With the new version of OpenSSH, SSHv1 is no longer supported server-side. Along with that rsa1 type keys are no longer supported. Don't try to generate such keys on new systems. ok christos To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/etc/rc.d/sshd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/include
Module Name:src Committed By: christos Date: Sat Oct 7 21:16:06 UTC 2017 Modified Files: src/include: stdlib.h Log Message: remove recallocarray To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/include/stdlib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Sat Oct 7 21:15:48 UTC 2017 Modified Files: src/lib/libc/stdlib: reallocarray.c Log Message: remove recallocarray To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdlib/reallocarray.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Sat Oct 7 21:15:48 UTC 2017 Modified Files: src/lib/libc/stdlib: reallocarray.c Log Message: remove recallocarray To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libc/stdlib/reallocarray.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/reallocarray.c diff -u src/lib/libc/stdlib/reallocarray.c:1.8 src/lib/libc/stdlib/reallocarray.c:1.9 --- src/lib/libc/stdlib/reallocarray.c:1.8 Sat Oct 7 15:38:35 2017 +++ src/lib/libc/stdlib/reallocarray.c Sat Oct 7 17:15:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: reallocarray.c,v 1.8 2017/10/07 19:38:35 christos Exp $ */ +/* $NetBSD: reallocarray.c,v 1.9 2017/10/07 21:15:48 christos Exp $ */ /* $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */ /*- @@ -31,11 +31,10 @@ */ #include -__RCSID("$NetBSD: reallocarray.c,v 1.8 2017/10/07 19:38:35 christos Exp $"); +__RCSID("$NetBSD: reallocarray.c,v 1.9 2017/10/07 21:15:48 christos Exp $"); #define _OPENBSD_SOURCE #include -#include #include void * @@ -52,15 +51,3 @@ reallocarray(void *optr, size_t nmemb, s errno = e; return NULL; } - -void * -recallocarray(void *optr, size_t omemb, size_t nmemb, size_t size) -{ - char *nptr = reallocarray(optr, nmemb, size); - - if (nptr == NULL || omemb >= nmemb) - return nptr; - - memset(nptr + omemb * size, 0, (nmemb - omemb) * size); - return nptr; -}
CVS commit: src/include
Module Name:src Committed By: christos Date: Sat Oct 7 21:16:06 UTC 2017 Modified Files: src/include: stdlib.h Log Message: remove recallocarray To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/include/stdlib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/stdlib.h diff -u src/include/stdlib.h:1.118 src/include/stdlib.h:1.119 --- src/include/stdlib.h:1.118 Sat Oct 7 15:38:09 2017 +++ src/include/stdlib.h Sat Oct 7 17:16:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.118 2017/10/07 19:38:09 christos Exp $ */ +/* $NetBSD: stdlib.h,v 1.119 2017/10/07 21:16:06 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -126,7 +126,6 @@ unsigned long #ifdef _OPENBSD_SOURCE long long strtonum(const char *, long long, long long, const char **); void *reallocarray(void *, size_t, size_t); -void *recallocarray(void *, size_t, size_t, size_t); #endif int system(const char *);
CVS commit: src/crypto/external/bsd/openssh
Module Name:src Committed By: christos Date: Sat Oct 7 21:14:59 UTC 2017 Modified Files: src/crypto/external/bsd/openssh/dist: includes.h src/crypto/external/bsd/openssh/lib: Makefile Added Files: src/crypto/external/bsd/openssh/dist: recallocarray.c Log Message: define recallocarray locally. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/crypto/external/bsd/openssh/dist/includes.h cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/openssh/dist/recallocarray.c cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/openssh/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/includes.h diff -u src/crypto/external/bsd/openssh/dist/includes.h:1.6 src/crypto/external/bsd/openssh/dist/includes.h:1.7 --- src/crypto/external/bsd/openssh/dist/includes.h:1.6 Tue Apr 18 14:41:46 2017 +++ src/crypto/external/bsd/openssh/dist/includes.h Sat Oct 7 17:14:59 2017 @@ -1,9 +1,11 @@ -/* $NetBSD: includes.h,v 1.6 2017/04/18 18:41:46 christos Exp $ */ +/* $NetBSD: includes.h,v 1.7 2017/10/07 21:14:59 christos Exp $ */ #include #ifndef __OpenBSD__ #define __bounded__(a, b, c) #define explicit_bzero(a, b) explicit_memset((a), 0, (b)) #define timingsafe_bcmp(a, b, c) (!consttime_memequal((a), (b), (c))) +#include +void *recallocarray(void *, size_t, size_t, size_t); #endif #include "namespace.h" Index: src/crypto/external/bsd/openssh/lib/Makefile diff -u src/crypto/external/bsd/openssh/lib/Makefile:1.22 src/crypto/external/bsd/openssh/lib/Makefile:1.23 --- src/crypto/external/bsd/openssh/lib/Makefile:1.22 Sat Oct 7 15:39:19 2017 +++ src/crypto/external/bsd/openssh/lib/Makefile Sat Oct 7 17:14:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2017/10/07 19:39:19 christos Exp $ +# $NetBSD: Makefile,v 1.23 2017/10/07 21:14:59 christos Exp $ .include @@ -57,6 +57,7 @@ packet.c \ poly1305.c \ progressmeter.c \ readpass.c \ +recallocarray.c \ sc25519.c \ smult_curve25519_ref.c \ sshbuf-getput-basic.c \ Added files: Index: src/crypto/external/bsd/openssh/dist/recallocarray.c diff -u /dev/null src/crypto/external/bsd/openssh/dist/recallocarray.c:1.1 --- /dev/null Sat Oct 7 17:14:59 2017 +++ src/crypto/external/bsd/openssh/dist/recallocarray.c Sat Oct 7 17:14:59 2017 @@ -0,0 +1,51 @@ +/* $NetBSD: recallocarray.c,v 1.1 2017/10/07 21:14:59 christos Exp $ */ +/* $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */ + +/*- + * Copyright (c) 2015 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Christos Zoulas. + * + * 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 "includes.h" +#include +__RCSID("$NetBSD: recallocarray.c,v 1.1 2017/10/07 21:14:59 christos Exp $"); + +#include +#include +#include + +void * +recallocarray(void *optr, size_t omemb, size_t nmemb, size_t size) +{ + char *nptr = reallocarray(optr, nmemb, size); + + if (nptr == NULL || omemb >= nmemb) + return nptr; + + memset(nptr + omemb * size, 0, (nmemb - omemb) * size); + return nptr; +}
CVS commit: src/crypto/external/bsd/openssh
Module Name:src Committed By: christos Date: Sat Oct 7 21:14:59 UTC 2017 Modified Files: src/crypto/external/bsd/openssh/dist: includes.h src/crypto/external/bsd/openssh/lib: Makefile Added Files: src/crypto/external/bsd/openssh/dist: recallocarray.c Log Message: define recallocarray locally. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/crypto/external/bsd/openssh/dist/includes.h cvs rdiff -u -r0 -r1.1 src/crypto/external/bsd/openssh/dist/recallocarray.c cvs rdiff -u -r1.22 -r1.23 src/crypto/external/bsd/openssh/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 20:32:20 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add axp22x and pcf8563rtc To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 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.38 src/sys/arch/evbarm/conf/SUNXI:1.39 --- src/sys/arch/evbarm/conf/SUNXI:1.38 Sat Oct 7 18:22:23 2017 +++ src/sys/arch/evbarm/conf/SUNXI Sat Oct 7 20:32:20 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.38 2017/10/07 18:22:23 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.39 2017/10/07 20:32:20 jmcneill Exp $ # # Allwinner sunxi family # @@ -159,7 +159,9 @@ tcakp* at iic? # TI TCA8418 Keypad Sc wskbd* at tcakp? console ? axp20x* at iic? # AXP209 Power Management IC axp20xreg* at axp20x? +axp22x* at iic? # AXP221 Power Management IC sy8106a* at iic? # Silergy SY81061 regulator +pcf8563rtc* at iic? # PCF8563 RTC # RTC sunxirtc* at fdt? # RTC
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Oct 7 20:31:48 UTC 2017 Modified Files: src/sys/dev/i2c: axp22x.c Log Message: add direct config support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/axp22x.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/axp22x.c diff -u src/sys/dev/i2c/axp22x.c:1.2 src/sys/dev/i2c/axp22x.c:1.3 --- src/sys/dev/i2c/axp22x.c:1.2 Fri Nov 21 22:31:09 2014 +++ src/sys/dev/i2c/axp22x.c Sat Oct 7 20:31:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: axp22x.c,v 1.2 2014/11/21 22:31:09 jmcneill Exp $ */ +/* $NetBSD: axp22x.c,v 1.3 2017/10/07 20:31:48 jmcneill Exp $ */ /*- * Copyright (c) 2014 Jared D. McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: axp22x.c,v 1.2 2014/11/21 22:31:09 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: axp22x.c,v 1.3 2017/10/07 20:31:48 jmcneill Exp $"); #include #include @@ -40,6 +40,11 @@ __KERNEL_RCSID(0, "$NetBSD: axp22x.c,v 1 #include +static const char *compatible[] = { + "x-powers,axp221", + NULL +}; + #define AXP_TEMP_MON_REG 0x56 /* 2 bytes */ struct axp22x_softc { @@ -63,6 +68,11 @@ CFATTACH_DECL_NEW(axp22x, sizeof(struct static int axp22x_match(device_t parent, cfdata_t match, void *aux) { + struct i2c_attach_args *ia = aux; + + if (ia->ia_name != NULL) + return iic_compat_match(ia, compatible); + return 1; }
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Oct 7 20:31:48 UTC 2017 Modified Files: src/sys/dev/i2c: axp22x.c Log Message: add direct config support To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/axp22x.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/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 20:32:20 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add axp22x and pcf8563rtc To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 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/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Oct 7 20:18:16 UTC 2017 Modified Files: src/sys/dev/i2c: pcf8563.c Log Message: Add FDT support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/pcf8563.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/pcf8563.c diff -u src/sys/dev/i2c/pcf8563.c:1.7 src/sys/dev/i2c/pcf8563.c:1.8 --- src/sys/dev/i2c/pcf8563.c:1.7 Sat Apr 11 20:05:44 2015 +++ src/sys/dev/i2c/pcf8563.c Sat Oct 7 20:18:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pcf8563.c,v 1.7 2015/04/11 20:05:44 joerg Exp $ */ +/* $NetBSD: pcf8563.c,v 1.8 2017/10/07 20:18:16 jmcneill Exp $ */ /* * Copyright (c) 2011 Jonathan A. Kollasch @@ -26,8 +26,13 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* XXX */ +#if defined(__arm__) || defined(__aarch64__) +#include "opt_fdt.h" +#endif + #include -__KERNEL_RCSID(0, "$NetBSD: pcf8563.c,v 1.7 2015/04/11 20:05:44 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcf8563.c,v 1.8 2017/10/07 20:18:16 jmcneill Exp $"); #include #include @@ -39,6 +44,16 @@ __KERNEL_RCSID(0, "$NetBSD: pcf8563.c,v #include #include +#ifdef FDT +#include +#endif + +static const char *compatible[] = { + "nxp,pcf8563", + "pcf8563rtc", + NULL +}; + struct pcf8563rtc_softc { device_t sc_dev; i2c_tag_t sc_tag; @@ -64,8 +79,7 @@ pcf8563rtc_match(device_t parent, cfdata if (ia->ia_name) { /* direct config - check name */ - if (strcmp(ia->ia_name, "pcf8563rtc") == 0) - return 1; + return iic_compat_match(ia, compatible); } else { /* indirect config - check typical address */ if (ia->ia_addr == PCF8563_ADDR) @@ -98,7 +112,11 @@ pcf8563rtc_attach(device_t parent, devic I2C_F_POLL); iic_release_bus(sc->sc_tag, I2C_F_POLL); +#ifdef FDT + fdtbus_todr_attach(self, ia->ia_cookie, >sc_todr); +#else todr_attach(>sc_todr); +#endif } static int
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Oct 7 20:18:16 UTC 2017 Modified Files: src/sys/dev/i2c: pcf8563.c Log Message: Add FDT support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/pcf8563.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 Oct 7 20:17:38 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_twi.c Log Message: Initialize TWI clock rate to 100kHz To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_twi.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_twi.c diff -u src/sys/arch/arm/sunxi/sunxi_twi.c:1.4 src/sys/arch/arm/sunxi/sunxi_twi.c:1.5 --- src/sys/arch/arm/sunxi/sunxi_twi.c:1.4 Mon Oct 2 22:41:25 2017 +++ src/sys/arch/arm/sunxi/sunxi_twi.c Sat Oct 7 20:17:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_twi.c,v 1.4 2017/10/02 22:41:25 jmcneill Exp $ */ +/* $NetBSD: sunxi_twi.c,v 1.5 2017/10/07 20:17:38 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_twi.c,v 1.4 2017/10/02 22:41:25 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_twi.c,v 1.5 2017/10/07 20:17:38 jmcneill Exp $"); #include #include @@ -42,6 +42,10 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_twi.c, #include +#define TWI_CCR_REG 0x14 +#define TWI_CCR_CLK_M __BITS(6,3) +#define TWI_CCR_CLK_N __BITS(2,0) + static int sunxi_twi_match(device_t, cfdata_t, void *); static void sunxi_twi_attach(device_t, device_t, void *); @@ -135,6 +139,16 @@ sunxi_twi_attach(device_t parent, device prop_dictionary_set_bool(device_properties(self), "iflg-rwc", conf->iflg_rwc); + /* + * Set clock rate to 100kHz. From the datasheet: + * For 100Khz standard speed 2Wire, CLK_N=2, CLK_M=11 + * F0=48M/2^2=12Mhz, F1=F0/(10*(11+1)) = 0.1Mhz + */ + const u_int m = 11, n = 2; + const uint32_t ccr = __SHIFTIN(n, TWI_CCR_CLK_N) | + __SHIFTIN(m, TWI_CCR_CLK_M); + bus_space_write_4(bst, bsh, TWI_CCR_REG, ccr); + gttwsi_attach_subr(self, bst, bsh); ih = fdtbus_intr_establish(phandle, 0, IPL_VM, 0, gttwsi_intr, sc);
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 20:17:38 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_twi.c Log Message: Initialize TWI clock rate to 100kHz To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/sunxi/sunxi_twi.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/isapnp
Module Name:src Committed By: jdolecek Date: Sat Oct 7 20:02:07 UTC 2017 Modified Files: src/sys/dev/isapnp: wdc_isapnp.c Log Message: adapt for NCQ branch merge too To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/isapnp/wdc_isapnp.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/isapnp/wdc_isapnp.c diff -u src/sys/dev/isapnp/wdc_isapnp.c:1.42 src/sys/dev/isapnp/wdc_isapnp.c:1.43 --- src/sys/dev/isapnp/wdc_isapnp.c:1.42 Tue Jul 31 15:50:35 2012 +++ src/sys/dev/isapnp/wdc_isapnp.c Sat Oct 7 20:02:07 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_isapnp.c,v 1.42 2012/07/31 15:50:35 bouyer Exp $ */ +/* $NetBSD: wdc_isapnp.c,v 1.43 2017/10/07 20:02:07 jdolecek Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.42 2012/07/31 15:50:35 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.43 2017/10/07 20:02:07 jdolecek Exp $"); #include #include @@ -55,7 +55,6 @@ struct wdc_isapnp_softc { struct wdc_softc sc_wdcdev; struct ata_channel *wdc_chanlist[1]; struct ata_channel ata_channel; - struct ata_queue wdc_chqueue; struct wdc_regs wdc_regs; isa_chipset_tag_t sc_ic; void *sc_ih; @@ -159,9 +158,8 @@ wdc_isapnp_attach(device_t parent, devic sc->sc_wdcdev.wdc_maxdrives = 2; sc->ata_channel.ch_channel = 0; sc->ata_channel.ch_atac = >sc_wdcdev.sc_atac; - sc->ata_channel.ch_queue = >wdc_chqueue; - - wdc_init_shadow_regs(>ata_channel); + sc->ata_channel.ch_queue = ata_queue_alloc(1); + wdc_init_shadow_regs(wdr); wdcattach(>ata_channel); }
CVS commit: src/sys/dev/isapnp
Module Name:src Committed By: jdolecek Date: Sat Oct 7 20:02:07 UTC 2017 Modified Files: src/sys/dev/isapnp: wdc_isapnp.c Log Message: adapt for NCQ branch merge too To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/dev/isapnp/wdc_isapnp.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
Module Name:src Committed By: jdolecek Date: Sat Oct 7 19:58:54 UTC 2017 Modified Files: src/sys/arch/arm/gemini: obio_wdc.c src/sys/arch/dreamcast/dev/g1: wdc_g1.c src/sys/arch/evbarm/iq31244: wdc_obio.c src/sys/arch/evbarm/tsarm: wdc_ts.c src/sys/arch/evbppc/mpc85xx: wdc_obio.c src/sys/arch/mmeye/dev: wdc_mainbus.c Log Message: adapt the rest of wdc attachments for NCQ branch merge To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/gemini/obio_wdc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/dreamcast/dev/g1/wdc_g1.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/iq31244/wdc_obio.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/tsarm/wdc_ts.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/mpc85xx/wdc_obio.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mmeye/dev/wdc_mainbus.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
Module Name:src Committed By: jdolecek Date: Sat Oct 7 19:58:54 UTC 2017 Modified Files: src/sys/arch/arm/gemini: obio_wdc.c src/sys/arch/dreamcast/dev/g1: wdc_g1.c src/sys/arch/evbarm/iq31244: wdc_obio.c src/sys/arch/evbarm/tsarm: wdc_ts.c src/sys/arch/evbppc/mpc85xx: wdc_obio.c src/sys/arch/mmeye/dev: wdc_mainbus.c Log Message: adapt the rest of wdc attachments for NCQ branch merge To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/gemini/obio_wdc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/dreamcast/dev/g1/wdc_g1.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/iq31244/wdc_obio.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/tsarm/wdc_ts.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/mpc85xx/wdc_obio.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mmeye/dev/wdc_mainbus.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/gemini/obio_wdc.c diff -u src/sys/arch/arm/gemini/obio_wdc.c:1.6 src/sys/arch/arm/gemini/obio_wdc.c:1.7 --- src/sys/arch/arm/gemini/obio_wdc.c:1.6 Tue Jul 31 15:50:31 2012 +++ src/sys/arch/arm/gemini/obio_wdc.c Sat Oct 7 19:58:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: obio_wdc.c,v 1.6 2012/07/31 15:50:31 bouyer Exp $ */ +/* $NetBSD: obio_wdc.c,v 1.7 2017/10/07 19:58:53 jdolecek Exp $ */ /* adapted from iq31244/wdc_obio.c: * NetBSD: wdc_obio.c,v 1.5 2008/04/28 20:23:16 martin Exp @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: obio_wdc.c,v 1.6 2012/07/31 15:50:31 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obio_wdc.c,v 1.7 2017/10/07 19:58:53 jdolecek Exp $"); #include "locators.h" @@ -58,7 +58,6 @@ struct wdc_obio_softc { struct wdc_softc sc_wdcdev; struct ata_channel *wdc_chanlist[1]; struct ata_channel ata_channel; - struct ata_queue wdc_chqueue; struct wdc_regs wdc_regs; void *sc_ih; }; @@ -141,8 +140,8 @@ wdc_obio_attach(device_t parent, device_ sc->sc_wdcdev.wdc_maxdrives = 2; sc->ata_channel.ch_channel = 0; sc->ata_channel.ch_atac = >sc_wdcdev.sc_atac; - sc->ata_channel.ch_queue = >wdc_chqueue; - wdc_init_shadow_regs(>ata_channel); + sc->ata_channel.ch_queue = ata_queue_alloc(1); + wdc_init_shadow_regs(wdr); aprint_normal("\n"); Index: src/sys/arch/dreamcast/dev/g1/wdc_g1.c diff -u src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.1 src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.2 --- src/sys/arch/dreamcast/dev/g1/wdc_g1.c:1.1 Thu Dec 29 11:49:05 2016 +++ src/sys/arch/dreamcast/dev/g1/wdc_g1.c Sat Oct 7 19:58:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_g1.c,v 1.1 2016/12/29 11:49:05 tsutsui Exp $ */ +/* $NetBSD: wdc_g1.c,v 1.2 2017/10/07 19:58:53 jdolecek Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -55,7 +55,6 @@ struct wdc_g1_softc { struct wdc_softc sc_wdcdev; struct ata_channel *wdc_chanlist[1]; struct ata_channel ata_channel; - struct ata_queue wdc_chqueue; struct wdc_regs wdc_regs; void *sc_ih; int sc_irq; @@ -164,8 +163,8 @@ wdc_g1_attach(struct device *parent, str sc->sc_wdcdev.reset = wdc_g1_do_reset; sc->ata_channel.ch_channel = 0; sc->ata_channel.ch_atac = >sc_wdcdev.sc_atac; - sc->ata_channel.ch_queue = >wdc_chqueue; - wdc_init_shadow_regs(>ata_channel); + sc->ata_channel.ch_queue = ata_queue_alloc(1); + wdc_init_shadow_regs(wdr); aprint_normal(": %s\n", sysasic_intr_string(SYSASIC_IRL9)); Index: src/sys/arch/evbarm/iq31244/wdc_obio.c diff -u src/sys/arch/evbarm/iq31244/wdc_obio.c:1.9 src/sys/arch/evbarm/iq31244/wdc_obio.c:1.10 --- src/sys/arch/evbarm/iq31244/wdc_obio.c:1.9 Tue Jul 31 15:50:32 2012 +++ src/sys/arch/evbarm/iq31244/wdc_obio.c Sat Oct 7 19:58:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_obio.c,v 1.9 2012/07/31 15:50:32 bouyer Exp $ */ +/* $NetBSD: wdc_obio.c,v 1.10 2017/10/07 19:58:53 jdolecek Exp $ */ /*- * Copyright (c) 1998, 2003, 2005 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.9 2012/07/31 15:50:32 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.10 2017/10/07 19:58:53 jdolecek Exp $"); #include #include @@ -54,7 +54,6 @@ struct wdc_obio_softc { struct wdc_softc sc_wdcdev; struct ata_channel *wdc_chanlist[1]; struct ata_channel ata_channel; - struct ata_queue wdc_chqueue; struct wdc_regs wdc_regs; void *sc_ih; }; @@ -112,8 +111,8 @@ wdc_obio_attach(device_t parent, device_ sc->sc_wdcdev.wdc_maxdrives = 2; sc->ata_channel.ch_channel = 0; sc->ata_channel.ch_atac = >sc_wdcdev.sc_atac; - sc->ata_channel.ch_queue = >wdc_chqueue; - wdc_init_shadow_regs(>ata_channel); + sc->ata_channel.ch_queue = ata_queue_alloc(1); + wdc_init_shadow_regs(wdr); aprint_normal("\n"); Index: src/sys/arch/evbarm/tsarm/wdc_ts.c diff -u src/sys/arch/evbarm/tsarm/wdc_ts.c:1.9 src/sys/arch/evbarm/tsarm/wdc_ts.c:1.10 --- src/sys/arch/evbarm/tsarm/wdc_ts.c:1.9 Tue Jul 31 15:50:32 2012 +++
CVS commit: src/sys/dev
Module Name:src Committed By: jdolecek Date: Sat Oct 7 19:52:11 UTC 2017 Modified Files: src/sys/dev/ic: wdc_upc.c src/sys/dev/ofisa: wdc_ofisa.c src/sys/dev/podulebus: dtide.c hcide.c Log Message: adapt several more wdc attachments for NCQ branch merge To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/wdc_upc.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ofisa/wdc_ofisa.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/podulebus/dtide.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/podulebus/hcide.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
Module Name:src Committed By: jdolecek Date: Sat Oct 7 19:52:11 UTC 2017 Modified Files: src/sys/dev/ic: wdc_upc.c src/sys/dev/ofisa: wdc_ofisa.c src/sys/dev/podulebus: dtide.c hcide.c Log Message: adapt several more wdc attachments for NCQ branch merge To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/wdc_upc.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/ofisa/wdc_ofisa.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/podulebus/dtide.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/podulebus/hcide.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/wdc_upc.c diff -u src/sys/dev/ic/wdc_upc.c:1.29 src/sys/dev/ic/wdc_upc.c:1.30 --- src/sys/dev/ic/wdc_upc.c:1.29 Tue Jul 31 15:50:35 2012 +++ src/sys/dev/ic/wdc_upc.c Sat Oct 7 19:52:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_upc.c,v 1.29 2012/07/31 15:50:35 bouyer Exp $ */ +/* $NetBSD: wdc_upc.c,v 1.30 2017/10/07 19:52:11 jdolecek Exp $ */ /*- * Copyright (c) 2000 Ben Harris * All rights reserved. @@ -28,7 +28,7 @@ /* This file is part of NetBSD/arm26 -- a port of NetBSD to ARM2/3 machines. */ #include -__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.29 2012/07/31 15:50:35 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.30 2017/10/07 19:52:11 jdolecek Exp $"); #include #include @@ -51,7 +51,6 @@ struct wdc_upc_softc { struct wdc_softc sc_wdc; struct ata_channel *sc_chanlist[1]; struct ata_channel sc_channel; - struct ata_queue sc_chqueue; struct wdc_regs sc_wdc_regs; }; @@ -88,7 +87,7 @@ wdc_upc_attach(device_t parent, device_t wdr->ctl_ioh = ua->ua_ioh2; sc->sc_channel.ch_channel = 0; sc->sc_channel.ch_atac = >sc_wdc.sc_atac; - sc->sc_channel.ch_queue = >sc_chqueue; + sc->sc_channel.ch_queue = ata_queue_alloc(1); sc->sc_wdc.wdc_maxdrives = 2; for (i = 0; i < WDC_NREG; i++) { if (bus_space_subregion(ua->ua_iot, ua->ua_ioh, i, @@ -98,7 +97,7 @@ wdc_upc_attach(device_t parent, device_t return; } } - wdc_init_shadow_regs(>sc_channel); + wdc_init_shadow_regs(wdr); upc_intr_establish(ua->ua_irqhandle, IPL_BIO, wdcintr, >sc_channel); Index: src/sys/dev/ofisa/wdc_ofisa.c diff -u src/sys/dev/ofisa/wdc_ofisa.c:1.33 src/sys/dev/ofisa/wdc_ofisa.c:1.34 --- src/sys/dev/ofisa/wdc_ofisa.c:1.33 Tue Jul 31 15:50:35 2012 +++ src/sys/dev/ofisa/wdc_ofisa.c Sat Oct 7 19:52:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_ofisa.c,v 1.33 2012/07/31 15:50:35 bouyer Exp $ */ +/* $NetBSD: wdc_ofisa.c,v 1.34 2017/10/07 19:52:11 jdolecek Exp $ */ /* * Copyright 1997, 1998 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.33 2012/07/31 15:50:35 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.34 2017/10/07 19:52:11 jdolecek Exp $"); #include #include @@ -61,7 +61,6 @@ struct wdc_ofisa_softc { struct wdc_softc sc_wdcdev; struct ata_channel *sc_chanlist[1]; struct ata_channel sc_channel; - struct ata_queue sc_chqueue; struct wdc_regs wdc_regs; void *sc_ih; }; @@ -161,8 +160,7 @@ wdc_ofisa_attach(device_t parent, device sc->sc_wdcdev.wdc_maxdrives = 2; sc->sc_channel.ch_channel = 0; sc->sc_channel.ch_atac = >sc_wdcdev.sc_atac; - sc->sc_channel.ch_queue = >sc_chqueue; - + sc->sc_channel.ch_queue = ata_queue_alloc(1); wdc_init_shadow_regs(>sc_channel); wdcattach(>sc_channel); Index: src/sys/dev/podulebus/dtide.c diff -u src/sys/dev/podulebus/dtide.c:1.28 src/sys/dev/podulebus/dtide.c:1.29 --- src/sys/dev/podulebus/dtide.c:1.28 Tue Jul 31 15:50:37 2012 +++ src/sys/dev/podulebus/dtide.c Sat Oct 7 19:52:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dtide.c,v 1.28 2012/07/31 15:50:37 bouyer Exp $ */ +/* $NetBSD: dtide.c,v 1.29 2017/10/07 19:52:11 jdolecek Exp $ */ /*- * Copyright (c) 2000, 2001 Ben Harris @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.28 2012/07/31 15:50:37 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.29 2017/10/07 19:52:11 jdolecek Exp $"); #include @@ -53,7 +53,6 @@ struct dtide_softc { struct wdc_softc sc_wdc; struct ata_channel *sc_chp[DTIDE_NCHANNELS];/* pointers to sc_chan */ struct ata_channel sc_chan[DTIDE_NCHANNELS]; - struct ata_queue sc_chq[DTIDE_NCHANNELS]; struct wdc_regs sc_wdc_regs[DTIDE_NCHANNELS]; bus_space_tag_t sc_magict; bus_space_handle_t sc_magich; @@ -106,14 +105,14 @@ dtide_attach(device_t parent, device_t s ch->ch_atac = >sc_wdc.sc_atac; wdr->cmd_iot = bst; wdr->ctl_iot = bst; - ch->ch_queue = >sc_chq[i]; + ch->ch_queue = ata_queue_alloc(1); bus_space_map(pa->pa_fast_t, pa->pa_fast_base + dtide_cmdoffsets[i], 0, 8, >cmd_baseioh); for (j = 0; j < WDC_NREG; j++) bus_space_subregion(wdr->cmd_iot, wdr->cmd_baseioh, j, j == 0 ? 4 : 1, >cmd_iohs[j]); - wdc_init_shadow_regs(ch); + wdc_init_shadow_regs(wdr); bus_space_map(pa->pa_fast_t, pa->pa_fast_base +
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Sat Oct 7 19:44:22 UTC 2017 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: bump libssh To generate a diff of this commit: cvs rdiff -u -r1.821 -r1.822 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.183 -r1.184 src/distrib/sets/lists/debug/shl.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/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.821 src/distrib/sets/lists/base/shl.mi:1.822 --- src/distrib/sets/lists/base/shl.mi:1.821 Fri Oct 6 15:21:17 2017 +++ src/distrib/sets/lists/base/shl.mi Sat Oct 7 15:44:22 2017 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.821 2017/10/06 19:21:17 christos Exp $ +# $NetBSD: shl.mi,v 1.822 2017/10/07 19:44:22 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -787,8 +787,8 @@ ./usr/lib/libsqlite3.so.1.3 base-sys-shlib compatfile ./usr/lib/libss.sobase-obsolete obsolete ./usr/lib/libssh.sobase-secsh-shlib compatfile -./usr/lib/libssh.so.30base-secsh-shlib compatfile -./usr/lib/libssh.so.30.0 base-secsh-shlib compatfile +./usr/lib/libssh.so.31base-secsh-shlib compatfile +./usr/lib/libssh.so.31.0 base-secsh-shlib compatfile ./usr/lib/libssl.sobase-crypto-shlib compatfile ./usr/lib/libssl.so.12base-crypto-shlib compatfile ./usr/lib/libssl.so.12.0 base-crypto-shlib compatfile Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.183 src/distrib/sets/lists/debug/shl.mi:1.184 --- src/distrib/sets/lists/debug/shl.mi:1.183 Fri Oct 6 15:21:17 2017 +++ src/distrib/sets/lists/debug/shl.mi Sat Oct 7 15:44:22 2017 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.183 2017/10/06 19:21:17 christos Exp $ +# $NetBSD: shl.mi,v 1.184 2017/10/07 19:44:22 christos Exp $ ./usr/lib/libbfd_g.a comp-c-debuglib debuglib,compatfile,binutils ./usr/libdata/debug/lib base-sys-usr debug,dynamicroot,compatdir ./usr/libdata/debug/lib/libblacklist.so.0.0.debug comp-sys-debug debug,dynamicroot @@ -267,7 +267,7 @@ ./usr/libdata/debug/usr/lib/libskey.so.2.0.debug comp-sys-debug debug,compatfile,skey ./usr/libdata/debug/usr/lib/libsl.so.6.0.debug comp-krb5-debug debug,compatfile,kerberos ./usr/libdata/debug/usr/lib/libsqlite3.so.1.3.debug comp-sys-debug debug,compatfile -./usr/libdata/debug/usr/lib/libssh.so.30.0.debug comp-secsh-debug debug,compatfile +./usr/libdata/debug/usr/lib/libssh.so.31.0.debug comp-secsh-debug debug,compatfile ./usr/libdata/debug/usr/lib/libssl.so.12.0.debug comp-crypto-debug debug,compatfile ./usr/libdata/debug/usr/lib/libstdc++.so.7.3.debug comp-sys-debug debug,compatfile,gcc=48,cxx,libstdcxx ./usr/libdata/debug/usr/lib/libstdc++.so.8.0.debug comp-sys-debug debug,compatfile,gcc=53,cxx,libstdcxx
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Sat Oct 7 19:44:22 UTC 2017 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: bump libssh To generate a diff of this commit: cvs rdiff -u -r1.821 -r1.822 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.183 -r1.184 src/distrib/sets/lists/debug/shl.mi 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 Oct 7 19:42:45 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_gmac.c Log Message: Support snps,reset-gpio property and deassert optional stmmaceth reset. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_gmac.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_gmac.c diff -u src/sys/arch/arm/sunxi/sunxi_gmac.c:1.1 src/sys/arch/arm/sunxi/sunxi_gmac.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_gmac.c:1.1 Sat Oct 7 13:28:59 2017 +++ src/sys/arch/arm/sunxi/sunxi_gmac.c Sat Oct 7 19:42:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_gmac.c,v 1.1 2017/10/07 13:28:59 jmcneill Exp $ */ +/* $NetBSD: sunxi_gmac.c,v 1.2 2017/10/07 19:42:45 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -28,13 +28,14 @@ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_gmac.c,v 1.1 2017/10/07 13:28:59 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_gmac.c,v 1.2 2017/10/07 19:42:45 jmcneill Exp $"); #include #include #include #include #include +#include #include #include @@ -56,6 +57,36 @@ static const char * compatible[] = { }; static int +sunxi_gmac_reset(const int phandle) +{ + struct fdtbus_gpio_pin *pin_reset; + const u_int *reset_delay_us; + bool reset_active_low; + int len, val; + + pin_reset = fdtbus_gpio_acquire(phandle, "snps,reset-gpio", GPIO_PIN_OUTPUT); + if (pin_reset == NULL) + return 0; + + reset_delay_us = fdtbus_get_prop(phandle, "snps,reset-delays-us", ); + if (reset_delay_us == NULL || len != 12) + return ENXIO; + + reset_active_low = of_hasprop(phandle, "snps,reset-active-low"); + + val = reset_active_low ? 1 : 0; + + fdtbus_gpio_write(pin_reset, val); + delay(be32toh(reset_delay_us[0])); + fdtbus_gpio_write(pin_reset, !val); + delay(be32toh(reset_delay_us[1])); + fdtbus_gpio_write(pin_reset, val); + delay(be32toh(reset_delay_us[2])); + + return 0; +} + +static int sunxi_gmac_intr(void *arg) { return dwc_gmac_intr(arg); @@ -76,6 +107,7 @@ sunxi_gmac_attach(device_t parent, devic struct fdt_attach_args * const faa = aux; const int phandle = faa->faa_phandle; struct clk *clk_gmac, *clk_gmac_tx; + struct fdtbus_reset *rst_gmac; const char *phy_mode; char intrstr[128]; bus_addr_t addr; @@ -106,6 +138,8 @@ sunxi_gmac_attach(device_t parent, devic return; } + rst_gmac = fdtbus_reset_get(phandle, "stmmaceth"); + phy_mode = fdtbus_get_string(phandle, "phy-mode"); if (phy_mode == NULL) { aprint_error(": missing 'phy-mode' property\n"); @@ -131,6 +165,11 @@ sunxi_gmac_attach(device_t parent, devic return; } + if (rst_gmac != NULL && fdtbus_reset_deassert(rst_gmac) != 0) { + aprint_error(": couldn't de-assert reset\n"); + return; + } + aprint_naive("\n"); aprint_normal(": GMAC\n"); @@ -140,6 +179,9 @@ sunxi_gmac_attach(device_t parent, devic } aprint_normal_dev(self, "interrupting on %s\n", intrstr); + if (sunxi_gmac_reset(phandle) != 0) + aprint_error_dev(self, "PHY reset failed\n"); + dwc_gmac_attach(sc, GMAC_MII_CLK_150_250M_DIV102); }
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sat Oct 7 19:43:27 UTC 2017 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new openssh To generate a diff of this commit: cvs rdiff -u -r1.1474 -r1.1475 src/doc/3RDPARTY cvs rdiff -u -r1.2321 -r1.2322 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/3RDPARTY diff -u src/doc/3RDPARTY:1.1474 src/doc/3RDPARTY:1.1475 --- src/doc/3RDPARTY:1.1474 Sat Oct 7 10:16:34 2017 +++ src/doc/3RDPARTY Sat Oct 7 15:43:27 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1474 2017/10/07 14:16:34 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.1475 2017/10/07 19:43:27 christos Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1030,8 +1030,8 @@ Notes: Patch applied after OpenSSH import. Package: OpenSSH -Version: 7.5 -Current Vers: 7.5 / portable 7.5p1 +Version: 7.6 +Current Vers: 7.6 / portable 7.6p1 Maintainer: OpenSSH Archive Site: http://www.openssh.com/ftp.html Home Page: http://www.openssh.com/portable.html Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2321 src/doc/CHANGES:1.2322 --- src/doc/CHANGES:1.2321 Sat Oct 7 13:42:43 2017 +++ src/doc/CHANGES Sat Oct 7 15:43:27 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2321 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2322 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -66,4 +66,6 @@ Changes from NetBSD 8.0 to NetBSD 9.0: DTrace Toolkit if DTrace support is enabled. [sevan 20170917] dhcpcd(8): Import dhcpcd-7.0.0-rc3. [roy 20171007] ahcisata(4), siisata(4): Add support for NCQ. [jdolecek 20171007] - mvsata(4): Add support for NCQ, and enable ATAPI support. [jdolecek 20171007] + mvsata(4): Add support for NCQ, and enable ATAPI support. + [jdolecek 20171007] + OpenSSH: Imported 7.6. [christos 20171007]
CVS commit: src/doc
Module Name:src Committed By: christos Date: Sat Oct 7 19:43:27 UTC 2017 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: new openssh To generate a diff of this commit: cvs rdiff -u -r1.1474 -r1.1475 src/doc/3RDPARTY cvs rdiff -u -r1.2321 -r1.2322 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/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 19:42:45 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_gmac.c Log Message: Support snps,reset-gpio property and deassert optional stmmaceth reset. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_gmac.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 Oct 7 19:41:51 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun6i_a31_ccu.c Log Message: add dma and codec gates To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun6i_a31_ccu.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/sun6i_a31_ccu.c diff -u src/sys/arch/arm/sunxi/sun6i_a31_ccu.c:1.2 src/sys/arch/arm/sunxi/sun6i_a31_ccu.c:1.3 --- src/sys/arch/arm/sunxi/sun6i_a31_ccu.c:1.2 Sun Jul 2 13:36:46 2017 +++ src/sys/arch/arm/sunxi/sun6i_a31_ccu.c Sat Oct 7 19:41:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sun6i_a31_ccu.c,v 1.2 2017/07/02 13:36:46 jmcneill Exp $ */ +/* $NetBSD: sun6i_a31_ccu.c,v 1.3 2017/10/07 19:41:51 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -29,7 +29,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun6i_a31_ccu.c,v 1.2 2017/07/02 13:36:46 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun6i_a31_ccu.c,v 1.3 2017/10/07 19:41:51 jmcneill Exp $"); #include #include @@ -185,6 +185,8 @@ static struct sunxi_ccu_clk sun6i_a31_cc SD3_CLK_REG, __BITS(17, 16), __BITS(3,0), __BITS(25, 24), __BIT(31), SUNXI_CCU_NM_POWER_OF_TWO|SUNXI_CCU_NM_ROUND_DOWN), + SUNXI_CCU_GATE(A31_CLK_AHB1_DMA, "ahb1-dma", "ahb1", + AHB1_GATING_REG0, 6), SUNXI_CCU_GATE(A31_CLK_AHB1_MMC0, "ahb1-mmc0", "ahb1", AHB1_GATING_REG0, 8), SUNXI_CCU_GATE(A31_CLK_AHB1_MMC1, "ahb1-mmc1", "ahb1", @@ -208,7 +210,9 @@ static struct sunxi_ccu_clk sun6i_a31_cc SUNXI_CCU_GATE(A31_CLK_AHB1_OHCI2, "ahb1-ohci2", "ahb1", AHB1_GATING_REG0, 31), - SUNXI_CCU_GATE(A31_CLK_APB1_PIO, "ahb1-pio", "apb1", + SUNXI_CCU_GATE(A31_CLK_APB1_CODEC, "apb1-codec", "apb1", + APB1_GATING_REG, 0), + SUNXI_CCU_GATE(A31_CLK_APB1_PIO, "apb1-pio", "apb1", APB1_GATING_REG, 5), SUNXI_CCU_GATE(A31_CLK_APB2_I2C0, "apb2-i2c0", "apb2",
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 19:41:51 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun6i_a31_ccu.c Log Message: add dma and codec gates To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun6i_a31_ccu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/openssh
Module Name:src Committed By: christos Date: Sat Oct 7 19:39:20 UTC 2017 Modified Files: src/crypto/external/bsd/openssh/bin/ssh: Makefile src/crypto/external/bsd/openssh/dist: LICENCE PROTOCOL PROTOCOL.agent PROTOCOL.certkeys auth-options.c auth-options.h auth-pam.c auth.c auth.h auth2-chall.c auth2-gss.c auth2-hostbased.c auth2-kbdint.c auth2-krb5.c auth2-none.c auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bitmap.c bufbn.c buffer.h channels.c channels.h cipher.c cipher.h clientloop.c clientloop.h compat.c compat.h digest-libc.c digest-openssl.c dispatch.c dispatch.h dns.c dns.h gss-serv.c hostfile.c kex.c kex.h kexc25519c.c kexc25519s.c kexdhc.c kexdhs.c kexecdhc.c kexecdhs.c kexgexc.c kexgexs.c key.c key.h krl.c log.c log.h mac.c misc.c misc.h monitor.c monitor_wrap.c monitor_wrap.h mux.c myproposal.h nchan.c opacket.c opacket.h packet.c packet.h pathnames.h readconf.c readconf.h scp.1 scp.c servconf.c servconf.h serverloop.c serverloop.h session.c session.h sftp-client.c sftp-common.c sftp-server.c sftp.1 sftp.c ssh-add.1 ssh-add.c ssh-agent.c ssh-gss.h ssh-keygen.1 ssh-keygen.c ssh-keyscan.1 ssh-keyscan.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c ssh-rsa.c ssh.1 ssh.c ssh.h ssh_api.c ssh_config ssh_config.5 sshbuf-getput-basic.c sshbuf.c sshbuf.h sshconnect.c sshconnect.h sshconnect2.c sshd.8 sshd.c sshd_config.5 ssherr.c sshkey.c sshkey.h ttymodes.c ttymodes.h umac.c utf8.c version.h xmalloc.c xmalloc.h src/crypto/external/bsd/openssh/dist/moduli-gen: moduli.2048 moduli.3072 moduli.4096 moduli.6144 moduli.7680 moduli.8192 src/crypto/external/bsd/openssh/lib: Makefile shlib_version Removed Files: src/crypto/external/bsd/openssh/dist: cipher-3des1.c cipher-bf1.c deattack.c deattack.h rsa.c rsa.h ssh1.h sshconnect1.c Log Message: merge conflicts. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssh/bin/ssh/Makefile cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssh/dist/LICENCE \ src/crypto/external/bsd/openssh/dist/bitmap.c \ src/crypto/external/bsd/openssh/dist/digest-openssl.c \ src/crypto/external/bsd/openssh/dist/sshkey.h \ src/crypto/external/bsd/openssh/dist/utf8.c cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssh/dist/PROTOCOL \ src/crypto/external/bsd/openssh/dist/buffer.h \ src/crypto/external/bsd/openssh/dist/compat.h \ src/crypto/external/bsd/openssh/dist/dns.h \ src/crypto/external/bsd/openssh/dist/kexdhc.c \ src/crypto/external/bsd/openssh/dist/kexgexc.c \ src/crypto/external/bsd/openssh/dist/sftp-common.c \ src/crypto/external/bsd/openssh/dist/ssh-pkcs11-client.c \ src/crypto/external/bsd/openssh/dist/ssh.h \ src/crypto/external/bsd/openssh/dist/sshconnect.h \ src/crypto/external/bsd/openssh/dist/xmalloc.c \ src/crypto/external/bsd/openssh/dist/xmalloc.h cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssh/dist/PROTOCOL.agent \ src/crypto/external/bsd/openssh/dist/auth-options.h \ src/crypto/external/bsd/openssh/dist/authfd.h \ src/crypto/external/bsd/openssh/dist/bufbn.c \ src/crypto/external/bsd/openssh/dist/dispatch.c \ src/crypto/external/bsd/openssh/dist/kexc25519s.c \ src/crypto/external/bsd/openssh/dist/kexecdhs.c \ src/crypto/external/bsd/openssh/dist/nchan.c cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/openssh/dist/PROTOCOL.certkeys \ src/crypto/external/bsd/openssh/dist/auth2-kbdint.c \ src/crypto/external/bsd/openssh/dist/auth2-none.c \ src/crypto/external/bsd/openssh/dist/auth2-passwd.c \ src/crypto/external/bsd/openssh/dist/kexecdhc.c \ src/crypto/external/bsd/openssh/dist/opacket.c \ src/crypto/external/bsd/openssh/dist/opacket.h \ src/crypto/external/bsd/openssh/dist/session.h \ src/crypto/external/bsd/openssh/dist/ssh-gss.h \ src/crypto/external/bsd/openssh/dist/sshbuf-getput-basic.c \ src/crypto/external/bsd/openssh/dist/sshbuf.c \ src/crypto/external/bsd/openssh/dist/sshbuf.h \ src/crypto/external/bsd/openssh/dist/ttymodes.c \ src/crypto/external/bsd/openssh/dist/ttymodes.h cvs rdiff -u -r1.15 -r1.16 \ src/crypto/external/bsd/openssh/dist/auth-options.c \ src/crypto/external/bsd/openssh/dist/auth.h \ src/crypto/external/bsd/openssh/dist/kex.h \ src/crypto/external/bsd/openssh/dist/misc.c \ src/crypto/external/bsd/openssh/dist/packet.h \ src/crypto/external/bsd/openssh/dist/servconf.h \ src/crypto/external/bsd/openssh/dist/sftp.1 \ src/crypto/external/bsd/openssh/dist/ssh-add.c cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssh/dist/auth-pam.c \
CVS commit: src/crypto/external/bsd/openssh
Module Name:src Committed By: christos Date: Sat Oct 7 19:39:20 UTC 2017 Modified Files: src/crypto/external/bsd/openssh/bin/ssh: Makefile src/crypto/external/bsd/openssh/dist: LICENCE PROTOCOL PROTOCOL.agent PROTOCOL.certkeys auth-options.c auth-options.h auth-pam.c auth.c auth.h auth2-chall.c auth2-gss.c auth2-hostbased.c auth2-kbdint.c auth2-krb5.c auth2-none.c auth2-passwd.c auth2-pubkey.c auth2.c authfd.c authfd.h authfile.c bitmap.c bufbn.c buffer.h channels.c channels.h cipher.c cipher.h clientloop.c clientloop.h compat.c compat.h digest-libc.c digest-openssl.c dispatch.c dispatch.h dns.c dns.h gss-serv.c hostfile.c kex.c kex.h kexc25519c.c kexc25519s.c kexdhc.c kexdhs.c kexecdhc.c kexecdhs.c kexgexc.c kexgexs.c key.c key.h krl.c log.c log.h mac.c misc.c misc.h monitor.c monitor_wrap.c monitor_wrap.h mux.c myproposal.h nchan.c opacket.c opacket.h packet.c packet.h pathnames.h readconf.c readconf.h scp.1 scp.c servconf.c servconf.h serverloop.c serverloop.h session.c session.h sftp-client.c sftp-common.c sftp-server.c sftp.1 sftp.c ssh-add.1 ssh-add.c ssh-agent.c ssh-gss.h ssh-keygen.1 ssh-keygen.c ssh-keyscan.1 ssh-keyscan.c ssh-pkcs11-client.c ssh-pkcs11-helper.c ssh-pkcs11.c ssh-rsa.c ssh.1 ssh.c ssh.h ssh_api.c ssh_config ssh_config.5 sshbuf-getput-basic.c sshbuf.c sshbuf.h sshconnect.c sshconnect.h sshconnect2.c sshd.8 sshd.c sshd_config.5 ssherr.c sshkey.c sshkey.h ttymodes.c ttymodes.h umac.c utf8.c version.h xmalloc.c xmalloc.h src/crypto/external/bsd/openssh/dist/moduli-gen: moduli.2048 moduli.3072 moduli.4096 moduli.6144 moduli.7680 moduli.8192 src/crypto/external/bsd/openssh/lib: Makefile shlib_version Removed Files: src/crypto/external/bsd/openssh/dist: cipher-3des1.c cipher-bf1.c deattack.c deattack.h rsa.c rsa.h ssh1.h sshconnect1.c Log Message: merge conflicts. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssh/bin/ssh/Makefile cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/openssh/dist/LICENCE \ src/crypto/external/bsd/openssh/dist/bitmap.c \ src/crypto/external/bsd/openssh/dist/digest-openssl.c \ src/crypto/external/bsd/openssh/dist/sshkey.h \ src/crypto/external/bsd/openssh/dist/utf8.c cvs rdiff -u -r1.9 -r1.10 src/crypto/external/bsd/openssh/dist/PROTOCOL \ src/crypto/external/bsd/openssh/dist/buffer.h \ src/crypto/external/bsd/openssh/dist/compat.h \ src/crypto/external/bsd/openssh/dist/dns.h \ src/crypto/external/bsd/openssh/dist/kexdhc.c \ src/crypto/external/bsd/openssh/dist/kexgexc.c \ src/crypto/external/bsd/openssh/dist/sftp-common.c \ src/crypto/external/bsd/openssh/dist/ssh-pkcs11-client.c \ src/crypto/external/bsd/openssh/dist/ssh.h \ src/crypto/external/bsd/openssh/dist/sshconnect.h \ src/crypto/external/bsd/openssh/dist/xmalloc.c \ src/crypto/external/bsd/openssh/dist/xmalloc.h cvs rdiff -u -r1.8 -r1.9 src/crypto/external/bsd/openssh/dist/PROTOCOL.agent \ src/crypto/external/bsd/openssh/dist/auth-options.h \ src/crypto/external/bsd/openssh/dist/authfd.h \ src/crypto/external/bsd/openssh/dist/bufbn.c \ src/crypto/external/bsd/openssh/dist/dispatch.c \ src/crypto/external/bsd/openssh/dist/kexc25519s.c \ src/crypto/external/bsd/openssh/dist/kexecdhs.c \ src/crypto/external/bsd/openssh/dist/nchan.c cvs rdiff -u -r1.7 -r1.8 \ src/crypto/external/bsd/openssh/dist/PROTOCOL.certkeys \ src/crypto/external/bsd/openssh/dist/auth2-kbdint.c \ src/crypto/external/bsd/openssh/dist/auth2-none.c \ src/crypto/external/bsd/openssh/dist/auth2-passwd.c \ src/crypto/external/bsd/openssh/dist/kexecdhc.c \ src/crypto/external/bsd/openssh/dist/opacket.c \ src/crypto/external/bsd/openssh/dist/opacket.h \ src/crypto/external/bsd/openssh/dist/session.h \ src/crypto/external/bsd/openssh/dist/ssh-gss.h \ src/crypto/external/bsd/openssh/dist/sshbuf-getput-basic.c \ src/crypto/external/bsd/openssh/dist/sshbuf.c \ src/crypto/external/bsd/openssh/dist/sshbuf.h \ src/crypto/external/bsd/openssh/dist/ttymodes.c \ src/crypto/external/bsd/openssh/dist/ttymodes.h cvs rdiff -u -r1.15 -r1.16 \ src/crypto/external/bsd/openssh/dist/auth-options.c \ src/crypto/external/bsd/openssh/dist/auth.h \ src/crypto/external/bsd/openssh/dist/kex.h \ src/crypto/external/bsd/openssh/dist/misc.c \ src/crypto/external/bsd/openssh/dist/packet.h \ src/crypto/external/bsd/openssh/dist/servconf.h \ src/crypto/external/bsd/openssh/dist/sftp.1 \ src/crypto/external/bsd/openssh/dist/ssh-add.c cvs rdiff -u -r1.11 -r1.12 src/crypto/external/bsd/openssh/dist/auth-pam.c \
CVS commit: src/include
Module Name:src Committed By: christos Date: Sat Oct 7 19:38:09 UTC 2017 Modified Files: src/include: stdlib.h Log Message: add recallocarray (used by openssh-7.6) To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/include/stdlib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/stdlib.h diff -u src/include/stdlib.h:1.117 src/include/stdlib.h:1.118 --- src/include/stdlib.h:1.117 Fri Jul 1 18:42:01 2016 +++ src/include/stdlib.h Sat Oct 7 15:38:09 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: stdlib.h,v 1.117 2016/07/01 22:42:01 christos Exp $ */ +/* $NetBSD: stdlib.h,v 1.118 2017/10/07 19:38:09 christos Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -126,6 +126,7 @@ unsigned long #ifdef _OPENBSD_SOURCE long long strtonum(const char *, long long, long long, const char **); void *reallocarray(void *, size_t, size_t); +void *recallocarray(void *, size_t, size_t, size_t); #endif int system(const char *);
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Sat Oct 7 19:38:35 UTC 2017 Modified Files: src/lib/libc/stdlib: reallocarray.c Log Message: add recallocarray To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/stdlib/reallocarray.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/reallocarray.c diff -u src/lib/libc/stdlib/reallocarray.c:1.7 src/lib/libc/stdlib/reallocarray.c:1.8 --- src/lib/libc/stdlib/reallocarray.c:1.7 Wed Apr 6 07:07:58 2016 +++ src/lib/libc/stdlib/reallocarray.c Sat Oct 7 15:38:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: reallocarray.c,v 1.7 2016/04/06 11:07:58 roy Exp $ */ +/* $NetBSD: reallocarray.c,v 1.8 2017/10/07 19:38:35 christos Exp $ */ /* $OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $ */ /*- @@ -31,10 +31,11 @@ */ #include -__RCSID("$NetBSD: reallocarray.c,v 1.7 2016/04/06 11:07:58 roy Exp $"); +__RCSID("$NetBSD: reallocarray.c,v 1.8 2017/10/07 19:38:35 christos Exp $"); #define _OPENBSD_SOURCE #include +#include #include void * @@ -51,3 +52,15 @@ reallocarray(void *optr, size_t nmemb, s errno = e; return NULL; } + +void * +recallocarray(void *optr, size_t omemb, size_t nmemb, size_t size) +{ + char *nptr = reallocarray(optr, nmemb, size); + + if (nptr == NULL || omemb >= nmemb) + return nptr; + + memset(nptr + omemb * size, 0, (nmemb - omemb) * size); + return nptr; +}
CVS commit: src/include
Module Name:src Committed By: christos Date: Sat Oct 7 19:38:09 UTC 2017 Modified Files: src/include: stdlib.h Log Message: add recallocarray (used by openssh-7.6) To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/include/stdlib.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: christos Date: Sat Oct 7 19:38:35 UTC 2017 Modified Files: src/lib/libc/stdlib: reallocarray.c Log Message: add recallocarray To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/stdlib/reallocarray.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Sat Oct 7 19:36:15 UTC 2017 Update of /cvsroot/src/crypto/external/bsd/openssh/dist In directory ivanova.netbsd.org:/tmp/cvs-serv22787 Log Message: Potentially-incompatible changes This release includes a number of changes that may affect existing configurations: * ssh(1): delete SSH protocol version 1 support, associated configuration options and documentation. * ssh(1)/sshd(8): remove support for the hmac-ripemd160 MAC. * ssh(1)/sshd(8): remove support for the arcfour, blowfish and CAST ciphers. * Refuse RSA keys <1024 bits in length and improve reporting for keys that do not meet this requirement. * ssh(1): do not offer CBC ciphers by default. Changes since OpenSSH 7.5 = This is primarily a bugfix release. It also contains substantial internal refactoring. Security * sftp-server(8): in read-only mode, sftp-server was incorrectly permitting creation of zero-length files. Reported by Michal Zalewski. New Features * ssh(1): add RemoteCommand option to specify a command in the ssh config file instead of giving it on the client's command line. This allows the configuration file to specify the command that will be executed on the remote host. * sshd(8): add ExposeAuthInfo option that enables writing details of the authentication methods used (including public keys where applicable) to a file that is exposed via a $SSH_USER_AUTH environment variable in the subsequent session. * ssh(1): add support for reverse dynamic forwarding. In this mode, ssh will act as a SOCKS4/5 proxy and forward connections to destinations requested by the remote SOCKS client. This mode is requested using extended syntax for the -R and RemoteForward options and, because it is implemented solely at the client, does not require the server be updated to be supported. * sshd(8): allow LogLevel directive in sshd_config Match blocks; bz#2717 * ssh-keygen(1): allow inclusion of arbitrary string or flag certificate extensions and critical options. * ssh-keygen(1): allow ssh-keygen to use a key held in ssh-agent as a CA when signing certificates. bz#2377 * ssh(1)/sshd(8): allow IPQoS=none in ssh/sshd to not set an explicit ToS/DSCP value and just use the operating system default. * ssh-add(1): added -q option to make ssh-add quiet on success. * ssh(1): expand the StrictHostKeyChecking option with two new settings. The first "accept-new" will automatically accept hitherto-unseen keys but will refuse connections for changed or invalid hostkeys. This is a safer subset of the current behaviour of StrictHostKeyChecking=no. The second setting "off", is a synonym for the current behaviour of StrictHostKeyChecking=no: accept new host keys, and continue connection for hosts with incorrect hostkeys. A future release will change the meaning of StrictHostKeyChecking=no to the behaviour of "accept-new". bz#2400 * ssh(1): add SyslogFacility option to ssh(1) matching the equivalent option in sshd(8). bz#2705 Bugfixes * ssh(1): use HostKeyAlias if specified instead of hostname for matching host certificate principal names; bz#2728 * sftp(1): implement sorting for globbed ls; bz#2649 * ssh(1): add a user@host prefix to client's "Permission denied" messages, useful in particular when using "stacked" connections (e.g. ssh -J) where it's not clear which host is denying. bz#2720 * ssh(1): accept unknown EXT_INFO extension values that contain \0 characters. These are legal, but would previously cause fatal connection errors if received. * ssh(1)/sshd(8): repair compression statistics printed at connection exit * sftp(1): print '?' instead of incorrect link count (that the protocol doesn't provide) for remote listings. bz#2710 * ssh(1): return failure rather than fatal() for more cases during session multiplexing negotiations. Causes the session to fall back to a non-mux connection if they occur. bz#2707 * ssh(1): mention that the server may send debug messages to explain public key authentication problems under some circumstances; bz#2709 * Translate OpenSSL error codes to better report incorrect passphrase errors when loading private keys; bz#2699 * sshd(8): adjust compatibility patterns for WinSCP to correctly identify versions that implement only the legacy DH group exchange scheme. bz#2748 * ssh(1): print the "Killed by signal 1" message only at LogLevel verbose so that it is not shown at the default level; prevents it from appearing during ssh -J and equivalent ProxyCommand configs. bz#1906, bz#2744 * ssh-keygen(1): when generating all hostkeys (ssh-keygen -A), clobber existing keys if they exist but are zero length. zero-length keys could previously be made if ssh-keygen failed or was interrupted part way
CVS import: src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: christos Date: Sat Oct 7 19:36:15 UTC 2017 Update of /cvsroot/src/crypto/external/bsd/openssh/dist In directory ivanova.netbsd.org:/tmp/cvs-serv22787 Log Message: Potentially-incompatible changes This release includes a number of changes that may affect existing configurations: * ssh(1): delete SSH protocol version 1 support, associated configuration options and documentation. * ssh(1)/sshd(8): remove support for the hmac-ripemd160 MAC. * ssh(1)/sshd(8): remove support for the arcfour, blowfish and CAST ciphers. * Refuse RSA keys <1024 bits in length and improve reporting for keys that do not meet this requirement. * ssh(1): do not offer CBC ciphers by default. Changes since OpenSSH 7.5 = This is primarily a bugfix release. It also contains substantial internal refactoring. Security * sftp-server(8): in read-only mode, sftp-server was incorrectly permitting creation of zero-length files. Reported by Michal Zalewski. New Features * ssh(1): add RemoteCommand option to specify a command in the ssh config file instead of giving it on the client's command line. This allows the configuration file to specify the command that will be executed on the remote host. * sshd(8): add ExposeAuthInfo option that enables writing details of the authentication methods used (including public keys where applicable) to a file that is exposed via a $SSH_USER_AUTH environment variable in the subsequent session. * ssh(1): add support for reverse dynamic forwarding. In this mode, ssh will act as a SOCKS4/5 proxy and forward connections to destinations requested by the remote SOCKS client. This mode is requested using extended syntax for the -R and RemoteForward options and, because it is implemented solely at the client, does not require the server be updated to be supported. * sshd(8): allow LogLevel directive in sshd_config Match blocks; bz#2717 * ssh-keygen(1): allow inclusion of arbitrary string or flag certificate extensions and critical options. * ssh-keygen(1): allow ssh-keygen to use a key held in ssh-agent as a CA when signing certificates. bz#2377 * ssh(1)/sshd(8): allow IPQoS=none in ssh/sshd to not set an explicit ToS/DSCP value and just use the operating system default. * ssh-add(1): added -q option to make ssh-add quiet on success. * ssh(1): expand the StrictHostKeyChecking option with two new settings. The first "accept-new" will automatically accept hitherto-unseen keys but will refuse connections for changed or invalid hostkeys. This is a safer subset of the current behaviour of StrictHostKeyChecking=no. The second setting "off", is a synonym for the current behaviour of StrictHostKeyChecking=no: accept new host keys, and continue connection for hosts with incorrect hostkeys. A future release will change the meaning of StrictHostKeyChecking=no to the behaviour of "accept-new". bz#2400 * ssh(1): add SyslogFacility option to ssh(1) matching the equivalent option in sshd(8). bz#2705 Bugfixes * ssh(1): use HostKeyAlias if specified instead of hostname for matching host certificate principal names; bz#2728 * sftp(1): implement sorting for globbed ls; bz#2649 * ssh(1): add a user@host prefix to client's "Permission denied" messages, useful in particular when using "stacked" connections (e.g. ssh -J) where it's not clear which host is denying. bz#2720 * ssh(1): accept unknown EXT_INFO extension values that contain \0 characters. These are legal, but would previously cause fatal connection errors if received. * ssh(1)/sshd(8): repair compression statistics printed at connection exit * sftp(1): print '?' instead of incorrect link count (that the protocol doesn't provide) for remote listings. bz#2710 * ssh(1): return failure rather than fatal() for more cases during session multiplexing negotiations. Causes the session to fall back to a non-mux connection if they occur. bz#2707 * ssh(1): mention that the server may send debug messages to explain public key authentication problems under some circumstances; bz#2709 * Translate OpenSSL error codes to better report incorrect passphrase errors when loading private keys; bz#2699 * sshd(8): adjust compatibility patterns for WinSCP to correctly identify versions that implement only the legacy DH group exchange scheme. bz#2748 * ssh(1): print the "Killed by signal 1" message only at LogLevel verbose so that it is not shown at the default level; prevents it from appearing during ssh -J and equivalent ProxyCommand configs. bz#1906, bz#2744 * ssh-keygen(1): when generating all hostkeys (ssh-keygen -A), clobber existing keys if they exist but are zero length. zero-length keys could previously be made if ssh-keygen failed or was interrupted part way
CVS commit: src/libexec/rshd
Module Name:src Committed By: ryo Date: Sat Oct 7 19:23:02 UTC 2017 Modified Files: src/libexec/rshd: rshd.c Log Message: fix to compile without USE_PAM. (unused variables) To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/libexec/rshd/rshd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/rshd
Module Name:src Committed By: ryo Date: Sat Oct 7 19:23:02 UTC 2017 Modified Files: src/libexec/rshd: rshd.c Log Message: fix to compile without USE_PAM. (unused variables) To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/libexec/rshd/rshd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/rshd/rshd.c diff -u src/libexec/rshd/rshd.c:1.50 src/libexec/rshd/rshd.c:1.51 --- src/libexec/rshd/rshd.c:1.50 Sat Jul 14 15:06:26 2012 +++ src/libexec/rshd/rshd.c Sat Oct 7 19:23:02 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rshd.c,v 1.50 2012/07/14 15:06:26 darrenr Exp $ */ +/* $NetBSD: rshd.c,v 1.51 2017/10/07 19:23:02 ryo Exp $ */ /* * Copyright (C) 1998 WIDE Project. @@ -69,7 +69,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94"; #else -__RCSID("$NetBSD: rshd.c,v 1.50 2012/07/14 15:06:26 darrenr Exp $"); +__RCSID("$NetBSD: rshd.c,v 1.51 2017/10/07 19:23:02 ryo Exp $"); #endif #endif /* not lint */ @@ -147,7 +147,9 @@ __dead static void usage(void); #define OPTIONS "aLln" extern int __check_rhosts_file; extern char *__rcmd_errstr; /* syslog hook from libc/net/rcmd.c. */ +#ifdef USE_PAM static const char incorrect[] = "Login incorrect."; +#endif int main(int argc, char *argv[])
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Oct 7 18:22:06 UTC 2017 Modified Files: src/sys/dev/i2c: axp20x.c axp20xvar.h files.i2c Log Message: Hook axp20x into fdt regulator api To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/axp20x.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/axp20xvar.h cvs rdiff -u -r1.77 -r1.78 src/sys/dev/i2c/files.i2c 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/axp20x.c diff -u src/sys/dev/i2c/axp20x.c:1.7 src/sys/dev/i2c/axp20x.c:1.8 --- src/sys/dev/i2c/axp20x.c:1.7 Tue Aug 29 10:10:54 2017 +++ src/sys/dev/i2c/axp20x.c Sat Oct 7 18:22:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: axp20x.c,v 1.7 2017/08/29 10:10:54 jmcneill Exp $ */ +/* $NetBSD: axp20x.c,v 1.8 2017/10/07 18:22:06 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill@@ -29,7 +29,7 @@ #include "opt_fdt.h" #include -__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.7 2017/08/29 10:10:54 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.8 2017/10/07 18:22:06 jmcneill Exp $"); #include #include @@ -632,6 +632,31 @@ axp20x_set_dcdc(device_t dev, int dcdc, } } +int +axp20x_get_dcdc(device_t dev, int dcdc, int *pmvolt, bool poll) +{ + struct axp20x_softc *sc = device_private(dev); + uint8_t reg; + int error; + + switch (dcdc) { + case AXP20X_DCDC2: + error = axp20x_read(sc, AXP_DCDC2, , 1, poll ? I2C_F_POLL : 0); + if (error != 0) + return error; + *pmvolt = __SHIFTOUT(reg, AXP_DCDC2_VOLT_MASK) * 25 + 700; + return 0; + case AXP20X_DCDC3: + error = axp20x_read(sc, AXP_DCDC3, , 1, poll ? I2C_F_POLL : 0); + if (error != 0) + return error; + *pmvolt = __SHIFTOUT(reg, AXP_DCDC3_VOLT_MASK) * 25 + 700; + return 0; + default: + return EINVAL; + } +} + void axp20x_poweroff(device_t dev) { @@ -643,6 +668,122 @@ axp20x_poweroff(device_t dev) } #ifdef FDT +static const struct axp20xregdef { + const char *name; + int dcdc; +} axp20x_regdefs[] = { + { "dcdc2", AXP20X_DCDC2 }, + { "dcdc3", AXP20X_DCDC3 }, +}; + +struct axp20xreg_softc { + device_t sc_dev; + int sc_phandle; + const struct axp20xregdef *sc_regdef; +}; + +struct axp20xreg_attach_args { + int reg_phandle; +}; + +static int +axp20xreg_acquire(device_t dev) +{ + return 0; +} + +static void +axp20xreg_release(device_t dev) +{ +} + +static int +axp20xreg_enable(device_t dev, bool enable) +{ + /* TODO */ + return enable ? 0 : EINVAL; +} + +static int +axp20xreg_set_voltage(device_t dev, u_int min_uvol, u_int max_uvol) +{ + struct axp20xreg_softc * const sc = device_private(dev); + + return axp20x_set_dcdc(device_parent(dev), sc->sc_regdef->dcdc, min_uvol / 1000, true); +} + +static int +axp20xreg_get_voltage(device_t dev, u_int *puvol) +{ + struct axp20xreg_softc * const sc = device_private(dev); + int mvol, error; + + error = axp20x_get_dcdc(device_parent(dev), sc->sc_regdef->dcdc, , true); + if (error != 0) + return error; + + *puvol = mvol * 1000; + return 0; +} + +static struct fdtbus_regulator_controller_func axp20xreg_funcs = { + .acquire = axp20xreg_acquire, + .release = axp20xreg_release, + .enable = axp20xreg_enable, + .set_voltage = axp20xreg_set_voltage, + .get_voltage = axp20xreg_get_voltage, +}; + +static const struct axp20xregdef * +axp20xreg_lookup(int phandle) +{ + const char *name; + int n; + + name = fdtbus_get_string(phandle, "name"); + if (name == NULL) + return NULL; + + for (n = 0; n < __arraycount(axp20x_regdefs); n++) + if (strcmp(name, axp20x_regdefs[n].name) == 0) + return _regdefs[n]; + + return NULL; +} + +static int +axp20xreg_match(device_t parent, cfdata_t match, void *aux) +{ + const struct axp20xreg_attach_args *reg = aux; + + return axp20xreg_lookup(reg->reg_phandle) != NULL; +} + +static void +axp20xreg_attach(device_t parent, device_t self, void *aux) +{ + struct axp20xreg_softc * const sc = device_private(self); + const struct axp20xreg_attach_args *reg = aux; + const char *regulator_name; + + sc->sc_dev = self; + sc->sc_phandle = reg->reg_phandle; + sc->sc_regdef = axp20xreg_lookup(reg->reg_phandle); + + regulator_name = fdtbus_get_string(reg->reg_phandle, "regulator-name"); + + aprint_naive("\n"); + if (regulator_name) + aprint_normal(": %s (%s)\n", sc->sc_regdef->name, regulator_name); + else + aprint_normal(": %s\n", sc->sc_regdef->name); + + fdtbus_register_regulator_controller(self, sc->sc_phandle, _funcs); +} + +CFATTACH_DECL_NEW(axp20xreg, sizeof(struct axp20xreg_softc), +axp20xreg_match, axp20xreg_attach, NULL, NULL); + static void axp20x_fdt_poweroff(device_t dev) { @@ -657,7 +798,18 @@ static struct fdtbus_power_controller_fu static void axp20x_fdt_attach(struct axp20x_softc *sc) { + int regulators_phandle, child; + fdtbus_register_power_controller(sc->sc_dev, sc->sc_phandle, _fdt_power_funcs); + + regulators_phandle = of_find_firstchild_byname(sc->sc_phandle,
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 18:22:23 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add axp20xreg To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 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/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 18:22:23 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add axp20xreg To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 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.37 src/sys/arch/evbarm/conf/SUNXI:1.38 --- src/sys/arch/evbarm/conf/SUNXI:1.37 Sat Oct 7 15:13:00 2017 +++ src/sys/arch/evbarm/conf/SUNXI Sat Oct 7 18:22:23 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.37 2017/10/07 15:13:00 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.38 2017/10/07 18:22:23 jmcneill Exp $ # # Allwinner sunxi family # @@ -158,6 +158,7 @@ iic* at i2cbus? tcakp* at iic? # TI TCA8418 Keypad Scan IC wskbd* at tcakp? console ? axp20x* at iic? # AXP209 Power Management IC +axp20xreg* at axp20x? sy8106a* at iic? # Silergy SY81061 regulator # RTC
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: jmcneill Date: Sat Oct 7 18:22:06 UTC 2017 Modified Files: src/sys/dev/i2c: axp20x.c axp20xvar.h files.i2c Log Message: Hook axp20x into fdt regulator api To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/i2c/axp20x.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/axp20xvar.h cvs rdiff -u -r1.77 -r1.78 src/sys/dev/i2c/files.i2c 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: jdolecek Date: Sat Oct 7 17:42:43 UTC 2017 Modified Files: src/doc: CHANGES Log Message: note NCQ support for ahcisata(4), mvsata(4), and siisata(4), and note enabled ATAPI support for mvsata(4) To generate a diff of this commit: cvs rdiff -u -r1.2320 -r1.2321 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: jdolecek Date: Sat Oct 7 17:42:43 UTC 2017 Modified Files: src/doc: CHANGES Log Message: note NCQ support for ahcisata(4), mvsata(4), and siisata(4), and note enabled ATAPI support for mvsata(4) To generate a diff of this commit: cvs rdiff -u -r1.2320 -r1.2321 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.2320 src/doc/CHANGES:1.2321 --- src/doc/CHANGES:1.2320 Sat Oct 7 14:16:34 2017 +++ src/doc/CHANGES Sat Oct 7 17:42:43 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2320 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2321 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -65,3 +65,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0: dtrace: Install dtruss, execsnoop, opensnoop, and procsystime from the DTrace Toolkit if DTrace support is enabled. [sevan 20170917] dhcpcd(8): Import dhcpcd-7.0.0-rc3. [roy 20171007] + ahcisata(4), siisata(4): Add support for NCQ. [jdolecek 20171007] + mvsata(4): Add support for NCQ, and enable ATAPI support. [jdolecek 20171007]
CVS commit: src/share/man/man4
Module Name:src Committed By: jdolecek Date: Sat Oct 7 17:35:48 UTC 2017 Modified Files: src/share/man/man4: ahcisata.4 mvsata.4 siisata.4 Log Message: update to note NCQ support To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/ahcisata.4 \ src/share/man/man4/siisata.4 cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/mvsata.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/ahcisata.4 diff -u src/share/man/man4/ahcisata.4:1.6 src/share/man/man4/ahcisata.4:1.7 --- src/share/man/man4/ahcisata.4:1.6 Fri Mar 18 08:26:19 2011 +++ src/share/man/man4/ahcisata.4 Sat Oct 7 17:35:48 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: ahcisata.4,v 1.6 2011/03/18 08:26:19 jruoho Exp $ +.\" $NetBSD: ahcisata.4,v 1.7 2017/10/07 17:35:48 jdolecek Exp $ .\" .\" Copyright (c) 2006 Manuel Bouyer. .\" @@ -22,7 +22,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 March 18, 2011 +.Dd October 7, 2017 .Dt AHCISATA 4 .Os .Sh NAME @@ -61,5 +61,9 @@ for Intel AHCI controllers). .%D June 26, 2008 .%U http://download.intel.com/technology/serialata/pdf/rev1_3.pdf .Re -.Sh BUGS -Native Command Queuing is not yet supported. +.Sh HISTORY +NCQ support was added +in +.Nx +on October 7, 2017 by +.An Jaromir Dolecek Aq Mt jdole...@netbsd.org . Index: src/share/man/man4/siisata.4 diff -u src/share/man/man4/siisata.4:1.6 src/share/man/man4/siisata.4:1.7 --- src/share/man/man4/siisata.4:1.6 Sat Jun 17 20:40:59 2017 +++ src/share/man/man4/siisata.4 Sat Oct 7 17:35:48 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: siisata.4,v 1.6 2017/06/17 20:40:59 jdolecek Exp $ +.\" $NetBSD: siisata.4,v 1.7 2017/10/07 17:35:48 jdolecek Exp $ .\" .\" Copyright (c) 2007, 2008 Jonathan A. Kollasch. All rights reserved. .\" @@ -22,7 +22,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 June 17, 2017 +.Dd October 7, 2017 .Dt SIISATA 4 .Os .Sh NAME @@ -62,14 +62,18 @@ The .Nm driver first appeared in .Nx 5.0 . +NCQ support was added in +.Nx +on October 7, 2017 . .Sh AUTHORS The .Nm driver was written by .An Jonathan A. Kollasch Aq Mt jakll...@kollasch.net . +NCQ support was added by him, and +.An Jaromir Dolecek Aq Mt jdole...@netbsd.org . .Sh BUGS .Bl -tag -width Ds -compact -.It SATA Native Command Queuing is not yet supported . .It Device hot swapping is not yet supported . .It Silicon Image's Software RAID is not yet supported by the .Xr ataraid 4 Index: src/share/man/man4/mvsata.4 diff -u src/share/man/man4/mvsata.4:1.5 src/share/man/man4/mvsata.4:1.6 --- src/share/man/man4/mvsata.4:1.5 Tue Mar 18 18:20:39 2014 +++ src/share/man/man4/mvsata.4 Sat Oct 7 17:35:48 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: mvsata.4,v 1.5 2014/03/18 18:20:39 riastradh Exp $ +.\" $NetBSD: mvsata.4,v 1.6 2017/10/07 17:35:48 jdolecek Exp $ .\" .\" Copyright (c) 2009 KIYOHARA Takashi .\" All rights reserved. @@ -24,7 +24,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 19, 2009 +.Dd October 7, 2017 .Dt MVSATA 4 .Os .Sh NAME @@ -46,17 +46,47 @@ The following controllers are supported .Nm driver: .Pp -.Bl -tag -width Ds -offset indent -compact -.It Adaptec RAID 1420SA -.It Adaptec RAID 1430SA -.It Marvell 88SX50xx Hercules-I -.It Marvell 88SX60xx Hercules-II -.It Marvell 88SX70xx Hercules-II -.It Triones Technologies RocketRAID 2310 RAID card +.Bl -tag -width "Gen IIe" -offset "" -compact +.It Gen I +.Bl -bullet -compact +.It +SATA 1.5Gbps; no support for NCQ, PMP, ATAPI +.It +Supported controllers: +.Bl -bullet -compact +.It +Marvell 88SX50xx Hercules-I +.El +.El +.It Gen II +.Bl -bullet -compact +.It +SATA 3Gbps, NCQ, and PMP support; no ATAPI support +.It +Supported controllers: +.Bl -bullet -compact +.It +Adaptec RAID 1420SA +.It +Marvell 88SX60xx Hercules-II +.El +.El +.It Gen IIe +.Bl -bullet -compact +.It +SATA 3Gbps, NCQ, PMP, ATAPI support +.It +Supported controllers: +.Bl -bullet -compact +.It +Adaptec RAID 1430SA +.It +Marvell 88SX70xx Hercules-II +.It +Triones Technologies RocketRAID 2310 RAID card +.El +.El .El -.Pp -The 88SX60xx and later support Native Command Queuing. -The 88SX70xx also supports ATAPI. .Sh SEE ALSO .Xr ata 4 , .Xr atapi 4 , @@ -67,16 +97,20 @@ The .Nm driver first appeared in .Nx 6.0 . +NCQ support was added, and ATAPI support enabled, in +.Nx +on October 7, 2017 . .Sh AUTHORS The .Nm driver was written by .An KIYOHARA Takashi Aq Mt kiyoh...@kk.iij4u.or.jp . +NCQ support was added by +.An Jaromir Dolecek Aq Mt jdole...@netbsd.org . .Sh BUGS .Bl -tag -width Ds -compact -.It SATA Native Command Queuing is not yet supported . +.It NCQ is not enabled on Gen II controllers yet .
CVS commit: src/share/man/man4
Module Name:src Committed By: jdolecek Date: Sat Oct 7 17:35:48 UTC 2017 Modified Files: src/share/man/man4: ahcisata.4 mvsata.4 siisata.4 Log Message: update to note NCQ support To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/ahcisata.4 \ src/share/man/man4/siisata.4 cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/mvsata.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kre Date: Sat Oct 7 17:15:44 UTC 2017 Modified Files: src/tests/lib/libc/sys: t_msgctl.c Log Message: If we have SYSVMSG in kernel (test finds it) restore the signal handler to its previous state, so any signals that occur during the rest of the test gat handled just as they would (core dump) as if the handler was never executed. No need to bother if the SYSVMSG test fails, as in that case, nothing else will be done anyway. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/sys/t_msgctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/sys/t_msgctl.c diff -u src/tests/lib/libc/sys/t_msgctl.c:1.6 src/tests/lib/libc/sys/t_msgctl.c:1.7 --- src/tests/lib/libc/sys/t_msgctl.c:1.6 Fri Oct 6 17:00:28 2017 +++ src/tests/lib/libc/sys/t_msgctl.c Sat Oct 7 17:15:44 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: t_msgctl.c,v 1.6 2017/10/06 17:00:28 kre Exp $ */ +/* $NetBSD: t_msgctl.c,v 1.7 2017/10/07 17:15:44 kre Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_msgctl.c,v 1.6 2017/10/06 17:00:28 kre Exp $"); +__RCSID("$NetBSD: t_msgctl.c,v 1.7 2017/10/07 17:15:44 kre Exp $"); #include #include @@ -360,14 +360,16 @@ static int no_kernel_sysvmsg(void) { int id; + void (*osig)(int); sig_caught = 0; - (void) signal(SIGSYS, sigsys_handler); + osig = signal(SIGSYS, sigsys_handler); id = msgget(MSG_KEY, IPC_CREAT | 0600); if (sig_caught || id == -1) return 1; (void)msgctl(id, IPC_RMID, 0); + (void)signal(SIGSYS, osig); return 0; }
CVS commit: src/tests/lib/libc/sys
Module Name:src Committed By: kre Date: Sat Oct 7 17:15:44 UTC 2017 Modified Files: src/tests/lib/libc/sys: t_msgctl.c Log Message: If we have SYSVMSG in kernel (test finds it) restore the signal handler to its previous state, so any signals that occur during the rest of the test gat handled just as they would (core dump) as if the handler was never executed. No need to bother if the SYSVMSG test fails, as in that case, nothing else will be done anyway. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/sys/t_msgctl.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 Oct 7 17:03:49 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_rtc.c Log Message: Add sun7i RTC support. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_rtc.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_rtc.c diff -u src/sys/arch/arm/sunxi/sunxi_rtc.c:1.1 src/sys/arch/arm/sunxi/sunxi_rtc.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_rtc.c:1.1 Thu Jun 29 19:38:24 2017 +++ src/sys/arch/arm/sunxi/sunxi_rtc.c Sat Oct 7 17:03:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_rtc.c,v 1.1 2017/06/29 19:38:24 jmcneill Exp $ */ +/* $NetBSD: sunxi_rtc.c,v 1.2 2017/10/07 17:03:49 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_rtc.c,v 1.1 2017/06/29 19:38:24 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_rtc.c,v 1.2 2017/10/07 17:03:49 jmcneill Exp $"); #include #include @@ -40,22 +40,39 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_rtc.c, #include -#define RTC_YY_MM_DD_REG 0x10 -#define SUNXI_RTC_LEAP __BIT(22) -#define SUNXI_RTC_YEAR __BITS(21,16) -#define SUNXI_RTC_MONTH __BITS(11,8) -#define SUNXI_RTC_DAY __BITS(4,0) -#define RTC_HH_MM_SS_REG 0x14 -#define SUNXI_RTC_WK_NO __BITS(31,29) -#define SUNXI_RTC_HOUR __BITS(20,16) -#define SUNXI_RTC_MINUTE __BITS(13,8) -#define SUNXI_RTC_SECOND __BITS(5,0) +#define SUN7I_RTC_YY_MM_DD_REG 0x04 +#define SUN7I_RTC_LEAP __BIT(24) +#define SUN7I_RTC_YEAR __BITS(23,16) +#define SUN7I_RTC_MONTH __BITS(11,8) +#define SUN7I_RTC_DAY __BITS(4,0) +#define SUN7I_RTC_HH_MM_SS_REG 0x08 +#define SUN7I_RTC_WK_NO __BITS(31,29) +#define SUN7I_RTC_HOUR __BITS(20,16) +#define SUN7I_RTC_MINUTE __BITS(13,8) +#define SUN7I_RTC_SECOND __BITS(5,0) + +#define SUN6I_RTC_YY_MM_DD_REG 0x10 +#define SUN6I_RTC_LEAP __BIT(22) +#define SUN6I_RTC_YEAR __BITS(21,16) +#define SUN6I_RTC_MONTH __BITS(11,8) +#define SUN6I_RTC_DAY __BITS(4,0) +#define SUN6I_RTC_HH_MM_SS_REG 0x14 +#define SUN6I_RTC_WK_NO __BITS(31,29) +#define SUN6I_RTC_HOUR __BITS(20,16) +#define SUN6I_RTC_MINUTE __BITS(13,8) +#define SUN6I_RTC_SECOND __BITS(5,0) #define SUNXI_RTC_BASE_YEAR 2000 -static const char * const compatible[] = { - "allwinner,sun6i-a31-rtc", - NULL +enum sunxi_rtc_type { + RTC_SUN6I = 1, + RTC_SUN7I, +}; + +static const struct of_compat_data compat_data[] = { + { "allwinner,sun6i-a31-rtc", RTC_SUN6I }, + { "allwinner,sun7i-a20-rtc", RTC_SUN7I }, + { NULL } }; struct sunxi_rtc_softc { @@ -73,8 +90,11 @@ struct sunxi_rtc_softc { static int sunxi_rtc_match(device_t, cfdata_t, void *); static void sunxi_rtc_attach(device_t, device_t, void *); -static int sunxi_rtc_gettime(todr_chip_handle_t, struct clock_ymdhms *); -static int sunxi_rtc_settime(todr_chip_handle_t, struct clock_ymdhms *); +static int sun6i_rtc_gettime(todr_chip_handle_t, struct clock_ymdhms *); +static int sun6i_rtc_settime(todr_chip_handle_t, struct clock_ymdhms *); + +static int sun7i_rtc_gettime(todr_chip_handle_t, struct clock_ymdhms *); +static int sun7i_rtc_settime(todr_chip_handle_t, struct clock_ymdhms *); CFATTACH_DECL_NEW(sunxi_rtc, sizeof(struct sunxi_rtc_softc), sunxi_rtc_match, sunxi_rtc_attach, NULL, NULL); @@ -84,7 +104,7 @@ sunxi_rtc_match(device_t parent, cfdata_ { struct fdt_attach_args * const faa = aux; - return of_match_compatible(faa->faa_phandle, compatible); + return of_match_compat_data(faa->faa_phandle, compat_data); } static void @@ -93,6 +113,7 @@ sunxi_rtc_attach(device_t parent, device struct sunxi_rtc_softc * const sc = device_private(self); struct fdt_attach_args * const faa = aux; const int phandle = faa->faa_phandle; + enum sunxi_rtc_type type; bus_addr_t addr; bus_size_t size; @@ -111,34 +132,99 @@ sunxi_rtc_attach(device_t parent, device aprint_naive("\n"); aprint_normal(": RTC\n"); - sc->sc_todr.todr_gettime_ymdhms = sunxi_rtc_gettime; - sc->sc_todr.todr_settime_ymdhms = sunxi_rtc_settime; + type = of_search_compatible(phandle, compat_data)->data; + sc->sc_todr.cookie = sc; + switch (type) { + case RTC_SUN6I: + sc->sc_todr.todr_gettime_ymdhms = sun6i_rtc_gettime; + sc->sc_todr.todr_settime_ymdhms = sun6i_rtc_settime; + break; + case RTC_SUN7I: + sc->sc_todr.todr_gettime_ymdhms = sun7i_rtc_gettime; + sc->sc_todr.todr_settime_ymdhms = sun7i_rtc_settime; + break; + } fdtbus_todr_attach(self, phandle, >sc_todr); } static int -sunxi_rtc_gettime(todr_chip_handle_t tch, struct clock_ymdhms *dt) +sun6i_rtc_gettime(todr_chip_handle_t tch, struct clock_ymdhms *dt) +{ + struct sunxi_rtc_softc *sc = tch->cookie; + + const uint32_t yymmdd = RTC_READ(sc, SUN6I_RTC_YY_MM_DD_REG); + const uint32_t hhmmss = RTC_READ(sc, SUN6I_RTC_HH_MM_SS_REG); + + dt->dt_year = __SHIFTOUT(yymmdd,
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 17:03:49 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_rtc.c Log Message: Add sun7i RTC support. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_rtc.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 Oct 7 16:44:24 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_wdt.c Log Message: Add sun4i watchdog support. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_wdt.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_wdt.c diff -u src/sys/arch/arm/sunxi/sunxi_wdt.c:1.1 src/sys/arch/arm/sunxi/sunxi_wdt.c:1.2 --- src/sys/arch/arm/sunxi/sunxi_wdt.c:1.1 Tue Jul 25 17:04:52 2017 +++ src/sys/arch/arm/sunxi/sunxi_wdt.c Sat Oct 7 16:44:24 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_wdt.c,v 1.1 2017/07/25 17:04:52 jmcneill Exp $ */ +/* $NetBSD: sunxi_wdt.c,v 1.2 2017/10/07 16:44:24 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_wdt.c,v 1.1 2017/07/25 17:04:52 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_wdt.c,v 1.2 2017/10/07 16:44:24 jmcneill Exp $"); #include #include @@ -43,31 +43,46 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_wdt.c, #define SUNXI_WDT_PERIOD_DEFAULT 16 -#define WDT_IRQ_EN_REG 0x00 -#define WDT_IRQ_EN_EN __BIT(0) -#define WDT_IRQ_STA_REG 0x04 -#define WDT_IRQ_STA_PEND __BIT(0) -#define WDT_CTRL_REG 0x10 -#define WDT_CTRL_KEY_FIELD __BITS(12,1) -#define WDT_CTRL_KEY_FIELD_V 0xa57 -#define WDT_CTRL_RSTART __BIT(0) -#define WDT_CFG_REG 0x14 -#define WDT_CFG_CONFIG __BITS(1,0) -#define WDT_CFG_CONFIG_SYS 1 -#define WDT_CFG_CONFIG_IRQ 2 -#define WDT_MODE_REG 0x18 -#define WDT_MODE_INTV __BITS(7,4) -#define WDT_MODE_EN __BIT(0) +#define SUN4I_WDT_CTRL_REG 0x00 +#define SUN4I_WDT_CTRL_KEY_FIELD __BITS(12,1) +#define SUN4I_WDT_CTRL_KEY_FIELD_V 0xa57 +#define SUN4I_WDT_CTRL_RSTART __BIT(0) +#define SUN4I_WDT_MODE_REG 0x04 +#define SUN4I_WDT_MODE_INTV __BITS(6,3) +#define SUN4I_WDT_MODE_RST_EN __BIT(1) +#define SUN4I_WDT_MODE_EN __BIT(0) + +#define SUN6I_WDT_IRQ_EN_REG 0x00 +#define SUN6I_WDT_IRQ_EN_EN __BIT(0) +#define SUN6I_WDT_IRQ_STA_REG 0x04 +#define SUN6I_WDT_IRQ_STA_PEND __BIT(0) +#define SUN6I_WDT_CTRL_REG 0x10 +#define SUN6I_WDT_CTRL_KEY_FIELD __BITS(12,1) +#define SUN6I_WDT_CTRL_KEY_FIELD_V 0xa57 +#define SUN6I_WDT_CTRL_RSTART __BIT(0) +#define SUN6I_WDT_CFG_REG 0x14 +#define SUN6I_WDT_CFG_CONFIG __BITS(1,0) +#define SUN6I_WDT_CFG_CONFIG_SYS 1 +#define SUN6I_WDT_CFG_CONFIG_IRQ 2 +#define SUN6I_WDT_MODE_REG 0x18 +#define SUN6I_WDT_MODE_INTV __BITS(7,4) +#define SUN6I_WDT_MODE_EN __BIT(0) -static const int sun6i_periods[] = { +static const int sunxi_periods[] = { 500, 1000, 2000, 3000, 4000, 5000, 6000, 8000, 1, 12000, 14000, 16000, -1 }; +enum sunxi_wdt_type { + WDT_SUN4I = 1, + WDT_SUN6I, +}; + static const struct of_compat_data compat_data[] = { - { "allwinner,sun6i-a31-wdt", (uintptr_t)_periods }, + { "allwinner,sun4i-a10-wdt", WDT_SUN4I }, + { "allwinner,sun6i-a31-wdt", WDT_SUN6I }, { NULL } }; @@ -106,14 +121,52 @@ sunxi_wdt_map_period(struct sunxi_wdt_so } static int -sunxi_wdt_setmode(struct sysmon_wdog *smw) +sun4i_wdt_setmode(struct sysmon_wdog *smw) +{ + struct sunxi_wdt_softc * const sc = smw->smw_cookie; + uint32_t mode; + int intv; + + if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { + WDT_WRITE(sc, SUN4I_WDT_MODE_REG, 0); + } else { + if (smw->smw_period == WDOG_PERIOD_DEFAULT) + smw->smw_period = SUNXI_WDT_PERIOD_DEFAULT; + intv = sunxi_wdt_map_period(sc, smw->smw_period, + >sc_smw.smw_period); + if (intv == -1) + return EINVAL; + + mode = SUN4I_WDT_MODE_EN | SUN4I_WDT_MODE_RST_EN | + __SHIFTIN(intv, SUN4I_WDT_MODE_INTV); + + WDT_WRITE(sc, SUN4I_WDT_MODE_REG, mode); + } + + return 0; +} + +static int +sun4i_wdt_tickle(struct sysmon_wdog *smw) +{ + struct sunxi_wdt_softc * const sc = smw->smw_cookie; + const uint32_t ctrl = SUN4I_WDT_CTRL_RSTART | + __SHIFTIN(SUN4I_WDT_CTRL_KEY_FIELD_V, SUN4I_WDT_CTRL_KEY_FIELD); + + WDT_WRITE(sc, SUN4I_WDT_CTRL_REG, ctrl); + + return 0; +} + +static int +sun6i_wdt_setmode(struct sysmon_wdog *smw) { struct sunxi_wdt_softc * const sc = smw->smw_cookie; uint32_t cfg, mode; int intv; if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { - WDT_WRITE(sc, WDT_MODE_REG, 0); + WDT_WRITE(sc, SUN6I_WDT_MODE_REG, 0); } else { if (smw->smw_period == WDOG_PERIOD_DEFAULT) smw->smw_period = SUNXI_WDT_PERIOD_DEFAULT; @@ -122,24 +175,24 @@ sunxi_wdt_setmode(struct sysmon_wdog *sm if (intv == -1) return EINVAL; - cfg = __SHIFTIN(WDT_CFG_CONFIG_SYS, WDT_CFG_CONFIG); - mode = WDT_MODE_EN | __SHIFTIN(intv, WDT_MODE_INTV); + cfg = __SHIFTIN(SUN6I_WDT_CFG_CONFIG_SYS, SUN6I_WDT_CFG_CONFIG); + mode = SUN6I_WDT_MODE_EN | __SHIFTIN(intv, SUN6I_WDT_MODE_INTV); - WDT_WRITE(sc, WDT_CFG_REG, cfg); - WDT_WRITE(sc, WDT_MODE_REG, mode); + WDT_WRITE(sc,
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 16:44:24 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_wdt.c Log Message: Add sun4i watchdog support. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_wdt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: jdolecek Date: Sat Oct 7 16:05:33 UTC 2017 Modified Files: src/sys/arch/acorn32/eb7500atx: rside.c src/sys/arch/acorn32/mainbus: wdc_pioc.c src/sys/arch/acorn32/podulebus: icside.c rapide.c simide.c src/sys/arch/amiga/dev: efa.c efavar.h wdc_acafh.c wdc_amiga.c wdc_buddha.c wdc_xsurf.c src/sys/arch/arm/allwinner: awin_wdc.c src/sys/arch/atari/dev: atari5380.c dma.c fd.c wdc_mb.c src/sys/arch/atari/include: dma.h src/sys/arch/i386/pnpbios: pciide_pnpbios.c src/sys/arch/landisk/dev: wdc_obio.c src/sys/arch/mac68k/obio: wdc_obio.c src/sys/arch/macppc/dev: kauai.c wdc_obio.c src/sys/arch/mips/adm5120/dev: wdc_extio.c src/sys/arch/playstation2/dev: wdc_spd.c src/sys/arch/prep/pnpbus: wdc_pnpbus.c src/sys/dev/ata: ata.c ata_wdc.c atareg.h atavar.h files.ata sata_subr.c satafis_subr.c satafisvar.h satapmp_subr.c satapmpvar.h wd.c wdvar.h src/sys/dev/ic: ahcisata_core.c ahcisatareg.h ahcisatavar.h mvsata.c mvsatareg.h mvsatavar.h ninjaata32.c ninjaata32var.h siisata.c siisatareg.h siisatavar.h wdc.c wdcvar.h src/sys/dev/isa: wdc_isa.c src/sys/dev/pci: acardide.c artsata.c cmdide.c cypide.c pciide_common.c pdcsata.c satalink.c svwsata.c viaide.c src/sys/dev/pcmcia: wdc_pcmcia.c src/sys/dev/scsipi: atapi_wdc.c src/sys/dev/usb: umass.c umass_isdata.c umass_isdata.h Added Files: src/sys/dev/ata: TODO.ncq Log Message: Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch ATA subsystem was changed to support several outstanding commands, and use NCQ xfers if supported by both the controller and the disk, including NCQ error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers if supported. Added FUA support. Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced by condvars, and switched most code from spl* to mutexes (separate wd(4) and ata channel lock). Introduced new option WD_CHAOS_MONKEY to facilitate testing of error handling, fixed several uncovered issues. Also fixed several problems with kernel dump to wd(4) disk. Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64, with and without port multiplier, both disk and ATAPI devices; other drivers and archs mechanically adjusted and compile-tested. NCQ is supported for ahcisata(4) and siisata(4) for any controller, for mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in mvsata(4). Thanks to Matt Thomas for initial ATA infrastructure patch, and Jonathan A.Kollasch for siisata(4) NCQ changes and general testing. Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041, PR kern/51979 (kernel dump) To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/acorn32/eb7500atx/rside.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/acorn32/mainbus/wdc_pioc.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/acorn32/podulebus/icside.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/acorn32/podulebus/rapide.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/acorn32/podulebus/simide.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amiga/dev/efa.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/efavar.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/amiga/dev/wdc_acafh.c \ src/sys/arch/amiga/dev/wdc_xsurf.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/amiga/dev/wdc_amiga.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/amiga/dev/wdc_buddha.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/allwinner/awin_wdc.c cvs rdiff -u -r1.62 -r1.63 src/sys/arch/atari/dev/atari5380.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/dev/dma.c cvs rdiff -u -r1.84 -r1.85 src/sys/arch/atari/dev/fd.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/atari/dev/wdc_mb.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/atari/include/dma.h cvs rdiff -u -r1.31 -r1.32 src/sys/arch/i386/pnpbios/pciide_pnpbios.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/landisk/dev/wdc_obio.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mac68k/obio/wdc_obio.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/macppc/dev/kauai.c cvs rdiff -u -r1.59 -r1.60 src/sys/arch/macppc/dev/wdc_obio.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/adm5120/dev/wdc_extio.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/playstation2/dev/wdc_spd.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/prep/pnpbus/wdc_pnpbus.c cvs rdiff -u -r0 -r1.2 src/sys/dev/ata/TODO.ncq cvs rdiff -u -r1.132 -r1.133 src/sys/dev/ata/ata.c cvs rdiff -u -r1.105 -r1.106 src/sys/dev/ata/ata_wdc.c cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ata/atareg.h src/sys/dev/ata/wdvar.h cvs rdiff -u -r1.92 -r1.93 src/sys/dev/ata/atavar.h cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ata/files.ata cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ata/sata_subr.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/ata/satafis_subr.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ata/satafisvar.h \ src/sys/dev/ata/satapmpvar.h cvs rdiff -u
CVS commit: [jdolecek-ncq] src/sys/dev/ata
Module Name:src Committed By: jdolecek Date: Sat Oct 7 15:24:36 UTC 2017 Modified Files: src/sys/dev/ata [jdolecek-ncq]: wd.c wdvar.h Log Message: make usage of NCQ 'high' priority for BPRIO_TIMECRITICAL xfers settable via sysctl, too To generate a diff of this commit: cvs rdiff -u -r1.428.2.35 -r1.428.2.36 src/sys/dev/ata/wd.c cvs rdiff -u -r1.43.4.9 -r1.43.4.10 src/sys/dev/ata/wdvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [jdolecek-ncq] src/sys/dev/ata
Module Name:src Committed By: jdolecek Date: Sat Oct 7 15:24:36 UTC 2017 Modified Files: src/sys/dev/ata [jdolecek-ncq]: wd.c wdvar.h Log Message: make usage of NCQ 'high' priority for BPRIO_TIMECRITICAL xfers settable via sysctl, too To generate a diff of this commit: cvs rdiff -u -r1.428.2.35 -r1.428.2.36 src/sys/dev/ata/wd.c cvs rdiff -u -r1.43.4.9 -r1.43.4.10 src/sys/dev/ata/wdvar.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/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.428.2.35 src/sys/dev/ata/wd.c:1.428.2.36 --- src/sys/dev/ata/wd.c:1.428.2.35 Thu Sep 28 20:34:23 2017 +++ src/sys/dev/ata/wd.c Sat Oct 7 15:24:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.428.2.35 2017/09/28 20:34:23 jdolecek Exp $ */ +/* $NetBSD: wd.c,v 1.428.2.36 2017/10/07 15:24:36 jdolecek Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.35 2017/09/28 20:34:23 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.428.2.36 2017/10/07 15:24:36 jdolecek Exp $"); #include "opt_ata.h" #include "opt_wd.h" @@ -751,7 +751,7 @@ wdstart1(struct wd_softc *wd, struct buf xfer->c_bio.flags |= ATA_LBA48; xfer->c_flags |= C_NCQ; - if ((wd->drvp->drive_flags & ATA_DRIVE_NCQ_PRIO) && + if (WD_USE_NCQ_PRIO(wd) && BIO_GETPRIO(bp) == BPRIO_TIMECRITICAL) xfer->c_bio.flags |= ATA_PRIO_HIGH; } @@ -2360,6 +2360,19 @@ wd_sysctl_attach(struct wd_softc *wd) return; } + wd->drv_ncq_prio = true; + if ((error = sysctl_createv(>nodelog, 0, NULL, NULL, +CTLFLAG_READWRITE, CTLTYPE_BOOL, "use_ncq_prio", +SYSCTL_DESCR("use NCQ PRIORITY if supported"), +NULL, 0, >drv_ncq_prio, 0, +CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL)) +!= 0) { + aprint_error_dev(wd->sc_dev, + "could not create %s.%s.use_ncq_prio sysctl - error %d\n", + "hw", device_xname(wd->sc_dev), error); + return; + } + #ifdef WD_CHAOS_MONKEY wd->drv_chaos_freq = 0; if ((error = sysctl_createv(>nodelog, 0, NULL, NULL, Index: src/sys/dev/ata/wdvar.h diff -u src/sys/dev/ata/wdvar.h:1.43.4.9 src/sys/dev/ata/wdvar.h:1.43.4.10 --- src/sys/dev/ata/wdvar.h:1.43.4.9 Thu Sep 28 20:34:23 2017 +++ src/sys/dev/ata/wdvar.h Sat Oct 7 15:24:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wdvar.h,v 1.43.4.9 2017/09/28 20:34:23 jdolecek Exp $ */ +/* $NetBSD: wdvar.h,v 1.43.4.10 2017/10/07 15:24:36 jdolecek Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. @@ -78,6 +78,9 @@ struct wd_softc { bool drv_ncq; #define WD_USE_NCQ(wd) \ ((wd)->drv_ncq && ((wd)->drvp->drive_flags & ATA_DRIVE_NCQ)) + bool drv_ncq_prio; +#define WD_USE_NCQ_PRIO(wd) \ + ((wd)->drv_ncq_prio && ((wd)->drvp->drive_flags & ATA_DRIVE_NCQ_PRIO)) #ifdef WD_CHAOS_MONKEY int drv_chaos_freq; /* frequency of simulated bio errors */ int drv_chaos_cnt; /* count of processed bio read xfers */
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 15:13:00 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add ahcisata To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 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.36 src/sys/arch/evbarm/conf/SUNXI:1.37 --- src/sys/arch/evbarm/conf/SUNXI:1.36 Sat Oct 7 13:29:28 2017 +++ src/sys/arch/evbarm/conf/SUNXI Sat Oct 7 15:13:00 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.36 2017/10/07 13:29:28 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.37 2017/10/07 15:13:00 jmcneill Exp $ # # Allwinner sunxi family # @@ -184,6 +184,11 @@ ld2 at sdmmc2 ld3 at sdmmc3 ld* at sdmmc? +# SATA +ahcisata* at fdt? # SATA +atabus* at ata? +wd* at atabus? drive ? + # Display genfb* at fdt? wsdisplay* at genfb?
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 15:13:00 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add ahcisata To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 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/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 15:12:36 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi sun4i_a10_ccu.c Added Files: src/sys/arch/arm/sunxi: sunxi_sata.c Log Message: Add A10/A20 SATA support To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_sata.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 Oct 7 15:12:36 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi sun4i_a10_ccu.c Added Files: src/sys/arch/arm/sunxi: sunxi_sata.c Log Message: Add A10/A20 SATA support To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_sata.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.29 src/sys/arch/arm/sunxi/files.sunxi:1.30 --- src/sys/arch/arm/sunxi/files.sunxi:1.29 Sat Oct 7 13:28:59 2017 +++ src/sys/arch/arm/sunxi/files.sunxi Sat Oct 7 15:12:35 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.29 2017/10/07 13:28:59 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.30 2017/10/07 15:12:35 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -195,6 +195,10 @@ device sunxithermal: sysmon_envsys, sysm attach sunxithermal at fdt with sunxi_thermal file arch/arm/sunxi/sunxi_thermal.c sunxi_thermal +# SATA +attach ahcisata at fdt with sunxi_sata +file arch/arm/sunxi/sunxi_sata.c sunxi_sata + # SOC parameters defflag opt_soc.h SOC_SUNXI defflag opt_soc.h SOC_SUN4I: SOC_SUNXI Index: src/sys/arch/arm/sunxi/sun4i_a10_ccu.c diff -u src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.2 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.3 --- src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.2 Sat Oct 7 12:22:29 2017 +++ src/sys/arch/arm/sunxi/sun4i_a10_ccu.c Sat Oct 7 15:12:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sun4i_a10_ccu.c,v 1.2 2017/10/07 12:22:29 jmcneill Exp $ */ +/* $NetBSD: sun4i_a10_ccu.c,v 1.3 2017/10/07 15:12:35 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.2 2017/10/07 12:22:29 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.3 2017/10/07 15:12:35 jmcneill Exp $"); #include #include @@ -55,6 +55,7 @@ __KERNEL_RCSID(1, "$NetBSD: sun4i_a10_cc #define SD1_SCLK_CFG_REG0x08c #define SD2_SCLK_CFG_REG0x090 #define SD3_SCLK_CFG_REG 0x094 +#define SATA_CFG_REG 0x0c8 #define USBPHY_CFG_REG 0x0cc #define BE_CFG_REG 0x104 #define FE_CFG_REG 0x10c @@ -93,6 +94,7 @@ static const char *ahb_parents[] = { "ax static const char *apb0_parents[] = { "ahb" }; static const char *apb1_parents[] = { "osc24m", "pll_periph", "losc" }; static const char *mod_parents[] = { "osc24m", "pll_periph", "pll_ddr" }; +static const char *sata_parents[] = { "pll6_periph_sata", "external" }; static const struct sunxi_ccu_nkmp_tbl sun4i_a10_ac_dig_table[] = { { 24576000, 86, 0, 21, 3 }, @@ -145,6 +147,13 @@ static struct sunxi_ccu_clk sun4i_a10_cc __BIT(14), /* enable */ 0), + SUNXI_CCU_DIV_GATE(A10_CLK_SATA, "sata", sata_parents, + SATA_CFG_REG, /* reg */ + 0,/* div */ + __BIT(24), /* sel */ + __BIT(31), /* enable */ + 0), + SUNXI_CCU_DIV(A10_CLK_CPU, "cpu", cpu_parents, CPU_AHB_APB0_CFG_REG, /* reg */ 0,/* div */ Added files: Index: src/sys/arch/arm/sunxi/sunxi_sata.c diff -u /dev/null src/sys/arch/arm/sunxi/sunxi_sata.c:1.1 --- /dev/null Sat Oct 7 15:12:36 2017 +++ src/sys/arch/arm/sunxi/sunxi_sata.c Sat Oct 7 15:12:35 2017 @@ -0,0 +1,125 @@ +/* $NetBSD: sunxi_sata.c,v 1.1 2017/10/07 15:12: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 + *
CVS commit: src/doc
Module Name:src Committed By: roy Date: Sat Oct 7 14:16:34 UTC 2017 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-7.0.0-rc3 To generate a diff of this commit: cvs rdiff -u -r1.1473 -r1.1474 src/doc/3RDPARTY cvs rdiff -u -r1.2319 -r1.2320 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/3RDPARTY diff -u src/doc/3RDPARTY:1.1473 src/doc/3RDPARTY:1.1474 --- src/doc/3RDPARTY:1.1473 Mon Sep 25 23:19:31 2017 +++ src/doc/3RDPARTY Sat Oct 7 14:16:34 2017 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1473 2017/09/25 23:19:31 christos Exp $ +# $NetBSD: 3RDPARTY,v 1.1474 2017/10/07 14:16:34 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -334,8 +334,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 7.0.0-rc2 -Current Vers: 7.0.0-rc2 +Version: 7.0.0-rc3 +Current Vers: 7.0.0-rc3 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2319 src/doc/CHANGES:1.2320 --- src/doc/CHANGES:1.2319 Tue Sep 19 19:20:44 2017 +++ src/doc/CHANGES Sat Oct 7 14:16:34 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2319 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2320 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -64,4 +64,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: acpi(4): Updated ACPICA to 20170831. [christos 20170915] dtrace: Install dtruss, execsnoop, opensnoop, and procsystime from the DTrace Toolkit if DTrace support is enabled. [sevan 20170917] - dhcpcd(8): Import dhcpcd-7.0.0-rc2. [roy 20170919] + dhcpcd(8): Import dhcpcd-7.0.0-rc3. [roy 20171007]
CVS commit: src/doc
Module Name:src Committed By: roy Date: Sat Oct 7 14:16:34 UTC 2017 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-7.0.0-rc3 To generate a diff of this commit: cvs rdiff -u -r1.1473 -r1.1474 src/doc/3RDPARTY cvs rdiff -u -r1.2319 -r1.2320 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/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Sat Oct 7 14:14:40 UTC 2017 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c Log Message: Remove mistakenly commited debug. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/dist/src/dhcp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.4 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.5 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.4 Sat Oct 7 14:11:07 2017 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Sat Oct 7 14:14:40 2017 @@ -1487,7 +1487,6 @@ get_lease(struct interface *ifp, if (get_option_uint32(ctx, >renewaltime, bootp, len, DHO_RENEWALTIME) != 0) lease->renewaltime = 0; - lease->renewaltime = 30; if (get_option_uint32(ctx, >rebindtime, bootp, len, DHO_REBINDTIME) != 0) lease->rebindtime = 0; @@ -2750,18 +2749,10 @@ dhcp_handledhcp(struct interface *ifp, s #endif if (state->xid != ntohl(bootp->xid)) { - if (state->state != DHS_BOUND && state->state != DHS_NONE) { + if (state->state != DHS_BOUND && state->state != DHS_NONE) logdebugx("%s: wrong xid 0x%x (expecting 0x%x) from %s", ifp->name, ntohl(bootp->xid), state->xid, inet_ntoa(*from)); - char old[sizeof(state->leasefile)]; - - memcpy(old, state->leasefile, sizeof(old)); - snprintf(state->leasefile, sizeof(state->leasefile), "/tmp/dhcpcd-wrongxid-0x%x.%d", state->xid, rand()); - if (write_lease(ifp, bootp, bootp_len) == -1) - logerr(__func__); - memcpy(state->leasefile, old, sizeof(old)); - } dhcp_redirect_dhcp(ifp, bootp, bootp_len, from); return; }
CVS commit: src/external/bsd/dhcpcd/dist/src
Module Name:src Committed By: roy Date: Sat Oct 7 14:14:40 UTC 2017 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c Log Message: Remove mistakenly commited debug. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/dist/src/dhcp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd
Module Name:src Committed By: roy Date: Sat Oct 7 14:11:07 UTC 2017 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c src/external/bsd/dhcpcd/include: config.h src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: dhcpcd no longer needs hmac_md5.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcpcd/include/config.h cvs rdiff -u -r1.41 -r1.42 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/dhcpcd
Module Name:src Committed By: roy Date: Sat Oct 7 14:11:07 UTC 2017 Modified Files: src/external/bsd/dhcpcd/dist/src: dhcp.c src/external/bsd/dhcpcd/include: config.h src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: dhcpcd no longer needs hmac_md5.c To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/dhcp.c cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcpcd/include/config.h cvs rdiff -u -r1.41 -r1.42 src/external/bsd/dhcpcd/sbin/dhcpcd/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/bsd/dhcpcd/dist/src/dhcp.c diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.3 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.4 --- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.3 Tue Sep 19 19:19:21 2017 +++ src/external/bsd/dhcpcd/dist/src/dhcp.c Sat Oct 7 14:11:07 2017 @@ -1487,6 +1487,7 @@ get_lease(struct interface *ifp, if (get_option_uint32(ctx, >renewaltime, bootp, len, DHO_RENEWALTIME) != 0) lease->renewaltime = 0; + lease->renewaltime = 30; if (get_option_uint32(ctx, >rebindtime, bootp, len, DHO_REBINDTIME) != 0) lease->rebindtime = 0; @@ -2749,10 +2750,18 @@ dhcp_handledhcp(struct interface *ifp, s #endif if (state->xid != ntohl(bootp->xid)) { - if (state->state != DHS_BOUND && state->state != DHS_NONE) + if (state->state != DHS_BOUND && state->state != DHS_NONE) { logdebugx("%s: wrong xid 0x%x (expecting 0x%x) from %s", ifp->name, ntohl(bootp->xid), state->xid, inet_ntoa(*from)); + char old[sizeof(state->leasefile)]; + + memcpy(old, state->leasefile, sizeof(old)); + snprintf(state->leasefile, sizeof(state->leasefile), "/tmp/dhcpcd-wrongxid-0x%x.%d", state->xid, rand()); + if (write_lease(ifp, bootp, bootp_len) == -1) + logerr(__func__); + memcpy(state->leasefile, old, sizeof(old)); + } dhcp_redirect_dhcp(ifp, bootp, bootp_len, from); return; } Index: src/external/bsd/dhcpcd/include/config.h diff -u src/external/bsd/dhcpcd/include/config.h:1.1 src/external/bsd/dhcpcd/include/config.h:1.2 --- src/external/bsd/dhcpcd/include/config.h:1.1 Fri Mar 31 21:02:09 2017 +++ src/external/bsd/dhcpcd/include/config.h Sat Oct 7 14:11:07 2017 @@ -10,7 +10,6 @@ #define HAVE_IFADDRS_ADDRFLAGS #define HAVE_UTIL_H #define HAVE_SYS_QUEUE_H -#define HAVE_SPAWN_H #define HAVE_REALLOCARRAY #define HAVE_KQUEUE #define HAVE_KQUEUE1 Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.41 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.42 --- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.41 Fri Sep 15 12:02:00 2017 +++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Sat Oct 7 14:11:07 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.41 2017/09/15 12:02:00 roy Exp $ +# $NetBSD: Makefile,v 1.42 2017/10/07 14:11:07 roy Exp $ # WARNS?= 6 @@ -26,7 +26,7 @@ DHCPCD_DEFS= dhcpcd-definitions-small.co .else DHCPCD_DEFS= dhcpcd-definitions.conf CPPFLAGS+= -DAUTH -SRCS+= auth.c hmac_md5.c +SRCS+= auth.c .endif .if (${USE_INET} != "no")
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 14:11:11 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_codec.h Log Message: match allwinner,sun7i-a20-codec To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_codec.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/arm/sunxi/sunxi_codec.h diff -u src/sys/arch/arm/sunxi/sunxi_codec.h:1.2 src/sys/arch/arm/sunxi/sunxi_codec.h:1.3 --- src/sys/arch/arm/sunxi/sunxi_codec.h:1.2 Sun Aug 27 16:05:26 2017 +++ src/sys/arch/arm/sunxi/sunxi_codec.h Sat Oct 7 14:11:11 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_codec.h,v 1.2 2017/08/27 16:05:26 jmcneill Exp $ */ +/* $NetBSD: sunxi_codec.h,v 1.3 2017/10/07 14:11:11 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill@@ -128,6 +128,7 @@ extern const struct sunxi_codec_conf sun extern const struct sunxi_codec_conf sun4i_a10_codecconf; #define A10_CODEC_COMPATDATA \ - { "allwinner,sun4i-a10-codec", (uintptr_t)_a10_codecconf } + { "allwinner,sun4i-a10-codec", (uintptr_t)_a10_codecconf }, \ + { "allwinner,sun7i-a20-codec", (uintptr_t)_a10_codecconf } #endif /* !_ARM_SUNXI_CODEC_H */
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 14:11:11 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_codec.h Log Message: match allwinner,sun7i-a20-codec To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/sunxi/sunxi_codec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Sat Oct 7 14:05:37 UTC 2017 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv10499 Log Message: Import dhcpcd-7.0.0-rc3 with the following noteable changes: * Fixed handling RA's from multiple routers * Fixed changing to a better route based on gateway * IPv6 default route is now deleted when config is not persistent * Use hmac(3) if available in libc to reduce binary size Fixes PR bin/52554 Status: Vendor Tag: roy Release Tags: dhcpcd-7-0-0-rc3 U src/external/bsd/dhcpcd/dist/.arcconfig U src/external/bsd/dhcpcd/dist/.gitignore U src/external/bsd/dhcpcd/dist/BUILDING.md U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/Makefile U src/external/bsd/dhcpcd/dist/Makefile.inc U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/config-null.mk U src/external/bsd/dhcpcd/dist/configure U src/external/bsd/dhcpcd/dist/iconfig.mk U src/external/bsd/dhcpcd/dist/compat/_strtoi.h U src/external/bsd/dhcpcd/dist/compat/arc4random.c U src/external/bsd/dhcpcd/dist/compat/arc4random.h U src/external/bsd/dhcpcd/dist/compat/bitops.h U src/external/bsd/dhcpcd/dist/compat/queue.h U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.c U src/external/bsd/dhcpcd/dist/compat/dprintf.c U src/external/bsd/dhcpcd/dist/compat/dprintf.h U src/external/bsd/dhcpcd/dist/compat/endian.h U src/external/bsd/dhcpcd/dist/compat/pidfile.c U src/external/bsd/dhcpcd/dist/compat/pidfile.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.h N src/external/bsd/dhcpcd/dist/compat/strlcpy.c N src/external/bsd/dhcpcd/dist/compat/strlcpy.h U src/external/bsd/dhcpcd/dist/compat/strtoi.c U src/external/bsd/dhcpcd/dist/compat/strtoi.h U src/external/bsd/dhcpcd/dist/compat/strtou.c N src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c N src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/GNUmakefile U src/external/bsd/dhcpcd/dist/src/Makefile U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/dev.c U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/src/genembedc U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c U src/external/bsd/dhcpcd/dist/src/genembedh U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/if-linux.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/if-sun.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/dev/Makefile U
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Sat Oct 7 14:05:37 UTC 2017 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv10499 Log Message: Import dhcpcd-7.0.0-rc3 with the following noteable changes: * Fixed handling RA's from multiple routers * Fixed changing to a better route based on gateway * IPv6 default route is now deleted when config is not persistent * Use hmac(3) if available in libc to reduce binary size Fixes PR bin/52554 Status: Vendor Tag: roy Release Tags: dhcpcd-7-0-0-rc3 U src/external/bsd/dhcpcd/dist/.arcconfig U src/external/bsd/dhcpcd/dist/.gitignore U src/external/bsd/dhcpcd/dist/BUILDING.md U src/external/bsd/dhcpcd/dist/LICENSE U src/external/bsd/dhcpcd/dist/Makefile U src/external/bsd/dhcpcd/dist/Makefile.inc U src/external/bsd/dhcpcd/dist/README.md U src/external/bsd/dhcpcd/dist/config-null.mk U src/external/bsd/dhcpcd/dist/configure U src/external/bsd/dhcpcd/dist/iconfig.mk U src/external/bsd/dhcpcd/dist/compat/_strtoi.h U src/external/bsd/dhcpcd/dist/compat/arc4random.c U src/external/bsd/dhcpcd/dist/compat/arc4random.h U src/external/bsd/dhcpcd/dist/compat/bitops.h U src/external/bsd/dhcpcd/dist/compat/queue.h U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.c U src/external/bsd/dhcpcd/dist/compat/arc4random_uniform.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.c U src/external/bsd/dhcpcd/dist/compat/dprintf.c U src/external/bsd/dhcpcd/dist/compat/dprintf.h U src/external/bsd/dhcpcd/dist/compat/endian.h U src/external/bsd/dhcpcd/dist/compat/pidfile.c U src/external/bsd/dhcpcd/dist/compat/pidfile.h U src/external/bsd/dhcpcd/dist/compat/reallocarray.h N src/external/bsd/dhcpcd/dist/compat/strlcpy.c N src/external/bsd/dhcpcd/dist/compat/strlcpy.h U src/external/bsd/dhcpcd/dist/compat/strtoi.c U src/external/bsd/dhcpcd/dist/compat/strtoi.h U src/external/bsd/dhcpcd/dist/compat/strtou.c N src/external/bsd/dhcpcd/dist/compat/crypt/hmac.c N src/external/bsd/dhcpcd/dist/compat/crypt/hmac.h U src/external/bsd/dhcpcd/dist/compat/crypt/md5.c U src/external/bsd/dhcpcd/dist/compat/crypt/md5.h U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.c U src/external/bsd/dhcpcd/dist/compat/crypt/sha256.h U src/external/bsd/dhcpcd/dist/src/dhcp.c U src/external/bsd/dhcpcd/dist/src/GNUmakefile U src/external/bsd/dhcpcd/dist/src/Makefile U src/external/bsd/dhcpcd/dist/src/arp.c U src/external/bsd/dhcpcd/dist/src/arp.h U src/external/bsd/dhcpcd/dist/src/auth.c U src/external/bsd/dhcpcd/dist/src/auth.h U src/external/bsd/dhcpcd/dist/src/bpf.c U src/external/bsd/dhcpcd/dist/src/bpf.h U src/external/bsd/dhcpcd/dist/src/common.c U src/external/bsd/dhcpcd/dist/src/common.h U src/external/bsd/dhcpcd/dist/src/control.c U src/external/bsd/dhcpcd/dist/src/control.h U src/external/bsd/dhcpcd/dist/src/defs.h U src/external/bsd/dhcpcd/dist/src/dev.c U src/external/bsd/dhcpcd/dist/src/dev.h U src/external/bsd/dhcpcd/dist/src/dhcp-common.c U src/external/bsd/dhcpcd/dist/src/dhcp-common.h U src/external/bsd/dhcpcd/dist/src/dhcp.h U src/external/bsd/dhcpcd/dist/src/dhcp6.c U src/external/bsd/dhcpcd/dist/src/dhcp6.h U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf.5.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions-small.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/src/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/src/dhcpcd.c U src/external/bsd/dhcpcd/dist/src/dhcpcd.conf U src/external/bsd/dhcpcd/dist/src/genembedc U src/external/bsd/dhcpcd/dist/src/dhcpcd.h U src/external/bsd/dhcpcd/dist/src/duid.c U src/external/bsd/dhcpcd/dist/src/duid.h U src/external/bsd/dhcpcd/dist/src/eloop.c U src/external/bsd/dhcpcd/dist/src/eloop.h U src/external/bsd/dhcpcd/dist/src/if-linux-wext.c U src/external/bsd/dhcpcd/dist/src/genembedh U src/external/bsd/dhcpcd/dist/src/if-bsd.c U src/external/bsd/dhcpcd/dist/src/if-linux.c U src/external/bsd/dhcpcd/dist/src/if-options.c U src/external/bsd/dhcpcd/dist/src/if-options.h U src/external/bsd/dhcpcd/dist/src/if-sun.c U src/external/bsd/dhcpcd/dist/src/if.c U src/external/bsd/dhcpcd/dist/src/if.h U src/external/bsd/dhcpcd/dist/src/ipv4.c U src/external/bsd/dhcpcd/dist/src/ipv4.h U src/external/bsd/dhcpcd/dist/src/ipv4ll.c U src/external/bsd/dhcpcd/dist/src/ipv4ll.h U src/external/bsd/dhcpcd/dist/src/ipv6.c U src/external/bsd/dhcpcd/dist/src/ipv6.h U src/external/bsd/dhcpcd/dist/src/ipv6nd.c U src/external/bsd/dhcpcd/dist/src/ipv6nd.h U src/external/bsd/dhcpcd/dist/src/logerr.c U src/external/bsd/dhcpcd/dist/src/logerr.h U src/external/bsd/dhcpcd/dist/src/route.c U src/external/bsd/dhcpcd/dist/src/route.h U src/external/bsd/dhcpcd/dist/src/sa.c U src/external/bsd/dhcpcd/dist/src/sa.h U src/external/bsd/dhcpcd/dist/src/script.c U src/external/bsd/dhcpcd/dist/src/script.h U src/external/bsd/dhcpcd/dist/src/dev/Makefile U
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 13:29:28 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add sunxigmacclk, awge, and rlphy To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 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.35 src/sys/arch/evbarm/conf/SUNXI:1.36 --- src/sys/arch/evbarm/conf/SUNXI:1.35 Fri Oct 6 21:21:22 2017 +++ src/sys/arch/evbarm/conf/SUNXI Sat Oct 7 13:29:28 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: SUNXI,v 1.35 2017/10/06 21:21:22 jmcneill Exp $ +# $NetBSD: SUNXI,v 1.36 2017/10/07 13:29:28 jmcneill Exp $ # # Allwinner sunxi family # @@ -107,6 +107,7 @@ sun8ih3rccu* at fdt? pass 2 # H3 CCU (P sun50ia64ccu* at fdt? pass 2 # A64 CCU sunxiresets* at fdt? pass 1 # Misc. clock resets sunxigates* at fdt? pass 1 # Misc. clock gates +sunxigmacclk* at fdt? pass 2 # GMAC MII/RGMII clock mux fclock* at fdt? pass 1 ffclock* at fdt? pass 1 @@ -134,15 +135,15 @@ sunxiintc* at fdt? pass 1 # Allwinner I sun4idma* at fdt? # DMA controller (sun4i) sun6idma* at fdt? # DMA controller (sun6i) -# Clock and Reset controller - # GPIO controller sunxigpio* at fdt? pass 3 # GPIO gpio* at gpiobus? # Ethernet -sunxiemac* at fdt? # Allwinner Gigabit Ethernet +sunxiemac* at fdt? # Allwinner Gigabit Ethernet (EMAC) +awge* at fdt? # Allwinner Gigabit Ethernet (GMAC) rgephy* at mii? phy ? +rlphy* at mii? phy ? ukphy* at mii? phy ? # UART
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Oct 7 13:29:28 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: SUNXI Log Message: add sunxigmacclk, awge, and rlphy To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 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/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 13:28:59 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sunxi_gmac.c sunxi_gmacclk.c Log Message: Add support for sun6i/sun7i ethernet To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_gmac.c \ src/sys/arch/arm/sunxi/sunxi_gmacclk.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 Oct 7 13:28:59 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: files.sunxi Added Files: src/sys/arch/arm/sunxi: sunxi_gmac.c sunxi_gmacclk.c Log Message: Add support for sun6i/sun7i ethernet To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/arm/sunxi/files.sunxi cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/sunxi/sunxi_gmac.c \ src/sys/arch/arm/sunxi/sunxi_gmacclk.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.28 src/sys/arch/arm/sunxi/files.sunxi:1.29 --- src/sys/arch/arm/sunxi/files.sunxi:1.28 Fri Oct 6 21:20:59 2017 +++ src/sys/arch/arm/sunxi/files.sunxi Sat Oct 7 13:28:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.sunxi,v 1.28 2017/10/06 21:20:59 jmcneill Exp $ +# $NetBSD: files.sunxi,v 1.29 2017/10/07 13:28:59 jmcneill Exp $ # # Configuration info for Allwinner sunxi family SoCs # @@ -73,6 +73,11 @@ device sunxigates attach sunxigates at fdt with sunxi_gates file arch/arm/sunxi/sunxi_gates.c sunxi_gates +# GMAC MII/RGMII clock mux +device sunxigmacclk +attach sunxigmacclk at fdt with sunxi_gmacclk +file arch/arm/sunxi/sunxi_gmacclk.c sunxi_gmacclk + # Interrupt controller device sunxiintc: pic, pic_splfuncs attach sunxiintc at fdt with sunxi_intc @@ -132,6 +137,10 @@ device sunxiemac: arp, ether, ifnet, mii attach sunxiemac at fdt with sunxi_emac file arch/arm/sunxi/sunxi_emac.c sunxi_emac +# GMAC +attach awge at fdt with sunxi_gmac +file arch/arm/sunxi/sunxi_gmac.c sunxi_gmac + # Timer device sunxitimer attach sunxitimer at fdt with sunxi_timer Added files: Index: src/sys/arch/arm/sunxi/sunxi_gmac.c diff -u /dev/null src/sys/arch/arm/sunxi/sunxi_gmac.c:1.1 --- /dev/null Sat Oct 7 13:28:59 2017 +++ src/sys/arch/arm/sunxi/sunxi_gmac.c Sat Oct 7 13:28:59 2017 @@ -0,0 +1,147 @@ +/* $NetBSD: sunxi_gmac.c,v 1.1 2017/10/07 13:28:59 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_gmac.c,v 1.1 2017/10/07 13:28:59 jmcneill Exp $"); + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include + +#define GMAC_TX_RATE_MII 2500 +#define GMAC_TX_RATE_RGMII 12500 + +static const char * compatible[] = { + "allwinner,sun7i-a20-gmac", + NULL +}; + +static int +sunxi_gmac_intr(void *arg) +{ + return dwc_gmac_intr(arg); +} + +static int +sunxi_gmac_match(device_t parent, cfdata_t cf, void *aux) +{ + struct fdt_attach_args * const faa = aux; + + return of_match_compatible(faa->faa_phandle, compatible); +} + +static void +sunxi_gmac_attach(device_t parent, device_t self, void *aux) +{ + struct dwc_gmac_softc * const sc = device_private(self); + struct fdt_attach_args * const faa = aux; + const int phandle = faa->faa_phandle; + struct clk *clk_gmac, *clk_gmac_tx; + const char *phy_mode; + char intrstr[128]; + bus_addr_t addr; + bus_size_t size; + + if (fdtbus_get_reg(phandle, 0, , ) != 0) { + aprint_error(": couldn't get registers\n"); + return; + } + + sc->sc_dev = self; + sc->sc_bst = faa->faa_bst; + if (bus_space_map(sc->sc_bst, addr, size, 0, >sc_bsh) != 0) { + aprint_error(": couldn't map registers\n"); + return; + } + sc->sc_dmat = faa->faa_dmat; + + if (!fdtbus_intr_str(phandle, 0, intrstr, sizeof(intrstr))) { + aprint_error(": failed to decode interrupt\n"); + return; + } + + clk_gmac =
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 12:22:29 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun4i_a10_ccu.c Log Message: Add mmc sample and output phase clocks To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sun4i_a10_ccu.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 Oct 7 12:22:29 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sun4i_a10_ccu.c Log Message: Add mmc sample and output phase clocks To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sun4i_a10_ccu.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/sun4i_a10_ccu.c diff -u src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.1 src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.2 --- src/sys/arch/arm/sunxi/sun4i_a10_ccu.c:1.1 Fri Oct 6 21:09:21 2017 +++ src/sys/arch/arm/sunxi/sun4i_a10_ccu.c Sat Oct 7 12:22:29 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sun4i_a10_ccu.c,v 1.1 2017/10/06 21:09:21 jmcneill Exp $ */ +/* $NetBSD: sun4i_a10_ccu.c,v 1.2 2017/10/07 12:22:29 jmcneill Exp $ */ /*- * Copyright (c) 2017 Jared McNeill@@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.1 2017/10/06 21:09:21 jmcneill Exp $"); +__KERNEL_RCSID(1, "$NetBSD: sun4i_a10_ccu.c,v 1.2 2017/10/07 12:22:29 jmcneill Exp $"); #include #include @@ -184,6 +184,10 @@ static struct sunxi_ccu_clk sun4i_a10_cc __BITS(25,24), /* sel */ __BIT(31), /* enable */ SUNXI_CCU_NM_POWER_OF_TWO), + SUNXI_CCU_PHASE(A10_CLK_MMC0_SAMPLE, "mmc0_sample", "mmc0", + SD0_SCLK_CFG_REG, __BITS(22,20)), + SUNXI_CCU_PHASE(A10_CLK_MMC0_OUTPUT, "mmc0_output", "mmc0", + SD0_SCLK_CFG_REG, __BITS(10,8)), SUNXI_CCU_NM(A10_CLK_MMC1, "mmc1", mod_parents, SD1_SCLK_CFG_REG, /* reg */ __BITS(17,16), /* n */ @@ -191,6 +195,10 @@ static struct sunxi_ccu_clk sun4i_a10_cc __BITS(25,24), /* sel */ __BIT(31), /* enable */ SUNXI_CCU_NM_POWER_OF_TWO), + SUNXI_CCU_PHASE(A10_CLK_MMC1_SAMPLE, "mmc1_sample", "mmc1", + SD1_SCLK_CFG_REG, __BITS(22,20)), + SUNXI_CCU_PHASE(A10_CLK_MMC1_OUTPUT, "mmc1_output", "mmc1", + SD1_SCLK_CFG_REG, __BITS(10,8)), SUNXI_CCU_NM(A10_CLK_MMC2, "mmc2", mod_parents, SD2_SCLK_CFG_REG, /* reg */ __BITS(17,16), /* n */ @@ -198,6 +206,10 @@ static struct sunxi_ccu_clk sun4i_a10_cc __BITS(25,24), /* sel */ __BIT(31), /* enable */ SUNXI_CCU_NM_POWER_OF_TWO), + SUNXI_CCU_PHASE(A10_CLK_MMC2_SAMPLE, "mmc2_sample", "mmc2", + SD2_SCLK_CFG_REG, __BITS(22,20)), + SUNXI_CCU_PHASE(A10_CLK_MMC2_OUTPUT, "mmc2_output", "mmc2", + SD2_SCLK_CFG_REG, __BITS(10,8)), SUNXI_CCU_NM(A10_CLK_MMC3, "mmc3", mod_parents, SD3_SCLK_CFG_REG, /* reg */ __BITS(17,16), /* n */ @@ -205,6 +217,10 @@ static struct sunxi_ccu_clk sun4i_a10_cc __BITS(25,24), /* sel */ __BIT(31), /* enable */ SUNXI_CCU_NM_POWER_OF_TWO), + SUNXI_CCU_PHASE(A10_CLK_MMC3_SAMPLE, "mmc3_sample", "mmc3", + SD3_SCLK_CFG_REG, __BITS(22,20)), + SUNXI_CCU_PHASE(A10_CLK_MMC3_OUTPUT, "mmc3_output", "mmc3", + SD3_SCLK_CFG_REG, __BITS(10,8)), /* AHB_GATING_REG0 */ SUNXI_CCU_GATE(A10_CLK_AHB_OTG, "ahb-otg", "ahb",
CVS commit: src/sys/arch/arm/sunxi
Module Name:src Committed By: jmcneill Date: Sat Oct 7 12:21:53 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Fix maximum xfer length for sun7i-a20 compatible controllers To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/sunxi/sunxi_mmc.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 Oct 7 12:21:53 UTC 2017 Modified Files: src/sys/arch/arm/sunxi: sunxi_mmc.c Log Message: Fix maximum xfer length for sun7i-a20 compatible controllers To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/sunxi/sunxi_mmc.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_mmc.c diff -u src/sys/arch/arm/sunxi/sunxi_mmc.c:1.7 src/sys/arch/arm/sunxi/sunxi_mmc.c:1.8 --- src/sys/arch/arm/sunxi/sunxi_mmc.c:1.7 Mon Sep 11 22:00:05 2017 +++ src/sys/arch/arm/sunxi/sunxi_mmc.c Sat Oct 7 12:21:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: sunxi_mmc.c,v 1.7 2017/09/11 22:00:05 jmcneill Exp $ */ +/* $NetBSD: sunxi_mmc.c,v 1.8 2017/10/07 12:21:53 jmcneill Exp $ */ /*- * Copyright (c) 2014-2017 Jared McNeill@@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.7 2017/09/11 22:00:05 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunxi_mmc.c,v 1.8 2017/10/07 12:21:53 jmcneill Exp $"); #include #include @@ -179,7 +179,7 @@ static const struct sunxi_mmc_config sun }; static const struct sunxi_mmc_config sun7i_a20_mmc_config = { - .idma_xferlen = 0x1, + .idma_xferlen = 0x2000, .dma_ftrglevel = 0x20070008, .delays = sunxi_mmc_delays, .flags = 0,
CVS commit: src/sys/arch/i386/stand/boot
Module Name:src Committed By: maxv Date: Sat Oct 7 10:32:56 UTC 2017 Modified Files: src/sys/arch/i386/stand/boot: version Log Message: Bump bootloader version, support for booting KASLR amd64 kernels. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/stand/boot/version Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/stand/boot
Module Name:src Committed By: maxv Date: Sat Oct 7 10:32:56 UTC 2017 Modified Files: src/sys/arch/i386/stand/boot: version Log Message: Bump bootloader version, support for booting KASLR amd64 kernels. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/stand/boot/version 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/stand/boot/version diff -u src/sys/arch/i386/stand/boot/version:1.16 src/sys/arch/i386/stand/boot/version:1.17 --- src/sys/arch/i386/stand/boot/version:1.16 Fri Aug 30 16:43:33 2013 +++ src/sys/arch/i386/stand/boot/version Sat Oct 7 10:32:56 2017 @@ -1,4 +1,4 @@ -$NetBSD: version,v 1.16 2013/08/30 16:43:33 jmcneill Exp $ +$NetBSD: version,v 1.17 2017/10/07 10:32:56 maxv Exp $ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important - make sure the entries are appended on end, last item @@ -48,3 +48,4 @@ is taken as the current. 5.8: Support for splash images. 5.9: VESA VBE/DDC EDID support. 5.10: Support for using raw file-system images as memory disks. +5.11: Support for booting KASLR amd64 kernels.
CVS commit: src/sys
Module Name:src Committed By: maxv Date: Sat Oct 7 10:26:39 UTC 2017 Modified Files: src/sys/arch/i386/stand/boot: boot2.c src/sys/arch/i386/stand/lib: exec.c src/sys/arch/x86/include: bootinfo.h src/sys/lib/libsa: loadfile.h loadfile_elf32.c Log Message: Add a new option in libsa, to load dynamic binaries. A separate function is used, and it does not break in any way the generic static loader. Then, add a new "pkboot" command in the x86 bootloader, which boots a GENERIC_KASLR kernel via the prekern. (See thread on tech-kern@.) To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/i386/stand/boot/boot2.c cvs rdiff -u -r1.68 -r1.69 src/sys/arch/i386/stand/lib/exec.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x86/include/bootinfo.h cvs rdiff -u -r1.13 -r1.14 src/sys/lib/libsa/loadfile.h cvs rdiff -u -r1.43 -r1.44 src/sys/lib/libsa/loadfile_elf32.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/i386/stand/boot/boot2.c diff -u src/sys/arch/i386/stand/boot/boot2.c:1.66 src/sys/arch/i386/stand/boot/boot2.c:1.67 --- src/sys/arch/i386/stand/boot/boot2.c:1.66 Wed Feb 3 05:27:53 2016 +++ src/sys/arch/i386/stand/boot/boot2.c Sat Oct 7 10:26:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: boot2.c,v 1.66 2016/02/03 05:27:53 christos Exp $ */ +/* $NetBSD: boot2.c,v 1.67 2017/10/07 10:26:38 maxv Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -121,6 +121,7 @@ void command_ls(char *); #endif void command_quit(char *); void command_boot(char *); +void command_pkboot(char *); void command_dev(char *); void command_consdev(char *); #ifndef SMALL @@ -137,6 +138,7 @@ const struct bootblk_command commands[] #endif { "quit", command_quit }, { "boot", command_boot }, + { "pkboot", command_pkboot }, { "dev", command_dev }, { "consdev", command_consdev }, #ifndef SMALL @@ -470,6 +472,14 @@ command_boot(char *arg) } void +command_pkboot(char *arg) +{ + extern int has_prekern; + has_prekern = 1; + command_boot(arg); +} + +void command_dev(char *arg) { static char savedevname[MAXDEVNAME + 1]; Index: src/sys/arch/i386/stand/lib/exec.c diff -u src/sys/arch/i386/stand/lib/exec.c:1.68 src/sys/arch/i386/stand/lib/exec.c:1.69 --- src/sys/arch/i386/stand/lib/exec.c:1.68 Fri Mar 24 08:50:17 2017 +++ src/sys/arch/i386/stand/lib/exec.c Sat Oct 7 10:26:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.c,v 1.68 2017/03/24 08:50:17 nonaka Exp $ */ +/* $NetBSD: exec.c,v 1.69 2017/10/07 10:26:38 maxv Exp $ */ /* * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -266,6 +266,67 @@ userconf_add(char *cmd) } } +struct btinfo_prekern bi_prekern; +int has_prekern = 0; + +static int +common_load_prekern(const char *file, u_long *basemem, u_long *extmem, +physaddr_t loadaddr, int floppy, u_long marks[MARK_MAX]) +{ + paddr_t kernpa_start, kernpa_end; + char prekernpath[] = "/prekern"; + int fd, flags; + + *extmem = getextmem(); + *basemem = getbasemem(); + + marks[MARK_START] = loadaddr; + + /* Load the prekern (static) */ + flags = LOAD_KERNEL & ~(LOAD_HDR|COUNT_HDR|LOAD_SYM|COUNT_SYM); + if ((fd = loadfile(prekernpath, marks, flags)) == -1) + return EIO; + close(fd); + + marks[MARK_END] = (1UL << 21); /* the kernel starts at 2MB XXX */ + kernpa_start = marks[MARK_END]; + + /* Load the kernel (dynamic) */ + flags = (LOAD_KERNEL | LOAD_DYN) & ~(floppy ? LOAD_BACKWARDS : 0); + if ((fd = loadfile(file, marks, flags)) == -1) + return EIO; + close(fd); + + kernpa_end = marks[MARK_END]; + + /* If the root fs type is unusual, load its module. */ + if (fsmod != NULL) + module_add_common(fsmod, BM_TYPE_KMOD); + + bi_prekern.kernpa_start = kernpa_start; + bi_prekern.kernpa_end = kernpa_end; + BI_ADD(_prekern, BTINFO_PREKERN, sizeof(struct btinfo_prekern)); + + /* + * Gather some information for the kernel. Do this after the + * "point of no return" to avoid memory leaks. + * (but before DOS might be trashed in the XMS case) + */ +#ifdef PASS_BIOSGEOM + bi_getbiosgeom(); +#endif +#ifdef PASS_MEMMAP + bi_getmemmap(); +#endif + + marks[MARK_END] = (((u_long)marks[MARK_END] + sizeof(int) - 1)) & + (-sizeof(int)); + image_end = marks[MARK_END]; + kernel_loaded = true; + + return 0; +} + static int common_load_kernel(const char *file, u_long *basemem, u_long *extmem, physaddr_t loadaddr, int floppy, u_long marks[MARK_MAX]) @@ -380,8 +441,13 @@ exec_netbsd(const char *file, physaddr_t memset(marks, 0, sizeof(marks)); - error = common_load_kernel(file, , , loadaddr, floppy, - marks); + if (has_prekern) { + error = common_load_prekern(file, , , loadaddr, + floppy, marks); + } else { + error = common_load_kernel(file, , , loadaddr, + floppy, marks); + } if (error) { errno = error; goto out; Index: src/sys/arch/x86/include/bootinfo.h diff -u src/sys/arch/x86/include/bootinfo.h:1.26