From patchwork Wed Jul 2 08:47:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 32952 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 789AE20560 for ; Wed, 2 Jul 2014 08:48:18 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id v10sf50718239pde.3 for ; Wed, 02 Jul 2014 01:48:17 -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=6mjPXKf51LLfdsuO0rNr+DUPmJNAMLmHVx+kbQQsruQ=; b=SUgXvCMbMmTZVDSvlP51RLr85TrleyxuGxzqX2MRFuwYZhBrD+tbkL+h8hIif12YeW S5RQWm0rNCvgGd3b+pStYicgz9GElA6/g0ZhsWYgEjZLnvvtffrVfBz3eu3JEtj48Ohb CoYnlxvdHFv+xdyZKTor2eTbfuW62VuhWAIXmtOZLEGassdogdC+rRZMKdkvsS4sSG7h ru2L9nUxZHkQtCUIgkXlsW9zvKGF3ZgXPH569hkmd9d4Vh9BoVBbTuZkW+SWrAi0m2m5 9NL2xXIN9hSUVsE6hiQ+XUp2O20GfGfe6fWgNNe8AYvOgeJRsCEM3Via+7gFOGI1EcA4 j/Nw== X-Gm-Message-State: ALoCoQkkb9NIjRiFiWQeDB9ofcNylkNqTCNP2oskkid0S6qpLVAFCakxgLfo5ltlZo0bKVzrIpaC X-Received: by 10.68.242.74 with SMTP id wo10mr21145906pbc.0.1404290897808; Wed, 02 Jul 2014 01:48:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.105.54 with SMTP id b51ls2374856qgf.48.gmail; Wed, 02 Jul 2014 01:48:17 -0700 (PDT) X-Received: by 10.58.12.73 with SMTP id w9mr10569329veb.13.1404290897697; Wed, 02 Jul 2014 01:48:17 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id sp1si12627521vec.83.2014.07.02.01.48.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 02 Jul 2014 01:48:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id lf12so9985133vcb.4 for ; Wed, 02 Jul 2014 01:48:17 -0700 (PDT) X-Received: by 10.58.188.199 with SMTP id gc7mr44537389vec.4.1404290897628; Wed, 02 Jul 2014 01:48:17 -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 tc5csp277231vcb; Wed, 2 Jul 2014 01:48:17 -0700 (PDT) X-Received: by 10.66.152.35 with SMTP id uv3mr2497243pab.74.1404290896923; Wed, 02 Jul 2014 01:48:16 -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.16; Wed, 02 Jul 2014 01:48:16 -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 S1751688AbaGBIsG (ORCPT + 6 others); Wed, 2 Jul 2014 04:48:06 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:39730 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbaGBIsD (ORCPT ); Wed, 2 Jul 2014 04:48:03 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s628laSA026438; Wed, 2 Jul 2014 03:47:36 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s628laXn004441; Wed, 2 Jul 2014 03:47:36 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Wed, 2 Jul 2014 03:47:36 -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 s628lOXb007645; Wed, 2 Jul 2014 03:47:35 -0500 From: Tero Kristo To: , , , CC: Subject: [PATCH 05/13] ARM: OMAP2+: clock: introduce ti_clk_features flags Date: Wed, 2 Jul 2014 11:47:39 +0300 Message-ID: <1404290867-6768-6-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.173 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: , This shall be used to replace the cpu type checks around the clock code. Actual bit values will be introduced in patches later. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/clock.c | 14 ++++++++++++++ arch/arm/mach-omap2/clock.h | 10 ++++++++++ arch/arm/mach-omap2/io.c | 2 ++ 3 files changed, 26 insertions(+) diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 591581a..7897053 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -47,6 +47,11 @@ u16 cpu_mask; /* + * Clock features setup. Used instead of CPU type checks. + */ +struct ti_clk_features ti_clk_features; + +/* * clkdm_control: if true, then when a clock is enabled in the * hardware, its clockdomain will first be enabled; and when a clock * is disabled in the hardware, its clockdomain will be disabled @@ -731,3 +736,12 @@ void __init omap2_clk_print_new_rates(const char *hfclkin_ck_name, (clk_get_rate(core_ck) / 1000000), (clk_get_rate(mpu_ck) / 1000000)); } + +/** + * ti_clk_init_features - init clock features struct for the SoC + * + * Initializes the clock features struct based on the SoC type. + */ +void __init ti_clk_init_features(void) +{ +} diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h index e29f982..9b89cc0 100644 --- a/arch/arm/mach-omap2/clock.h +++ b/arch/arm/mach-omap2/clock.h @@ -223,6 +223,14 @@ void omap2_clk_writel(u32 val, struct clk_hw_omap *clk, void __iomem *reg); extern u16 cpu_mask; +/* + * Clock features setup. Used instead of CPU type checks. + */ +struct ti_clk_features { + u32 flags; +}; +extern struct ti_clk_features ti_clk_features; + extern const struct clkops clkops_omap2_dflt_wait; extern const struct clkops clkops_dummy; extern const struct clkops clkops_omap2_dflt; @@ -261,4 +269,6 @@ extern int omap2_clkops_enable_clkdm(struct clk_hw *hw); extern void omap2_clkops_disable_clkdm(struct clk_hw *hw); extern void omap_clocks_register(struct omap_clk *oclks, int cnt); + +void __init ti_clk_init_features(void); #endif diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 8f55945..1fae5c1 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -728,6 +728,8 @@ int __init omap_clk_init(void) if (!omap_clk_soc_init) return 0; + ti_clk_init_features(); + ret = of_prcm_init(); if (!ret) ret = omap_clk_soc_init();