diff options
Diffstat (limited to 'sys/arm')
| -rw-r--r-- | sys/arm/broadcom/bcm2835/bcm2835_audio.c | 71 | ||||
| -rw-r--r-- | sys/arm/conf/GENERIC | 4 | ||||
| -rw-r--r-- | sys/arm/conf/NOTES | 5 | ||||
| -rw-r--r-- | sys/arm/include/ieeefp.h | 10 | ||||
| -rw-r--r-- | sys/arm/include/kexec.h | 38 | ||||
| -rw-r--r-- | sys/arm/mv/mv_cp110_icu.c | 2 | ||||
| -rw-r--r-- | sys/arm/nvidia/tegra_ahci.c | 2 | ||||
| -rw-r--r-- | sys/arm/nvidia/tegra_lic.c | 4 | ||||
| -rw-r--r-- | sys/arm/nvidia/tegra_mc.c | 2 | ||||
| -rw-r--r-- | sys/arm/nvidia/tegra_xhci.c | 4 | ||||
| -rw-r--r-- | sys/arm/ti/clk/ti_clkctrl.c | 6 | ||||
| -rw-r--r-- | sys/arm/ti/cpsw/if_cpsw.c | 2 | 
12 files changed, 116 insertions, 34 deletions
| diff --git a/sys/arm/broadcom/bcm2835/bcm2835_audio.c b/sys/arm/broadcom/bcm2835/bcm2835_audio.c index 13f309dd3f11..2df6ac76124f 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_audio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_audio.c @@ -132,6 +132,7 @@ struct bcm2835_audio_info {  	uint32_t flags_pending; +	int verbose_trace;  	/* Worker thread state */  	int worker_state;  }; @@ -140,6 +141,29 @@ struct bcm2835_audio_info {  #define BCM2835_AUDIO_LOCKED(sc)	mtx_assert(&(sc)->lock, MA_OWNED)  #define BCM2835_AUDIO_UNLOCK(sc)	mtx_unlock(&(sc)->lock) +#define BCM2835_LOG_ERROR(sc,...)				\ +	do {							\ +		device_printf((sc)->dev, __VA_ARGS__);		\ +	} while(0) + +#define BCM2835_LOG_INFO(sc,...)				\ +	do {							\ +		if (sc->verbose_trace > 0)			\ +			device_printf((sc)->dev, __VA_ARGS__);	\ +	} while(0) + +#define BCM2835_LOG_WARN(sc,...) \ +	do {							\ +		if (sc->verbose_trace > 1)			\ +			device_printf((sc)->dev, __VA_ARGS__);	\ +	} while(0) + +#define BCM2835_LOG_TRACE(sc,...)				\ +	do {							\ +		if(sc->verbose_trace > 2)			\ +			device_printf((sc)->dev, __VA_ARGS__);	\ +	} while(0) +  static const char *  dest_description(uint32_t dest)  { @@ -236,8 +260,9 @@ bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *m  					device_printf(sc->dev, "available_space == %d, count = %d, perr=%d\n",  					    ch->available_space, count, perr);  					device_printf(sc->dev, -					    "retrieved_samples = %lld, submitted_samples = %lld\n", -					    ch->retrieved_samples, ch->submitted_samples); +					    "retrieved_samples = %ju, submitted_samples = %ju\n", +					    (uintmax_t)ch->retrieved_samples, +					    (uintmax_t)ch->submitted_samples);  				}  				ch->available_space += count;  				ch->retrieved_samples += count; @@ -247,7 +272,8 @@ bcm2835_audio_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *m  		}  		BCM2835_AUDIO_UNLOCK(sc);  	} else -		printf("%s: unknown m.type: %d\n", __func__, m.type); +		BCM2835_LOG_WARN(sc, "%s: unknown m.type: %d\n", __func__, +		    m.type);  }  /* VCHIQ stuff */ @@ -259,13 +285,13 @@ bcm2835_audio_init(struct bcm2835_audio_info *sc)  	/* Initialize and create a VCHI connection */  	status = vchi_initialise(&sc->vchi_instance);  	if (status != 0) { -		printf("vchi_initialise failed: %d\n", status); +		BCM2835_LOG_ERROR(sc, "vchi_initialise failed: %d\n", status);  		return;  	}  	status = vchi_connect(NULL, 0, sc->vchi_instance);  	if (status != 0) { -		printf("vchi_connect failed: %d\n", status); +		BCM2835_LOG_ERROR(sc, "vchi_connect failed: %d\n", status);  		return;  	} @@ -297,7 +323,8 @@ bcm2835_audio_release(struct bcm2835_audio_info *sc)  	if (sc->vchi_handle != VCHIQ_SERVICE_HANDLE_INVALID) {  		success = vchi_service_close(sc->vchi_handle);  		if (success != 0) -			printf("vchi_service_close failed: %d\n", success); +			BCM2835_LOG_ERROR(sc, "vchi_service_close failed: %d\n", +			    success);  		vchi_service_release(sc->vchi_handle);  		sc->vchi_handle = VCHIQ_SERVICE_HANDLE_INVALID;  	} @@ -327,7 +354,9 @@ bcm2835_audio_start(struct bcm2835_audio_chinfo *ch)  		    &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL);  		if (ret != 0) -			printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); +			BCM2835_LOG_ERROR(sc, +			    "%s: vchi_msg_queue failed (err %d)\n", __func__, +			    ret);  	}  } @@ -346,7 +375,9 @@ bcm2835_audio_stop(struct bcm2835_audio_chinfo *ch)  		    &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL);  		if (ret != 0) -			printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); +			BCM2835_LOG_ERROR(sc, +			    "%s: vchi_msg_queue failed (err %d)\n", __func__, +			    ret);  	}  } @@ -362,7 +393,9 @@ bcm2835_audio_open(struct bcm2835_audio_info *sc)  		    &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL);  		if (ret != 0) -			printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); +			BCM2835_LOG_ERROR(sc, +			    "%s: vchi_msg_queue failed (err %d)\n", __func__, +			    ret);  	}  } @@ -384,7 +417,9 @@ bcm2835_audio_update_controls(struct bcm2835_audio_info *sc, uint32_t volume, ui  		    &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL);  		if (ret != 0) -			printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); +			BCM2835_LOG_ERROR(sc, +			    "%s: vchi_msg_queue failed (err %d)\n", __func__, +			    ret);  	}  } @@ -404,7 +439,9 @@ bcm2835_audio_update_params(struct bcm2835_audio_info *sc, uint32_t fmt, uint32_  		    &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL);  		if (ret != 0) -			printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); +			BCM2835_LOG_ERROR(sc, +			    "%s: vchi_msg_queue failed (err %d)\n", __func__, +			    ret);  	}  } @@ -452,14 +489,15 @@ bcm2835_audio_write_samples(struct bcm2835_audio_chinfo *ch, void *buf, uint32_t  	    &m, sizeof m, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL);  	if (ret != 0) -		printf("%s: vchi_msg_queue failed (err %d)\n", __func__, ret); +		BCM2835_LOG_ERROR(sc, "%s: vchi_msg_queue failed (err %d)\n", +		    __func__, ret);  	while (count > 0) {  		int bytes = MIN((int)m.u.write.max_packet, (int)count);  		ret = vchi_msg_queue(sc->vchi_handle,  		    buf, bytes, VCHI_FLAGS_BLOCK_UNTIL_QUEUED, NULL);  		if (ret != 0) -			printf("%s: vchi_msg_queue failed: %d\n", +			BCM2835_LOG_ERROR(sc, "%s: vchi_msg_queue failed: %d\n",  			    __func__, ret);  		buf = (char *)buf + bytes;  		count -= bytes; @@ -577,7 +615,8 @@ bcm2835_audio_create_worker(struct bcm2835_audio_info *sc)  	sc->worker_state = WORKER_RUNNING;  	if (kproc_create(bcm2835_audio_worker, (void*)sc, &newp, 0, 0,  	    "bcm2835_audio_worker") != 0) { -		printf("failed to create bcm2835_audio_worker\n"); +		BCM2835_LOG_ERROR(sc, +		    "failed to create bcm2835_audio_worker\n");  	}  } @@ -830,6 +869,9 @@ vchi_audio_sysctl_init(struct bcm2835_audio_info *sc)  	SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "starved",  			CTLFLAG_RD, &sc->pch.starved,  			sc->pch.starved, "number of starved conditions"); +	SYSCTL_ADD_INT(ctx, tree, OID_AUTO, "trace", +			CTLFLAG_RW, &sc->verbose_trace, +			sc->verbose_trace, "enable tracing of transfers");  }  static void @@ -861,6 +903,7 @@ bcm2835_audio_delayed_init(void *xsc)  	bcm2835_audio_open(sc);  	sc->volume = 75;  	sc->dest = DEST_AUTO; +	sc->verbose_trace = 0;      	if (mixer_init(sc->dev, &bcmmixer_class, sc)) {  		device_printf(sc->dev, "mixer_init failed\n"); diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 7394f3842d43..22bb75993834 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -270,7 +270,3 @@ makeoptions	MODULES_EXTRA+="dtb/nvidia"  makeoptions	MODULES_EXTRA+="dtb/rockchip"  makeoptions	MODULES_EXTRA+="dtb/rpi"  makeoptions	MODULES_EXTRA+="dtb/zynq" - -# SOC-specific modules -makeoptions	MODULES_EXTRA+="allwinner" -makeoptions	MODULES_EXTRA+="imx" diff --git a/sys/arm/conf/NOTES b/sys/arm/conf/NOTES index 920d721dc3ba..2bd41d911124 100644 --- a/sys/arm/conf/NOTES +++ b/sys/arm/conf/NOTES @@ -92,11 +92,6 @@ nodevice	mps  nodevice	bnxt -# Build SOC-specific modules... - -makeoptions	MODULES_EXTRA+="allwinner" -makeoptions	MODULES_EXTRA+="imx" -  # Build dtb files...  makeoptions	MODULES_EXTRA+="dtb/allwinner" diff --git a/sys/arm/include/ieeefp.h b/sys/arm/include/ieeefp.h index 57dd058b8a95..57719b883d58 100644 --- a/sys/arm/include/ieeefp.h +++ b/sys/arm/include/ieeefp.h @@ -49,4 +49,14 @@ typedef enum {  #define fp_except_t	int +/* Augment the userland declarations. */ +__BEGIN_DECLS +extern fp_rnd_t    fpgetround(void); +extern fp_rnd_t    fpsetround(fp_rnd_t); +extern fp_except_t fpgetmask(void); +extern fp_except_t fpsetmask(fp_except_t); +extern fp_except_t fpgetsticky(void); +extern fp_except_t fpsetsticky(fp_except_t); +__END_DECLS +  #endif /* _MACHINE_IEEEFP_H_ */ diff --git a/sys/arm/include/kexec.h b/sys/arm/include/kexec.h new file mode 100644 index 000000000000..50391d32812a --- /dev/null +++ b/sys/arm/include/kexec.h @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Juniper Networks, Inc. + * + * 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 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 AUTHOR 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. + */ + +#ifndef _ARM_KEXEC_H_ +#define	_ARM_KEXEC_H_ + +int +kexec_load_md(struct kexec_image *image) +{ +	return (ENOSYS); +} + +#define	kexec_reboot_md(x) do {} while (0) +#endif /* _ARM_KEXEC_H_ */ diff --git a/sys/arm/mv/mv_cp110_icu.c b/sys/arm/mv/mv_cp110_icu.c index 25ec19bee575..d30f337f56fc 100644 --- a/sys/arm/mv/mv_cp110_icu.c +++ b/sys/arm/mv/mv_cp110_icu.c @@ -257,7 +257,7 @@ mv_cp110_icu_init(struct mv_cp110_icu_softc *sc, uint64_t addr)  		WR4(sc, ICU_SETSPI_SEI_AH, (addr >> 32) & UINT32_MAX);  		break;  	default: -		panic("Unkown ICU type."); +		panic("Unknown ICU type.");  	}  	sc->initialized = true; diff --git a/sys/arm/nvidia/tegra_ahci.c b/sys/arm/nvidia/tegra_ahci.c index 30e28dd33235..efbad6ae618c 100644 --- a/sys/arm/nvidia/tegra_ahci.c +++ b/sys/arm/nvidia/tegra_ahci.c @@ -526,7 +526,7 @@ tegra_ahci_ctrl_init(struct tegra_ahci_sc *sc)  		rv = sc->soc->init(sc);  		if (rv != 0) {  			device_printf(sc->dev, -			    "SOC specific intialization failed: %d\n", rv); +			    "SOC specific initialization failed: %d\n", rv);  			return (rv);  		}  	} diff --git a/sys/arm/nvidia/tegra_lic.c b/sys/arm/nvidia/tegra_lic.c index e1d641635351..6956dc0ca849 100644 --- a/sys/arm/nvidia/tegra_lic.c +++ b/sys/arm/nvidia/tegra_lic.c @@ -213,12 +213,12 @@ tegra_lic_attach(device_t dev)  	}  	sc->parent = OF_device_from_xref(parent_xref);  	if (sc->parent == NULL) { -		device_printf(dev, "Cannott find parent controller\n"); +		device_printf(dev, "Cannot find parent controller\n");  		goto fail;  	}  	if (bus_alloc_resources(dev, lic_spec, sc->mem_res)) { -		device_printf(dev, "Cannott allocate resources\n"); +		device_printf(dev, "Cannot allocate resources\n");  		goto fail;  	} diff --git a/sys/arm/nvidia/tegra_mc.c b/sys/arm/nvidia/tegra_mc.c index 2568ff8324af..5703d768e505 100644 --- a/sys/arm/nvidia/tegra_mc.c +++ b/sys/arm/nvidia/tegra_mc.c @@ -157,7 +157,7 @@ tegra_mc_intr(void *arg)  	if (stat & MC_INT_DECERR_VPR)  		printf(" - VPR requirements violated\n");  	if (stat & MC_INT_INVALID_APB_ASID_UPDATE) -		printf(" - ivalid APB ASID update\n"); +		printf(" - invalid APB ASID update\n");  	if (stat & MC_INT_INVALID_SMMU_PAGE)  		printf(" - SMMU address translation error\n");  	if (stat & MC_INT_ARBITRATION_EMEM) diff --git a/sys/arm/nvidia/tegra_xhci.c b/sys/arm/nvidia/tegra_xhci.c index 474e31981770..b9dac91cccd8 100644 --- a/sys/arm/nvidia/tegra_xhci.c +++ b/sys/arm/nvidia/tegra_xhci.c @@ -818,7 +818,7 @@ load_fw(struct tegra_xhci_softc *sc)  		DELAY(100);  	}  	if (i <= 0) { -		device_printf(sc->dev, "Timedout while wating for DMA, " +		device_printf(sc->dev, "Timedout while waiting for DMA, "  		    "state: 0x%08X\n",  		    CSB_RD4(sc, XUSB_CSB_MEMPOOL_L2IMEMOP_RESULT));  		return (ETIMEDOUT); @@ -835,7 +835,7 @@ load_fw(struct tegra_xhci_softc *sc)  		DELAY(100);  	}  	if (i <= 0) { -		device_printf(sc->dev, "Timedout while wating for FALCON cpu, " +		device_printf(sc->dev, "Timedout while waiting for FALCON cpu, "  		    "state: 0x%08X\n", CSB_RD4(sc, XUSB_FALCON_CPUCTL));  		return (ETIMEDOUT);  	} diff --git a/sys/arm/ti/clk/ti_clkctrl.c b/sys/arm/ti/clk/ti_clkctrl.c index 72fa8548d4f8..06e558d140f2 100644 --- a/sys/arm/ti/clk/ti_clkctrl.c +++ b/sys/arm/ti/clk/ti_clkctrl.c @@ -284,9 +284,9 @@ create_clkctrl(struct ti_clkctrl_softc *sc, cell_t *reg, uint32_t index, uint32_  	/*  	 * Check out XX_CLKCTRL-INDEX(offset)-macro dance in -	 * sys/gnu/dts/dts/include/dt-bindings/clock/am3.h -	 * sys/gnu/dts/dts/include/dt-bindings/clock/am4.h -	 * sys/gnu/dts/dts/include/dt-bindings/clock/dra7.h +	 * sys/contrib/device-tree/include/dt-bindings/clock/am3.h +	 * sys/contrib/device-tree/include/dt-bindings/clock/am4.h +	 * sys/contrib/device-tree/include/dt-bindings/clock/dra7.h  	 * reg[0] are in practice the same as the offset described in the dts.  	 */  	/* special_gdbclk_reg are 0 or 1 */ diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c index dc3d8b1f9023..e2cc9ee0d7b2 100644 --- a/sys/arm/ti/cpsw/if_cpsw.c +++ b/sys/arm/ti/cpsw/if_cpsw.c @@ -1646,7 +1646,7 @@ cpsw_rx_dequeue(struct cpsw_softc *sc)  		port = (bd.flags & CPDMA_BD_PORT_MASK) - 1;  		KASSERT(port >= 0 && port <= 1, -		    ("patcket received with invalid port: %d", port)); +		    ("packet received with invalid port: %d", port));  		psc = device_get_softc(sc->port[port].dev);  		/* Set up mbuf */ | 
