From patchwork Wed Sep 18 12:14:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 20419 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 12D7F246E9 for ; Wed, 18 Sep 2013 12:15:22 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id c14sf7263083vea.9 for ; Wed, 18 Sep 2013 05:15:21 -0700 (PDT) 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=b4ZGzNb4/IwfvBpmynzy2u/isJB86eGr4DaYHoykSVg=; b=kuQIFa19seA1TgGu6bGOzY67QLi7KVRmFWacdjUx26f8hZ5vNO+ysD+B2Aedj6IazU Hf92ElAE/IuQ6T1SIFAc/qYjbDBSOxmdy5pY+408hGKcsviEIOZy9/EKrpJCaVlrrtrU aip6xQi3b9CmsT21YnYTcqRsGFSp2Z41kAyMl5i0457NGlGDP+p29M/NdJKKxl8cMIui DlQK5VU0GDJ4xw3yqJNKc1m2J4Q2JbdMiKtVb5uLVU9f7HbSPz1syQYyODhfSUEVdDqt q2xIuG/5sDsepk6xkMrnbsflsd5hUzDjtEJ+UvIQcVdW9qXLOGqvr4lf/3Zws5/MI1nA auSQ== X-Gm-Message-State: ALoCoQliF0mrbEPK4iWgdlSA5p/PdVWybcPDPx5bymVnQBlO/307DGwiKhnGw7ZbrHjoMtYg+U8s X-Received: by 10.236.63.165 with SMTP id a25mr6048420yhd.43.1379506521901; Wed, 18 Sep 2013 05:15:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.108.230 with SMTP id hn6ls3383457qeb.81.gmail; Wed, 18 Sep 2013 05:15:21 -0700 (PDT) X-Received: by 10.58.67.9 with SMTP id j9mr24460235vet.3.1379506521805; Wed, 18 Sep 2013 05:15:21 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id ee8si434020vdc.67.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 05:15:21 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 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.177; Received: by mail-ve0-f177.google.com with SMTP id db12so5266832veb.8 for ; Wed, 18 Sep 2013 05:15:21 -0700 (PDT) X-Received: by 10.220.144.68 with SMTP id y4mr65704vcu.28.1379506521722; Wed, 18 Sep 2013 05:15:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp214516vcz; Wed, 18 Sep 2013 05:15:21 -0700 (PDT) X-Received: by 10.15.94.201 with SMTP id bb49mr59828807eeb.23.1379506518460; Wed, 18 Sep 2013 05:15:18 -0700 (PDT) Received: from mail-ea0-f169.google.com (mail-ea0-f169.google.com [209.85.215.169]) by mx.google.com with ESMTPS id l4si1527704eew.101.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 05:15:18 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.169 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.215.169; Received: by mail-ea0-f169.google.com with SMTP id k11so3463109eaj.28 for ; Wed, 18 Sep 2013 05:15:17 -0700 (PDT) X-Received: by 10.15.55.133 with SMTP id v5mr392472eew.96.1379506517672; Wed, 18 Sep 2013 05:15:17 -0700 (PDT) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginmedia.com. [92.233.57.238]) by mx.google.com with ESMTPSA id b45sm2382210eef.4.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 05:15:17 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@linaro.org, Lee Jones Subject: [PATCH 31/41] ARM: ux500: Call appropriate clock initialisation based on DT or !DT booting Date: Wed, 18 Sep 2013 13:14:28 +0100 Message-Id: <1379506478-16625-32-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1379506478-16625-1-git-send-email-lee.jones@linaro.org> References: <1379506478-16625-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The ux500 platform will soon be converted to Device Tree only. When that happens the old clock initialisation will be ripped out. In the meantime however, we have to make a decision and call the appropriate initialisation code manually. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/cpu.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index e6fb023..3c211d2 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -70,9 +70,17 @@ void __init ux500_init_irq(void) if (cpu_is_u8500_family()) { prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1); - u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, - U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, - U8500_CLKRST6_BASE); + + if (of_have_populated_dt()) + u8500_of_clk_init(U8500_CLKRST1_BASE, + U8500_CLKRST2_BASE, + U8500_CLKRST3_BASE, + U8500_CLKRST5_BASE, + U8500_CLKRST6_BASE); + else + u8500_clk_init(U8500_CLKRST1_BASE, U8500_CLKRST2_BASE, + U8500_CLKRST3_BASE, U8500_CLKRST5_BASE, + U8500_CLKRST6_BASE); } else if (cpu_is_u9540()) { prcmu_early_init(U8500_PRCMU_BASE, SZ_8K - 1); ux500_pm_init(U8500_PRCMU_BASE, SZ_8K - 1);