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: 8658361 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 6F452C0553 for ; Thu, 24 Mar 2016 06:42:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B3572037F for ; Thu, 24 Mar 2016 06:41:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 81A9E20379 for ; Thu, 24 Mar 2016 06:41:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754590AbcCXGl5 (ORCPT ); Thu, 24 Mar 2016 02:41:57 -0400 Received: from mail-pf0-f171.google.com ([209.85.192.171]:32989 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752015AbcCXGl4 (ORCPT ); Thu, 24 Mar 2016 02:41:56 -0400 Received: by mail-pf0-f171.google.com with SMTP id 4so50167802pfd.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=QzoYY1bExDoD3Br4OS7AuuCQe3tEMiFXut8n3m9UAdEQHrKcRsx2UqzXx7uXG1Ufvb /OQH623WaSIV9573kIbAtA1bITXhFWrCTtcUPzDyeS7aOWhk1F/xq+pVI20oNUq6kGya pqH9OpA32bwu4JUnoRGGhtF4qI5Ufjrn5eLazivVAnN213HHYMoA2JEFDqQnRBM7djct YooXUKSPSEhFd+BhaW+UDg2CLqI4BpHNCP5JXaey0rklCdtIkIR9QrckYdNpi2ExW/s2 0wkkPVf1jqCOxJN9r08Dt0aWsivm+viYxOETjKGLbczNPoR02ulezr7H8j/BZbQGvZ3V ckzg== X-Gm-Message-State: AD7BkJKwb02I7nA2NxN0jDUL+9oIovZUsNDcsTbmD4cfSXQ4a8swvnJXcjuTkSKmMae6HG5I 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 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 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: 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=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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)