From patchwork Tue Mar 4 09:18:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 25670 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D427E206F9 for ; Tue, 4 Mar 2014 09:19:53 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id oz11sf11577920veb.5 for ; Tue, 04 Mar 2014 01:19:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=IJFifDJ0b+lbcEQHMhKMpM6OtC3SbnKRfZxyRXNJicM=; b=DevZYqAxKS+gD5YxHD2gVizsEWcGE4OAlQXUNOsqxinrjd58dnm47+dFh9H+/CCmHk exltMAtq6bcSxNO86oAbuF7uVIEMlwpfLmitwiodcD3xQpkEQk/I4n7dj2x5yMDvz1sb JIoiyplXLrtLvdAEpXUYJEfRXxwYNQd5kmozFFJNWcaadBZKhF6fuAHj3cJTFiIRQJGI 9XAfaoDPn62u14NVFf1Ge5PlB7K0caRHIv/em2bG6K0qxFLUqtxbKNgXk3wpjLAL9AAR 1p98MYp01bvbIpZRqhnC/SSItP3IgQFr+DNUz9ysttINLXOJ2msPc48ft8GtvBECWOcb LiOA== X-Gm-Message-State: ALoCoQlecOO8XTmWWfy2QVubWFMGugf9lxDnmGRwLrXrmN6mbQn2iQulLJaVgbHXnFgbQqrBAbkj X-Received: by 10.236.96.138 with SMTP id r10mr8242374yhf.12.1393924793569; Tue, 04 Mar 2014 01:19:53 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.195 with SMTP id 61ls2467261qgv.19.gmail; Tue, 04 Mar 2014 01:19:53 -0800 (PST) X-Received: by 10.52.142.10 with SMTP id rs10mr3062765vdb.3.1393924793483; Tue, 04 Mar 2014 01:19:53 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id xj4si4085008vec.94.2014.03.04.01.19.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 01:19:53 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so4433550veb.20 for ; Tue, 04 Mar 2014 01:19:53 -0800 (PST) X-Received: by 10.220.69.133 with SMTP id z5mr47614vci.49.1393924793416; Tue, 04 Mar 2014 01:19:53 -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.220.130.193 with SMTP id u1csp113785vcs; Tue, 4 Mar 2014 01:19:53 -0800 (PST) X-Received: by 10.68.49.228 with SMTP id x4mr24907403pbn.50.1393924792841; Tue, 04 Mar 2014 01:19:52 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si13499024pav.333.2014.03.04.01.19.52; Tue, 04 Mar 2014 01:19:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756773AbaCDJTv (ORCPT + 5 others); Tue, 4 Mar 2014 04:19:51 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:44040 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756697AbaCDJTt (ORCPT ); Tue, 4 Mar 2014 04:19:49 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s249JLoN017428; Tue, 4 Mar 2014 03:19:21 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s249JLpM017831; Tue, 4 Mar 2014 03:19:21 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 4 Mar 2014 03:19:20 -0600 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s249Il4J024729; Tue, 4 Mar 2014 03:19:19 -0600 From: Tero Kristo To: , , , , CC: , Subject: [PATCHv2 12/14] ARM: OMAP2: clock: use DT clock boot if available Date: Tue, 4 Mar 2014 11:18:18 +0200 Message-ID: <1393924700-6510-13-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393924700-6510-1-git-send-email-t-kristo@ti.com> References: <1393924700-6510-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: t-kristo@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , Otherwise legacy boot clock data is used. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/io.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index af432b1..e57088d 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -53,6 +53,7 @@ #include "prm2xxx.h" #include "prm3xxx.h" #include "prm44xx.h" +#include "opp2xxx.h" /* * omap_clk_soc_init: points to a function that does the SoC-specific @@ -410,7 +411,12 @@ void __init omap2420_init_early(void) omap242x_clockdomains_init(); omap2420_hwmod_init(); omap_hwmod_init_postsetup(); - omap_clk_soc_init = omap2420_clk_init; + if (of_have_populated_dt()) { + omap_clk_soc_init = omap2420_dt_clk_init; + rate_table = omap2420_rate_table; + } else { + omap_clk_soc_init = omap2420_clk_init; + } } void __init omap2420_init_late(void) @@ -439,7 +445,12 @@ void __init omap2430_init_early(void) omap243x_clockdomains_init(); omap2430_hwmod_init(); omap_hwmod_init_postsetup(); - omap_clk_soc_init = omap2430_clk_init; + if (of_have_populated_dt()) { + omap_clk_soc_init = omap2430_dt_clk_init; + rate_table = omap2430_rate_table; + } else { + omap_clk_soc_init = omap2430_clk_init; + } } void __init omap2430_init_late(void)