From patchwork Mon Dec 1 11:41:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41760 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5E40A24001 for ; Mon, 1 Dec 2014 11:42:26 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id u10sf6402591lbd.6 for ; Mon, 01 Dec 2014 03:42:25 -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=LepPNzBpsZqQUtTgIjdKvREdiaDI56+a+AebcviEasA=; b=SyV4t8IXf5vNcaBHVrlIhloAo+CAd7SB5ENGRreorqy9yyLwTZ9hxv8puEn2Dh4U08 lmIqiwL6mP5tpYFf0bDtfK+kcTplC8poo6HMh/jTZ7Sm+h6ZT+7w1PJkWQsndPR/hu9+ Qo+rZZm9Ef6/v8W0eNdIlfbtEofd/ztIkTfoyrhK+RV74v68caFIcyyjIGVpBI/8Bn59 rjuF4tvkRgoMkIazTth7wZLKQG+8D2bMq3lYKnn5YrA9LPLRXgo4RcxnlCkZDsNAvE2k x8J7JOpVLwnEQqAs53/txvJSlZ6XkJRC1Pv5SoqGcp+yqFJTln9v8Y/5Kyk/toFhDcAg bX9g== X-Gm-Message-State: ALoCoQnN98y1AwdRny5CiWGHMHN+U2O8GuCIt/Iv7go/twr3AXslGT/es8vY8jIVoKwEcViz68Fh X-Received: by 10.180.94.3 with SMTP id cy3mr13596277wib.7.1417434145363; Mon, 01 Dec 2014 03:42:25 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.227 with SMTP id v3ls1215528lav.91.gmail; Mon, 01 Dec 2014 03:42:25 -0800 (PST) X-Received: by 10.152.21.167 with SMTP id w7mr56959212lae.70.1417434145097; Mon, 01 Dec 2014 03:42:25 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id py1si17377506lbb.103.2014.12.01.03.42.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:42:25 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gq15so8657362lab.18 for ; Mon, 01 Dec 2014 03:42:25 -0800 (PST) X-Received: by 10.112.138.137 with SMTP id qq9mr56100435lbb.80.1417434145008; Mon, 01 Dec 2014 03:42:25 -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 ew9csp269060lbc; Mon, 1 Dec 2014 03:42:24 -0800 (PST) X-Received: by 10.68.221.106 with SMTP id qd10mr98093682pbc.98.1417434143329; Mon, 01 Dec 2014 03:42:23 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xr5si28398938pbc.116.2014.12.01.03.42.22 for ; Mon, 01 Dec 2014 03:42:23 -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 S1753236AbaLALmU (ORCPT + 12 others); Mon, 1 Dec 2014 06:42:20 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:52196 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753400AbaLALmR (ORCPT ); Mon, 1 Dec 2014 06:42:17 -0500 Received: by mail-pa0-f54.google.com with SMTP id fb1so11019667pad.27 for ; Mon, 01 Dec 2014 03:42:17 -0800 (PST) X-Received: by 10.68.243.3 with SMTP id wu3mr99075866pbc.133.1417434137071; Mon, 01 Dec 2014 03:42:17 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id z5sm17275383pbt.89.2014.12.01.03.42.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:42:16 -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 7/8] cpufreq: calxeda: reuse dt_device.c to create cpufreq platform device Date: Mon, 1 Dec 2014 17:11:28 +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.45 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 calxeda, 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 --- drivers/cpufreq/dt_device.c | 3 +++ drivers/cpufreq/highbank-cpufreq.c | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/dt_device.c b/drivers/cpufreq/dt_device.c index 2075228..8b5ac05 100644 --- a/drivers/cpufreq/dt_device.c +++ b/drivers/cpufreq/dt_device.c @@ -34,6 +34,9 @@ static const struct of_device_id compatible_machine_match[] = { { .compatible = "xlnx,zynq-7000", .data = "cpufreq-dt" }, + { .compatible = "calxeda,highbank", .data = "cpufreq-dt" }, + { .compatible = "calxeda,ecx-2000", .data = "cpufreq-dt" }, + /* BLACKLIST of existing users of arm-bL-cpufreq-dt below */ /* BLACKLIST of existing users of other drivers below */ diff --git a/drivers/cpufreq/highbank-cpufreq.c b/drivers/cpufreq/highbank-cpufreq.c index 1608f71..faab680 100644 --- a/drivers/cpufreq/highbank-cpufreq.c +++ b/drivers/cpufreq/highbank-cpufreq.c @@ -20,7 +20,6 @@ #include #include #include -#include #define HB_CPUFREQ_CHANGE_NOTE 0x80000001 #define HB_CPUFREQ_IPC_LEN 7 @@ -60,7 +59,6 @@ static struct notifier_block hb_cpufreq_clk_nb = { static int hb_cpufreq_driver_init(void) { - struct platform_device_info devinfo = { .name = "cpufreq-dt", }; struct device *cpu_dev; struct clk *cpu_clk; struct device_node *np; @@ -95,9 +93,6 @@ static int hb_cpufreq_driver_init(void) goto out_put_node; } - /* Instantiate cpufreq-dt */ - platform_device_register_full(&devinfo); - out_put_node: of_node_put(np); return ret;