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 53003C32772 for ; Tue, 23 Aug 2022 21:53:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7969584314; Tue, 23 Aug 2022 23:53:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=quicinc.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=quicinc.com header.i=@quicinc.com header.b="MFXXyWTW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C395984314; Tue, 23 Aug 2022 23:53:42 +0200 (CEST) Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 0525683E03 for ; Tue, 23 Aug 2022 23:53:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=quic_jaehyoo@quicinc.com Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27NLlL1f032501; Tue, 23 Aug 2022 21:53:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=iPwhXBzOluMeFiqvY59IVUvtOQw9BNp8fr+wx0Oe0a4=; b=MFXXyWTWEBmOFzjzHAYxiMA6B95vCRCWEloOsgaYV/d6MWQAh2Cy1uToYWjd9q+Hp4FZ XYsGgnZ/ysFZYcwDjweaD0S0IsAIgR8F5Zho3l26QfW2abxUDkOFDFArNbjSKcj4EM3i 0PeNXFcr0ev7HE7Of+hNs3e2y37Q9c3Fkzv60d+2Ckgsnb0J8rQBIuzvW0r6CQ3YwKQf CV3Rn+qIjTZMzl8van9Ere5OQaXnuX4mB0g2/gOP1MapjF8KPqHoMvCtFQlU8wgVTO+j S6idssc+iW51UUudXSrOJOwbjGSBLHNel9WCXffbMMwKy6w0Cw0YQeHx9zbuNfl0PR2N MQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j52ph8usm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 21:53:14 +0000 Received: from pps.filterd (NALASPPMTA03.qualcomm.com [127.0.0.1]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 27NLrE2s003561; Tue, 23 Aug 2022 21:53:14 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA03.qualcomm.com (PPS) with ESMTPS id 3j47bmxw1v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 21:53:14 +0000 Received: from NALASPPMTA03.qualcomm.com (NALASPPMTA03.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27NLrDg0003556; Tue, 23 Aug 2022 21:53:14 GMT Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (PPS) with ESMTPS id 27NLrDJH003555 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 21:53:13 +0000 Received: from maru.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Tue, 23 Aug 2022 14:53:12 -0700 From: Jae Hyun Yoo To: Michal Simek , Ovidiu Panait , Simon Glass , Mario Six , Masahisa Kojima , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Heinrich Schuchardt , Ashok Reddy Soma , "Thomas Huth" , Huang Jianan , Chris Morgan , Roland Gaudig , Patrick Delaunay , Alexandru Gagniuc CC: Jamie Iles , Graeme Gregory , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Jae Hyun Yoo , Subject: [PATCH v3 0/7] cmd/fru: move FRU handling support to common region Date: Tue, 23 Aug 2022 14:52:53 -0700 Message-ID: <20220823215300.1485789-1-quic_jaehyoo@quicinc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: Dbcu2iaxX28ogtdA9gbmWvWt_Vi6b6OF X-Proofpoint-GUID: Dbcu2iaxX28ogtdA9gbmWvWt_Vi6b6OF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-23_09,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 impostorscore=0 mlxscore=0 suspectscore=0 adultscore=0 mlxlogscore=798 spamscore=0 malwarescore=0 bulkscore=0 priorityscore=1501 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208230082 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.6 at phobos.denx.de X-Virus-Status: Clean Hello, The FRU handling was added as a Xilinx board dependent support but it is also useful for other boards, so this commit moves the FRU handling support to the common region so that it can be enabled by CONFIG_CMD_FRU. To provide manufacturer specific custom info fields and multi-records parsing, it refactors the FRU handling logic using linked list so that each board support can utilize them in their own custom way. This series adds 'Product Info' parsing support, usage document and unit test script too. Please review! Thanks, Jae Graeme Gregory (1): cmd: fru: move FRU handling support to common region Jae Hyun Yoo (6): xilinx: common: refactor FRU handling support cmd: fru: fix a sandbox segfault issue cmd: fru: add product info area parsing support doc: fru: add documentation for the fru command and APIs test: py: fru: add a test for the fru command test: cmd: fru: add unit test for the fru command board/xilinx/Kconfig | 8 - board/xilinx/common/Makefile | 3 - board/xilinx/common/board.c | 68 ++- board/xilinx/common/fru.h | 108 ----- board/xilinx/common/fru_ops.c | 415 ----------------- cmd/Kconfig | 8 + cmd/Makefile | 1 + {board/xilinx/common => cmd}/fru.c | 54 ++- configs/sandbox_defconfig | 1 + doc/usage/cmd/fru.rst | 144 ++++++ doc/usage/index.rst | 1 + include/fru.h | 328 +++++++++++++ include/test/suites.h | 1 + lib/Makefile | 1 + lib/fru_ops.c | 725 +++++++++++++++++++++++++++++ test/cmd/Makefile | 1 + test/cmd/fru.c | 84 ++++ test/cmd_ut.c | 6 + test/py/tests/test_fru.py | 47 ++ 19 files changed, 1447 insertions(+), 557 deletions(-) delete mode 100644 board/xilinx/common/fru.h delete mode 100644 board/xilinx/common/fru_ops.c rename {board/xilinx/common => cmd}/fru.c (50%) create mode 100644 doc/usage/cmd/fru.rst create mode 100644 include/fru.h create mode 100644 lib/fru_ops.c create mode 100644 test/cmd/fru.c create mode 100644 test/py/tests/test_fru.py -- 2.25.1