From patchwork Thu Mar 24 06:40:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 8658391 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6CCBE9F36E for ; Thu, 24 Mar 2016 06:44:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B8592037F for ; Thu, 24 Mar 2016 06:44:25 +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 9212F20379 for ; Thu, 24 Mar 2016 06:44:24 +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 1aiyyM-00006E-9F; Thu, 24 Mar 2016 06:42:22 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aiyyH-0008Vh-Ax for linux-arm-kernel@lists.infradead.org; Thu, 24 Mar 2016 06:42:19 +0000 Received: by mail-pf0-x22d.google.com with SMTP id 4so50167850pfd.0 for ; Wed, 23 Mar 2016 23:41:56 -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=1PsWNvglvKEZ+XXwba8Z0wR43u7jH9a+uRhuH3v0B/Y=; b=JlESz5dCthQfI4/kijmcUNorfThPIBIEmQlXDweImUhi4AExYimZ/JcKDc2tTqBuOK WZ83zTMvSMel+wpfGJSekECa6nGQFai3a1AO7gsdsFv02AtV3xCG2lPSkBgrgbAzvKYA GY2/BT98PxKx0vp5/IBh70SpjFCyillxbC0PQ= 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=1PsWNvglvKEZ+XXwba8Z0wR43u7jH9a+uRhuH3v0B/Y=; b=QF1yIa6F07afXtoLOxt9ApC7vRMT/MVTWVepKZU8sxwHjnUSyo100jK3A8JtDAq89B SxISAsvDuV2BqqXpPD2DR4PVt8J/ScPDWG1c/CIzokVmHcUCqRYJ8iT7hN1YuDZRK/qO DRT9U1fOlr5U1isyhWI6KjCCaGChSBx2m0zacT4edc/x+6llWh/TbPzBU/1ZBZlZp5W1 kybkcp4WcUqcYww5xjiB8FlA9jaMlaa//3l6Byc3zcAiJ/BGNOkSM/Tythfl5CVzAU8k rSCl740OSuSA9VaXzShZY2cT5vocQEpEA1Wwexk6L+01Yq9mJU24Vtsrt+MKn+ogsYf6 AzBw== X-Gm-Message-State: AD7BkJKsd5lY9st9JJgq8AmPAKqjA5M0E6bIZ5qroxXh3ugTy+EOoe2bidulYsYdh3rZyVZC X-Received: by 10.98.16.7 with SMTP id y7mr10027948pfi.111.1458801715631; Wed, 23 Mar 2016 23:41:55 -0700 (PDT) Received: from localhost ([122.172.61.242]) by smtp.gmail.com with ESMTPSA id o69sm8216034pfi.14.2016.03.23.23.41.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Mar 2016 23:41:54 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , arnd.bergmann@linaro.org, Kukjin Kim , Krzysztof Kozlowski , Viresh Kumar Subject: [PATCH 3/3] cpufreq: exynos: Use generic platdev driver Date: Thu, 24 Mar 2016 12:10:30 +0530 Message-Id: <6cb29053bce7026dd9429326236a67c45e901c7b.1458801338.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-20160323_234217_434232_995D785F X-CRM114-Status: GOOD ( 13.34 ) 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: kgene.kim@samsung.com, heiko@sntech.de, xf@rock-chips.com, mmcclint@codeaurora.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linaro-kernel@lists.linaro.org, linux-arm-kernel@lists.infradead.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=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 --- arch/arm/mach-exynos/exynos.c | 25 ------------------------- drivers/cpufreq/cpufreq-dt-platdev.c | 5 +++++ 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 1c47aee31e9c..757c6012989c 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -224,29 +224,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" }, - { /* 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("exynos-cpufreq", -1, NULL, 0); - return; - } - - platform_device_register_simple(match->data, -1, NULL, 0); -} - static void __init exynos_dt_machine_init(void) { /* @@ -269,8 +246,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 18b81724ca0b..d7e62528ce06 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -20,6 +20,11 @@ struct cpufreq_dt_compat { }; static struct cpufreq_dt_compat compat[] = { + { "samsung,exynos3250", NULL, 0 }, + { "samsung,exynos4210", NULL, 0 }, + { "samsung,exynos4212", NULL, 0 }, + { "samsung,exynos4412", NULL, 0 }, + { "samsung,exynos5250", NULL, 0 }, }; static int __init cpufreq_dt_platdev_init(void)