From patchwork Thu Apr 21 08:43:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 8897271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F1009BF29F for ; Thu, 21 Apr 2016 08:46:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0DF3720260 for ; Thu, 21 Apr 2016 08:46:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2E4220303 for ; Thu, 21 Apr 2016 08:46:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1atAE2-0001hl-FP; Thu, 21 Apr 2016 08:44:38 +0000 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1atADs-0001SI-EY for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2016 08:44:29 +0000 Received: by mail-pf0-x235.google.com with SMTP id 184so28190293pff.0 for ; Thu, 21 Apr 2016 01:44:08 -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 :in-reply-to:references; bh=uLhqQsfgZjHHDQvzA388Epn4ftTrG0mbKa9xLt0Rx+E=; b=hDkWNpZmHfVly44dAsnZduJrtHIhWYjavGGq1LLvD9aDgSSDztWvjcAd485PUGKXRh RqIZWdIRQCVNYhSm4Eezx73cXPqlc48rHpDUIxNtJiNzntat6Y0BJN4Gfxb3EYK0aByP 9lAi2s441fJt0qtnUe4XEFwK5wd3yw4kB+MUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=uLhqQsfgZjHHDQvzA388Epn4ftTrG0mbKa9xLt0Rx+E=; b=XnJngIcjy+LIwt18DnVbaB4pJQxOeOWxaDTBpzQ3yj+yLL8CmhLIHRHpC91HZZFkOb /7SWyNqt6HAduRhCW30DZ1Pke8P0EuVIXe8oIIxKShwFp0G5ygx++FNpuERaz/u2XPzq 9PoSr4lG3xfBd/gbqfGan3Zq7Q/0nA8iFMuQ5lVVhSpGRExZ1ieLG+XJ0xubD7useXr2 HKak358DbHy4ZSWcnSf37o7Adb1IV4qddbodND45nqXPKk1kvSlmWkIvHoA7uZp11t+2 XbEhNV1z/u9FgaSq3384T55BQM1vmoOnCSLnRgqyqqKV/Gwn0xXgPH9bxwltIjPOkR6L H+4A== X-Gm-Message-State: AOPr4FUzHrSQf9lpKts7Iem8UwsXHPdmptBDXN3WEezS93uX2NcvMolIfUJgcF+1tjG8imwk X-Received: by 10.98.104.6 with SMTP id d6mr18635588pfc.15.1461228247936; Thu, 21 Apr 2016 01:44:07 -0700 (PDT) Received: from localhost ([122.167.26.250]) by smtp.gmail.com with ESMTPSA id n10sm139894pax.18.2016.04.21.01.44.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Apr 2016 01:44:07 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Shawn Guo , Sascha Hauer , Viresh Kumar Subject: [PATCH 2/8] cpufreq: imx: Use generic platdev driver Date: Thu, 21 Apr 2016 14:13:48 +0530 Message-Id: <08c7bf360dfb7620591c0e0de6e047fffb0a5546.1461228081.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160421_014428_616723_4CF9895B X-CRM114-Status: GOOD ( 14.02 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnd.bergmann@linaro.org, linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The cpufreq-dt-platdev driver supports creation of cpufreq-dt platform device now, reuse that and remove similar code from platform code. Cc: Shawn Guo Cc: Sascha Hauer Signed-off-by: Viresh Kumar Acked-by: Lucas Stach --- arch/arm/mach-imx/imx27-dt.c | 4 ---- arch/arm/mach-imx/mach-imx51.c | 3 --- arch/arm/mach-imx/mach-imx53.c | 2 -- arch/arm/mach-imx/mach-imx7d.c | 6 ------ drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++ 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index bd42d1bd10af..90c62bf01f9e 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c @@ -20,11 +20,7 @@ static void __init imx27_dt_init(void) { - struct platform_device_info devinfo = { .name = "cpufreq-dt", }; - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); - - platform_device_register_full(&devinfo); } static const char * const imx27_dt_board_compat[] __initconst = { diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index 6883fbaf9484..10a82a4f1e58 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c @@ -50,13 +50,10 @@ static void __init imx51_ipu_mipi_setup(void) static void __init imx51_dt_init(void) { - struct platform_device_info devinfo = { .name = "cpufreq-dt", }; - imx51_ipu_mipi_setup(); imx_src_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); - platform_device_register_full(&devinfo); } static void __init imx51_init_late(void) diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index 86316a979297..18b5c5c136db 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -40,8 +40,6 @@ static void __init imx53_dt_init(void) static void __init imx53_init_late(void) { imx53_pm_init(); - - platform_device_register_simple("cpufreq-dt", -1, NULL, 0); } static const char * const imx53_dt_board_compat[] __initconst = { diff --git a/arch/arm/mach-imx/mach-imx7d.c b/arch/arm/mach-imx/mach-imx7d.c index 5a27f20c9a82..b450f525a670 100644 --- a/arch/arm/mach-imx/mach-imx7d.c +++ b/arch/arm/mach-imx/mach-imx7d.c @@ -105,11 +105,6 @@ static void __init imx7d_init_irq(void) irqchip_init(); } -static void __init imx7d_init_late(void) -{ - platform_device_register_simple("cpufreq-dt", -1, NULL, 0); -} - static const char *const imx7d_dt_compat[] __initconst = { "fsl,imx7d", NULL, @@ -117,7 +112,6 @@ static const char *const imx7d_dt_compat[] __initconst = { DT_MACHINE_START(IMX7D, "Freescale i.MX7 Dual (Device Tree)") .init_irq = imx7d_init_irq, - .init_late = imx7d_init_late, .init_machine = imx7d_init_machine, .dt_compat = imx7d_dt_compat, MACHINE_END diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index 3b3e6804cf14..ac12c4a02964 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -12,6 +12,11 @@ #include static const struct of_device_id machines[] = { + { .compatible = "fsl,imx27", }, + { .compatible = "fsl,imx51", }, + { .compatible = "fsl,imx53", }, + { .compatible = "fsl,imx7d", }, + { .compatible = "marvell,berlin", }, { .compatible = "samsung,exynos3250", },