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: 64295 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp455782lbc; Wed, 23 Mar 2016 23:41:59 -0700 (PDT) X-Received: by 10.66.237.39 with SMTP id uz7mr9930487pac.141.1458801718876; Wed, 23 Mar 2016 23:41:58 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h78si10042111pfh.148.2016.03.23.23.41.58; Wed, 23 Mar 2016 23:41:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-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-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754590AbcCXGl5 (ORCPT + 4 others); 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 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(-) -- 2.7.1.410.g6faf27b -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 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-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)