From patchwork Thu Nov 4 14:23:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 516810 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp1994391iml; Thu, 4 Nov 2021 07:24:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtaIYg55EL3+mATfAxd22r5h5q2fINBpSD0NTJPjkwvpftqSGaE650RKJHvWRPagrPIDnZ X-Received: by 2002:a05:6402:350b:: with SMTP id b11mr12243378edd.184.1636035890669; Thu, 04 Nov 2021 07:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636035890; cv=none; d=google.com; s=arc-20160816; b=QBGOZembzPFmHrjCllA4N2RQxg22IEi+PgrHrSYnok06508EYLq8fGUvnIv0we9R8e DAG8i2j/hDusYqYet3xEV5mrB2avzSSbQQJS2y/MtV13Q3/FOhxsqw3YD4ky3GQl6T8G XVD04QTP/yzz6BG/cSub5yblWDc1MDul4L2Bt6h0YUnDaX256JzVIw3508XAMyPgXvUo 8JvmT5F+JfvK7tsVSNgMWX+9GMvgSuqWYosBQuCJdFIo0LtemDHBQT7Xpx9kMW/8M/KN e15BaOwoNeAJPxfbB+yp0/CWcVV8irHBd45olIURX4mkytUaEH4Mwfg9pZPSRI0HR1oe pReg== 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=js8EbXkaLLnAB6JhLc4CliLfyFNg3BTLbv81LacT3VA=; b=r0xEoF6JcCDyQoS/JJ32q6N0ImX+TYNvgKkhsPYWjIVhJ0oEz7tQKSYqDOW+OgTTwU 1JzoscC+jCcoAwTknf0GJ7bQOJajr9iZBVfOnmcwExJfrysTJj950Rb1t+kSBolShQ3D jj7af7x0ZFDBoFPPr2Q7aHYtkNcAQ5PmO2AZKFk3hxhNQgLbY7KaEW8pnbtfmR7vEZ3B FHUW4HLCyAGS8fV1SnhKY3O0NlIvGxPFbVPyOq7ABf9n0ATtBPLsgw/3Onl9JOwNnYSy VjBei4z3SyFzEczDFvahUmRG92u+Bm49Fd6zGWcsG/0Y1685d37hJgS/erqDhZl1BC8N 7Zbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K3YJm7tN; 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 q5si7373240ejb.580.2021.11.04.07.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 07:24:50 -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=K3YJm7tN; 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 69F4483705; Thu, 4 Nov 2021 15:24:05 +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="K3YJm7tN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ABD10836E2; Thu, 4 Nov 2021 15:23:42 +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-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (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 C81E3836C9 for ; Thu, 4 Nov 2021 15:23:34 +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-x430.google.com with SMTP id d5so8925121wrc.1 for ; Thu, 04 Nov 2021 07:23:34 -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=js8EbXkaLLnAB6JhLc4CliLfyFNg3BTLbv81LacT3VA=; b=K3YJm7tNScn0FiuZzO4iU+gdqPAu8NJHp/KWjNEdMrKXitQZjZwavO9X2CkGvKy1gr 07ILvc82zXOyEqswPygfWJRok9UEXke7KcCrTfsAlTUDyUe81zf5pRfbpA09rHgxmDtd heROSSAwdd4py4vYKDXEWLfo5nEZgYNd91lSmIdwoxT1KZwy9gWTr/muK86qkeE69W4M K4TPPZwUGlgMjU6C5GHUEN9kP1rpVIOqj83kQVtfFQQ5PyVyuWhHA6qiqfwQgKekuH6X pH5Hq0gS1t7kEn3y5l/EGk08gG4tXZIrf7RRdJNOu9VJtaKuhIGPwPUDpPfJ+xtPyIBk DE6g== 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=js8EbXkaLLnAB6JhLc4CliLfyFNg3BTLbv81LacT3VA=; b=S2vfDjz+lXioiQC46zdeNlO/DbCjM25qyH/9/2LDqAjwmJ2FGXZj/X0lhJ1qp0eGqy Ia+0d2z4/HVOVb72XZ3Zjb4XOkJKVsjPHDUhKbN8B3hL0XsCbbuXwSbgExFVQSuHvqvu KOQEWPw9rIAmw8fhv3vDUIbP8A7ozXqDLBnzRO8FOPJcofZ5ozJwz58EIsacSTmumRkX O6uIkam4pPdmU8B+XJynPsmSj4q4SuTukFfencGZdHpcWK1RGPtOiEuk3udi/2+8HFmp 0s3IWOGk8qLGja4sbK9/J0dxoHc7lKWfsZ9XQv23eYZf7ZhoRUDhowkGTyvh+Ho5ug2V XD4A== X-Gm-Message-State: AOAM5335ZyM3a7vkij302kr6g+lW4N8PanMDLJXT6shPrIrs28KU1PtC qHyN1xVviwo5/pBAyDPxHvx2mvfwC3MmaQ== X-Received: by 2002:adf:e984:: with SMTP id h4mr61497553wrm.149.1636035810670; Thu, 04 Nov 2021 07:23:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Nov 2021 07:23:30 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Etienne Carriere Subject: [PATCH 04/14] firmware: scmi: smccc transport: use plat data, not priv data Date: Thu, 4 Nov 2021 15:23:14 +0100 Message-Id: <20211104142324.2879-4-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 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. Signed-off-by: Etienne Carriere --- drivers/firmware/scmi/smccc_agent.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.17.1 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, };