From nobody Wed Nov 18 06:49:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jTsdl0B2Wz6y5rK for ; Wed, 18 Nov 2026 06:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jTsdk4qJdz3NpB for ; Wed, 18 Nov 2026 06:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794984554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3KUistnfnFf7lagXZJYBKzspc3HIlX+s2c6PYY99bU=; b=utwSXvH6xzZR9/uAsf3ubD1U6m5i24AKZHVeKCyOLW6VYr5Hzh30EfUbCccdYyKcBRxvaA BRdhJB+hTOrpm88HyHGswObc/GbKTYvpB4Y/O9PO7Ox/Bfye5TL33udyA/1v1rZGNhmZx7 fuGAUKJWNvXC74CxpAMXnxmamhR8q5Imr8bLVVNOH9ra9neBKrfFMjqLoXxflc0Rl5zong yFN5HYYnWWMM2o3bb95V3uTdzo2rpStA9JIhzHnrIIi841YU3v+mIBxAWkXnnJyJCW3NoW bZhiXBhV5cFKrBCtDnzqZ0doh/uXe4vTXfH0cs9J34NAKJVOPsgtijwcBmNLdQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794984554; b=f0FMtMi/2B3cAMBGJ2vp1i4dQE8uP9ftjq17G+ihke+QlsQQjaz6SYjEDSklw/8hw46ejm tTnaxnOXMeTmGeIs7B8QdQTYTATNSgoQh3LeuCnNGGBe1lrogXwLZhTV3IjsvXp+tM/agl fGTZMrBTDEBj6+Flkbd7tVsZd1kZtfnlJwZe5pa09LmAOkzx3k619FJPZrwRgf19DITtbF Wzn413YW3MQTTNqbbYrbK47QP2Tsv/x7zKfg475CQFOAQehhZBedIFVuB/YMOSu29jfPt5 1D2yYrp2ciEJKsPWtv+/W8szMCF8rFj+VzE5sV5lb4CLiSz5jMdTNyEJYSkyYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794984554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3KUistnfnFf7lagXZJYBKzspc3HIlX+s2c6PYY99bU=; b=TsetZd5ZtqfUmFKcy8ILJjmy/xgM3+K9rbl1cd7CfctrcVN4toC8tts80e8iBknA+xLipl XYH6JiBbhHlY+n5m8SHVxJ+2oeiOY5reWd834cZlkSYxtR31p6eLhDMPQAP+veWLu03j3L uEIxsmroEOROg3WsSnxEYnD+LyVXZMeMhHCtGkF206a/dBW2VOA++GdUcjD2Tb/0Ts8Nzg uL4IME21tiyfby01DjpFGHkoZzPxV4aITAtTO2k+EwlMmc+TdZLDw80tXvm6+UjoriEKDj x4g7OlqU0IOes4ExksYCzM1MVRxgiv9q/Q46Y1XjVH4mjGaLY16sbhVPVuHuSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jTsdk4TbQz1HQW for ; Wed, 18 Nov 2026 06:49:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d94c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 18 Nov 2026 06:49:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: ab350f6e4a6f - main - aw_thermal: Add an init function to the SoC configuration List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab350f6e4a6f8467b08962e953ca45073fb0e10c Auto-Submitted: auto-generated Date: Wed, 18 Nov 2026 06:49:14 +0000 Message-Id: <6afd4a6a.d94c.48f66c7d@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ab350f6e4a6f8467b08962e953ca45073fb0e10c commit ab350f6e4a6f8467b08962e953ca45073fb0e10c Author: Emmanuel Vadot AuthorDate: 2026-11-17 21:50:13 +0000 Commit: Emmanuel Vadot CommitDate: 2026-11-18 06:49:00 +0000 aw_thermal: Add an init function to the SoC configuration Move the initialisation of the controller to a function of the SoC configuration, as the controller of the H6 is different from the one of the other supported SoCs. No functional change intended. --- sys/arm/allwinner/aw_thermal.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index bdb7e2dacc4e..bc8cde323fe8 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -152,6 +152,8 @@ struct aw_thermal_sensor { int init_shut; }; +struct aw_thermal_softc; + struct aw_thermal_config { struct aw_thermal_sensor sensors[MAX_SENSORS]; int nsensors; @@ -160,6 +162,7 @@ struct aw_thermal_config { int adc_cali_en; uint32_t filter; uint32_t thermal_per; + int (*init)(struct aw_thermal_softc *); int (*to_temp)(uint32_t, int); uint32_t (*to_reg)(int, int); int temp_base; @@ -169,6 +172,8 @@ struct aw_thermal_config { uint32_t calib0_mask, calib1_mask; }; +static int aw_thermal_v1_init(struct aw_thermal_softc *); + static int a83t_to_temp(uint32_t val, int sensor) { @@ -196,6 +201,7 @@ static const struct aw_thermal_config a83t_config = { .adc_cali_en = 1, .filter = A83T_FILTER, .thermal_per = A83T_THERMAL_PER, + .init = aw_thermal_v1_init, .to_temp = a83t_to_temp, .calib0_mask = 0xffffffff, .calib1_mask = 0xffff, @@ -228,6 +234,7 @@ static const struct aw_thermal_config a64_config = { .adc_cali_en = 1, .filter = A64_FILTER, .thermal_per = A64_THERMAL_PER, + .init = aw_thermal_v1_init, .to_temp = a64_to_temp, .calib0_mask = 0xffffffff, .calib1_mask = 0xffff, @@ -260,6 +267,7 @@ static const struct aw_thermal_config h3_config = { .adc_cali_en = 1, .filter = H3_FILTER, .thermal_per = H3_THERMAL_PER, + .init = aw_thermal_v1_init, .to_temp = h3_to_temp, .to_reg = h3_to_reg, .calib0_mask = 0xffffffff, @@ -334,6 +342,7 @@ static const struct aw_thermal_config h5_config = { .adc_acquire_time = H5_ADC_ACQUIRE_TIME, .filter = H5_FILTER, .thermal_per = H5_THERMAL_PER, + .init = aw_thermal_v1_init, .to_temp = h5_to_temp, .to_reg = h5_to_reg, .calib0_mask = 0xffffffff, @@ -375,7 +384,7 @@ static struct resource_spec aw_thermal_spec[] = { #define WR4(sc, reg, val) bus_write_4((sc)->res[0], (reg), (val)) static int -aw_thermal_init(struct aw_thermal_softc *sc) +aw_thermal_v1_init(struct aw_thermal_softc *sc) { phandle_t node; uint32_t calib[2]; @@ -664,7 +673,7 @@ aw_thermal_attach(device_t dev) sc->conf->sensors[i].init_shut); } - if (aw_thermal_init(sc) != 0) + if (sc->conf->init(sc) != 0) goto fail; for (i = 0; i < sc->conf->nsensors; i++)