From patchwork Mon Feb 22 07:27:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 385740 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp1052403jap; Sun, 21 Feb 2021 23:29:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJySAM7o4d79EJqMAdyycEK/qXvfGp4JTCDGYMTSSlrB1H+K0Q0vnH5jVRTEuL9ViD8ntOIU X-Received: by 2002:a17:906:3e52:: with SMTP id t18mr6272567eji.461.1613978968890; Sun, 21 Feb 2021 23:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613978968; cv=none; d=google.com; s=arc-20160816; b=tADrNZ6d1TVxssIXYjQFK52l5xeH41y9mwDTxPylbE6Wd7dR/Pnl1K1lStitMR6uWd mOhZv8QZ2QAlRiPxLuTDpOSPoJGj3dfDcIT6N0nMgVzaUi5fG8h4MnDrRrZsJTIRmL8v cJYL4shYRQnX1mqS9PBCEYtARovQuTjtUO4JoG48QONOuY5eTAwpQWcoo1Uf6AJY3qyU 6aFqnfoaD6fUJFbFMvNXQKD41/lAOjdEaGJt/c7irkbrK6L63RiHoL2tj6jom/IxOz0A TFioLNx/a7F9b68CSY8SM9FlDrxU9xx211C+EfZUUD9dfaHpJPb665OivQ4QUMv4UMcx 9xQw== 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=BVYyJ9BMTr42y8T0BVJyt91yaHaqSwmXmY6QKKL2Ij4=; b=IIILaouF+toWq4pZe8M1xE5qATZJcrHCEWuY5ka5+6P8jZ4GH6mJvtdXd6K5sK/jug mmFMTyNlU2s/NWVUF4DN72P4K10+tRBe/BRpRZVk8IHx6MFy8fYW83ntL6W+qH54NjeF mL/0E9bsJkPy0IHWwZX6lmxnzAN3vkYmN5MKFAjeHHiepEoogdcXXgkv+lu2qEuFdbJW +9YpkJeJD+9dJvF2UqYNNnRDVdTNyW0PV4v4D3ld9W6QHY6Wo5SLPDlTXSDboFSGdDR4 5FlcKZhkpsaltSBewDa0/uqETTr+thc4EJQzLDOHeTYI9EuQZkoU1++QLIkQjRUSi0ul ieIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L65D7Tlf; 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 g24si11978711edh.565.2021.02.21.23.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 23:29:28 -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=L65D7Tlf; 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 C3FD68289B; Mon, 22 Feb 2021 08:29:16 +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="L65D7Tlf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 51F7C8289B; Mon, 22 Feb 2021 08:29:07 +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,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (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 88D7782868 for ; Mon, 22 Feb 2021 08:28:57 +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-wr1-x429.google.com with SMTP id t15so17870701wrx.13 for ; Sun, 21 Feb 2021 23:28:57 -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=BVYyJ9BMTr42y8T0BVJyt91yaHaqSwmXmY6QKKL2Ij4=; b=L65D7Tlfr6oowk2mmOUT9+ZAwtlDWH9UYcJ0rQFi6frvG+v6wvLVFlCNsNm5BRS66N /VMKeKqzVPRbaUORFnLLFT5B4G6J1PdujbWXqX6MAI9czW7ZEbfRimCHiGlylUxZCuKJ pNw9F1MbgRkuiD9MYIkcUVvN2Q6aAkXtGpvaX1+MRna8kBQKW+XiYkWwHrNo5wLp6uRw 7ZzV0fhWJEr5SxjHo1ejEOxCqUAx6TlO+b2FymLhtpvxbzGp8xgnFgN+UMDN4gB7kaFI kywmf15i0UY2TYs3bF/8RaIxUfGqSVSr7UaDu+14O/jRGDByFrdeav8w8LmvgWyvuAUI nAhw== 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=BVYyJ9BMTr42y8T0BVJyt91yaHaqSwmXmY6QKKL2Ij4=; b=Eg0pVJka2C5fHhbvWU8Jj/YmGVvG5gsXxAMZ6Y9MVCdlCSAiULxJzqZKDKbvZg3jt4 5Dci9SNBkEY/9uuBT3xRwtMjTMH97YGfRFUKZbQeJcHBU6rctDA60ODbGWQ9BTy1Fg7I 0Ay4wtMWvFgiYbnsl4WkHHSAWygFTJOXpanCMnk80mH0tEdcrrfLjMGTZwkiWzW/OSmH 1QCugQlBmq8uD8UM9I0DC0CGcQy1QJy2m58/bF8hzneqICN91m8YGNhqSR2XrKK98/H7 6FdHWJZ2WOtwi6TaunXbLrWGLG/r9vSdLbX2HHPgfcqheHIKy7eqWSf7ZmkLVxdxugYP Nj9g== X-Gm-Message-State: AOAM532wK3vSdN4zJgbILxY8HxTZ9oBW0ZufNYoJz+lBEIcN45YPgfYn UTHxIOBCno/KqqC0NaRNmMVeXze2PcjaNA== X-Received: by 2002:a5d:4dc1:: with SMTP id f1mr13886021wru.163.1613978936820; Sun, 21 Feb 2021 23:28:56 -0800 (PST) Received: from lmecxl0524.lme.st.com (2a01cb058b850800b51a732fdac74386.ipv6.abo.wanadoo.fr. [2a01:cb05:8b85:800:b51a:732f:dac7:4386]) by smtp.gmail.com with ESMTPSA id u137sm25426244wmu.20.2021.02.21.23.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 23:28:56 -0800 (PST) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Simon Glass , Jaehoon Chung , Patrick Delaunay , Patrice Chotard , etienne.carriere@linaro.org Subject: [PATCH v3 3/4] firmware: scmi: fix inline comments and minor coding style issues Date: Mon, 22 Feb 2021 08:27:46 +0100 Message-Id: <20210222072747.7514-3-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210222072747.7514-1-etienne.carriere@linaro.org> References: <20210222072747.7514-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.3 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 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)