From nobody Fri Sep 01 18:23:15 2023 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 4RcmcM2LM7z4s1Xx; Fri, 1 Sep 2023 18:23: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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcmcM1t1Gz4Hc6; Fri, 1 Sep 2023 18:23:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693592595; 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=bTYvtTtBfm6xncYZiMMCbj+Dhy1iclveZchqg2Jh8HU=; b=NkKnM7cz1TXwyYP2GDPDlAxJshot20080BT1bpts9ryn6PTusvPJgdca7wO6cK8UFhLS5x oTRsthRyAMa1nZe8bmsmvjE/Z2E2320/0G+LUWA6DGBqjFTwT8RVhJuAStsqyy2OHrHOpX j+Jj11z148mNIHC7LYonI6d1lPyTt7GbBOAzNPR2LY9yY+9oxDcjr59A4e7wo4rwNW24nX LOmFGyiXMNyvs8jLmmMh8mc5mB/aoxoSnd4UJTYf4xGDpmydc0Jt82gaT9LfeO6dfIZ7uj 4SsFQtKEomtwd6KbxgRVvvi/V1scj31iBgtKfqQ3OVsh1SxUQdJjr27agfihow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1693592595; a=rsa-sha256; cv=none; b=SxYylhs5cx/JMZL+ZEX2Fk5sRZh/tAMUOsRZGbcJAjVIbdst4ZFmgttvgXHxYjXCn+QAaE N3w7MzUAt7XsJUvJsBj9zcVPE8U7lA44QPIB5W4lRjHxmIlBG4zOk/fQtoIGPz5/mPGz/Q 7sNQ7x2eDPQVrjv4Be141O1QYrj/bGEZUuJwDVs2S5lgoA8ip+QHt2rPfrKALoi1eJU7j3 HPYBQ4+gTjV9JbhBYIvvA3P+pm913R/nI1LFmV7aYum1PD04Wu9XNVtTEuuX3kBup5l0we 9OiCDeDx9BYTXmAiaoIS2QOUMadf22BeagCrAYLH7ac38UlCMbjcYNv1q+AYkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1693592595; 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=bTYvtTtBfm6xncYZiMMCbj+Dhy1iclveZchqg2Jh8HU=; b=l+RdA+rTWBUxTc7UbdYRGjtNZAmmL+s2RKDzAedjwfIFoTQSWGT//SgNIsem0zNfjSeyss XMFFot22+1TjNKVeP8rvFEZJ8Bn54QCflNLGew08KM4yZ93ZBo8I4rHbFMcSt4xvOKNqcH zCU8Q9r3XgBlpbYcnKvnU7HBKfnrz5N0nBDDsfxAeGgkV3M+VOzH+/4N6+V9ymLmJMM4FD YN0IxTDeJ+DdlYD6RvF+8UAeytx7QLl7OjK5nSBl5poWxxbiItTts8ROy635expgl/oKp2 1qM62Bue4qW/wyFbQRdBTUp1b7kX4MuUn17yzHI/XaSm4UKHTeQkeg2xrDnpYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RcmcM0x7Tz1B7W; Fri, 1 Sep 2023 18:23:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 381INFOr020894; Fri, 1 Sep 2023 18:23:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 381INFAP020891; Fri, 1 Sep 2023 18:23:15 GMT (envelope-from git) Date: Fri, 1 Sep 2023 18:23:15 GMT Message-Id: <202309011823.381INFAP020891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mike Karels Subject: git: 1a0824ec9438 - stable/13 - clk_fixed: reduce and clarify messages due to missing clk-frequency List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1a0824ec9438ead5e61e1fa64785efc9465fab5e Auto-Submitted: auto-generated The branch stable/13 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=1a0824ec9438ead5e61e1fa64785efc9465fab5e commit 1a0824ec9438ead5e61e1fa64785efc9465fab5e Author: Mike Karels AuthorDate: 2023-08-25 20:11:46 +0000 Commit: Mike Karels CommitDate: 2023-09-01 18:22:49 +0000 clk_fixed: reduce and clarify messages due to missing clk-frequency The current dts for Raspberry 3B+ and 4B have 2 disabled fixed-clock nodes which have no clock-frequency value. Such nodes are non-standard. This results in about 150 messages during autoconfiguration: clk_fixed2: disabled on ofwbus0 clk_fixed2: Cannot FDT parameters. device_attach: clk_fixed2 attach returned 6 Defensively check for clock-frequency in the probe routine, and if none, return an error with a more direct error message (1 line per occurrence, 50 lines total): clk_fixed2: clock-fixed has no clock-frequency Based on a patch by manu. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41594 (cherry picked from commit b4ef09b9eb117d622bb274448e5cffcae0ba3488) --- sys/dev/extres/clk/clk_fixed.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/extres/clk/clk_fixed.c b/sys/dev/extres/clk/clk_fixed.c index 7c71f04eac0d..6a26effb73a2 100644 --- a/sys/dev/extres/clk/clk_fixed.c +++ b/sys/dev/extres/clk/clk_fixed.c @@ -153,6 +153,11 @@ clk_fixed_probe(device_t dev) clk_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; switch (clk_type) { case CLK_TYPE_FIXED: + if (OF_hasprop(ofw_bus_get_node(dev), "clock-frequency") == 0) { + device_printf(dev, + "clock-fixed has no clock-frequency\n"); + return (ENXIO); + } device_set_desc(dev, "Fixed clock"); return (BUS_PROBE_DEFAULT); case CLK_TYPE_FIXED_FACTOR: