From patchwork Mon Nov 8 07:56:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 1552233 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=OSVXbbGz; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hnk3V1jQZz9s0r for ; Mon, 8 Nov 2021 18:57:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4BF183817; Mon, 8 Nov 2021 08:56:45 +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="OSVXbbGz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A8AC083608; Mon, 8 Nov 2021 08:56:27 +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-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (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 7889983613 for ; Mon, 8 Nov 2021 08:56:18 +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-wm1-x333.google.com with SMTP id r9-20020a7bc089000000b00332f4abf43fso9822406wmh.0 for ; Sun, 07 Nov 2021 23:56:18 -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=JqJ9sDVd5D3/NRf06aTboyXaFbst7Besn9EdZpl57Jk=; b=OSVXbbGz3bMKg+eqS+tlBbaEtEWznPGQoVtCjMihYy1HjvkpVcSg3S/97su7O6zK37 baiXE0b4BodoDfTYU98tLudc4Ym8R22vzj3hdjbCdhDUFcajZeFwEeJAIDtqtcLxRmKV oLZrQ/etwXjHWKMAHHmDRSFx90t6CNRnnMA9TKagxb0ec35Q/A1CkH6QDUiSTclSA/8N 9mYlRrwcVLzHD2vBoAHf0BjB0mbNEdFNtJRxDyCHaarwf/vplXCSLNs5TC2FG2cqQ78G ESyjZl9h46cTa6MfHMvB3npi5V+WW7Wsvtl/msR21n83oBD0U/3O6P5hN21+mxCHqu/R 850g== 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=JqJ9sDVd5D3/NRf06aTboyXaFbst7Besn9EdZpl57Jk=; b=2aojW31FEo1O4sEWfhUKL1I3WIx0pS0Ldblpq148Jky10GgDB0kaZP8vw/j3mEYw0s vp5F1u4HajYWskY46L4oxRTpGKasO6nbJG8qOFRR76W3g5LFzlueqPF4pSdKx0t9cDNT NtgKNKkayKZr3JnhwUSMOoP4OCoHfgAHHiGjojZEdLx4AnHvqya6ublz+XI/qWtdbyWl Wo9V3ucZZFfQnaPrs5ApSC93/xgXq4XbDCioeRRiq9xlinc5Y33EOkY1gN/ONrgkYmrq SjiePVf01tCVuxqVVSo4+4UNSlcquxhDzvXRJnHkF6Q2Qr05Gc4avICbHxjIUlGx29a/ Vv4Q== X-Gm-Message-State: AOAM530+gU7FxeFFi0vYNECp0MSvRova26oOcbSBliOeja8fqsrYEwmV jWs8JTCRcvCT/OEzr5oJ298ASzyVfmRSfg== X-Google-Smtp-Source: ABdhPJymivuicOTnuQGahMOSoZNArtVHDWNVsNz3U76a/EzGnW/M8WVf2z/SNRqn1xw1nMUVAShqqw== X-Received: by 2002:a1c:4d15:: with SMTP id o21mr31976826wmh.171.1636358177910; Sun, 07 Nov 2021 23:56:17 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 23:56:17 -0800 (PST) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Etienne Carriere , Simon Glass , Patrice Chotard , Patrick Delaunay Subject: [PATCH 3/5] firmware: scmi: mailbox transport: use plat data, not priv data Date: Mon, 8 Nov 2021 08:56:09 +0100 Message-Id: <20211108075611.30759-3-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 mailbox 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/mailbox_agent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/scmi/mailbox_agent.c b/drivers/firmware/scmi/mailbox_agent.c index eb841d692b..8e4af0c8fa 100644 --- a/drivers/firmware/scmi/mailbox_agent.c +++ b/drivers/firmware/scmi/mailbox_agent.c @@ -33,7 +33,7 @@ struct scmi_mbox_channel { static int scmi_mbox_process_msg(struct udevice *dev, struct scmi_msg *msg) { - struct scmi_mbox_channel *chan = dev_get_priv(dev); + struct scmi_mbox_channel *chan = dev_get_plat(dev); int ret; ret = scmi_write_msg_to_smt(dev, &chan->smt, msg); @@ -62,9 +62,9 @@ out: return ret; } -int scmi_mbox_probe(struct udevice *dev) +int scmi_mbox_of_to_plat(struct udevice *dev) { - struct scmi_mbox_channel *chan = dev_get_priv(dev); + struct scmi_mbox_channel *chan = dev_get_plat(dev); int ret; chan->timeout_us = TIMEOUT_US_10MS; @@ -95,7 +95,7 @@ U_BOOT_DRIVER(scmi_mbox) = { .name = "scmi-over-mailbox", .id = UCLASS_SCMI_AGENT, .of_match = scmi_mbox_ids, - .priv_auto = sizeof(struct scmi_mbox_channel), - .probe = scmi_mbox_probe, + .plat_auto = sizeof(struct scmi_mbox_channel), + .of_to_plat = scmi_mbox_of_to_plat, .ops = &scmi_mbox_ops, };