From patchwork Wed Mar 30 08:15:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 64643 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2455103lbc; Wed, 30 Mar 2016 01:16:02 -0700 (PDT) X-Received: by 10.66.65.109 with SMTP id w13mr10781622pas.142.1459325761569; Wed, 30 Mar 2016 01:16:01 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kn6si4808284pab.36.2016.03.30.01.16.01; Wed, 30 Mar 2016 01:16:01 -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 S932746AbcC3IPx (ORCPT + 29 others); Wed, 30 Mar 2016 04:15:53 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33258 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932694AbcC3IPt (ORCPT ); Wed, 30 Mar 2016 04:15:49 -0400 Received: by mail-pa0-f53.google.com with SMTP id zm5so34703598pac.0 for ; Wed, 30 Mar 2016 01:15:48 -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=d4imKf8FtJzX0Iz6cM5amVRPgk/ztAqV5L/rH4P23I8=; b=BTN39LRJZ/JNhs48kTMH7OSf29vi7/+XznxPxbi6x16xhZt3jLpLJ8AT8sI5gRdbbE ZZ9JHZmGGf/yNM6fQDnO2wVo12Rhs//zlzqY/Ft9PM0VJmDlNvNyVP8vRa2N5iEbH0YV J1iwyWGiZXE42zFEkr4Ax9ql+S6AOXx0RX6qI= 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=d4imKf8FtJzX0Iz6cM5amVRPgk/ztAqV5L/rH4P23I8=; b=aT3ACrUlfWZXagreIdzUO5J9UD/lPlT54Coe6fWJbzb+AUVRfeM9pu45r0wK0zkHPO 5o7HWs+6dmjo3pwV/c9UE4/QzG0A/DrS2fd2kAjgqtTIFRawyWlDNLrEEKK6Gu83U6q8 WhlZ5CtfIHeFri5H+ziXL5W56cMZj8XXrrOPwXX02tQqytXs91NuQBvXy9HNR2YtTH2o jhL6efFY0719Ybq7DI2H3J9IxKItc1vOcsYYF3OdHFC2ufgZ6nMdVmROvAJ5jM9IK9D4 FIS9tiZqcPS7wt2tqVSwDCDMMrFs/tj/nDuxrS0Ev+WBRb9G6p2G70glnC10yO9fQ5gi +B7Q== X-Gm-Message-State: AD7BkJKI+hpDdvc3rux9dutDNJmKZVmS0kmqAtDC5UX8R4vYhSQ5U+Wq8YgQ088pXUQncgFM X-Received: by 10.66.123.17 with SMTP id lw17mr10945762pab.108.1459325748257; Wed, 30 Mar 2016 01:15:48 -0700 (PDT) Received: from localhost ([122.172.81.221]) by smtp.gmail.com with ESMTPSA id r68sm3683276pfb.51.2016.03.30.01.15.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Mar 2016 01:15:47 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , arnd.bergmann@linaro.org, Kukjin Kim , Krzysztof Kozlowski , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, kgene.kim@samsung.com, xf@rock-chips.com, heiko@sntech.de, mmcclint@codeaurora.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 4/4] cpufreq: exynos: Use generic platdev driver Date: Wed, 30 Mar 2016 13:45:28 +0530 Message-Id: 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. Signed-off-by: Viresh Kumar Reviewed-by: Krzysztof Kozlowski --- arch/arm/mach-exynos/exynos.c | 25 ------------------------- drivers/cpufreq/cpufreq-dt-platdev.c | 9 +++++++++ 2 files changed, 9 insertions(+), 25 deletions(-) -- 2.7.1.410.g6faf27b diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 4dfce1069406..4d3b056fd786 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -213,29 +213,6 @@ static void __init exynos_init_irq(void) exynos_map_pmu(); } -static const struct of_device_id exynos_cpufreq_matches[] = { - { .compatible = "samsung,exynos3250", .data = "cpufreq-dt" }, - { .compatible = "samsung,exynos4210", .data = "cpufreq-dt" }, - { .compatible = "samsung,exynos4212", .data = "cpufreq-dt" }, - { .compatible = "samsung,exynos4412", .data = "cpufreq-dt" }, - { .compatible = "samsung,exynos5250", .data = "cpufreq-dt" }, -#ifndef CONFIG_BL_SWITCHER - { .compatible = "samsung,exynos5420", .data = "cpufreq-dt" }, - { .compatible = "samsung,exynos5800", .data = "cpufreq-dt" }, -#endif - { /* sentinel */ } -}; - -static void __init exynos_cpufreq_init(void) -{ - struct device_node *root = of_find_node_by_path("/"); - const struct of_device_id *match; - - match = of_match_node(exynos_cpufreq_matches, root); - if (match) - platform_device_register_simple(match->data, -1, NULL, 0); -} - static void __init exynos_dt_machine_init(void) { /* @@ -258,8 +235,6 @@ static void __init exynos_dt_machine_init(void) of_machine_is_compatible("samsung,exynos5250")) platform_device_register(&exynos_cpuidle); - exynos_cpufreq_init(); - of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index 2a3532427ecf..f2ae7ad99a3c 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -12,6 +12,15 @@ #include static const struct of_device_id machines[] = { + { .compatible = "samsung,exynos3250", }, + { .compatible = "samsung,exynos4210", }, + { .compatible = "samsung,exynos4212", }, + { .compatible = "samsung,exynos4412", }, + { .compatible = "samsung,exynos5250", }, +#ifndef CONFIG_BL_SWITCHER + { .compatible = "samsung,exynos5420", }, + { .compatible = "samsung,exynos5800", }, +#endif }; static int __init cpufreq_dt_platdev_init(void)