From patchwork Fri Feb 19 13:33:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 384864 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp4567591jao; Fri, 19 Feb 2021 05:34:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmdFWMhalSMYrIUW3hfvPpkrohTXxGvbs08JvvXOmIbW7DtqS6oVHmog3DdQEyNgzo2xsU X-Received: by 2002:a05:6402:50ce:: with SMTP id h14mr9121344edb.283.1613741691312; Fri, 19 Feb 2021 05:34:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613741691; cv=none; d=google.com; s=arc-20160816; b=ll/wQ8I6BRFUWqj6O/ILAlI+1L5DUu1g1e2UGhvxiienor3Nxu9NiW8X4/qpONfLC6 Ow9tnkr8YvahveOvp1DIjPi0BkTDeFl5bGptVwClfc9FA1MonxIriTqDuAVe9b3PhFVX ZzCW+VxQe3XdZLliKTymMSU/PUamoMM05NBzTOPVA0kQJ60hxqoT9XMepdLYJH43DkUL Dcd+tVUkMDGlY4elgarI8bVeiFmnpKUPHWqwiMR4S8pRD00H8gjUklJy1+fCkhVUTP7Z 2O5vCHQ0kheEadtak5BVtRSmi508rBgmpLiCemegxrLMKMLNS/fyZeU9Wc8+EDUIBi9X RxEQ== 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=6DV/en+I9wtzRS76pL+iiSvowv1tsRueikkiLNCXHWU=; b=x+tbeDiKyjakVfS/J/z15vNT3iYvd1630umPWYQflITKKvI7sG1CGQDfy4O7Mo8ja/ NU+khEC717bH9JitK98WDuv3b5Yi7LWhTE4NNGTHh7rG9yaDyFVFAoV7vCYLe0zhZmOO 8WqFroRXeWgrNvAazCaUAcaGmghxsTR64ouQq9Qv39GnRJIiFFz2NK9pLPBiIfMcPpaV fHREr6R6acrf/YBVWOBZl/8/9B9aPUI50NR02QGqhwH+peEtKWIVWgZ9X7coEfG7IZQ7 qIWzlgVUQ6B6scnLW3tyG1U8H3n5WkDMvR9qB4ICpE4bCS9odD8Osd6VAtOhuC0fH4So kzzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s1CH6c3H; 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 zj19si2999562ejb.729.2021.02.19.05.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 05:34:51 -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=s1CH6c3H; 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 5BC2282849; Fri, 19 Feb 2021 14:34:38 +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="s1CH6c3H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B305282845; Fri, 19 Feb 2021 14:34:31 +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-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (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 2FD2082817 for ; Fri, 19 Feb 2021 14:34:24 +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-x42d.google.com with SMTP id u14so8530418wri.3 for ; Fri, 19 Feb 2021 05:34:24 -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=6DV/en+I9wtzRS76pL+iiSvowv1tsRueikkiLNCXHWU=; b=s1CH6c3Hb2NezttxvZ07dCtbR1H0RvU8hPROp/qZq2+YKOJcF6f2Re+v1v09MDev1E GL4ZTF1aKwmSa2Eo/FZfolw6pGfhZkZBpSjRft8XjQ8U3mjRwxnehv0XZr8tYvScVovI VMG4nPts1ZMPAicjOp8ssyShyqGT8JD1PfN6Ku1SjCQ8ymNBNGnPqLt56bgt5qB9Bjnt QSljPTal9cyaOa/bPAiG4mDWRx+d2U2Q36VDGNV7Z6s6cagiKohv7Cg6C85f1idRxAYk cvtCehfIYB0t9cbuEndFNotkOOptAcx2YEwYcuckrhGfD3L5/yQkTarrvVy4Do4CBKbL 4CCA== 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=6DV/en+I9wtzRS76pL+iiSvowv1tsRueikkiLNCXHWU=; b=e7G0rzOwutJ+R8/K02y4Gu0RYyR+bT+E1xH2QVM86VWh6zgMy9AsW0Zf9jE3rnnqpC bdRoeP85k9Sxq3EX7kZ/NxpPuviYVIPRtJ36dg9OXxN2PfPiJxa4gSDfBRf5IarPnNVx GAbURp/jijMJzflEZqL0/eVyaps0Y5cROzBO4k5Cm8T+uuSq5vepmfT4x/+0g+mBgD4l g9Uwa7RTXNUghoGslyK6rwN6Gq6wNbraojF7uEF9S/oWLVuofBuPW7qKwLkBCoFRC2ha NrSN8BsTtm7ofPDUwy6x8ibB6nx8xpq1Ua/Mae0C8TX6AqHO0i5oTmVdOlXgonJSYtV7 mMWw== X-Gm-Message-State: AOAM533DTu9Taes4D8kmfcE/HxXiDo+a1L8A+YVdDFPbqSFsBBjTOowm 2pMXqJVyzZwvCWKOkyDdLmrnTQJyBfEy9rqONKc= X-Received: by 2002:adf:ed41:: with SMTP id u1mr9159631wro.73.1613741663551; Fri, 19 Feb 2021 05:34:23 -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 r7sm11351059wmh.38.2021.02.19.05.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 05:34:23 -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 v2 3/3] firmware: scmi: fix inline comments and minor coding style issues Date: Fri, 19 Feb 2021 14:33:41 +0100 Message-Id: <20210219133341.3097-3-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210219133341.3097-1-etienne.carriere@linaro.org> References: <20210219133341.3097-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 --- 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 Reviewed-by: Simon Glass Reviewed-by: Jaehoon Chung 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)