From patchwork Fri May 13 06:26:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 572078 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:66c4:0:0:0:0 with SMTP id x4csp198539mal; Thu, 12 May 2022 23:31:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZao+zYOVAtZB3PrFxpSwSqtbM4ZcK2owjJNC23thJFHk7+HC3SHV44fQqm7VWX1/QX5iR X-Received: by 2002:a17:907:2da7:b0:6f4:801c:6c3d with SMTP id gt39-20020a1709072da700b006f4801c6c3dmr2811976ejc.310.1652423469821; Thu, 12 May 2022 23:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652423469; cv=none; d=google.com; s=arc-20160816; b=P6+kFSoz8Iup4orvgiZ5WjJDe2yj6lZtkBKUyq08DmOdOJqP6u29ot5I1TuyyFOA5U GdQCRmqz6wRDRR2EVDviPF5Lp32112DQTJlxtTMiLiyRQ1w21mGkY0NqHb+JL2UgRmJr EkUMM9L69cgI3D+RaQKnjcjMjUWgEklxF/c12dZYDWeY48NjqXMh/hiMvcFQWG8BgDeU YG5Y2uJj2Y59o6QZsEY48mcuLkzHBGfLQNxuZ+qRKqU6pvJkjRJexRjQP9GBqrjBaZ4g WVPk3tOaQxU6IJ25P/u1quOLWDG6r1ZuZcdHCrV+gPQT50TXMnpJ9oKOSBBfnWaDrjBd 5PVw== 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=ftKjhXnxXieu1AqR2t6cJKJbzTLryBUIn+TNj0Ew9A8=; b=j0tD7QnYUkWLl4vWEZORl0h/HXzRE5XFA73Xjeu698PLzShmWB7QSnXO0/+WZUlxMo mMd6gVpVfKnfsm6Iv18Fnf8XX7NG+ZzuBSSvAX/PaYOh8XTsQ3Orx/QA0ie87OTtWM+Y VAARnJer11DjOaCnnxWtu65ep+yT1SxiAZaSV3NROriD+voQ64qbGZ58eLbOhXXrsmy/ tLlevWs5ZvZZtZCCCydQUK3VJ/MbVA9am6WAsxRFlR1pV/gveMUYEJb8EMMLjqoF1j7B BixNuc4821AGgpgHGR0w9SW4q+7hVDkhUccKh+/2LeaSVWIRjscCe8rirHibiuSX0GZW LkjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Iyj3cxu2; 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 ay5-20020a170906d28500b006ec0aaff9cfsi1165509ejb.932.2022.05.12.23.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 23:31:09 -0700 (PDT) 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=Iyj3cxu2; 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 8E68E84189; Fri, 13 May 2022 08:29:31 +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="Iyj3cxu2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 63C2C83E01; Fri, 13 May 2022 08:28:45 +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-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 7496D83EAE for ; Fri, 13 May 2022 08:28:39 +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-wr1-x42f.google.com with SMTP id m1so10027719wrb.8 for ; Thu, 12 May 2022 23:28:39 -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=ftKjhXnxXieu1AqR2t6cJKJbzTLryBUIn+TNj0Ew9A8=; b=Iyj3cxu2KsN+BZB9Cm7XIbvzOwTPDucV19BwxJr7CtPMcXOFmecQECreApbuMN1zjh noRq1sdqnJwjqUbYrAJ72FSgfowJaTxeX58+y7q4MHG1AUxMDUw1eAm+2X8OOtVlMfzf iWC3GpfEYA1pPoMaYR5mklmD/5t0XzPOn4JsJHSF9Td32l4eGLpO9SMcv1fNO/45WEQm R7kCWYqGp6wYMOFElRsy1RMuh5BwgVC0oiOpOf5pjbpd5xD8vUemwOsNwsJwRtrM2UlB gGywT5Sdr3Tr1KMBJ7neB2OcBKpkXG9J7w5PUdlzRLnXiok9JwoRWSym5Qxe36xcFJOE 2Z6Q== 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=ftKjhXnxXieu1AqR2t6cJKJbzTLryBUIn+TNj0Ew9A8=; b=Su3rzsKZnL+6FEH7p0fXot1+5VMfmzpKQkJM9lK3NUEJ7AeVa0fGOua3BfCj/xKwy8 Jrn3+QKPucmeDdCEkeBJFpt02LtGoOB7pgu1bQ/SeNKAIIqLfjX+6O1vOsb81+fu1Sy+ KaIYXV4RTs18ThwZfGQ5PeHx4LNvKbRTtnci7Lu4WnxaSnzMQk5ptoJVSxwfIqMhiLYN nbGRO52Sf+LXnFt3UYcZ6GrSgmwq79ujDQl3zYRF8crojfFBmdrHTw8yaFgFtTBSsIMO 2P/QrUsRAbKIg7uuqncsVOak22TAoMbKcV8t/UOdoelqs6XzV74HISmtn/nj7Oxwf/rC 8svA== X-Gm-Message-State: AOAM531ePClFNN30CZcKh3xZda+iX0CVqgcYEVeEBdGCvRgrSiGZKbbL EspgIT0ZTuGcAShXfKRqlsqZTgAZxEHxpw== X-Received: by 2002:adf:ec89:0:b0:20a:c0a4:e4a3 with SMTP id z9-20020adfec89000000b0020ac0a4e4a3mr2437267wrn.98.1652423318413; Thu, 12 May 2022 23:28:38 -0700 (PDT) Received: from lmecxl1178.lme.st.com ([2a04:cec0:1194:a3aa:dc31:6fc0:bd75:771a]) by smtp.gmail.com with ESMTPSA id s18-20020a7bc0d2000000b003942a244eebsm1414235wmh.48.2022.05.12.23.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 23:28:38 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Patrick Delaunay , Patrice Chotard , Etienne Carriere Subject: [PATCH 14/14] firmware: scmi: use multi channel in mailbox, optee and smccc agents Date: Fri, 13 May 2022 08:26:22 +0200 Message-Id: <20220513062622.155433-15-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220513062622.155433-1-etienne.carriere@linaro.org> References: <20220513062622.155433-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 --- 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;