CVS commit: src/doc
Module Name:src Committed By: wiz Date: Sat Nov 5 18:38:08 UTC 2022 Modified Files: src/doc: 3RDPARTY Log Message: openssl 1.1.1s/3.0.7 out To generate a diff of this commit: cvs rdiff -u -r1.1898 -r1.1899 src/doc/3RDPARTY 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.1898 src/doc/3RDPARTY:1.1899 --- src/doc/3RDPARTY:1.1898 Sun Oct 30 01:05:47 2022 +++ src/doc/3RDPARTY Sat Nov 5 18:38:08 2022 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1898 2022/10/30 01:05:47 kre Exp $ +# $NetBSD: 3RDPARTY,v 1.1899 2022/11/05 18:38:08 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1117,7 +1117,7 @@ markus is very cooperative about it): Package: OpenSSL Version: 1.0.2o/1.1.1n -Current Vers: 1.0.2zd/1.1.1q/3.0.5 +Current Vers: 1.0.2zd/1.1.1s/3.0.7 Maintainer: The OpenSSL Project Archive Site: ftp://ftp.openssl.org/source/ Home Page: http://www.openssl.org/
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Sat Nov 5 18:38:08 UTC 2022 Modified Files: src/doc: 3RDPARTY Log Message: openssl 1.1.1s/3.0.7 out To generate a diff of this commit: cvs rdiff -u -r1.1898 -r1.1899 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/crypto
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:36:33 UTC 2022 Modified Files: src/sys/crypto/aes: aes_impl.c src/sys/crypto/chacha: chacha_impl.c Log Message: Make aes and chacha prints debug only. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/crypto/aes/aes_impl.c cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/chacha/chacha_impl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/crypto
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:36:33 UTC 2022 Modified Files: src/sys/crypto/aes: aes_impl.c src/sys/crypto/chacha: chacha_impl.c Log Message: Make aes and chacha prints debug only. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/crypto/aes/aes_impl.c cvs rdiff -u -r1.3 -r1.4 src/sys/crypto/chacha/chacha_impl.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/crypto/aes/aes_impl.c diff -u src/sys/crypto/aes/aes_impl.c:1.9 src/sys/crypto/aes/aes_impl.c:1.10 --- src/sys/crypto/aes/aes_impl.c:1.9 Mon Jul 27 20:45:15 2020 +++ src/sys/crypto/aes/aes_impl.c Sat Nov 5 17:36:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: aes_impl.c,v 1.9 2020/07/27 20:45:15 riastradh Exp $ */ +/* $NetBSD: aes_impl.c,v 1.10 2022/11/05 17:36:33 jmcneill Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: aes_impl.c,v 1.9 2020/07/27 20:45:15 riastradh Exp $"); +__KERNEL_RCSID(1, "$NetBSD: aes_impl.c,v 1.10 2022/11/05 17:36:33 jmcneill Exp $"); #include #include @@ -121,7 +121,7 @@ aes_select(void) if (aes_impl == NULL) panic("AES self-tests failed"); - aprint_verbose("aes: %s\n", aes_impl->ai_name); + aprint_debug("aes: %s\n", aes_impl->ai_name); return 0; } Index: src/sys/crypto/chacha/chacha_impl.c diff -u src/sys/crypto/chacha/chacha_impl.c:1.3 src/sys/crypto/chacha/chacha_impl.c:1.4 --- src/sys/crypto/chacha/chacha_impl.c:1.3 Mon Jul 27 20:49:10 2020 +++ src/sys/crypto/chacha/chacha_impl.c Sat Nov 5 17:36:33 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: chacha_impl.c,v 1.3 2020/07/27 20:49:10 riastradh Exp $ */ +/* $NetBSD: chacha_impl.c,v 1.4 2022/11/05 17:36:33 jmcneill Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -84,7 +84,7 @@ chacha_select(void) chacha_impl = chacha_md_impl; } - aprint_verbose("chacha: %s\n", chacha_impl->ci_name); + aprint_debug("chacha: %s\n", chacha_impl->ci_name); return 0; }
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:32:03 UTC 2022 Modified Files: src/sys/arch/evbarm/conf: GENERIC Log Message: Add cdnsiic and lmtemp To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/evbarm/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/conf/GENERIC diff -u src/sys/arch/evbarm/conf/GENERIC:1.113 src/sys/arch/evbarm/conf/GENERIC:1.114 --- src/sys/arch/evbarm/conf/GENERIC:1.113 Mon Oct 31 22:45:38 2022 +++ src/sys/arch/evbarm/conf/GENERIC Sat Nov 5 17:32:03 2022 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC,v 1.113 2022/10/31 22:45:38 jmcneill Exp $ +# $NetBSD: GENERIC,v 1.114 2022/11/05 17:32:03 jmcneill Exp $ # # GENERIC ARM (aarch32) kernel # @@ -359,6 +359,7 @@ zynquart* at fdt? pass 4 # Cadence UAR # I2C controllers options I2C_MAX_ADDR=0xfff bsciic* at fdt? # Broadcom BCM283x Serial Control +cdnsiic* at fdt? pass 4 # Cadence I2C exyoi2c* at fdt? # Samsung Exynos I2C imxi2c* at fdt? pass 4 # i.MX I2C rkiic* at fdt? pass 4 # Rockchip I2C @@ -380,6 +381,7 @@ axppmic* at iic? # X-Powers AXP Power axpreg* at axppmic? dsrtc* at iic? # Dallas Semiconductor RTCs em3027rtc* at iic? +lmtemp* at iic? # National Semiconductor LM7x max77620pmic* at iic? pcaiicmux* at iic? # PCA954x / PCA984x I2C switch / mux pcf8563rtc* at iic? # PCF8563 RTC
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:32:03 UTC 2022 Modified Files: src/sys/arch/evbarm/conf: GENERIC Log Message: Add cdnsiic and lmtemp To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/arch/evbarm/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:31:38 UTC 2022 Modified Files: src/sys/conf: files src/sys/dev/fdt: files.fdt Added Files: src/sys/dev/fdt: cdnsiic_fdt.c src/sys/dev/ic: cdnsiic.c cdnsiicvar.h Log Message: Add driver for Cadence I2C controller. To generate a diff of this commit: cvs rdiff -u -r1.1302 -r1.1303 src/sys/conf/files cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/cdnsiic_fdt.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/fdt/files.fdt cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/cdnsiic.c src/sys/dev/ic/cdnsiicvar.h 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: jmcneill Date: Sat Nov 5 17:31:38 UTC 2022 Modified Files: src/sys/conf: files src/sys/dev/fdt: files.fdt Added Files: src/sys/dev/fdt: cdnsiic_fdt.c src/sys/dev/ic: cdnsiic.c cdnsiicvar.h Log Message: Add driver for Cadence I2C controller. To generate a diff of this commit: cvs rdiff -u -r1.1302 -r1.1303 src/sys/conf/files cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/cdnsiic_fdt.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/fdt/files.fdt cvs rdiff -u -r0 -r1.1 src/sys/dev/ic/cdnsiic.c src/sys/dev/ic/cdnsiicvar.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/conf/files diff -u src/sys/conf/files:1.1302 src/sys/conf/files:1.1303 --- src/sys/conf/files:1.1302 Fri Oct 28 07:16:34 2022 +++ src/sys/conf/files Sat Nov 5 17:31:38 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1302 2022/10/28 07:16:34 skrll Exp $ +# $NetBSD: files,v 1.1303 2022/11/05 17:31:38 jmcneill Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20171118 @@ -1159,6 +1159,11 @@ define dwiic device dwiic: dwiic, i2cbus file dev/ic/dwiic.c dwiic +# Cadence I2C controller +define cdnsiic +device cdnsiic: i2cbus +file dev/ic/cdnsiic.c cdnsiic + # ACPI power management timer (hardware access, independent of ACPI) # define acpipmtimer Index: src/sys/dev/fdt/files.fdt diff -u src/sys/dev/fdt/files.fdt:1.65 src/sys/dev/fdt/files.fdt:1.66 --- src/sys/dev/fdt/files.fdt:1.65 Wed Jul 20 10:01:11 2022 +++ src/sys/dev/fdt/files.fdt Sat Nov 5 17:31:37 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files.fdt,v 1.65 2022/07/20 10:01:11 riastradh Exp $ +# $NetBSD: files.fdt,v 1.66 2022/11/05 17:31:37 jmcneill Exp $ include "external/bsd/libfdt/conf/files.libfdt" @@ -185,6 +185,10 @@ file dev/fdt/ahcisata_fdt.c ahcisata_f attach dwiic at fdt with dwiic_fdt file dev/fdt/dwiic_fdt.c dwiic_fdt +# Cadence I2C +attach cdnsiic at fdt with cdnsiic_fdt +file dev/fdt/cdnsiic_fdt.c cdnsiic_fdt + # AMD Cryptographic Coprocessor attach amdccp at fdt with amdccp_fdt file dev/fdt/amdccp_fdt.c amdccp_fdt Added files: Index: src/sys/dev/fdt/cdnsiic_fdt.c diff -u /dev/null src/sys/dev/fdt/cdnsiic_fdt.c:1.1 --- /dev/null Sat Nov 5 17:31:38 2022 +++ src/sys/dev/fdt/cdnsiic_fdt.c Sat Nov 5 17:31:37 2022 @@ -0,0 +1,103 @@ +/* $NetBSD: cdnsiic_fdt.c,v 1.1 2022/11/05 17:31:37 jmcneill Exp $ */ + +/*- + * Copyright (c) 2022 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: cdnsiic_fdt.c,v 1.1 2022/11/05 17:31:37 jmcneill Exp $"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +static const struct device_compatible_entry compat_data[] = { + { .compat = "cdns,i2c-r1p10" }, + { .compat = "cdns,i2c-r1p14" }, + DEVICE_COMPAT_EOL +}; + +static int +cdnsiic_fdt_match(device_t parent, cfdata_t cf, void *aux) +{ + struct fdt_attach_args * const faa = aux; + + return of_compatible_match(faa->faa_phandle, compat_data); +} + +static void +cdnsiic_fdt_attach(device_t parent, device_t self, void *aux) +{ + struct cdnsiic_softc * const sc = device_private(self); + struct fdt_attach_args * const faa = aux; + const int phandle = faa->faa_phandle; + bus_addr_t addr; + bus_size_t size; + int error; + + if (fdtbus_get_reg(phandle, 0, &addr, &size) != 0) { + aprint_error(": couldn't get registers\n"); + return; + } + + sc->sc_pclk = fdtbus_clock_get_index(phandle, 0); + if (sc->sc_pclk == NULL || clk_enable(sc->sc_pclk) != 0) { + aprint_error(": couldn't enable pclk\n"); + return; + } + + if
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:30:20 UTC 2022 Modified Files: src/sys/arch/arm/cortex: a9ptmr.c a9ptmr_var.h Log Message: Handle speed change events To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/a9ptmr.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cortex/a9ptmr_var.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/cortex/a9ptmr.c diff -u src/sys/arch/arm/cortex/a9ptmr.c:1.2 src/sys/arch/arm/cortex/a9ptmr.c:1.3 --- src/sys/arch/arm/cortex/a9ptmr.c:1.2 Wed Aug 14 09:20:00 2019 +++ src/sys/arch/arm/cortex/a9ptmr.c Sat Nov 5 17:30:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: a9ptmr.c,v 1.2 2019/08/14 09:20:00 skrll Exp $ */ +/* $NetBSD: a9ptmr.c,v 1.3 2022/11/05 17:30:20 jmcneill Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -30,13 +30,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: a9ptmr.c,v 1.2 2019/08/14 09:20:00 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: a9ptmr.c,v 1.3 2022/11/05 17:30:20 jmcneill Exp $"); #include #include #include #include #include +#include #include @@ -265,3 +266,25 @@ a9ptmr_intr(void *arg) return 1; } + +static void +a9ptmr_update_freq_cb(void *arg1, void *arg2) +{ + a9ptmr_init_cpu_clock(curcpu()); +} + +void +a9ptmr_update_freq(uint32_t freq) +{ + struct a9ptmr_softc * const sc = a9ptmr_sc; + uint64_t xc; + + KASSERT(sc->sc_dev != NULL); + KASSERT(freq != 0); + + sc->sc_freq = freq; + sc->sc_load = (sc->sc_freq / hz) - 1; + + xc = xc_broadcast(0, a9ptmr_update_freq_cb, NULL, NULL); + xc_wait(xc); +} Index: src/sys/arch/arm/cortex/a9ptmr_var.h diff -u src/sys/arch/arm/cortex/a9ptmr_var.h:1.1 src/sys/arch/arm/cortex/a9ptmr_var.h:1.2 --- src/sys/arch/arm/cortex/a9ptmr_var.h:1.1 Sat Aug 10 17:03:59 2019 +++ src/sys/arch/arm/cortex/a9ptmr_var.h Sat Nov 5 17:30:20 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: a9ptmr_var.h,v 1.1 2019/08/10 17:03:59 skrll Exp $ */ +/* $NetBSD: a9ptmr_var.h,v 1.2 2022/11/05 17:30:20 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -39,6 +39,7 @@ struct cpu_info; void a9ptmr_init_cpu_clock(struct cpu_info *); int a9ptmr_intr(void *); +void a9ptmr_update_freq(uint32_t); void a9ptmr_delay(unsigned int n); #endif
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:30:20 UTC 2022 Modified Files: src/sys/arch/arm/cortex: a9ptmr.c a9ptmr_var.h Log Message: Handle speed change events To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/cortex/a9ptmr.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/cortex/a9ptmr_var.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/fdt
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:30:07 UTC 2022 Modified Files: src/sys/arch/arm/fdt: a9ptmr_fdt.c Log Message: Handle speed change events To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/fdt/a9ptmr_fdt.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/fdt
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:30:07 UTC 2022 Modified Files: src/sys/arch/arm/fdt: a9ptmr_fdt.c Log Message: Handle speed change events To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/fdt/a9ptmr_fdt.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/fdt/a9ptmr_fdt.c diff -u src/sys/arch/arm/fdt/a9ptmr_fdt.c:1.6 src/sys/arch/arm/fdt/a9ptmr_fdt.c:1.7 --- src/sys/arch/arm/fdt/a9ptmr_fdt.c:1.6 Tue Nov 1 11:05:18 2022 +++ src/sys/arch/arm/fdt/a9ptmr_fdt.c Sat Nov 5 17:30:06 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: a9ptmr_fdt.c,v 1.6 2022/11/01 11:05:18 jmcneill Exp $ */ +/* $NetBSD: a9ptmr_fdt.c,v 1.7 2022/11/05 17:30:06 jmcneill Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: a9ptmr_fdt.c,v 1.6 2022/11/01 11:05:18 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: a9ptmr_fdt.c,v 1.7 2022/11/05 17:30:06 jmcneill Exp $"); #include #include @@ -50,6 +50,7 @@ static int a9ptmr_fdt_match(device_t, cf static void a9ptmr_fdt_attach(device_t, device_t, void *); static void a9ptmr_fdt_cpu_hatch(void *, struct cpu_info *); +static void a9ptmr_fdt_speed_changed(device_t); struct a9ptmr_fdt_softc { device_t sc_dev; @@ -144,6 +145,8 @@ a9ptmr_fdt_attach(device_t parent, devic arm_fdt_cpu_hatch_register(self, a9ptmr_fdt_cpu_hatch); arm_fdt_timer_register(a9ptmr_cpu_initclocks); } + + pmf_event_register(self, PMFE_SPEED_CHANGED, a9ptmr_fdt_speed_changed, true); } static void @@ -151,3 +154,16 @@ a9ptmr_fdt_cpu_hatch(void *priv, struct { a9ptmr_init_cpu_clock(ci); } + +static void +a9ptmr_fdt_speed_changed(device_t dev) +{ + struct a9ptmr_fdt_softc * const sc = device_private(dev); + prop_dictionary_t dict = device_properties(dev); + uint32_t rate; + + rate = clk_get_rate(sc->sc_clk); + prop_dictionary_set_uint32(dict, "frequency", rate); + + a9ptmr_update_freq(rate); +}
CVS commit: src/sys/arch/arm/xilinx
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:28:55 UTC 2022 Modified Files: src/sys/arch/arm/xilinx: zynq7000_clkc.c Log Message: Add I2C clocks To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/xilinx/zynq7000_clkc.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/xilinx/zynq7000_clkc.c diff -u src/sys/arch/arm/xilinx/zynq7000_clkc.c:1.3 src/sys/arch/arm/xilinx/zynq7000_clkc.c:1.4 --- src/sys/arch/arm/xilinx/zynq7000_clkc.c:1.3 Wed Oct 26 22:14:22 2022 +++ src/sys/arch/arm/xilinx/zynq7000_clkc.c Sat Nov 5 17:28:55 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: zynq7000_clkc.c,v 1.3 2022/10/26 22:14:22 jmcneill Exp $ */ +/* $NetBSD: zynq7000_clkc.c,v 1.4 2022/11/05 17:28:55 jmcneill Exp $ */ /*- * Copyright (c) 2022 Jared McNeill @@ -28,7 +28,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: zynq7000_clkc.c,v 1.3 2022/10/26 22:14:22 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zynq7000_clkc.c,v 1.4 2022/11/05 17:28:55 jmcneill Exp $"); #include #include @@ -56,6 +56,8 @@ __KERNEL_RCSID(0, "$NetBSD: zynq7000_clk #define APER_CLK_CTRL 0x12c #define UART1_CPU_1XCLKACT __BIT(21) #define UART0_CPU_1XCLKACT __BIT(20) +#define I2C1_CPU_1XCLKACT __BIT(19) +#define I2C0_CPU_1XCLKACT __BIT(18) #define SDI1_CPU_1XCLKACT __BIT(11) #define SDI0_CPU_1XCLKACT __BIT(10) #define SDIO_CLK_CTRL 0x150 @@ -246,7 +248,9 @@ zynq7000_clkc_clk_get_rate(void *priv, s clk == &sc->sc_clk[clkid_uart1]) { return zynq7000_clkc_get_rate_iop(sc, UART_CLK_CTRL); } else if (clk == &sc->sc_clk[clkid_uart0_aper] || - clk == &sc->sc_clk[clkid_uart1_aper]) { + clk == &sc->sc_clk[clkid_uart1_aper] || + clk == &sc->sc_clk[clkid_i2c0_aper] || + clk == &sc->sc_clk[clkid_i2c1_aper]) { return zynq7000_clkc_clk_get_rate(sc, &sc->sc_clk[clkid_cpu_1x]); } else { @@ -298,6 +302,12 @@ zynq7000_clkc_clk_enable(void *priv, str } else if (clk == &sc->sc_clk[clkid_uart1_aper]) { reg = APER_CLK_CTRL; mask = UART1_CPU_1XCLKACT; + } else if (clk == &sc->sc_clk[clkid_i2c0_aper]) { + reg = APER_CLK_CTRL; + mask = I2C0_CPU_1XCLKACT; + } else if (clk == &sc->sc_clk[clkid_i2c1_aper]) { + reg = APER_CLK_CTRL; + mask = I2C1_CPU_1XCLKACT; } else { return ENXIO; }
CVS commit: src/sys/arch/arm/xilinx
Module Name:src Committed By: jmcneill Date: Sat Nov 5 17:28:55 UTC 2022 Modified Files: src/sys/arch/arm/xilinx: zynq7000_clkc.c Log Message: Add I2C clocks To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/xilinx/zynq7000_clkc.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/regex
Module Name:src Committed By: riastradh Date: Sat Nov 5 11:33:55 UTC 2022 Modified Files: src/lib/libc/regex: regerror.c Log Message: regerror(3): Allow null errbuf if errbuf_size is zero. The man page says: If errbuf_size is 0, errbuf is ignored but the return value is still correct. POSIX says: If errbuf_size is 0, regerror() shall ignore the errbuf argument, and return the size of the buffer needed to hold the generated string. https://pubs.opengroup.org/onlinepubs/9699919799/functions/regerror.html from e...@google.com To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/regex/regerror.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/regex/regerror.c diff -u src/lib/libc/regex/regerror.c:1.25 src/lib/libc/regex/regerror.c:1.26 --- src/lib/libc/regex/regerror.c:1.25 Fri Feb 26 19:24:47 2021 +++ src/lib/libc/regex/regerror.c Sat Nov 5 11:33:55 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: regerror.c,v 1.25 2021/02/26 19:24:47 christos Exp $ */ +/* $NetBSD: regerror.c,v 1.26 2022/11/05 11:33:55 riastradh Exp $ */ /*- * SPDX-License-Identifier: BSD-3-Clause @@ -46,7 +46,7 @@ static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94"; __FBSDID("$FreeBSD: head/lib/libc/regex/regerror.c 326025 2017-11-20 19:49:47Z pfg $"); #endif -__RCSID("$NetBSD: regerror.c,v 1.25 2021/02/26 19:24:47 christos Exp $"); +__RCSID("$NetBSD: regerror.c,v 1.26 2022/11/05 11:33:55 riastradh Exp $"); #include "namespace.h" #include @@ -139,7 +139,7 @@ regerror(int errcode, char convbuf[50]; _DIAGASSERT(errcode != REG_ATOI || preg != NULL); - _DIAGASSERT(errbuf != NULL); + _DIAGASSERT(errbuf_size == 0 || errbuf != NULL); if (errcode == REG_ATOI) { s = regatoi(preg, convbuf, sizeof convbuf);
CVS commit: src/lib/libc/regex
Module Name:src Committed By: riastradh Date: Sat Nov 5 11:33:55 UTC 2022 Modified Files: src/lib/libc/regex: regerror.c Log Message: regerror(3): Allow null errbuf if errbuf_size is zero. The man page says: If errbuf_size is 0, errbuf is ignored but the return value is still correct. POSIX says: If errbuf_size is 0, regerror() shall ignore the errbuf argument, and return the size of the buffer needed to hold the generated string. https://pubs.opengroup.org/onlinepubs/9699919799/functions/regerror.html from e...@google.com To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/regex/regerror.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Nov 5 11:21:06 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Ticket #1550 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-9.4 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-9.4 diff -u src/doc/CHANGES-9.4:1.1.2.28 src/doc/CHANGES-9.4:1.1.2.29 --- src/doc/CHANGES-9.4:1.1.2.28 Thu Oct 27 16:15:57 2022 +++ src/doc/CHANGES-9.4 Sat Nov 5 11:21:06 2022 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.4,v 1.1.2.28 2022/10/27 16:15:57 martin Exp $ +# $NetBSD: CHANGES-9.4,v 1.1.2.29 2022/11/05 11:21:06 martin Exp $ A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4 release: @@ -433,3 +433,9 @@ bin/sh/miscbltin.c1.51,1.52 and cosmetic improvements to error reporting. [kre, ticket #1549] +sys/dev/usb/uhidev.c1.94 + + PR 57031: back out rev 1.82 "Do not explicitly set the HID Report + Protocol upon attach", pulled up for 9.3 in ticket #1428. + [jmcneill, ticket #1550] +
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Nov 5 11:21:06 UTC 2022 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Ticket #1550 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-9.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sat Nov 5 11:19:50 UTC 2022 Modified Files: src/sys/dev/usb [netbsd-9]: uhidev.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1550): sys/dev/usb/uhidev.c: revision 1.94 Back out r1.82 ("Do not explicitly set the HID Report Protocol upon attach") due to the regression reported in PR 57031 To generate a diff of this commit: cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/sys/dev/usb/uhidev.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/usb/uhidev.c diff -u src/sys/dev/usb/uhidev.c:1.75.2.2 src/sys/dev/usb/uhidev.c:1.75.2.3 --- src/sys/dev/usb/uhidev.c:1.75.2.2 Wed Feb 16 14:36:12 2022 +++ src/sys/dev/usb/uhidev.c Sat Nov 5 11:19:49 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: uhidev.c,v 1.75.2.2 2022/02/16 14:36:12 martin Exp $ */ +/* $NetBSD: uhidev.c,v 1.75.2.3 2022/11/05 11:19:49 martin Exp $ */ /* * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.75.2.2 2022/02/16 14:36:12 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.75.2.3 2022/11/05 11:19:49 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -169,16 +169,8 @@ uhidev_attach(device_t parent, device_t } (void)usbd_set_idle(iface, 0, 0); -#if 0 - /* - * HID 1.11 says we should do this, but the device firmware is - * supposed to come up in Report Protocol after reset anyway, and - * apparently explicitly requesting it confuses some devices. - */ - if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0 && - id->bInterfaceSubClass == UISUBCLASS_BOOT) + if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0) (void)usbd_set_protocol(iface, 1); -#endif maxinpktsize = 0; sc->sc_iep_addr = sc->sc_oep_addr = -1;
CVS commit: [netbsd-9] src/sys/dev/usb
Module Name:src Committed By: martin Date: Sat Nov 5 11:19:50 UTC 2022 Modified Files: src/sys/dev/usb [netbsd-9]: uhidev.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1550): sys/dev/usb/uhidev.c: revision 1.94 Back out r1.82 ("Do not explicitly set the HID Report Protocol upon attach") due to the regression reported in PR 57031 To generate a diff of this commit: cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/sys/dev/usb/uhidev.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/fdt
Module Name:src Committed By: skrll Date: Sat Nov 5 10:04:35 UTC 2022 Modified Files: src/sys/dev/fdt: cpus.c Log Message: Fix inverted result when status is "okay" To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/fdt/cpus.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/fdt/cpus.c diff -u src/sys/dev/fdt/cpus.c:1.5 src/sys/dev/fdt/cpus.c:1.6 --- src/sys/dev/fdt/cpus.c:1.5 Wed Jan 2 14:54:54 2019 +++ src/sys/dev/fdt/cpus.c Sat Nov 5 10:04:35 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: cpus.c,v 1.5 2019/01/02 14:54:54 jmcneill Exp $ */ +/* $NetBSD: cpus.c,v 1.6 2022/11/05 10:04:35 skrll Exp $ */ /*- * Copyright (c) 2017 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpus.c,v 1.5 2019/01/02 14:54:54 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpus.c,v 1.6 2022/11/05 10:04:35 skrll Exp $"); #include #include @@ -85,7 +85,7 @@ cpus_cpu_enabled(int child) s = fdtbus_get_string(child, "status"); if (s) { if (strcmp(s, "okay") == 0) - return false; + return true; if (strcmp(s, "disabled") == 0) return of_hasprop(child, "enable-method"); return false;
CVS commit: src/sys/dev/fdt
Module Name:src Committed By: skrll Date: Sat Nov 5 10:04:35 UTC 2022 Modified Files: src/sys/dev/fdt: cpus.c Log Message: Fix inverted result when status is "okay" To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/fdt/cpus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/conf
Module Name:src Committed By: skrll Date: Sat Nov 5 08:29:17 UTC 2022 Modified Files: src/sys/arch/aarch64/conf: files.aarch64 Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/aarch64/conf/files.aarch64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/aarch64/conf
Module Name:src Committed By: skrll Date: Sat Nov 5 08:29:17 UTC 2022 Modified Files: src/sys/arch/aarch64/conf: files.aarch64 Log Message: G/C To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/aarch64/conf/files.aarch64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/aarch64/conf/files.aarch64 diff -u src/sys/arch/aarch64/conf/files.aarch64:1.41 src/sys/arch/aarch64/conf/files.aarch64:1.42 --- src/sys/arch/aarch64/conf/files.aarch64:1.41 Thu Nov 3 09:04:56 2022 +++ src/sys/arch/aarch64/conf/files.aarch64 Sat Nov 5 08:29:17 2022 @@ -1,4 +1,4 @@ -# $NetBSD: files.aarch64,v 1.41 2022/11/03 09:04:56 skrll Exp $ +# $NetBSD: files.aarch64,v 1.42 2022/11/05 08:29:17 skrll Exp $ defflag opt_cpuoptions.h AARCH64_ALIGNMENT_CHECK defflag opt_cpuoptions.h AARCH64_EL0_STACK_ALIGNMENT_CHECK @@ -72,8 +72,6 @@ file arch/aarch64/aarch64/kgdb_machdep.c # mainbus files device mainbus { [addr = -1], [size = 0], [intr = -1] } -attach mainbus at root -file arch/aarch64/dev/mainbus.c mainbus device cpu { } file arch/aarch64/aarch64/cpu.c cpu