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: 518027 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp3208476iml; Sun, 7 Nov 2021 23:57:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZYMYV2t/4flhke47JE6uNBNQn7QaJC5ujAdcDg4YyCYouvc+EhZ4Vgdu1iOovNoHus5+r X-Received: by 2002:a50:da06:: with SMTP id z6mr105177393edj.355.1636358228011; Sun, 07 Nov 2021 23:57:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636358228; cv=none; d=google.com; s=arc-20160816; b=Uw+arU4NLVxEww1/GD9VNS3SmRPpZUBFU6CIhnJRAUZi1folx7OSjkFgFGEX3TQiRX Q95Yh8zHvrdd/Dg8hBwTg7idLhod6e3yUAN7n0VicLW2Wxin6Og0CdnpSjwZVJ2HYTnD 3Jo6OAKy6+wSTm0u68ALcN8O73PS6wuQILEF5sEWgEEYAzeOzO/RI3lNJm5/s6hXxzID U3qZg360w4tsbXG03NrRzk+OBrzlvaK8uzpWUhvW3raL77BUqA3tdLJXxC2N0JEXNjsC nNKCmS00eGtzTWJvrX8pT3EStnQOvrIytOnDFc4cPJD4ejKC+S3z471i224ufRQfhI0B mkGA== 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=JqJ9sDVd5D3/NRf06aTboyXaFbst7Besn9EdZpl57Jk=; b=h2f7l0WSjjGOWLvz8VQ1YFE3idmMt6XTF/o0+JEK4QNNDk0lIkZLFzMz9njrPVjNDc Od1gURD3w59c718nakyZZaZdyqWLSwlrsFbR+LLzclZezYC+Nf2+hhWYC5N63+bCP+eI QWgWhoU24PWe/F+GnagrCtMPeqrjthfcangOdCmlQdpUAWeFUu7pamq5eWrWkK4vrJ7M NAL8v9yU0rZ433tJgs3ejqG2JhSiNy4H2viO8AGTCxvcYXM4g9xFJMkjaN1RG2JIDi9p HjIyVDMa+5IqpAp+vaorIuOyuSQNmb6uwLtptiqr/eqUm0yk0gIL0LynDmYtz0tL48Pb ygWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OSVXbbGz; 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 hq13si36077169ejc.109.2021.11.07.23.57.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 23:57:08 -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=OSVXbbGz; 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 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-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, };