From patchwork Tue Nov 14 02:14:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 743755 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp1960050wrw; Mon, 13 Nov 2023 18:14:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEilHuTRdhgezmmOS4wI/T0qBSWKRFQxztrOqQFCLjueG7jrL7ks27CG0WvM5OTtN50qG2z X-Received: by 2002:a2e:8e6c:0:b0:2c6:efc6:946f with SMTP id t12-20020a2e8e6c000000b002c6efc6946fmr615260ljk.30.1699928087621; Mon, 13 Nov 2023 18:14:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699928087; cv=none; d=google.com; s=arc-20160816; b=fy9c15B6lmWN22/MHq6YbeOes/N8kMOdVETAiO56YhEXDUSW+onrOAJoHaac/WuG2+ 0r8tejZq9NfzoPdEwl5OuBI4U6iZJo7eY2gDa4xXAHjuc23lPJ0QWsDqbMmLCBpk688w CiTh3PU/usPBRb3dwH3Y/vus0fBzCu/iXW/bGA0TJHB40rlC8cpKhGvUJ+InfwhZsetA 1mGnxNUwg2+iX16jADndLXq7YIJs2uLo1UFSn6fLLVO3LT63FCI35ZHMfh7lwM34Xidi shfPR3/+RgLnCbhZaVhg0d0EmfCXpcR1nzkvkG5AhUzFEGHyJ4nF3ztsGgCgvhFgmQl5 QV+g== 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=PrB+iqYTBaZ95KSYK/XlTia4h60tiNlLhCJwoKvy7u8=; fh=FEXntNvfp44QdEE6WJIcPMgg3VtrFk//sTXqtO2Yfu8=; b=osY/5knW8h0g+n2W4LVyrTCTzwBX4AWumnr23Unc5uoB3/qmH9dnzLUcBgCRRdLNmz F3EOYbgahlEiPQa6k7kVXONg1SCtNxAb1WTWePQAtFyzJR+XE4dRltziP7pekODcN7hq epxJH1RNHV2s+8zDkwnqjV4Ue6377ONwCWKYxoRi7kYf5b1liSv0hMA7taDuH6v5SnMY NDOqywzU+w4JUPoptTlk3KyALK8jJ8Ehnkl8Im8zW9tqxEMcVLI7YOWalhPjnvMGGSU7 9V9GclB2M2LwQAmqU1uLoVfbVGxk9GyD2Gbbb5M6c/VnalPSsvm+jLFsaUWOa70zgqNV buiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P42f9wqC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id hv17-20020a17090760d100b009ddcbeeda0dsi3488233ejc.604.2023.11.13.18.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 18:14:47 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P42f9wqC; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 24D408715B; Tue, 14 Nov 2023 03:14:46 +0100 (CET) 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="P42f9wqC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2A5158715B; Tue, 14 Nov 2023 03:14:45 +0100 (CET) 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=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (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 6FE128719E for ; Tue, 14 Nov 2023 03:14:41 +0100 (CET) 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-pf1-x435.google.com with SMTP id d2e1a72fcca58-6bbfb8f7ac4so1141031b3a.0 for ; Mon, 13 Nov 2023 18:14:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699928080; x=1700532880; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PrB+iqYTBaZ95KSYK/XlTia4h60tiNlLhCJwoKvy7u8=; b=P42f9wqCaLIeZojUxIA+ZaOJFjSW+Pz7F3S9ZMQwl+O2RmM7/+NN5LIWq6pYemYyX2 3TKQAD6Y98A/Uy4Ckn2g2iK6+9/7H7WecWxvzsdpxV78gM5RNqZw1zCliOJKdQ76G26n F0/3s83QKcC/99Ewm6ZhfNzDGHkwNh9RNRaHtQypdYJumQ5RTEOilqGxvs4fRa02QEMp 3OafOymC0UYJRuqzJAPso5+u/evZ76j92/oL96nsgWU4TDVBBYe4+VpJqUauDHnE0WXz zLoTBOvYbjYbRXPQBgSf+W7YoSKkQq9GP+vX7RLEaKWdZpBKa2O6P+k0veI++8QNbGT8 FlXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699928080; x=1700532880; 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=PrB+iqYTBaZ95KSYK/XlTia4h60tiNlLhCJwoKvy7u8=; b=gjKUx+ja42Grzc8D9KRTKo+E/qVwmBznletgCuof9r8XFtFB8Wdb9fgRZ3FnYhKPkC ClFTWAy5BpVgCdW7OM7QVQA3Fxdkf5rtGei2Qy7R1CZZTkgqN/3jbNyUVWj6Dp12Z5ar XHPbi8CBlkl2kC42sNhmYoI6s+ZchwoDmBvb7Gcdpm4miLmaBcVMqmFHXVdEt9j23BSw Z7P4CiHlHf6XbW7xbdz2KSmG2I58DoPKMB5ZsyG2wwCe2imUglS3pYm8SV8tYjxYSGBz ohzz+FIMBowq9oGaYauIGDqdsPsXmKt+azlAelic3jrxUini2W02P4z2nfwrsUsRoZYa 5eBw== X-Gm-Message-State: AOJu0Yx+fTeJ5b/+U0vjNY9JFaekaA5WWQyzM1N7X6oKWFpZBHFkMhY4 kOWQ5uEJBclUMh2sdndsb6Fp8w== X-Received: by 2002:a05:6a20:3d0c:b0:15a:2c0b:6c81 with SMTP id y12-20020a056a203d0c00b0015a2c0b6c81mr1462181pzi.3.1699928079589; Mon, 13 Nov 2023 18:14:39 -0800 (PST) Received: from octopus.. ([2400:4050:c3e1:100:66f2:cd5c:3d82:6e6f]) by smtp.gmail.com with ESMTPSA id i4-20020a170902c94400b001c61afa7009sm4680475pla.114.2023.11.13.18.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 18:14:39 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com, sjg@chromium.org Cc: etienne.carriere@st.com, michal.simek@amd.com, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v3 0/5] cmd: add scmi command Date: Tue, 14 Nov 2023 11:14:23 +0900 Message-Id: <20231114021428.531887-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.34.1 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 "Scmi" command will be re-introduced per Michal's request. The functionality is the same as I put it in my patch set of adding SCMI base protocol support, but made some tweak to make UT, "ut dm scmi_cmd," more flexible and tolerable when enabling/disabling a specific SCMI protocol for test purpose. Each commit may have some change history inherited from the preceding patch series. Test ==== The patch series was tested on the following platforms: * sandbox Prerequisite: ============= * This patch series is based on the latest master. Changes: ======== v3(Nov 14, 2023) * return -EAGAIN if we want to skip a test. * use CONFIG_IS_ENABLED() rather than IS_ENABLED(). * remove goto by introducing a function in sandbox implementation. v2(Nov 13, 2023) * localize global variables to avoid pytest errors. AKASHI Takahiro (5): test: dm: skip scmi tests against disabled protocols firmware: scmi: support protocols on sandbox only if enabled cmd: add scmi command for SCMI firmware doc: cmd: add documentation for scmi test: dm: add scmi command test cmd/Kconfig | 9 + cmd/Makefile | 1 + cmd/scmi.c | 384 +++++++++++++++++++ configs/sandbox_defconfig | 1 + doc/usage/cmd/scmi.rst | 126 ++++++ doc/usage/index.rst | 1 + drivers/firmware/scmi/sandbox-scmi_agent.c | 30 +- drivers/firmware/scmi/sandbox-scmi_devices.c | 78 ++-- test/dm/scmi.c | 93 +++++ 9 files changed, 686 insertions(+), 37 deletions(-) create mode 100644 cmd/scmi.c create mode 100644 doc/usage/cmd/scmi.rst