From patchwork Thu Nov 4 14:23:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 516807 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp1993726iml; Thu, 4 Nov 2021 07:24:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtgYrf7j6U9aX0YD/fRJURP+yYrlboCMRb4UnOoVoQplnw2qmmgrRBmZBJUdSYO+rg3vB6 X-Received: by 2002:a17:907:7b98:: with SMTP id ne24mr34167974ejc.14.1636035857527; Thu, 04 Nov 2021 07:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636035857; cv=none; d=google.com; s=arc-20160816; b=shMIKmObt7myGEkQTYeRAAUj90EKy7EH/ChNPdrw6FPoOn0BdWTyufGjFlJ0HSfyaM uGcspSwZTTNYuP/L+7//1cJ1CAOsGFFXZ1sVQRI0z6HFZENDNwbR2ciAi7HtJlAy7Thl ZqDqADI3z4ZovFt1AjM1+Idy2h9W691MePH+nvU5SB0nx0jFmGO7fdqsL/dOH7vCXpAW RYC2YbpHumXlARB7RjeNE09Tck1Ptju3CluxCvdOfOR9mptZpkKJRVbLHSOrPUklAJdh iIaP/C+pSle+8CYxQ877Iex6Bx/ZLhUydUlsGD9LC5RD9uHdBFyJtXaA596yLbht6kjG 3h2A== 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=d3VHB6izkJfAHSS8Z/yD5Qmdqq2UUmOo/K4yKfLWLO8=; b=PNj6KeshpzztcmgGRJcRa95JNTFVBCO2ZbBKlIDMsZQrbN/eX0wrfwQ/5+PaK3lNhX EamLwHNeHsaPtjI7Fw2/Z52LX/USkiROzKmi94PngS5ioVqncacu5R3TlCAajuvCUBNx 0DieYTS7F4eKg1jkggOo6rL4SoRkZDyD3lzEvIhDNurypxFJ1tZJOqq59HZvL4xXleVH 2VWaCfJWidba78D4X4ebUyODyYMHJqtczV3+j582UP+B4Ogh2HWHIlfanu4eNJEJPsgL Z6I/iNfqNI415VqZllb41oi+vzZGEMPd2MGT8DK3hmY5lL1D0iU1ZsH2dCIzkNilx7MT Jnww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sXculUh3; 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 dn8si10721622ejc.146.2021.11.04.07.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 07:24:17 -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=sXculUh3; 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 83EA4836EC; Thu, 4 Nov 2021 15:23:50 +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="sXculUh3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6AECB836BE; Thu, 4 Nov 2021 15:23:39 +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-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) (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 AE0B2836BA for ; Thu, 4 Nov 2021 15:23:31 +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-x42a.google.com with SMTP id b12so8909556wrh.4 for ; Thu, 04 Nov 2021 07:23:31 -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; bh=d3VHB6izkJfAHSS8Z/yD5Qmdqq2UUmOo/K4yKfLWLO8=; b=sXculUh3lEu+ry4rIW7vVA4E1oU2b3l9LYiIPFzn0HpNfNXClt+AV8Hb6X6kziLnow NxKKOBd25+QqeCW3wPhT4dxikEeuYjNqyT+z5vi2eqAWI9AyxZxY/qE7RSfmmZb04bRq 1halr+VTjbxOpKtEuWushsU4h2vDo9FIWx149pTAGg6c7vC6GwRR0SEICtQSZTiKphCe XDIYKBayv2IT6MGsDJmei4YgloK4ZOLDUJK6F1MmUhvVGF+MBtw+I70vTX73flvYumic KtO5WCMqJ+aNtKwyxkvY770BuZM8VBpVxzfjWm83bIDaBAxAMLm1Oy5ZxE5BgxI+98Ty 3bNg== 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=d3VHB6izkJfAHSS8Z/yD5Qmdqq2UUmOo/K4yKfLWLO8=; b=xokNlaGBTi8D5KxM4tphaD9YP3gnD0/0RpogqPhqOJjmdZZ5p9Rky9ZVmUkcqkolG4 7uQDWW8mTXEGrQFKp0f5gic/KeDBauK0ZDBA4A6XpQTx8hu3ChNrIvJ5aAYZXqBUBBjt q5rRDrgrIMYdtZmWaQLj5r3lbWMLNeAxOW8Jmf5OTZ5SM/PECSoC8toH7bH71q5AI2VR f0oj4YcWEivsYRJWfOt8xikUkML6VK40ltXH+qsS+Gon8tn74PMmFPszKetKCP4b/20L 39+RrhR84iE/dC9wbxdiNm5iQu3ndqbt3a4UlFrQl1YTd6Wv1r6yPP33Yn6YiFvvPS9C pWYg== X-Gm-Message-State: AOAM530wZC72gxMPilaUNUyTwxlKAzGRCjP00inGDKpnpX66jgy3asps uSREGpEibzAsp/kjTw37otG+sf0d7zR1cQ== X-Received: by 2002:a5d:4c86:: with SMTP id z6mr34075750wrs.219.1636035809672; Thu, 04 Nov 2021 07:23:29 -0700 (PDT) Received: from lmecxl0524.lme.st.com ([2a04:cec0:10b3:52ee:40ee:3a6f:5eb8:bd35]) by smtp.gmail.com with ESMTPSA id m34sm9383297wms.25.2021.11.04.07.23.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 07:23:29 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Etienne Carriere Subject: [PATCH 03/14] firmware: scmi: mailbox transport: use plat data, not priv data Date: Thu, 4 Nov 2021 15:23:13 +0100 Message-Id: <20211104142324.2879-3-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211104142324.2879-1-etienne.carriere@linaro.org> References: <20211104142324.2879-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. Signed-off-by: Etienne Carriere --- drivers/firmware/scmi/mailbox_agent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 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, };