Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93D73EB64DC for ; Fri, 14 Jul 2023 16:44:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 749ED86DAD; Fri, 14 Jul 2023 18:44:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com 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=collabora.com header.i=@collabora.com header.b="N8csDFDJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8AE4486DAD; Fri, 14 Jul 2023 18:44:25 +0200 (CEST) Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7E84F86D20 for ; Fri, 14 Jul 2023 18:44:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=detlev.casanova@collabora.com Received: from arisu.hitronhub.home (unknown [23.233.251.139]) (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) (Authenticated sender: detlev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2E0636607059; Fri, 14 Jul 2023 17:44:22 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689353062; bh=iXreZmtq77/faDAyQawEsF6ftMipUwZWnx4iCOVa5/c=; h=From:To:Cc:Subject:Date:From; b=N8csDFDJhScfGbcbZA7h+PqJ+GL+RJp3U44wnp5z+IVxQBrJF0ZyRulNiUzlnYShM tATrj8XbA1QuJjjMCWZKbyxCn1/fR8KAPGRp0B22baiW1NTqpcWsgw2Bk32tP5iH0J 8XkZhzR5hdMG6lMcpFg5e+FzvPVysqSYGqaKJk4C+xiMHh6KtGrC9/35DmgtXJsHa7 RC2tLshR59qZMH7OE/VZlQBhMkccaARsZPRsilrTbU15iDy8642OrB0eMSbPGuhPAU UL7wt2gPrJP/xqGtwnqvbSWpWE9AJ/rU0+rmv92X2Y1SxYqMObVn8ni+NX0qqx7OzW 9pjEJdkP9Buuw== From: Detlev Casanova To: u-boot@lists.denx.de Cc: Marek Vasut , Hai Pham , Tam Nguyen , Simon Glass , Detlev Casanova Subject: [PATCH v3 0/5] Introduce the sysinfo command Date: Fri, 14 Jul 2023 12:43:42 -0400 Message-ID: <20230714164424.838842-1-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The command can be used to show various information that can be used to identify the running system. Currently supported subcommands are: * model: A string representing the model * id: The id of the board * revision: The revision of this board. Changes since v2: - Fix code style. - Use printf() instead of debug(). - Clarify sysinfo new ids types (int). - Add a test for sysinfo command. - Add documentation for sysinfo command. Changes since v1: - Removed shell function to select linux device tree. This will be distributions job. - Break revision in rev_major and rev_minor in the sysinfo driver. Detlev Casanova (6): sysinfo: Add IDs for board id and revision cmd: Add a sysinfo command sysinfo: Add a test sysinfo: Add documentation sysinfo: rcar3: Use int instead of char for revision sysinfo: rcar3: Implement BOARD_ID and BOARD_REV_* cmd/Kconfig | 6 ++ cmd/Makefile | 1 + cmd/sysinfo.c | 133 +++++++++++++++++++++++++++++++++++ configs/sandbox_defconfig | 1 + doc/usage/cmd/sysinfo.rst | 56 +++++++++++++++ drivers/sysinfo/rcar3.c | 141 ++++++++++++++++++++++++++------------ drivers/sysinfo/sandbox.c | 17 +++++ include/sysinfo.h | 5 ++ test/cmd/Makefile | 1 + test/cmd/test_sysinfo.c | 51 ++++++++++++++ 10 files changed, 370 insertions(+), 42 deletions(-) create mode 100644 cmd/sysinfo.c create mode 100644 doc/usage/cmd/sysinfo.rst create mode 100644 test/cmd/test_sysinfo.c -- 2.41.0