From patchwork Fri Oct 3 13:57:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 38316 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 306ED2057C for ; Fri, 3 Oct 2014 13:57:58 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e51sf845674eek.3 for ; Fri, 03 Oct 2014 06:57:57 -0700 (PDT) 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=Q77hOXeTvvCye9Vg6Z9U2Z3wFdni0Ngqr+X43vf/fW0=; b=SgA+7+NseuJFKDlzcG7iVZf8To+j5m59McI7hN+73ieu+gks1+AAoFAWwfUcF1kJ44 +8iMfs/afcyyHytX18v99CgSJzDN5iXnRGOyiKbwkV5VOZ5Hc7856Mj6lxp7Aguf9iTc HYMjdd51ic3zdLjLMhByhqfvTopFfLW+AyS6O/EstzYX8oqPzaSeBc764HmF5M58RgeN CJcr2B8Nx+dqHZXQ8G3Ym2NzI3iv9SDUJtvbF2MUIuj0Scr6nccxvX2ae+1iRBea4HD/ NGOneRf+GVBJ9a4WM9YOr61aLN8vfBj0KYkZaVmuYC30Cyg2evgCRLw3N1L7pDFbo9CU sVTA== X-Gm-Message-State: ALoCoQnCqqqMaPYwVYZqNGFcyGe/aqOC1CB9khzqHJANDeoAHlKGSz5fsuvkAcs590tqWT025uy2 X-Received: by 10.112.14.101 with SMTP id o5mr21968lbc.23.1412344677216; Fri, 03 Oct 2014 06:57:57 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.1 with SMTP id e1ls390366lab.51.gmail; Fri, 03 Oct 2014 06:57:57 -0700 (PDT) X-Received: by 10.112.135.230 with SMTP id pv6mr3245266lbb.105.1412344676987; Fri, 03 Oct 2014 06:57:56 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by mx.google.com with ESMTPS id b2si2290151lbm.104.2014.10.03.06.57.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 Oct 2014 06:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id mk6so1102977lab.1 for ; Fri, 03 Oct 2014 06:57:56 -0700 (PDT) X-Received: by 10.152.204.231 with SMTP id lb7mr6182981lac.44.1412344676748; Fri, 03 Oct 2014 06:57:56 -0700 (PDT) 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.130.169 with SMTP id of9csp231214lbb; Fri, 3 Oct 2014 06:57:56 -0700 (PDT) X-Received: by 10.66.173.141 with SMTP id bk13mr2568862pac.137.1412344674918; Fri, 03 Oct 2014 06:57:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gs8si7375428pac.40.2014.10.03.06.57.54 for ; Fri, 03 Oct 2014 06:57:54 -0700 (PDT) Received-SPF: none (google.com: linux-omap-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 S1752595AbaJCN5x (ORCPT + 5 others); Fri, 3 Oct 2014 09:57:53 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:50083 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090AbaJCN5w (ORCPT ); Fri, 3 Oct 2014 09:57:52 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s93DvOG4030149; Fri, 3 Oct 2014 08:57:24 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s93DvOr5024433; Fri, 3 Oct 2014 08:57:24 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Fri, 3 Oct 2014 08:57:24 -0500 Received: from sokoban.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s93DvJfb007112; Fri, 3 Oct 2014 08:57:22 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCH 1/5] ARM: OMAP3: clock: use clk_features flags for omap3 DPLL4 checks Date: Fri, 3 Oct 2014 16:57:10 +0300 Message-ID: <1412344634-2798-2-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1412344634-2798-1-git-send-email-t-kristo@ti.com> References: <1412344634-2798-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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 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: , DPLL4 can't be reprogrammed on OMAP3430 ES1.0 due to hardware limitation. Currently, the code does runtime omap_rev() check to see the chip it is being executed on, instead, change this to use clk_features flags. This avoids need for runtime omap_rev() checks. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/clock.c | 4 ++++ arch/arm/mach-omap2/clock.h | 1 + arch/arm/mach-omap2/clock3xxx.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 500530d..c2b2398 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -771,4 +771,8 @@ void __init ti_clk_init_features(void) ti_clk_features.cm_idlest_val = OMAP24XX_CM_IDLEST_VAL; else if (cpu_is_omap34xx()) ti_clk_features.cm_idlest_val = OMAP34XX_CM_IDLEST_VAL; + + /* On OMAP3430 ES1.0, DPLL4 can't be re-programmed */ + if (omap_rev() == OMAP3430_REV_ES1_0) + ti_clk_features.flags |= TI_CLK_DPLL4_DENY_REPROGRAM; } diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index 4592a27..641337c 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -234,6 +234,7 @@ struct ti_clk_features { }; #define TI_CLK_DPLL_HAS_FREQSEL (1 << 0) +#define TI_CLK_DPLL4_DENY_REPROGRAM (1 << 1) extern struct ti_clk_features ti_clk_features; diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c index 0b02b41..9a25601 100644 --- a/arch/arm/mach-omap2/clock3xxx.c +++ b/arch/arm/mach-omap2/clock3xxx.c @@ -46,7 +46,7 @@ int omap3_dpll4_set_rate(struct clk_hw *hw, unsigned long rate, * on 3430ES1 prevents us from changing DPLL multipliers or dividers * on DPLL4. */ - if (omap_rev() == OMAP3430_REV_ES1_0) { + if (ti_clk_features.flags & TI_CLK_DPLL4_DENY_REPROGRAM) { pr_err("clock: DPLL4 cannot change rate due to silicon 'Limitation 2.5' on 3430ES1.\n"); return -EINVAL; }