From nobody Thu Sep 21 21:16: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 4Rs7Vl2lqGz4v1DB; Thu, 21 Sep 2023 21:16: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 4Rs7Vl26Tyz3bv1; Thu, 21 Sep 2023 21:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695330975; 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=jha9BIaG/JAyDWFXx9tRFo33A6wWDUdo6OZ+zpxiXoo=; b=w/qbMkSXGVqy13GhGKZk0hM/+h+gZtRqxI03AzfY9m6tejEy20Wamay+jiN66emC1sF1qk JOPki5guwlYepsMlgZJ3SDlgw3qzLdqAWqgp4432/r453wRDYrzj9D/4LIhpKRQ7/ZnOp7 uMknC5K0eB3naj+cj1bzwWDtKd1QX0RS4vRpBJAK9I33hKM9V9v2GBRwphs/DlXsfT6+eq Tw/mF4wGMekzDIDVqCke144eCE4QWtC13RzqTBjWl1bM7cbYa81QkTMqQXlhfNx/AFFTZT UjdWsD9+otKEttJ+jNV/GSj+8SbEvdx9XpTVgXFUmPOSWpFY6HOsCFPBqmce6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695330975; a=rsa-sha256; cv=none; b=Ail8hpul8NtIV4aQACHmYZ07auqeFPCjvykStqPyWyt7rNNt+dPnhwr1UspPprmkAbWp2H D7mgEksL/ZmBQAVfcz7ZnW5EHfAwSBzcY7izEBRVAMeCNJPdxedBe3TLOKYNDFP8wJnD2f t9IpS9jvC7ixbt4cpldb8eE1KBuK1uJwD6yySNd9Rj9FjQGu+9V03FNraS5UdEI4aIMWq3 z4x1nUxnAIDrvEJ6LBoPAX51pGCahe+6DCrDmyLMUYkMyKPZ767d34vJtggLcbADa+OtU8 30RaIzGdgKmFb7BMrOVqdm+wWnkWu0Hga+rxjz0c5lkIHVQbzCXOVmp4ZtYDDA== 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=1695330975; 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=jha9BIaG/JAyDWFXx9tRFo33A6wWDUdo6OZ+zpxiXoo=; b=HdYoswoQ7xUxtBAKnvuCr8a6/BJeqnWvIEBoP8/aLFITMUWMYFoji8N+A8az/TokuPGurx bZ3i1xiujF71ef17x13k1BaEPaVrKctF11c0otuKZt7qqw4KCy/S1KI/mDr5ItnEAPdCmi DBbDK8qVXk/8jgaj9NQUjQOSUd5pTD3C4KV6a2wgcmEwbVUBlHg/Uj4EsX7rTu3TOk5Icc F2KjdtkPHyjzoVCrdy3JYGM6lj2/lhpQd23st01zozDmc1WDxN7WKmScvDlhjUIeLF1uOt 6w0rE+jjjDnTSdcKmDzfqbeeN3LVvYI4RkLfA6zwKCyrx3zBU7dxv69SWdrrxA== 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 4Rs7Vl16gmztvw; Thu, 21 Sep 2023 21:16: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 38LLGFIU074379; Thu, 21 Sep 2023 21:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38LLGFlp074376; Thu, 21 Sep 2023 21:16:15 GMT (envelope-from git) Date: Thu, 21 Sep 2023 21:16:15 GMT Message-Id: <202309212116.38LLGFlp074376@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: 2476a7603190 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 2476a76031908016dd2513862d46ad8dd2bab462 Auto-Submitted: auto-generated The branch stable/14 has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=2476a76031908016dd2513862d46ad8dd2bab462 commit 2476a76031908016dd2513862d46ad8dd2bab462 Author: Mike Karels AuthorDate: 2023-08-25 20:11:46 +0000 Commit: Mike Karels CommitDate: 2023-09-21 21:14:47 +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 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: