From patchwork Wed Jul 2 08:47:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 32950 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0F75020560 for ; Wed, 2 Jul 2014 08:48:13 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id va2sf64625863obc.2 for ; Wed, 02 Jul 2014 01:48:12 -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=mB5NF8O4SlYHxqri6of+gaonBwK8J8vKYE8kSDY/0wU=; b=UU78zfe11uVc7UkuOmXIduUqwM0pZxLOot+k0K49EuJSTVjkHSPfuodKgEFkYMT1rq NWp5i5Zb6BLejz/hYfJaXzgWtV7IU07wG+FLnHujDDfKADONWy36SZjNilvaA1BSvgTS lLVTxbWS4TI6qEHJJdjpd4euHoOa0utqiYMHR/u/L0mkhdHJJRlhn1sKjTgxLbw+iCy7 AiqxCTltyF10esywA0ndl0PO2MgveVsyZedS4tQLZRt6jXcJy4frF9wDFsV5ytaDn6cc +rGGUXnsyqJEokulqtvSkclrbDa41FgGQ0dr7GZOgwO1FDgwQhD6LwxQNZ1L0eXrxDFY bDzg== X-Gm-Message-State: ALoCoQnh/a0/V5nRcc5EeH2ZXFiDMQfTvO0ByL5qyh+SJAX+NJCNDR4W7PA49giKylJERjEebLbD X-Received: by 10.50.126.100 with SMTP id mx4mr10495554igb.6.1404290892673; Wed, 02 Jul 2014 01:48:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.11 with SMTP id n11ls2437261qge.11.gmail; Wed, 02 Jul 2014 01:48:12 -0700 (PDT) X-Received: by 10.52.182.163 with SMTP id ef3mr40466385vdc.22.1404290892493; Wed, 02 Jul 2014 01:48:12 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id dl7si4306459veb.85.2014.07.02.01.48.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 01:48:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id ij19so9967081vcb.22 for ; Wed, 02 Jul 2014 01:48:12 -0700 (PDT) X-Received: by 10.58.235.130 with SMTP id um2mr7655796vec.18.1404290892419; Wed, 02 Jul 2014 01:48:12 -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.221.37.5 with SMTP id tc5csp277223vcb; Wed, 2 Jul 2014 01:48:12 -0700 (PDT) X-Received: by 10.66.220.169 with SMTP id px9mr2424894pac.79.1404290891680; Wed, 02 Jul 2014 01:48:11 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cl5si29620598pad.108.2014.07.02.01.48.11; Wed, 02 Jul 2014 01:48:11 -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 S1751897AbaGBIsJ (ORCPT + 6 others); Wed, 2 Jul 2014 04:48:09 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:38805 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752024AbaGBIsH (ORCPT ); Wed, 2 Jul 2014 04:48:07 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s628lkIJ013423; Wed, 2 Jul 2014 03:47:46 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s628lkFW004504; Wed, 2 Jul 2014 03:47:46 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 2 Jul 2014 03:47:46 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s628lOXg007645; Wed, 2 Jul 2014 03:47:45 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCH 10/13] ARM: OMAP2+: clock/interface: add a clk_features definition for idlest value Date: Wed, 2 Jul 2014 11:47:44 +0300 Message-ID: <1404290867-6768-11-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1404290867-6768-1-git-send-email-t-kristo@ti.com> References: <1404290867-6768-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.220.177 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: , Helps to get rid of some runtime cpu_is_x checks. This also allows eventual migration of the code under clock driver. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/clock.c | 18 +++++++++++------- arch/arm/mach-omap2/clock.h | 1 + 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 23b5f05..5a0cac9 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -305,13 +305,7 @@ void omap2_clk_dflt_find_idlest(struct clk_hw_omap *clk, * 34xx reverses this, just to keep us on our toes * AM35xx uses both, depending on the module. */ - if (cpu_is_omap24xx()) - *idlest_val = OMAP24XX_CM_IDLEST_VAL; - else if (cpu_is_omap34xx()) - *idlest_val = OMAP34XX_CM_IDLEST_VAL; - else - BUG(); - + *idlest_val = ti_clk_features.cm_idlest_val; } /** @@ -788,4 +782,14 @@ void __init ti_clk_init_features(void) /* Jitter correction only available on OMAP343X */ if (cpu_is_omap343x()) ti_clk_features.flags |= TI_CLK_DPLL_HAS_FREQSEL; + + /* Idlest value for interface clocks. + * 24xx uses 0 to indicate not ready, and 1 to indicate ready. + * 34xx reverses this, just to keep us on our toes + * AM35xx uses both, depending on the module. + */ + if (cpu_is_omap24xx()) + 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; } diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index d3ef147..0f100dc 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -233,6 +233,7 @@ struct ti_clk_features { long fint_band1_max; long fint_band2_min; u8 dpll_bypass_vals; + u8 cm_idlest_val; }; #define TI_CLK_DPLL_HAS_FREQSEL (1 << 0)