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: 8693551 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 200FFC0553 for ; Wed, 30 Mar 2016 08:16:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1AB5C20123 for ; Wed, 30 Mar 2016 08:16:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F30E20225 for ; Wed, 30 Mar 2016 08:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932694AbcC3IP4 (ORCPT ); Wed, 30 Mar 2016 04:15:56 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36689 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932751AbcC3IPx (ORCPT ); Wed, 30 Mar 2016 04:15:53 -0400 Received: by mail-pa0-f53.google.com with SMTP id tt10so34496960pab.3 for ; Wed, 30 Mar 2016 01:15:53 -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=fGdzFQBbyyA1Ig8wawsJepZQoxf/eZ4GlZvhz+9AZ5yLB457BB2BfHlVN17zW/iXqJ seQRIx8TKJ8j9fzjhtvskMLqmPwHJf0Gb6vsXC6J/Bo6mLW12v1Yc7RyIbn3ObT110qU OQ6Uk6OT+F5gGhQrKhqhI+Jg2XAWflVuhDOyPdgsrT/XUj8gvnN6YuoiuYZl4PKRIJ4n 8C5BbnQGg27V9JbAlbbamtya714y1DGcci5hVTe05fWDyZLV5ltscSNRMJKjkPJI+k/g ZsuZPF5GJy90o/Q0h5xRllLwOEamUIcSIc9RS1h8nn0zYXqpVd48MCNIgZ3WaYCo78Tb vYPA== X-Gm-Message-State: AD7BkJJ8rhm8Cg+vf59IyBLajewHZlpl8yiwQcilP5lda/4vZ4Kvz9b29pqEsL3/LgvZEc/5 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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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. 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(-) 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)