From patchwork Thu Apr 27 20:37:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Prusov X-Patchwork-Id: 1774615 X-Patchwork-Delegate: seanga2@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sberdevices.ru header.i=@sberdevices.ru header.a=rsa-sha256 header.s=mail header.b=K/+GimOJ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q6nfR1dXyz23s0 for ; Fri, 28 Apr 2023 06:39:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A3BD863B7; Thu, 27 Apr 2023 22:38:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=sberdevices.ru Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=sberdevices.ru header.i=@sberdevices.ru header.b="K/+GimOJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ED3F28628C; Thu, 27 Apr 2023 22:38:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mx.sberdevices.ru (mx.sberdevices.ru [45.89.227.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 38CE6863A7 for ; Thu, 27 Apr 2023 22:38:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=sberdevices.ru Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=IVPrusov@sberdevices.ru Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mx.sberdevices.ru (Postfix) with ESMTP id 7DEEC5FD1B; Thu, 27 Apr 2023 23:38:22 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1682627902; bh=oG+EJfOk/dI8/+y64Hp0jydVlt3bQqqWbzy6LiIrNjk=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=K/+GimOJfJohMrRRYTt+1VOYsr0/TitTr5EANoUVknD/v7OI00KWbBkNkNAKx/pds PdIp6HTEbxfCHk0mO9MmVdtau7wS9eC+HgY5DFqqK2VEEnEcGukXoef7rt8ieTvEd4 qqB+uyZtXUk7DJQXnCDS2JqAP9BtG8nxVu+ADMs2JUYLyrVKwHLuhSE0/VvsyUt3hA /4b/HfCyyr2bVZYV/JDaIpvmz4V0aILEL3uFWKBpX17+VJZZvxLVRUKQfrZ6pSCDdN c5stSQZWoR8ZIVt01vw53e2osGpnRkjOmVnJPtzX5IHDv2G7Krp3c8QljjW4Yfdvi7 cdC3LpHdfIrtw== Received: from S-MS-EXCH01.sberdevices.ru (S-MS-EXCH01.sberdevices.ru [172.16.1.4]) by mx.sberdevices.ru (Postfix) with ESMTP; Thu, 27 Apr 2023 23:38:22 +0300 (MSK) From: Igor Prusov To: Michal Simek , Daniel Schwierzeck , Lukasz Majewski , Sean Anderson , Ryan Chen , Chia-Wei Wang , Aspeed BMC SW team , Joel Stanley , Stefan Roese , Patrick Delaunay , Patrice Chotard CC: , , Igor Prusov , , Subject: [RFC PATCH v1 5/7] cmd: clk: Use dump function from clk_ops Date: Thu, 27 Apr 2023 23:37:24 +0300 Message-ID: <20230427203726.11835-6-ivprusov@sberdevices.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230427203726.11835-1-ivprusov@sberdevices.ru> References: <20230427203726.11835-1-ivprusov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [172.16.1.6] X-ClientProxiedBy: S-MS-EXCH02.sberdevices.ru (172.16.1.5) To S-MS-EXCH01.sberdevices.ru (172.16.1.4) X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2023/04/27 14:43:00 #21175431 X-KSMG-AntiVirus-Status: Clean, skipped X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add another loop to dump additional info from clock providers that implement dump operation. Signed-off-by: Igor Prusov --- cmd/clk.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/clk.c b/cmd/clk.c index ff7c7649a1..55fb96e631 100644 --- a/cmd/clk.c +++ b/cmd/clk.c @@ -62,6 +62,7 @@ static void show_clks(struct udevice *dev, int depth, int last_flag) int __weak soc_clk_dump(void) { struct udevice *dev; + const struct clk_ops *ops; printf(" Rate Usecnt Name\n"); printf("------------------------------------------\n"); @@ -69,6 +70,14 @@ int __weak soc_clk_dump(void) uclass_foreach_dev_probe(UCLASS_CLK, dev) show_clks(dev, -1, 0); + uclass_foreach_dev_probe(UCLASS_CLK, dev) { + ops = dev_get_driver_ops(dev); + if (ops && ops->dump) { + printf("--------------------------\n"); + ops->dump(dev); + } + } + return 0; } #else