From patchwork Mon Nov 8 07:56:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 518026 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp3208401iml; Sun, 7 Nov 2021 23:56:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiaCFADrcwf8sIqaKR01mBgHHmX6evezflUrmXaicrvFs+1GZP6t7ZM0iRpImc3JHAJy8j X-Received: by 2002:a17:906:6547:: with SMTP id u7mr94332573ejn.544.1636358219234; Sun, 07 Nov 2021 23:56:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636358219; cv=none; d=google.com; s=arc-20160816; b=LBCr6H50MQBaI8Xz9PlHbEUUPB1Z2by7igR4ZUt0nIgm3+zeTnJe9Uratngo1SEfUU ha93Hf0aUsYE1pOt+zGwhLkbgDvCm95k26Uwp7SexahsqJRKMpGZFz7p7A6jnkX0fwOu 6FDY7PRWkT5wAaPww8ouKUj5+Gi18ElDfbBugr7JaKTvboC9XEGAUxI9ygMt/81JaOwT iLo+wsnING2r00bmVuzbLbIxv1GNf4WB/ybuPn7d70jNNbAw/HfOHvY5pIxVPhOdy7Ng wd0VxZFuo/wLRSqXCtqCjGhEJ6gx9anVyFtnbhOeCP+xUlQYFi8vZeyOVX4Ka0B8IwLY 5xwQ== 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=IA3OGWIdzae6YHz7qV2boZuYVOb1wQGJgliwD/Gvsu8=; b=HqSocXgWEUnz9ie2vrVwy7hCHEIXNgoYEL/A6qSCUM0q1W7OZv4C40fqxJAzQaNOvt ZrtKYBPv7En/XroIv2Bfu+l8ksrWOzhKvTvgrqf2/Q0fHsg4hOEbQIEfqvHomK+MJ1XA XStDFY8mbKNXzKT2TyQoUQfJcHGoaLSAjIMrr2CM7/aWY8P5B3w7viSEJSRJ5B2iy9Pz sMNhwFS0JY07a1r6hYiL4K6/lk3DwDxAIvt9oLdPyChMraotlimMH4vh3KDn2DeMHVkK yHoHmaSQKauwBuizshxdClyGcF3aqOSLODSwssIFFee03Z6LvJl81KZKodLShMGVovFJ ZdnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=twPCaS9T; 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 dp9si29982435ejc.773.2021.11.07.23.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 23:56:59 -0800 (PST) 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=twPCaS9T; 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 8871283702; Mon, 8 Nov 2021 08:56:41 +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="twPCaS9T"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 25EA781E47; Mon, 8 Nov 2021 08:56:26 +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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 5E35A81E47 for ; Mon, 8 Nov 2021 08:56:19 +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-x42f.google.com with SMTP id c4so25264446wrd.9 for ; Sun, 07 Nov 2021 23:56:19 -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=IA3OGWIdzae6YHz7qV2boZuYVOb1wQGJgliwD/Gvsu8=; b=twPCaS9TxlAFUFrOls7qQ32CVAXKaGRFVbYkquLK7ET1zeEgbrUb9DPhSBDSRzET1w ++4R8NqBHNsQWqfFtgvFP+xyvFM5xe8dnbMkINLc5Mm8i7KiDEFYicwtwBIF3iQF6qLr /994FjvNUJUSpcXfKW5uCFHYeb70ztXup249h5UHpdNTiI64XxkBXfhUuQlOEy/SGyHe U34w3UhLiFbUJYE2oLOryyeJqnD/vFmeFfX7RYpAaE3Oi6lkCE8qTQ8rFy+a89+7OPdo k/ngfUSuoDTlRGQslzlOA6NMCIdY+qphtevcKRCdnto7RUg4hVM8uF73K71Yv3SGy9qL frPg== 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; bh=IA3OGWIdzae6YHz7qV2boZuYVOb1wQGJgliwD/Gvsu8=; b=GNP/ryh8Iy/Pe+dJgAQX7TK8w/HbXrPqBAOWnSAjiwlAOvgwSoV8vg6NnHowUGpX/o of+QZDnOWYg+rKSzdp8k6SIWZKmDwhQXXUfM6paSoO7kA162Fa0y7eXLYssjsIZSGY9d Qi/sWiUcsdCW3tcLWDj8gghl3Flq4si8SmDaIfUHF+koC+CdqDfkI+QlcZSDF/IO+9Ys farutnGfXPJtPWOUUU+aeH6ZrjhU/ad/p/IM82bTdm7Wx+Gr+CEUcla4L1g8Rdld/EfR qgJsOpSAH9CcL9Jd7PmsZfZvFAMpBrZBil+A3AtZc0O8T748Zl7lffjU8JOgk4QpAqZL cPlQ== X-Gm-Message-State: AOAM530JR1yf6nIWQG3a10rsOn5HY7JB6B3mf9OQSJFbraaU1jhJd1jQ HC1LIapib/2sf1MdcUFVeN8N0odgecYzQw== X-Received: by 2002:a5d:400e:: with SMTP id n14mr82908396wrp.368.1636358178749; Sun, 07 Nov 2021 23:56:18 -0800 (PST) Received: from lmecxl0524.lme.st.com ([2a04:cec0:1097:d416:ed93:5b26:60a4:aace]) by smtp.gmail.com with ESMTPSA id t9sm17183725wrx.72.2021.11.07.23.56.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 23:56:18 -0800 (PST) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Etienne Carriere , Simon Glass , Patrice Chotard , Patrick Delaunay Subject: [PATCH 4/5] firmware: scmi: smccc transport: use plat data, not priv data Date: Mon, 8 Nov 2021 08:56:10 +0100 Message-Id: <20211108075611.30759-4-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211108075611.30759-1-etienne.carriere@linaro.org> References: <20211108075611.30759-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.103.2 at phobos.denx.de X-Virus-Status: Clean Change SCMI smccc transport drivers to use platform data rather than private data for channel reference since it only stores platform data retrieved from the DT. Consequently the probe handler is replaced with a of_to_plat handler. Cc: Simon Glass Cc: Patrice Chotard Cc: Patrick Delaunay Signed-off-by: Etienne Carriere Reviewed-by: Patrick Delaunay --- Changes since v1: - No change. Patch re-send. --- drivers/firmware/scmi/smccc_agent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/scmi/smccc_agent.c b/drivers/firmware/scmi/smccc_agent.c index f185891e8f..f0477b91dc 100644 --- a/drivers/firmware/scmi/smccc_agent.c +++ b/drivers/firmware/scmi/smccc_agent.c @@ -32,7 +32,7 @@ struct scmi_smccc_channel { static int scmi_smccc_process_msg(struct udevice *dev, struct scmi_msg *msg) { - struct scmi_smccc_channel *chan = dev_get_priv(dev); + struct scmi_smccc_channel *chan = dev_get_plat(dev); struct arm_smccc_res res; int ret; @@ -51,9 +51,9 @@ static int scmi_smccc_process_msg(struct udevice *dev, struct scmi_msg *msg) return ret; } -static int scmi_smccc_probe(struct udevice *dev) +static int scmi_smccc_of_to_plat(struct udevice *dev) { - struct scmi_smccc_channel *chan = dev_get_priv(dev); + struct scmi_smccc_channel *chan = dev_get_plat(dev); u32 func_id; int ret; @@ -86,7 +86,7 @@ U_BOOT_DRIVER(scmi_smccc) = { .name = "scmi-over-smccc", .id = UCLASS_SCMI_AGENT, .of_match = scmi_smccc_ids, - .priv_auto = sizeof(struct scmi_smccc_channel), - .probe = scmi_smccc_probe, + .plat_auto = sizeof(struct scmi_smccc_channel), + .of_to_plat = scmi_smccc_of_to_plat, .ops = &scmi_smccc_ops, };