From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98780C48BD6 for ; Tue, 25 Jun 2019 20:39:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5CD852063F for ; Tue, 25 Jun 2019 20:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561495182; bh=j3KZFviB5Xle6qBDzGdMd3VNiDKlu0Os1FHRxXh+iWE=; h=In-Reply-To:References:To:From:Subject:Cc:Date:List-ID:From; b=zq/DXUt8ZNafsvztxL+XSXoXvRP5912VEEjl16cROyua2G7SJr/enpyT+WP3iwrcF QxhruhiPGdwJGpiz+JhlPNZxpAIi3ilZQdgRW6GorwcWN58BK09fAJOEJ0Td8iPNyg wrSKgoMG67nBR9dul7wW1TbUgo70/utSOwELga3w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726274AbfFYUjm (ORCPT ); Tue, 25 Jun 2019 16:39:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:35690 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbfFYUjm (ORCPT ); Tue, 25 Jun 2019 16:39:42 -0400 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15C94205ED; Tue, 25 Jun 2019 20:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561495181; bh=j3KZFviB5Xle6qBDzGdMd3VNiDKlu0Os1FHRxXh+iWE=; h=In-Reply-To:References:To:From:Subject:Cc:Date:From; b=xUFoVMMARF1CYfZ3FYmhyNeW9XHtmic9ocPCrbnTXm90L1w97pfhFjGEWr55wLxa4 ROSkUwmC8AKfCd63ZqTeQh1+ic2CEJIeGW/yM8H0Y67yBEdMYOnvEOkCOISqoh0h6t tfDb3nBB6leXGBqFZc1m+hvKt4/dzPM7a92iMM+c= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1561373672-3533-1-git-send-email-abel.vesa@nxp.com> References: <1561373672-3533-1-git-send-email-abel.vesa@nxp.com> To: Abel Vesa , Anson Huang , Fabio Estevam , Jacky Bai , Mike Turquette , Sascha Hauer , Shawn Guo From: Stephen Boyd Subject: Re: [PATCH] clk: imx8mm: Switch to platform driver Cc: NXP Linux Team , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , Abel Vesa User-Agent: alot/0.8.1 Date: Tue, 25 Jun 2019 13:39:40 -0700 Message-Id: <20190625203941.15C94205ED@mail.kernel.org> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Quoting Abel Vesa (2019-06-24 03:54:32) > In order to make the clock provider a platform driver > all the data and code needs to be outside of .init section. Yes, but why are you making this change in general? >=20 > Signed-off-by: Abel Vesa [...] > @@ -480,7 +481,7 @@ static int __init imx8mm_clocks_init(struct device_no= de *ccm_node) > clks[IMX8MM_SYS_PLL2_500M] =3D imx_clk_fixed_factor("sys_pll2_500= m", "sys_pll2_out", 1, 2); > clks[IMX8MM_SYS_PLL2_1000M] =3D imx_clk_fixed_factor("sys_pll2_10= 00m", "sys_pll2_out", 1, 1); > =20 > - np =3D ccm_node; > + np =3D dev->of_node; > base =3D of_iomap(np, 0); If we're using platform device here it would be nice to also use platform device APIs to map memory and request resources, etc. > if (WARN_ON(!base)) > return -ENOMEM; > @@ -682,4 +683,19 @@ static int __init imx8mm_clocks_init(struct device_n= ode *ccm_node) > =20 > return 0; > } > -CLK_OF_DECLARE_DRIVER(imx8mm, "fsl,imx8mm-ccm", imx8mm_clocks_init); > + > +static const struct of_device_id imx8mm_clk_of_match[] =3D { > + { .compatible =3D "fsl,imx8mm-ccm" }, > + { /* Sentinel */ }, > +}; > +MODULE_DEVICE_TABLE(of, imx8mm_clk_of_match); > + > + Nitpick: Drop the second newline. > +static struct platform_driver imx8mm_clk_driver =3D { > + .probe =3D imx8mm_clocks_probe, > + .driver =3D { > + .name =3D "imx8mm-ccm", > + .of_match_table =3D of_match_ptr(imx8mm_clk_of_match), > + }, > +}; > +module_platform_driver(imx8mm_clk_driver); From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6479FC48BD6 for ; Tue, 25 Jun 2019 20:39:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3891A205ED for ; Tue, 25 Jun 2019 20:39:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BXiWHeMb"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="xUFoVMMA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3891A205ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:From:To: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=047aNLfSr7gDql5FFnkSSJ3ZmpE5afu9LsI7Ul6I/3g=; b=BXiWHeMbIV0ubM s0hHiZqzA1O+z4WKwq/IBl5SanyQYpuO2Qc33j4yI9YyXB4O+nddbRkps3oBYtkimLweuyXRqlMe9 LHr9FB0EMbv4vLvoLJ4LHi8WjQtgsGS2UB2UiRX4QeDwPMQxj5BRAUb3Jmyx0+8PzCjbNgyebK0xZ lyK8Jr90lsyoU1+yTi/nsbemF398nWf+EfLh9q5JMFJIXLmcb+Q92RZwofksdt3mj3YGzeuC3EP7j 3JU8HTxu/sHwXJFz1xkfyj3/1d43nxrQUn16JrrRkVcozwumKkbkXN/1dSessBhj5rXv+G1oa3xDF osdRdbsGd37LwUcjvGXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfsEB-0007NF-Gl; Tue, 25 Jun 2019 20:39:43 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfsE9-0007Mo-Du for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2019 20:39:42 +0000 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 15C94205ED; Tue, 25 Jun 2019 20:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561495181; bh=j3KZFviB5Xle6qBDzGdMd3VNiDKlu0Os1FHRxXh+iWE=; h=In-Reply-To:References:To:From:Subject:Cc:Date:From; b=xUFoVMMARF1CYfZ3FYmhyNeW9XHtmic9ocPCrbnTXm90L1w97pfhFjGEWr55wLxa4 ROSkUwmC8AKfCd63ZqTeQh1+ic2CEJIeGW/yM8H0Y67yBEdMYOnvEOkCOISqoh0h6t tfDb3nBB6leXGBqFZc1m+hvKt4/dzPM7a92iMM+c= MIME-Version: 1.0 In-Reply-To: <1561373672-3533-1-git-send-email-abel.vesa@nxp.com> References: <1561373672-3533-1-git-send-email-abel.vesa@nxp.com> To: Abel Vesa , Anson Huang , Fabio Estevam , Jacky Bai , Mike Turquette , Sascha Hauer , Shawn Guo From: Stephen Boyd Subject: Re: [PATCH] clk: imx8mm: Switch to platform driver User-Agent: alot/0.8.1 Date: Tue, 25 Jun 2019 13:39:40 -0700 Message-Id: <20190625203941.15C94205ED@mail.kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190625_133941_485343_686D7FF9 X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux Kernel Mailing List , Abel Vesa , NXP Linux Team , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Abel Vesa (2019-06-24 03:54:32) > In order to make the clock provider a platform driver > all the data and code needs to be outside of .init section. Yes, but why are you making this change in general? > > Signed-off-by: Abel Vesa [...] > @@ -480,7 +481,7 @@ static int __init imx8mm_clocks_init(struct device_node *ccm_node) > clks[IMX8MM_SYS_PLL2_500M] = imx_clk_fixed_factor("sys_pll2_500m", "sys_pll2_out", 1, 2); > clks[IMX8MM_SYS_PLL2_1000M] = imx_clk_fixed_factor("sys_pll2_1000m", "sys_pll2_out", 1, 1); > > - np = ccm_node; > + np = dev->of_node; > base = of_iomap(np, 0); If we're using platform device here it would be nice to also use platform device APIs to map memory and request resources, etc. > if (WARN_ON(!base)) > return -ENOMEM; > @@ -682,4 +683,19 @@ static int __init imx8mm_clocks_init(struct device_node *ccm_node) > > return 0; > } > -CLK_OF_DECLARE_DRIVER(imx8mm, "fsl,imx8mm-ccm", imx8mm_clocks_init); > + > +static const struct of_device_id imx8mm_clk_of_match[] = { > + { .compatible = "fsl,imx8mm-ccm" }, > + { /* Sentinel */ }, > +}; > +MODULE_DEVICE_TABLE(of, imx8mm_clk_of_match); > + > + Nitpick: Drop the second newline. > +static struct platform_driver imx8mm_clk_driver = { > + .probe = imx8mm_clocks_probe, > + .driver = { > + .name = "imx8mm-ccm", > + .of_match_table = of_match_ptr(imx8mm_clk_of_match), > + }, > +}; > +module_platform_driver(imx8mm_clk_driver); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel