From patchwork Tue May 31 16:09:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 577457 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp1302334mag; Tue, 31 May 2022 09:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf6sB+Pl0NpFvFWeDsqThYTlnoGKDLL0XKh5g9rLokRU52DZm0hitHF2mIWTMZeiVYH8sx X-Received: by 2002:a05:6e02:1a42:b0:2d3:afa3:bd with SMTP id u2-20020a056e021a4200b002d3afa300bdmr4874753ilv.142.1654013527956; Tue, 31 May 2022 09:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654013527; cv=none; d=google.com; s=arc-20160816; b=lvFbx5JBHOWtkGSpp4xU2ogSb1Er2a1M1VKPmHfOo0byrJ1i7Z7oSJc+NiY7kShqw7 xXcF24ROqsLZcN7vmr5XXCpbqinBkHeEFcbyPxiliZFat8MJ5v9G0sp9BQ4erbY+HRT3 nf6VZLTROA6ESR6iXSazYlshVtJBdnH4murBwEudbfyITuX6p04xqfuAeGODr07CfiST i2hWbFcmW9JO+aqqXxV58j6VXEueezA4JjQiiDrDuXukl7Qfj57K/DsptfxRRJfZxC8U CO3tuYr4emqCIzHd4A0TvNoSXlWO+BFFlUyna5xqxkdwmrFJfeVxifffjSvpjzwQNyDZ SW3Q== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aOQUVjcd80eT9g5ZI09/rRjgTm3cf8zed/+wUM6diBg=; b=ThnBSwa8YU/jTmri5d33jzIF2rTHcTm5irXgDdA8fmPSMcLCG3OrjcpC2UYTx+Nash PZi4HjkWLxc2YsxGrSZymdcPD8LFwzxyITar8DwBt+DFEGwPByH2L0/DQ9eS5ZSeSQ1O pF9DUs5sANy39+vwiXzl80cKcgvR38dzYe7fr4F7dlAzc1Xpo7TRrC9ftdJEBQhafe/e s+nIybfU8KOOXy8OaR3pY+u0/ymBBt+6qxx07hjg7tsFOMUDoeCp1f9v7kos0XlF0mMU YWZNt25oS8YtSX5j+jiH6LjKNZRCNPkiAfJIsf3/4Q36s+euNWYaMXMJWMAHJXOOHN1o VcBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YmeMIgMG; 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 a1-20020a92c541000000b002d1e8879de8si16706754ilj.20.2022.05.31.09.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 09:12:07 -0700 (PDT) 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=YmeMIgMG; 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 E8A06842D4; Tue, 31 May 2022 18:10:37 +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="YmeMIgMG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE6F483DE0; Tue, 31 May 2022 18:10:05 +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=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 B89B483F40 for ; Tue, 31 May 2022 18:09:52 +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=etienne.carriere@linaro.org Received: by mail-wm1-x32c.google.com with SMTP id v4-20020a1cac04000000b00397001398c0so1509503wme.5 for ; Tue, 31 May 2022 09:09:52 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=aOQUVjcd80eT9g5ZI09/rRjgTm3cf8zed/+wUM6diBg=; b=YmeMIgMG69Wg5HiWbH9iXPtvC3rOUF3WkYjHd5EDh6s83he2eXatY+j237G/ps/4U4 If09Q7YacmgK5o/uwggO5dauahP0hROYtzyn8MdxUB4K/om5HxCuoDTRIbO/wnBIgCpo n4f+UlKw8qlrUATSImUVpgayEC0+IGn1Pz3ZSo0sYbYi76N2B7qbxaPWsd1XMtYWvS67 LXXBvTiOyGcG2iPmyMIu6kFZ2dZac1pZAzaMOvyBldUbdrDiE3aOOl+D0ux3BBlnC80/ EM4rOL+4m/4ljzeycbXr22Zm2IbNCTsp2VWi13UC9JfzHNcyEmkoeC3Z3yzctRJLICc8 gMig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aOQUVjcd80eT9g5ZI09/rRjgTm3cf8zed/+wUM6diBg=; b=Lddt2ce3ApO9OiwJclrYDoILwk6/6IcHdq8qsDwYVIL37ZpurjfMzD/0mIfepJe0Hs pCW0bmI2UFimHHIzVj61hpkwH+BGQqaqEWNV5I6PRnntTGIY4xebaAsCDd2cFrODOIIh YTv3V7xD+LpT0lmqCoIqsxBqt66yTjyV+fVnNdPhk3qnTuqJvsL0fwBsGOdgfEmy6lbJ HBYYhxAMvPxuILsQOyCrM3yCrFPjVYiW8OcJfg5nH5NF1CFrkkQVi2BhBUAhAtrYy87c wsq6O3unhzLgmJbpF7LUlI6NbqVhPa8Dohwe2ptzQ/4o5jWWhVAAW3r4WBBCHn5TvyIx L+vA== X-Gm-Message-State: AOAM531XHzGc+YZn2I14Uk6OokxzMGyk3/XPf8cvCVQDv3NHP9lGIrHf XaS1JsFD2WClS0YGfufSFBjuhOFYGNEVEg== X-Received: by 2002:a05:600c:4f93:b0:399:e654:4481 with SMTP id n19-20020a05600c4f9300b00399e6544481mr15425741wmq.164.1654013391938; Tue, 31 May 2022 09:09:51 -0700 (PDT) Received: from lmecxl1178.lme.st.com ([2a04:cec0:117a:a94e:9569:2e63:8a35:2cc5]) by smtp.gmail.com with ESMTPSA id r23-20020a05600c321700b0039aa4d054f8sm2884035wmp.5.2022.05.31.09.09.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 09:09:51 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Patrick Delaunay , Patrice Chotard , etienne.carriere@linaro.org Subject: [PATCH v2 14/14] firmware: scmi: use multi channel in mailbox, optee and smccc agents Date: Tue, 31 May 2022 18:09:29 +0200 Message-Id: <20220531160929.931150-15-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220531160929.931150-1-etienne.carriere@linaro.org> References: <20220531160929.931150-1-etienne.carriere@linaro.org> 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.5 at phobos.denx.de X-Virus-Status: Clean Updates .process_msg operators of the SCMI transport drivers that supports multi-channel to use it now that drivers do provide the reference through channel argument. These are the mailbox agent, the optee agent and the smccc agent. Signed-off-by: Etienne Carriere --- No change since v1. --- drivers/firmware/scmi/mailbox_agent.c | 6 +----- drivers/firmware/scmi/optee_agent.c | 5 +---- drivers/firmware/scmi/smccc_agent.c | 6 +----- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c index e63b67c5ee8..3efdab9e723 100644 --- a/drivers/firmware/scmi/mailbox_agent.c +++ b/drivers/firmware/scmi/mailbox_agent.c @@ -43,13 +43,9 @@ static int scmi_mbox_process_msg(struct udevice *dev, struct scmi_channel *channel, struct scmi_msg *msg) { - struct scmi_mbox_channel *chan = dev_get_plat(dev); + struct scmi_mbox_channel *chan = &channel->ref; int ret; - /* Support SCMI drivers upgraded to of_get_channel operator */ - if (channel) - chan = &channel->ref; - ret = scmi_write_msg_to_smt(dev, &chan->smt, msg); if (ret) return ret; diff --git a/drivers/firmware/scmi/optee_agent.c b/drivers/firmware/scmi/optee_agent.c index da5c2ec9754..2b2b8c1670a 100644 --- a/drivers/firmware/scmi/optee_agent.c +++ b/drivers/firmware/scmi/optee_agent.c @@ -278,13 +278,10 @@ static int scmi_optee_process_msg(struct udevice *dev, struct scmi_channel *channel, struct scmi_msg *msg) { + struct scmi_optee_channel *chan = &channel->ref; struct channel_session sess = { }; int ret; - /* Support SCMI drivers upgraded to of_get_channel operator */ - if (channel) - chan = &channel->ref; - ret = open_channel(dev, chan, &sess); if (ret) return ret; diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c index 73a7e0a844a..bc2eb67335b 100644 --- a/drivers/firmware/scmi/smccc_agent.c +++ b/drivers/firmware/scmi/smccc_agent.c @@ -42,14 +42,10 @@ static int scmi_smccc_process_msg(struct udevice *dev, struct scmi_channel *channel, struct scmi_msg *msg) { - struct scmi_smccc_channel *chan = dev_get_plat(dev); + struct scmi_smccc_channel *chan = &channel->ref; struct arm_smccc_res res; int ret; - /* Support SCMI drivers upgraded to of_get_channel operator */ - if (channel) - chan = &channel->ref; - ret = scmi_write_msg_to_smt(dev, &chan->smt, msg); if (ret) return ret;