From nobody Fri Aug 25 20:12:53 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 4RXWN601vFz4qkyR; Fri, 25 Aug 2023 20:12:54 +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 4RXWN56bVrz3XR4; Fri, 25 Aug 2023 20:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692994373; 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=BPPY5gxhBiAlOaDOzRR6wFH+BcUOFwCjerFnt7NF534=; b=t6lrzg1OxaifOfgNE5To5Aygrk6rKinEcpW1gQEH0n2YZbxy7DMGI04yAIPpWVbkKOf9XE bOccOHDGKAsZhmqO5MrN6L+UOuCVXfIvDtFlKNC7PwRDA4+KZy5PJi8Gkln3Rbsv8p4Q5+ vYAOUjKLFJvBczziJQ+bzeSsAY712o/BJWqUR84NizhXm9Uw69+TI2uJ+Sag8J17G70LZ3 dPAUA/UDBSbkU1eJeFwzmW9lHgZKi7UhQmwL4J/dX3qqT4I3Grl82422Tei4ALBV6vEzv+ oODO4O+1bfqMSvHQN001lH0ZZ2/trqVxfW57/LJ0GoyFlc5mgXMEHuwY6uBs7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692994373; 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=BPPY5gxhBiAlOaDOzRR6wFH+BcUOFwCjerFnt7NF534=; b=cDUWPi/fuy66frA0D7M+m9/CcCAyieUM3utYLATmvSAZi58LXlF8Gg5/0FXf7W2UI7RXE4 h+fbnKDRXXxRzYoKfaEFwVAFxZL7i1mivo2JBwRQORK0t9IrXOV8FqPZWUyPZ0P6bzFr4Q ApZlz2Ch4lTcFBEK4etuGOu3F8PJuapaJndXVmoDHPyzx5sEmdhw6+h90dxqeYQO9DV87b IcviduLITXPPOCb9M50wQRjjoxSdIpgU0+UeWsJ01KKwmoUsthhpcmq++i9et36qzfD4Yi Y/qAaQAymEtfOtThNtl/i+534ZH39vDr2rB5tzpVq0zFhdKTIkZb1TrqzIEmow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692994373; a=rsa-sha256; cv=none; b=mzOHAF7WE/2mCtfTGDhWxHNqXlPPntG2d2vQscupgaIiUOgw8ZnVLiFUPMJaFqcTzihghs BxEGxVFbBSd6DkSHa8JGdJITY5mwSeWnxqquF3OgugiwztaikV0Rkp2In+c9MFOvHiKlk8 33Mv9pERvV0/NJgpiijSvC0UtLbGk+L377vKX2Yjd/KGO0yz48UHFLPg0Q7f0To2d+xxkJ tMJboGjux49OWCOY7x+M0C4dnmo1O1O94ZqMvnW1dOkpxYI15OpzCO8FY2AfI1RyRrdXMY S6YSo01YDFWak2as/d74e6aHFhiFLQdsH3gnpXkygh19LWA9PCwFyplMwH4ntw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RXWN55dTQz1Ltp; Fri, 25 Aug 2023 20:12:53 +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 37PKCrUP065775; Fri, 25 Aug 2023 20:12:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37PKCrOs065772; Fri, 25 Aug 2023 20:12:53 GMT (envelope-from git) Date: Fri, 25 Aug 2023 20:12:53 GMT Message-Id: <202308252012.37PKCrOs065772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: b4ef09b9eb11 - main - 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/main X-Git-Reftype: branch X-Git-Commit: b4ef09b9eb117d622bb274448e5cffcae0ba3488 Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=b4ef09b9eb117d622bb274448e5cffcae0ba3488 commit b4ef09b9eb117d622bb274448e5cffcae0ba3488 Author: Mike Karels AuthorDate: 2023-08-25 20:11:46 +0000 Commit: Mike Karels CommitDate: 2023-08-25 20:11:46 +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. MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D41594 --- 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 f4f1d462233a..e5ca6b31d000 100644 --- a/sys/dev/extres/clk/clk_fixed.c +++ b/sys/dev/extres/clk/clk_fixed.c @@ -157,6 +157,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: