From patchwork Fri Apr 22 11:28:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 66436 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp663573qge; Fri, 22 Apr 2016 04:29:38 -0700 (PDT) X-Received: by 10.66.249.166 with SMTP id yv6mr27327674pac.91.1461324578267; Fri, 22 Apr 2016 04:29:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p20si6527570pfa.90.2016.04.22.04.29.37; Fri, 22 Apr 2016 04:29:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753537AbcDVL3W (ORCPT + 13 others); Fri, 22 Apr 2016 07:29:22 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:34994 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbcDVL3U (ORCPT ); Fri, 22 Apr 2016 07:29:20 -0400 Received: by mail-pf0-f170.google.com with SMTP id n1so40711576pfn.2 for ; Fri, 22 Apr 2016 04:29:20 -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=5ZKYNeD2T3QAYPvZRUSRquN4+3Y9Bo/ICONm2H6WzLE=; b=iKHhJsdnlD6ti5AEYEoXYPucjX/iShP/7GXgAgz3PdkP7gpES/6JKzJ5YrkLVenc76 /OZHmPoC5gh/36PgwV/rnJbOTeuXvUOTp9ZYl8JnqPFKPpfJwlG+7BoHCm0KKFcELTg4 tE014sTGNFfGAgEtwlkdPOqjrL+tc1tH4lRP4= 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=5ZKYNeD2T3QAYPvZRUSRquN4+3Y9Bo/ICONm2H6WzLE=; b=RX1E5uQNsKSI9lgq215jezeARXmmWVCiHkiaYmXhkGFP9EqJ2um/97oOaPv5g4Op8P NulUziKpZEKTOIs+SMatOdOtKo/9Sd7SBjCyt/DfqQs80UUI7SV2rOywyddc6/e8NYuu qJX/qN+BPSxQA1VV6ZtQVZQIO3pHTFkPZNiFDnbfLE+9dv2eoPIdNbIjOazlBkF95WNf yxejmOp0hM9eXDPZXWjWv/lnioXezmqGCcLFKwqLqpOW/xtZIaAuGQzTmCQ/eIUczOp+ 6W/1IgKS83Zvk4qTJBxdQRC2wjChRtWrdkRid4ADbwTgFZ6cy5YdxWJLWfnlilpDf6+r uG9Q== X-Gm-Message-State: AOPr4FUNu+rVBSSgM2xJzJykuIjOgv/m0BE8Kbbc9wyJp9B2XkXXZJL2U0iXYIaQdDmpmQUo X-Received: by 10.98.80.150 with SMTP id g22mr27693611pfj.132.1461324559773; Fri, 22 Apr 2016 04:29:19 -0700 (PDT) Received: from localhost ([122.167.26.250]) by smtp.gmail.com with ESMTPSA id h1sm1443621pfh.49.2016.04.22.04.29.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Apr 2016 04:29:19 -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, geert@linux-m68k.org, Lucas Stach , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 3/9] cpufreq: imx: Use generic platdev driver Date: Fri, 22 Apr 2016 16:58:41 +0530 Message-Id: <8f9d83e29dc104584bb95bc0010c96721fecd176.1461324267.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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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. Note that the complete routine imx27_dt_init() is removed as of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); has same effect as a NULL .init_machine machine callback pointer. Cc: Shawn Guo Cc: Sascha Hauer Signed-off-by: Viresh Kumar Acked-by: Lucas Stach Acked-by: Arnd Bergmann --- arch/arm/mach-imx/imx27-dt.c | 10 ---------- 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(+), 21 deletions(-) -- 2.7.1.410.g6faf27b -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index bd42d1bd10af..530a728c2acc 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c @@ -18,15 +18,6 @@ #include "common.h" #include "mx27.h" -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 = { "fsl,imx27", NULL @@ -36,6 +27,5 @@ DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)") .map_io = mx27_map_io, .init_early = imx27_init_early, .init_irq = mx27_init_irq, - .init_machine = imx27_dt_init, .dt_compat = imx27_dt_board_compat, MACHINE_END 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 3e1c8211c213..3843314389c7 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[] __initconst = { + { .compatible = "fsl,imx27", }, + { .compatible = "fsl,imx51", }, + { .compatible = "fsl,imx53", }, + { .compatible = "fsl,imx7d", }, + { .compatible = "marvell,berlin", }, { .compatible = "samsung,exynos3250", },