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: 66338 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp11426qge; Thu, 21 Apr 2016 01:44:26 -0700 (PDT) X-Received: by 10.98.73.88 with SMTP id w85mr19130595pfa.82.1461228265983; Thu, 21 Apr 2016 01:44:25 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m68si21056300pfb.234.2016.04.21.01.44.25; Thu, 21 Apr 2016 01:44:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752099AbcDUIoL (ORCPT + 29 others); Thu, 21 Apr 2016 04:44:11 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:35254 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbcDUIoI (ORCPT ); Thu, 21 Apr 2016 04:44:08 -0400 Received: by mail-pf0-f181.google.com with SMTP id n1so28067440pfn.2 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=YFbaNjL+wX0K0Hb5NztH/SgAWSAtii0fld8JaYR0vfC5tcS2f8+wT2muIZ91VhUrPI NkV+mVUo6iAYDIhvIEIGKYklyK3dVLHQQkrvAZOk177Mu4BA4Z1yd1mgCfAmHtoirEG1 ccduXMWAoAP5ejdJfNKIR3QqHiVIkT7t5nDxpvaIozUbIvA1AvrudoNsMJbWlWNNaHoO 7tjrjhh0WDAeVU4wIoHxZSu5vTWcKnLi0nR39p2t7KjA5rAv2WU/UNzBY0GJiPhlOXmm wk/VbAyJQHxQb7l+KHzI9JHRF3n7miV0lP/6DlmvHXhE6PO7+k4Agc+prRk5OZ/Dyse6 RmRw== X-Gm-Message-State: AOPr4FVWUkDTEqu5CbI14cKm6GRf/hs2hPiY27DI44BEc6gJ907VCxFUJXF+f5WuYFSibVEI 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 Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, arnd.bergmann@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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(-) -- 2.7.1.410.g6faf27b Acked-by: Lucas Stach 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", },