From patchwork Mon Dec 1 11:41:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41758 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB28F24001 for ; Mon, 1 Dec 2014 11:42:18 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id hs14sf2996344lab.9 for ; Mon, 01 Dec 2014 03:42:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=N1lAlWZWPFp6+8aJa0IPkWb5BFR+7RL7wOYBiRq5tFY=; b=iR0Caj+8S41+hsZYiZb7WtXGk6cpUKccMtomx0FYJHmgdKDy8YLJsZ1rhnk7wvcyrW w+8XDdSknmUG7sL2GQmwSEuF0NLiWjiM0U1L/bw2pcgdLsEtL/TNtgWaRDiVXfjkylb9 EsJPiAKOjNzFRmlOFV3eCCa6ltS8SiKQ8xs1nX1LiiGYfZZUYWkQV6p6BwsbCMm1v5Yc WRMxs4DKUJ+G+azPIVp0WgHX7gKXUabmacYnKcueQwnn8OlmHbEi7nAIm8Dk53rMa5LX TCmEE1XPnjsCCCTyRxvgqVJAlUpeNEdbI5hmBnx0vqJYjATpxFx9FZ69YMhCbfcLn08l akdg== X-Gm-Message-State: ALoCoQnkw+ci0w9mz2tWNARMwOzHjIGF3rAd3U99qkRAZ85P0kUER8wZ7uu/VE0pd7kN8hOvzp6v X-Received: by 10.112.142.36 with SMTP id rt4mr15695771lbb.3.1417434137700; Mon, 01 Dec 2014 03:42:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.197 with SMTP id q5ls1229031lal.39.gmail; Mon, 01 Dec 2014 03:42:17 -0800 (PST) X-Received: by 10.152.7.193 with SMTP id l1mr56056117laa.57.1417434137206; Mon, 01 Dec 2014 03:42:17 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id qr5si17417145lbb.54.2014.12.01.03.42.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:42:17 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id s18so8488021lam.21 for ; Mon, 01 Dec 2014 03:42:17 -0800 (PST) X-Received: by 10.152.21.66 with SMTP id t2mr4977635lae.27.1417434137094; Mon, 01 Dec 2014 03:42:17 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp269043lbc; Mon, 1 Dec 2014 03:42:16 -0800 (PST) X-Received: by 10.70.21.168 with SMTP id w8mr99437580pde.95.1417434135290; Mon, 01 Dec 2014 03:42:15 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id al4si28364029pbc.137.2014.12.01.03.42.14 for ; Mon, 01 Dec 2014 03:42:15 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753403AbaLALmL (ORCPT + 12 others); Mon, 1 Dec 2014 06:42:11 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:54953 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbaLALmJ (ORCPT ); Mon, 1 Dec 2014 06:42:09 -0500 Received: by mail-pa0-f46.google.com with SMTP id lj1so10951373pab.33 for ; Mon, 01 Dec 2014 03:42:09 -0800 (PST) X-Received: by 10.68.203.161 with SMTP id kr1mr53134368pbc.78.1417434129268; Mon, 01 Dec 2014 03:42:09 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id qm3sm17414199pdb.51.2014.12.01.03.42.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:42:08 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Arnd Bergmann , Rob Herring , Grant Likely Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Nishanth Menon , Sudeep Holla , Stephen Boyd , devicetree@vger.kernel.org, santosh shilimkar , Lorenzo Pieralisi , Mike Turquette , kesavan.abhilash@gmail.com, catalin.marinas@arm.com, k.chander@samsung.com, olof@lixom.net, ta.omasab@gmail.com, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [RFC V1 5/8] cpufreq: shmobile: reuse dt_device.c to create cpufreq platform device Date: Mon, 1 Dec 2014 17:11:26 +0530 Message-Id: X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , We now have a common interface for create platform device required to probe cpufreq-dt driver (and others as well). Lets create devices from dt_device.c instead of platform specific code. For shmobile, we are updating the blacklist instead of DT because the newer kernel should be backwards compatible with older DT as well. We can update the "compatible" property in DT but it wouldn't make a difference as we already have imx in the blacklist. Signed-off-by: Viresh Kumar --- arch/arm/mach-shmobile/Makefile | 1 - arch/arm/mach-shmobile/common.h | 7 ------- arch/arm/mach-shmobile/cpufreq.c | 17 ----------------- drivers/cpufreq/dt_device.c | 3 +++ 4 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 arch/arm/mach-shmobile/cpufreq.c diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index e20f278..6780401 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile @@ -48,7 +48,6 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o # PM objects obj-$(CONFIG_SUSPEND) += suspend.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o -obj-$(CONFIG_CPU_FREQ) += cpufreq.o obj-$(CONFIG_PM_RCAR) += pm-rcar.o obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h index 72087c7..97ddd5f 100644 --- a/arch/arm/mach-shmobile/common.h +++ b/arch/arm/mach-shmobile/common.h @@ -45,19 +45,12 @@ int shmobile_cpuidle_init(void); static inline int shmobile_cpuidle_init(void) { return 0; } #endif -#ifdef CONFIG_CPU_FREQ -int shmobile_cpufreq_init(void); -#else -static inline int shmobile_cpufreq_init(void) { return 0; } -#endif - extern void __iomem *shmobile_scu_base; static inline void __init shmobile_init_late(void) { shmobile_suspend_init(); shmobile_cpuidle_init(); - shmobile_cpufreq_init(); } #endif /* __ARCH_MACH_COMMON_H */ diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c deleted file mode 100644 index 57fbff0..0000000 --- a/arch/arm/mach-shmobile/cpufreq.c +++ /dev/null @@ -1,17 +0,0 @@ -/* - * CPUFreq support code for SH-Mobile ARM - * - * Copyright (C) 2014 Gaku Inami - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#include - -int __init shmobile_cpufreq_init(void) -{ - platform_device_register_simple("cpufreq-dt", -1, NULL, 0); - return 0; -} diff --git a/drivers/cpufreq/dt_device.c b/drivers/cpufreq/dt_device.c index 33fc046..85dc002 100644 --- a/drivers/cpufreq/dt_device.c +++ b/drivers/cpufreq/dt_device.c @@ -29,6 +29,9 @@ static const struct of_device_id compatible_machine_match[] = { { .compatible = "marvell,armadaxp", .data = "cpufreq-dt" }, + { .compatible = "renesas,sh7372", .data = "cpufreq-dt" }, + { .compatible = "renesas,sh73a0", .data = "cpufreq-dt" }, + /* BLACKLIST of existing users of arm-bL-cpufreq-dt below */ /* BLACKLIST of existing users of other drivers below */