Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp2043472pxb; Mon, 13 Sep 2021 10:40:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaCHGe1Ad38u0/a+YCMgu2B0UmJ6sNlO4XuqOvuO5/iYP0eWs3oSX6/ErgrMYqjxLXZjWz X-Received: by 2002:a17:906:1454:: with SMTP id q20mr14537691ejc.446.1631554848826; Mon, 13 Sep 2021 10:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631554848; cv=none; d=google.com; s=arc-20160816; b=NVH6iFJjqID2bybRA0VUvBOe9QakfrTP+zyS6UeE2zPOoxi16lcVyUf2qyC2n+CnwJ vMpUXCH7M1YC84A3tGg/f6havuAIDQEE7wM+43/2HyX3TYno8MBqYTiJvDGWShoIuqMz RoJymqiwo/oVcUJfuSQ5iTl0yFfnVTHgR1vl6e8Hgv/JbDy66mUiiuPkIKq1lZMNlSZq EdpCE7Jj0d7pmsSQ0CYLYFwFHih9f+B/eoBZK+0CabSRVeEvyYcPeKqab+uCX4wZ8CPS /OFs/9n+n0d20uYdDs3gnjTYCRN5YncXg6XoFd8Zcm19Ro6PVVZwynGJ/E6SOPLKnO5t 6WAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=R+8OfbL9elkaNlMslJt+cjmPg39NxlDKjWXm6cwpIrI=; b=hyDL81Do3MBY+twftYO05oyTFdP9V5anUI/2/e4E8wSvE9onDBKAV9tG0Xpc9CwCj5 3cHAzgAuMlyFr7NfmeEMNDtGgPhmCGwMwDdRaH5neuvrZ9SWF8F9crjo6LwZO2+97IJO RVu6W69pJxUOtVmcP6KsjqRg3X3zJWaZvhDXveCFoL5CfEfpXPIYQNAICgRU0XzUAMik SV5O1QfJ8PJJyzzxoz4PBjUmjV4kASSWzZ3YNKXe7z8nlY4HXrG61l2/iBjAkMJhETaO 5WJXMpUUgo800wyJH3l4jm5lgsxvls8hXcfwoVuDoRLJv+jUfNVaEMXNLjKLBk09LwBv fk8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz10si7755484ejc.758.2021.09.13.10.40.25; Mon, 13 Sep 2021 10:40:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244030AbhIMRjr (ORCPT + 99 others); Mon, 13 Sep 2021 13:39:47 -0400 Received: from inva021.nxp.com ([92.121.34.21]:58708 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242897AbhIMRjm (ORCPT ); Mon, 13 Sep 2021 13:39:42 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 193BC2005BE; Mon, 13 Sep 2021 19:38:25 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 00D1D2005AC; Mon, 13 Sep 2021 19:38:25 +0200 (CEST) Received: from fsr-ub1664-175.ea.freescale.net (fsr-ub1664-175.ea.freescale.net [10.171.82.40]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 337AE20363; Mon, 13 Sep 2021 19:38:24 +0200 (CEST) From: Abel Vesa To: Rob Herring , Dong Aisheng , Shawn Guo , Sascha Hauer , Fabio Estevam , "catalin.marinas@arm.com" , Will Deacon , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Georgi Djakov , Adrian Hunter , Ulf Hansson , Ahmad Fatoum Cc: Pengutronix Kernel Team , linux-serial@vger.kernel.org, NXP Linux Team , Linux Kernel Mailing List , devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Abel Vesa Subject: [RFC 03/19] devfreq: imx-bus: Decouple imx-bus from icc made Date: Mon, 13 Sep 2021 20:37:58 +0300 Message-Id: <1631554694-9599-4-git-send-email-abel.vesa@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1631554694-9599-1-git-send-email-abel.vesa@nxp.com> References: <1631554694-9599-1-git-send-email-abel.vesa@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The link between an imx-bus device and its icc id will be done through the fsl,icc-id property in each dts node. The imx interconnect driver will pick up all the dts nodes that have that property defined and will link them to the rightfull icc id. Signed-off-by: Abel Vesa --- drivers/devfreq/imx-bus.c | 40 +++------------------------------------ 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/drivers/devfreq/imx-bus.c b/drivers/devfreq/imx-bus.c index 9d8dc9824d21..95339de8cccf 100644 --- a/drivers/devfreq/imx-bus.c +++ b/drivers/devfreq/imx-bus.c @@ -53,36 +53,6 @@ static void imx_bus_exit(struct device *dev) platform_device_unregister(priv->icc_pdev); } -/* imx_bus_init_icc() - register matching icc provider if required */ -static int imx_bus_init_icc(struct device *dev) -{ - struct imx_bus *priv = dev_get_drvdata(dev); - const char *icc_driver_name; - - if (!of_get_property(dev->of_node, "#interconnect-cells", 0)) - return 0; - if (!IS_ENABLED(CONFIG_INTERCONNECT_IMX)) { - dev_warn(dev, "imx interconnect drivers disabled\n"); - return 0; - } - - icc_driver_name = of_device_get_match_data(dev); - if (!icc_driver_name) { - dev_err(dev, "unknown interconnect driver\n"); - return 0; - } - - priv->icc_pdev = platform_device_register_data( - dev, icc_driver_name, -1, NULL, 0); - if (IS_ERR(priv->icc_pdev)) { - dev_err(dev, "failed to register icc provider %s: %ld\n", - icc_driver_name, PTR_ERR(priv->icc_pdev)); - return PTR_ERR(priv->icc_pdev); - } - - return 0; -} - static int imx_bus_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -130,10 +100,6 @@ static int imx_bus_probe(struct platform_device *pdev) goto err; } - ret = imx_bus_init_icc(dev); - if (ret) - goto err; - return 0; err: @@ -142,9 +108,9 @@ static int imx_bus_probe(struct platform_device *pdev) } static const struct of_device_id imx_bus_of_match[] = { - { .compatible = "fsl,imx8mq-noc", .data = "imx8mq-interconnect", }, - { .compatible = "fsl,imx8mm-noc", .data = "imx8mm-interconnect", }, - { .compatible = "fsl,imx8mn-noc", .data = "imx8mn-interconnect", }, + { .compatible = "fsl,imx8mq-noc",}, + { .compatible = "fsl,imx8mm-noc",}, + { .compatible = "fsl,imx8mn-noc",}, { .compatible = "fsl,imx8m-noc", }, { .compatible = "fsl,imx8m-nic", }, { /* sentinel */ }, -- 2.31.1