From patchwork Mon Mar 8 21:38:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 395509 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2061853jai; Mon, 8 Mar 2021 13:38:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4p8QtCpWZyLKsCEbOMvE8114/d+6SHqr0Y8VokJH9XggWz6Dj/rZEQ0ThtapXWpPFXGdD X-Received: by 2002:a17:907:d09:: with SMTP id gn9mr10586775ejc.538.1615239519825; Mon, 08 Mar 2021 13:38:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615239519; cv=none; d=google.com; s=arc-20160816; b=oqaf2KoNBAciwgLaqpkl419WGh1B7ljM1VwBASpQv5SARquNO7d0keqD9DlOs9CU+L zCy9DrtT8HoRTw7Kwo5/k6cK5XhbTbnHcEujkl288VPsnWCGnobiLblplqBEkBg/Irw/ +kTDOWgIS7BndzTaQDlNYO6kVnOSv2K2EgJggKBfxNn3KpqxQ+7q796XNbTtn3D68ZJQ TPxkp6Fld31Cf6k85YMnGRN2B4OmYm6EKM5yhXIg+whomAy3jy7eGb6l3wzIyWCHuy+F P08LeZ3SxKRXVjAC4ni+/QtHPJ40YTXeTEIzDeWgkp/8QkfCvdNB+9qLVptVQX/+Y4ZS OCgw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=RD0NbGg8AXnkocvGHMO5+/OFb3LsF2D+0QCCbdGSXEc=; b=kLTlzNsE+mlXZOOJ1Y3QqyWipQrou5KIN3xpMxRAw017npZk3htdn2SRFF77QP6+wu 90UDDXwPtDf3u02NFsJhvpSV7fpGcaPXXh8PIa/uVbfqJjodxxVRq/O6ezx1TZ8qxr/Y 1teD4pc5ZaQHptvH1VVoHH7DGgBqdJd3jYmdKf3OV9ZqwSTSpvkVhzP3Bcjw53Zsxnl3 dqp/sRPRWXOxCqwBfOGW8lMyvTTMR6Qx0XbxE4G73JrArfa/xPGXhgcvOv8u/Cnbtve7 Lg3fgsGcduIteDSVaYjjRheIwdLPsr/X5mA7KgiyDg6C11M58XXYUEhXCiTfz3JBNkGB a5tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mJOx3xoC; 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 q21si7228220ejo.166.2021.03.08.13.38.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 13:38:39 -0800 (PST) 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=mJOx3xoC; 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 C79AE82699; Mon, 8 Mar 2021 22:38:35 +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="mJOx3xoC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 16DE382764; Mon, 8 Mar 2021 22:38:33 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 5648D82699 for ; Mon, 8 Mar 2021 22:38:29 +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=etienne.carriere@linaro.org Received: by mail-wm1-x335.google.com with SMTP id n22so373674wmc.2 for ; Mon, 08 Mar 2021 13:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RD0NbGg8AXnkocvGHMO5+/OFb3LsF2D+0QCCbdGSXEc=; b=mJOx3xoC8ysXok7W8OEN6jf7XgvOXsI742FNxpXaq0tHG8RZDOGdCrMYNJDLwWCymB iWoDXCJs8IUxAYJGktu0xlDxPB9264ho0ZTynHO4vn+jaQzQ64e4ogl7qTbLjIaPtBWf Y/EaHrQY8nv1b35XePdbnn9WjODhqUQjnKwn3uKCAcImNy3++ijqCZ54txYtynBwi/HK eaHb8wq+5sXnGZXN5Kto4FPLnq0YHnJVWh+3bTHfeZAfohEvYTX3oWQOGsedir1FjbPo EwO3tRW78mtgK4xh9RdCGt8oMBLs3R1MiO6tHZ49gYVXUizeCDmdco/BhXpmZ3D0MhKy B+WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RD0NbGg8AXnkocvGHMO5+/OFb3LsF2D+0QCCbdGSXEc=; b=CksPhi0rxhP7oCXqtg9Be8KtaUSlG5Zx2Por4hCpk+AeeT4FBP3GM1N21qQ0oIPA+9 yubyoZU+9p6BqTgeZwER+bZdn5qJVOkYH1zVkFewVogsRCTpl2YdWkqeH9+qP0h1IA1H ACjv3L0f4Kl967B4X0/C2tFA+zbzKd03KluWYuSl176y6uKxZxooqbN0DoxCoLNMiD7z l/svb5VIWhpqqh9HaWi7aTK+wBsL9Hd62IznNzZkGfyEQPsa4CCAOj1TQ8kU0YdRaHsp iXwCE86qeA4sPQQwnU0q++4Puo5AXaWKnQxk49UUaPLyFez1mcEN81GksAr9hxlQT2Sf Bq/w== X-Gm-Message-State: AOAM531yQEiF2JG4ZFHf8EabYOlMyZHpvo/ytTC64elNO1WBfhjWIUWm 4psS5b+btgPWXjbbU33Az7wquFJCFdlDjw== X-Received: by 2002:a1c:4c17:: with SMTP id z23mr718825wmf.17.1615239508449; Mon, 08 Mar 2021 13:38:28 -0800 (PST) Received: from lmecxl0524.home (2a01cb058b85080038d9665c555bdad2.ipv6.abo.wanadoo.fr. [2a01:cb05:8b85:800:38d9:665c:555b:dad2]) by smtp.gmail.com with ESMTPSA id e8sm865238wme.14.2021.03.08.13.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 13:38:28 -0800 (PST) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Simon Glass , Jaehoon Chung , Patrick Delaunay , Patrice Chotard , Etienne Carriere Subject: [PATCH v4 3/5] firmware: scmi: fix inline comments and minor coding style issues Date: Mon, 8 Mar 2021 22:38:08 +0100 Message-Id: <20210308213810.29535-3-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210308213810.29535-1-etienne.carriere@linaro.org> References: <20210308213810.29535-1-etienne.carriere@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.4 at phobos.denx.de X-Virus-Status: Clean Fix inline comments and empty line in scmi driver and test files. Remove test on IS_ENABLED(CONFIG_*_SCMI) in test/dm/scmi.c since these configuration are expected enabled when CONFIG_FIRMWARE_SCMI is enabled in sandbox configuration. Signed-off-by: Etienne Carriere Reviewed-by: Simon Glass Reviewed-by: Jaehoon Chung --- Changes in v4: - no change Changes in v3: - applied review tags Changes in v2: - discard adding tests on IS_ENABLED(CONFIG_*_SCMI) in test/dm/scmi.c for the reason stated in commit log. --- arch/sandbox/include/asm/scmi_test.h | 5 +++-- drivers/firmware/scmi/sandbox-scmi_agent.c | 4 ++-- test/dm/scmi.c | 15 ++------------- 3 files changed, 7 insertions(+), 17 deletions(-) -- 2.17.1 diff --git a/arch/sandbox/include/asm/scmi_test.h b/arch/sandbox/include/asm/scmi_test.h index 9b7031531..2930e686d 100644 --- a/arch/sandbox/include/asm/scmi_test.h +++ b/arch/sandbox/include/asm/scmi_test.h @@ -24,6 +24,7 @@ struct sandbox_scmi_clk { /** * struct sandbox_scmi_reset - Simulated reset controller exposed by SCMI + * @id: Identifier of the reset controller used in the SCMI protocol * @asserted: Reset control state: true if asserted, false if desasserted */ struct sandbox_scmi_reset { @@ -48,8 +49,8 @@ struct sandbox_scmi_voltd { * @idx: Identifier for the SCMI agent, its index * @clk: Simulated clocks * @clk_count: Simulated clocks array size - * @clk: Simulated reset domains - * @clk_count: Simulated reset domains array size + * @reset: Simulated reset domains + * @reset_count: Simulated reset domains array size * @voltd: Simulated voltage domains (regulators) * @voltd_count: Simulated voltage domains array size */ diff --git a/drivers/firmware/scmi/sandbox-scmi_agent.c b/drivers/firmware/scmi/sandbox-scmi_agent.c index 3eafc49bd..56125a57b 100644 --- a/drivers/firmware/scmi/sandbox-scmi_agent.c +++ b/drivers/firmware/scmi/sandbox-scmi_agent.c @@ -18,7 +18,7 @@ * processing. It simulates few of the SCMI services for some of the * SCMI protocols embedded in U-Boot. Currently: * - SCMI clock protocol: emulate 2 agents each exposing few clocks - * - SCMI reset protocol: emulate 1 agents each exposing a reset + * - SCMI reset protocol: emulate 1 agent exposing a reset controller * - SCMI voltage domain protocol: emulate 1 agent exposing 2 regulators * * Agent #0 simulates 2 clocks, 1 reset domain and 1 voltage domain. @@ -29,7 +29,7 @@ * * All clocks and regulators are default disabled and reset controller down. * - * This Driver exports sandbox_scmi_service_ct() for the test sequence to + * This Driver exports sandbox_scmi_service_ctx() for the test sequence to * get the state of the simulated services (clock state, rate, ...) and * check back-end device state reflects the request send through the * various uclass devices, as clocks and reset controllers. diff --git a/test/dm/scmi.c b/test/dm/scmi.c index 792410338..2eaf06392 100644 --- a/test/dm/scmi.c +++ b/test/dm/scmi.c @@ -44,10 +44,8 @@ static int ut_assert_scmi_state_postprobe(struct unit_test_state *uts, scmi_devices = sandbox_scmi_devices_ctx(dev); ut_assertnonnull(scmi_devices); - if (IS_ENABLED(CONFIG_CLK_SCMI)) - ut_asserteq(3, scmi_devices->clk_count); - if (IS_ENABLED(CONFIG_RESET_SCMI)) - ut_asserteq(1, scmi_devices->reset_count); + ut_asserteq(3, scmi_devices->clk_count); + ut_asserteq(1, scmi_devices->reset_count); ut_asserteq(2, scmi_devices->regul_count); /* State of the simulated SCMI server exposed */ @@ -110,7 +108,6 @@ static int dm_test_scmi_sandbox_agent(struct unit_test_state *uts) return ret; } - DM_TEST(dm_test_scmi_sandbox_agent, UT_TESTF_SCAN_FDT); static int dm_test_scmi_clocks(struct unit_test_state *uts) @@ -121,9 +118,6 @@ static int dm_test_scmi_clocks(struct unit_test_state *uts) int ret_dev; int ret; - if (!IS_ENABLED(CONFIG_CLK_SCMI)) - return 0; - ret = load_sandbox_scmi_test_devices(uts, &dev); if (ret) return ret; @@ -172,7 +166,6 @@ static int dm_test_scmi_clocks(struct unit_test_state *uts) return release_sandbox_scmi_test_devices(uts, dev); } - DM_TEST(dm_test_scmi_clocks, UT_TESTF_SCAN_FDT); static int dm_test_scmi_resets(struct unit_test_state *uts) @@ -182,9 +175,6 @@ static int dm_test_scmi_resets(struct unit_test_state *uts) struct udevice *dev = NULL; int ret; - if (!IS_ENABLED(CONFIG_RESET_SCMI)) - return 0; - ret = load_sandbox_scmi_test_devices(uts, &dev); if (ret) return ret; @@ -203,7 +193,6 @@ static int dm_test_scmi_resets(struct unit_test_state *uts) return release_sandbox_scmi_test_devices(uts, dev); } - DM_TEST(dm_test_scmi_resets, UT_TESTF_SCAN_FDT); static int dm_test_scmi_voltage_domains(struct unit_test_state *uts)