From patchwork Fri Jul 28 00:33:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 707544 Delivered-To: patch@linaro.org Received: by 2002:a5d:6787:0:b0:317:2194:b2bc with SMTP id v7csp647933wru; Thu, 27 Jul 2023 17:34:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlEtfUGLj+uRs3T5SNCGMe1WHetNcpOa4RR5NDkgH0Xp+tVcdG1Jx7GhT1jcg9YkBEJ0Emwh X-Received: by 2002:adf:df0e:0:b0:316:f5b1:98c with SMTP id y14-20020adfdf0e000000b00316f5b1098cmr428596wrl.24.1690504441173; Thu, 27 Jul 2023 17:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690504441; cv=none; d=google.com; s=arc-20160816; b=aF0qJ70goPEkBRbFqXcccPvOBhA5MF9L9sEeafSSEkRSFKcMs4we1fVcVIekqIhVOF hBiJo1m6prqJJwbGP3f7mBw8BziWVnWm2ieoGGoHW8AGoFCwtjrw53U6881vDKHPRDvb QEHbFgaC8Z1jU+Esy8cTlS+dLVIkwBIcBefxZtWFQcOd6eWA+kvU2adxr/HNUZ5VbUbS xfBRLK+ez7F6X8T8UQC/CeN0gc7Mb9L+5f2f3Aqh+o56UhAd5jFWwQmvc+AEtemrl0pX JeZYoiH5bbZlJNOeXF4wnhXpcuP3zh1GDYQCfHUBHQTRvYvW0ZGoy1i838amTwTPmHD1 Ioww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=RRCXehpHok5vP1TtUisPaiq7jzEWLX+sYGsxAGIQn7I=; fh=RunEgwhbs7jBY7OMfHDvGK9UJp7q8al8FICtW1ZVXno=; b=EnqLDuWfd4QSqvHX2xOB9fpbNLEn4R+qFPG6lOUOow6xh50tDZl/OpG0oSEw2xdyNj thO/eP1id+x8Y2lFxaZJnHPKkwR5Y4TcNDlhs5B1z2MFX/UK3AdEEwoWbqI4DthO90UL aHqKxPbXSQVSMG5h14st+jM52R5l6F6ppchnGN10G5DVQInoGRHexmTUbDWGJGQqqeNG OwYt9wPialnE1o7hH5pjmbo/euEYDDb3y5xKnHj31vbG92XFG05a/pa+FZ5gMM+0VEnu wkGeoEycdXn40eQ+s+1dcyXZ6Iwa9cv7UEB1Is8ekceyeB2czHvy9Vrg5T8fYlTaBmFK JAWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sdukAWJF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id t15-20020adfe44f000000b003177a276c2csi1232979wrm.93.2023.07.27.17.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 17:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sdukAWJF; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 598DE86795; Fri, 28 Jul 2023 02:33:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="sdukAWJF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EF12B863B9; Fri, 28 Jul 2023 02:33:53 +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 mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0D2C186213 for ; Fri, 28 Jul 2023 02:33:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1bbadf9ed37so2387695ad.0 for ; Thu, 27 Jul 2023 17:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690504427; x=1691109227; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=RRCXehpHok5vP1TtUisPaiq7jzEWLX+sYGsxAGIQn7I=; b=sdukAWJFLBxJrQ2ttEarE+vpzjnJXKmd8tzLTYHqvsk1nf58q/wYsnZuY//Ke8id+T w3Sg8YDrbrZIFyZ42/C1dw3fgtOzsnBIVkW9sgN8+TVt3ERpvhH3wju8axh/bRDFv0n0 2dKImiqi0Aau28buyWPCzmoVQPD9PpFQVvujwjvCkz4u65L+GleiJn6E3+fXoiit4L7R MdNL/gBYpT07WATonttjLG0Fb6BhgbobHXE9fft3jgRavDAKBk0aYPOF3w1U+ZwP8eOb IoAYRjLvz7q4vebFGeShywQI/6knzJP8QSojZ7GQp/Myj4MIqWwApPZKX2NWTTrtQKjI 7YhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690504427; x=1691109227; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RRCXehpHok5vP1TtUisPaiq7jzEWLX+sYGsxAGIQn7I=; b=f+RjMnFelY+zC6fXSZT1RTETd/44vAqgJ8iJ9hlYJTZQdpsi20TEzZ4kV0cwZxzbLr +OkUA3ZSYYLxK3jG17neRkbIsw4hPXHyYPAqgdJJUy0KQz4H9Jy3Pw59rTRNdKEozcpi HGDEEh1VnCEOdl+yqq07LxJ6SRXo+RoeGElp5hCI0EkCQ8mK8RQya0ikTotxdjOF4h5F qJq10PlJ+x9OOkErVJolCekOdpBK/mB6CS2cCnrGUJ1raWmYq5Dz1hlRZzdp2JKdyHez Edy2N1TteB/H/lg+b08lJ7mR39/4p2t4vFpwrlEEz8/VcAqqefBht5j6uJR19fjoq3c5 /WZg== X-Gm-Message-State: ABy/qLZdfJuxX/0vJMqLWOz7Q3WBnNv1qNN/2yRMVRIZIFet2fNciuXE u+DT0zbbzghNtV6eR/1ijqOMrw== X-Received: by 2002:a17:902:d511:b0:1bb:ac37:384b with SMTP id b17-20020a170902d51100b001bbac37384bmr986116plg.6.1690504427232; Thu, 27 Jul 2023 17:33:47 -0700 (PDT) Received: from laputa.. ([2400:4050:c3e1:100:25dd:d673:efea:dbcc]) by smtp.gmail.com with ESMTPSA id g14-20020a1709029f8e00b001b9dab0397bsm2228540plq.29.2023.07.27.17.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 17:33:46 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, lukma@denx.de, seanga2@gmail.com, jh80.chung@samsung.com Cc: sjg@chromium.org, etienne.carriere@st.com, u-boot@lists.denx.de, AKASHI Takahiro Subject: [RFC 0/3] firmware: scmi: add sanity checks for protocols Date: Fri, 28 Jul 2023 09:33:10 +0900 Message-ID: <20230728003313.10439-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 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 Now that we have the Base protocol support, we will be able to add a couple of checks so that we will make sure that U-Boot scmi drivers work as expected. - check if SCMI server (firmware) supports the protocol - check if SCMI server implements an expected version of protocol Although adding these checks was one of my objectives in supporting the Base protocol, this patch series is marked as RFC for now because I have no confidence about what exact version the existing drivers are based on. (I temporarily assigned the version numbers in [1].) Test ==== The patch series was tested on the following platforms: * sandbox Prerequisite: ============= * This patch series is based on my previous patch of base protocol support[1] [1] https://lists.denx.de/pipermail/u-boot/2023-July/524811.html Change history: =============== RFC (Jul, 28, 2023) * initial release AKASHI Takahiro (3): firmware: scmi: add a check against availability of protocols firmware: scmi: add PROTOCOL_VERSION support for existing protocols on sandbox firmware: scmi: add a sanity check against protocol version drivers/clk/clk_scmi.c | 6 ++ drivers/firmware/scmi/sandbox-scmi_agent.c | 80 ++++++++++++++++++++++ drivers/firmware/scmi/scmi_agent-uclass.c | 41 ++++++++++- drivers/power/regulator/scmi_regulator.c | 6 ++ drivers/reset/reset-scmi.c | 14 +++- include/scmi_protocols.h | 6 ++ 6 files changed, 149 insertions(+), 4 deletions(-)