From mboxrd@z Thu Jan 1 00:00:00 1970 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 92597EB64DA for ; Thu, 20 Jul 2023 14:50:20 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ABC18867F0; Thu, 20 Jul 2023 16:50:18 +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="eHJsfist"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 20990867DF; Thu, 20 Jul 2023 16:50:18 +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 09C1D867E7 for ; Thu, 20 Jul 2023 16:50:15 +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.mtl.collabora.ca (mtl.collabora.ca [66.171.169.34]) (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 DA1BD6607089; Thu, 20 Jul 2023 15:50:13 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689864614; bh=Qida9YkA2VgUDLHsw7GxsWArBcd8P4UbUfaZ0NSpz+o=; h=From:To:Cc:Subject:Date:From; b=eHJsfist+fbiDGaDxaE89Fj1qTeDgLV3ZH4MTSuTPMMrvwMKwMEYojjex+BqdVKln EFjWP/3wTeUna23gyZ39ntEmwg71MWvP/C0/hwx8n66Gkx4T/kKNVr3ARZ2zPC3KjF eQAhKC2GTeAELljKRP68XhIUOJGw1oS0Q8jSyKzsSrWZ6Xj8PgG3q+M4jPlMQypoWQ y4i5J3UaoioaGabq2drZxyQvfkAo5si5W/snYATLbTnVxvt9uIiaLkW7eDg/2VYAGh bO5oC2+ytrxJKrqOKF0VixH4bCXHxaMkksHraa/Z1sqPLuSx39TgwuL8+sEF3+wtB1 cHsqHZPtsGh7Q== From: Detlev Casanova To: u-boot@lists.denx.de Cc: Marek Vasut , Hai Pham , Tam Nguyen , Simon Glass , Detlev Casanova Subject: [PATCH v4 0/6] Introduce the sysinfo command Date: Thu, 20 Jul 2023 10:49:41 -0400 Message-ID: <20230720145010.84791-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 v3: - Fix documentation typo. 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