From patchwork Mon Dec 1 11:41:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 41756 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0246F24001 for ; Mon, 1 Dec 2014 11:42:12 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id l18sf6367549wgh.10 for ; Mon, 01 Dec 2014 03:42:11 -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=t6HfNa+8+lis0VJzYGt4D86KwonbvWUs0ZpnuO8myr8=; b=VcQ3LN+Dkdz093RWDrej2KukW1yWKZ8Vq4hHbC5h2euyv1neiDe82fhqIsvI3BfN4q ywdjl7LUKVFscuSW/xEZwsDe9tHdFTNiFV7NcRVv6bxr2jJr2R9KWVpseNWDXQSodndm CM9npruQbmkmgtbdfOjCwGGLJ9YWc2zCjTZUNY4lWVwXBdu/9ayLg4F930Kzo3AaNevL D0KgV6iHhGVSNUqUJx0zRYBgE0yTQrJW3HWMKe+sVc2zdrX/8w9Wz5bLt/+nVK9odCXE /XkORsE4N55jS9YEHTOQURgLOB0Mn9B2yUK6ZNDlaERwT4bEr2YUXP2TdhdjEm3aRt5m SWDg== X-Gm-Message-State: ALoCoQnq0aXiMgYUWlyz8kgiUXb3jV2oTzBx0dqoyBH+VNrvpRXrrXrfD2YUc03ZTr/hIJXhEw15 X-Received: by 10.194.176.106 with SMTP id ch10mr316945wjc.6.1417434131299; Mon, 01 Dec 2014 03:42:11 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.7 with SMTP id 7ls1018804laq.88.gmail; Mon, 01 Dec 2014 03:42:11 -0800 (PST) X-Received: by 10.112.247.43 with SMTP id yb11mr56617862lbc.51.1417434130998; Mon, 01 Dec 2014 03:42:10 -0800 (PST) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id s4si67535lag.91.2014.12.01.03.42.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:42:10 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id 10so8310636lbg.26 for ; Mon, 01 Dec 2014 03:42:10 -0800 (PST) X-Received: by 10.112.14.69 with SMTP id n5mr56332334lbc.34.1417434130580; Mon, 01 Dec 2014 03:42:10 -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 ew9csp269024lbc; Mon, 1 Dec 2014 03:42:09 -0800 (PST) X-Received: by 10.68.65.35 with SMTP id u3mr85607596pbs.9.1417434128428; Mon, 01 Dec 2014 03:42:08 -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.07 for ; Mon, 01 Dec 2014 03:42:08 -0800 (PST) Received-SPF: none (google.com: devicetree-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 S1753396AbaLALmD (ORCPT + 4 others); Mon, 1 Dec 2014 06:42:03 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:35792 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753393AbaLALmB (ORCPT ); Mon, 1 Dec 2014 06:42:01 -0500 Received: by mail-pd0-f178.google.com with SMTP id g10so10815717pdj.9 for ; Mon, 01 Dec 2014 03:42:00 -0800 (PST) X-Received: by 10.66.165.70 with SMTP id yw6mr97645970pab.97.1417434120592; Mon, 01 Dec 2014 03:42:00 -0800 (PST) Received: from localhost ([122.166.92.172]) by mx.google.com with ESMTPSA id ty7sm11112823pac.1.2014.12.01.03.41.59 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Dec 2014 03:41:59 -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 3/8] cpufreq: imx: reuse dt_device.c to create cpufreq platform device Date: Mon, 1 Dec 2014 17:11:24 +0530 Message-Id: <67cc9759ae6634bd3059352644b693247afcb1be.1417433163.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.3.693.g996b0fd In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@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.217.181 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 imx, 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-imx/imx27-dt.c | 4 ---- arch/arm/mach-imx/mach-imx51.c | 3 --- drivers/cpufreq/dt_device.c | 2 ++ 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c index dc8f1a6..f12fe83 100644 --- a/arch/arm/mach-imx/imx27-dt.c +++ b/arch/arm/mach-imx/imx27-dt.c @@ -20,13 +20,9 @@ static void __init imx27_dt_init(void) { - struct platform_device_info devinfo = { .name = "cpufreq-dt", }; - mxc_arch_reset_init_dt(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); - - platform_device_register_full(&devinfo); } static const char * const imx27_dt_board_compat[] __initconst = { diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index 2c5fcaf..17d16a6 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c @@ -51,14 +51,11 @@ static void __init imx51_ipu_mipi_setup(void) static void __init imx51_dt_init(void) { - struct platform_device_info devinfo = { .name = "cpufreq-dt", }; - mxc_arch_reset_init_dt(); imx51_ipu_mipi_setup(); imx_src_init(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); - platform_device_register_full(&devinfo); } static void __init imx51_init_late(void) diff --git a/drivers/cpufreq/dt_device.c b/drivers/cpufreq/dt_device.c index 7800968..cf01bed 100644 --- a/drivers/cpufreq/dt_device.c +++ b/drivers/cpufreq/dt_device.c @@ -24,6 +24,8 @@ static const struct of_device_id compatible_machine_match[] = { { .compatible = "arm-bL-cpufreq-dt", .data = "arm-bL-cpufreq-dt" }, /* BLACKLIST of existing users of cpufreq-dt below */ + { .compatible = "fsl,imx27", .data = "cpufreq-dt" }, + { .compatible = "fsl,imx51", .data = "cpufreq-dt" }, /* BLACKLIST of existing users of arm-bL-cpufreq-dt below */