From patchwork Mon Mar 31 15:16:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 27451 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EE323202E0 for ; Mon, 31 Mar 2014 15:18:24 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id hn18sf6988945igb.8 for ; Mon, 31 Mar 2014 08:18:24 -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=uqF9SXqY6HwhXCzh3tvITw3wO6Z20/ErghcWcBHE030=; b=QkMjqJt/E7j3pTDD+HnCS/SGR1G23x7or2jdyspU3sQ2Rk6g9nwwjcrnBN+5C2AtTJ nu+G4Ezn0Tfs+4Zk5q/BNnvAfc+71H+sKCS4BCsxPptmkdbk8WvAD9a3/9TViqJzuKEa QMPAl0SU7+uFGXLzp1+ZXygvtGqHfuZNk968kyiLVk7K/+M2HpUj6nxQGvbMD8cUYizr tG42rIw6XZpbwWR7i9Gys9dVH768/bHiG5q8lm6FZoWacnVNXZ6wXxg7nzzSo+SFYBJN 6roi3ZVWQci7lC8cspiqCPzav7Ldk/NZFEaxI/QHgIfrnGYlMPoyfxI7Msilfy+cXOlx zhAA== X-Gm-Message-State: ALoCoQnEI22Sw0XEL7TysNLO2eDd2fXJKq2o3HaniUY+uXtFTN7IBDc81zVf3mkdRnvKBuTxHkC7 X-Received: by 10.42.13.198 with SMTP id e6mr8848830ica.21.1396279104437; Mon, 31 Mar 2014 08:18:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.40.200 with SMTP id x66ls2485632qgx.46.gmail; Mon, 31 Mar 2014 08:18:24 -0700 (PDT) X-Received: by 10.52.65.165 with SMTP id y5mr37061vds.51.1396279104326; Mon, 31 Mar 2014 08:18:24 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id tl10si2447411vcb.211.2014.03.31.08.18.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 31 Mar 2014 08:18:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id hu19so8587537vcb.29 for ; Mon, 31 Mar 2014 08:18:24 -0700 (PDT) X-Received: by 10.52.26.161 with SMTP id m1mr1903074vdg.24.1396279104206; Mon, 31 Mar 2014 08:18:24 -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.220.12.8 with SMTP id v8csp150743vcv; Mon, 31 Mar 2014 08:18:23 -0700 (PDT) X-Received: by 10.68.234.230 with SMTP id uh6mr3920228pbc.161.1396279103430; Mon, 31 Mar 2014 08:18:23 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si9354231pao.142.2014.03.31.08.18.22; Mon, 31 Mar 2014 08:18:22 -0700 (PDT) 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 S1753673AbaCaPSU (ORCPT + 5 others); Mon, 31 Mar 2014 11:18:20 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:54708 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753591AbaCaPST (ORCPT ); Mon, 31 Mar 2014 11:18:19 -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 s2VFHfiV028663; Mon, 31 Mar 2014 10:17:41 -0500 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 s2VFHfC6023458; Mon, 31 Mar 2014 10:17:41 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Mon, 31 Mar 2014 10:17:40 -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 s2VFGm4D013169; Mon, 31 Mar 2014 10:17:39 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 26/55] ARM: OMAP3: move cm2xxx_3xxx.h header to public location Date: Mon, 31 Mar 2014 18:16:05 +0300 Message-ID: <1396278994-12624-27-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1396278994-12624-1-git-send-email-t-kristo@ti.com> References: <1396278994-12624-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.220.170 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: , This file needs to be accessible from the PRCM core and mach-omap2 board support code. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/clkt_iclk.c | 2 +- arch/arm/mach-omap2/clock3xxx.c | 2 +- arch/arm/mach-omap2/clockdomains2420_data.c | 2 +- arch/arm/mach-omap2/clockdomains2430_data.c | 2 +- arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c | 2 +- arch/arm/mach-omap2/clockdomains3xxx_data.c | 2 +- arch/arm/mach-omap2/cm2xxx.h | 2 +- arch/arm/mach-omap2/cm2xxx_3xxx.h | 72 ---------------------- arch/arm/mach-omap2/cm2xxx_3xxx_private.h | 2 +- arch/arm/mach-omap2/cm3xxx.h | 2 +- arch/arm/mach-omap2/dpll3xxx.c | 2 +- arch/arm/mach-omap2/dsp.c | 2 +- arch/arm/mach-omap2/pm-debug.c | 2 +- arch/arm/mach-omap2/powerdomain.c | 2 +- arch/arm/mach-omap2/powerdomains3xxx_data.c | 2 +- arch/arm/mach-omap2/prm2xxx.c | 2 +- arch/arm/mach-omap2/serial.c | 2 +- include/linux/power/omap/cm2xxx_3xxx.h | 70 +++++++++++++++++++++ 18 files changed, 86 insertions(+), 88 deletions(-) delete mode 100644 arch/arm/mach-omap2/cm2xxx_3xxx.h create mode 100644 include/linux/power/omap/cm2xxx_3xxx.h diff --git a/arch/arm/mach-omap2/clkt_iclk.c b/arch/arm/mach-omap2/clkt_iclk.c index 333f0a6..b4cf577 100644 --- a/arch/arm/mach-omap2/clkt_iclk.c +++ b/arch/arm/mach-omap2/clkt_iclk.c @@ -17,7 +17,7 @@ #include "clock.h" #include "clock2xxx.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-24xx.h" /* Private functions */ diff --git a/arch/arm/mach-omap2/clock3xxx.c b/arch/arm/mach-omap2/clock3xxx.c index 0b02b41..4706f2f 100644 --- a/arch/arm/mach-omap2/clock3xxx.c +++ b/arch/arm/mach-omap2/clock3xxx.c @@ -26,7 +26,7 @@ #include "clock3xxx.h" #include "prm2xxx_3xxx.h" #include "prm-regbits-34xx.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-34xx.h" /* diff --git a/arch/arm/mach-omap2/clockdomains2420_data.c b/arch/arm/mach-omap2/clockdomains2420_data.c index 7e76bec..7931fd1 100644 --- a/arch/arm/mach-omap2/clockdomains2420_data.c +++ b/arch/arm/mach-omap2/clockdomains2420_data.c @@ -38,7 +38,7 @@ #include "soc.h" #include "clockdomain.h" #include "prm2xxx_3xxx.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-24xx.h" #include "prm-regbits-24xx.h" diff --git a/arch/arm/mach-omap2/clockdomains2430_data.c b/arch/arm/mach-omap2/clockdomains2430_data.c index b923007..2e3918c 100644 --- a/arch/arm/mach-omap2/clockdomains2430_data.c +++ b/arch/arm/mach-omap2/clockdomains2430_data.c @@ -38,7 +38,7 @@ #include "soc.h" #include "clockdomain.h" #include "prm2xxx_3xxx.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-24xx.h" #include "prm-regbits-24xx.h" diff --git a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c index 4972219..b728d6e 100644 --- a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c @@ -37,7 +37,7 @@ #include "clockdomain.h" #include "prm2xxx_3xxx.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-24xx.h" #include "cm-regbits-34xx.h" #include "cm-regbits-44xx.h" diff --git a/arch/arm/mach-omap2/clockdomains3xxx_data.c b/arch/arm/mach-omap2/clockdomains3xxx_data.c index e6b91e5..27851ac 100644 --- a/arch/arm/mach-omap2/clockdomains3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains3xxx_data.c @@ -36,7 +36,7 @@ #include "soc.h" #include "clockdomain.h" #include "prm2xxx_3xxx.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-34xx.h" #include "prm-regbits-34xx.h" diff --git a/arch/arm/mach-omap2/cm2xxx.h b/arch/arm/mach-omap2/cm2xxx.h index 5eaa007..80e9892 100644 --- a/arch/arm/mach-omap2/cm2xxx.h +++ b/arch/arm/mach-omap2/cm2xxx.h @@ -17,7 +17,7 @@ #define __ARCH_ASM_MACH_OMAP2_CM2XXX_H #include "prcm-common.h" -#include "cm2xxx_3xxx.h" +#include #include #define OMAP2420_CM_REGADDR(module, reg) \ diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx.h b/arch/arm/mach-omap2/cm2xxx_3xxx.h deleted file mode 100644 index b40b5bd..0000000 --- a/arch/arm/mach-omap2/cm2xxx_3xxx.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * OMAP2/3 Clock Management (CM) register definitions - * - * Copyright (C) 2007-2009 Texas Instruments, Inc. - * Copyright (C) 2007-2010 Nokia Corporation - * Paul Walmsley - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * The CM hardware modules on the OMAP2/3 are quite similar to each - * other. The CM modules/instances on OMAP4 are quite different, so - * they are handled in a separate file. - */ -#ifndef __ARCH_ASM_MACH_OMAP2_CM2XXX_3XXX_H -#define __ARCH_ASM_MACH_OMAP2_CM2XXX_3XXX_H - -#include "cm.h" - -/* - * Module specific CM register offsets from CM_BASE + domain offset - * Use cm_{read,write}_mod_reg() with these registers. - * These register offsets generally appear in more than one PRCM submodule. - */ - -/* Common between OMAP2 and OMAP3 */ - -#define CM_FCLKEN 0x0000 -#define CM_FCLKEN1 CM_FCLKEN -#define CM_CLKEN CM_FCLKEN -#define CM_ICLKEN 0x0010 -#define CM_ICLKEN1 CM_ICLKEN -#define CM_ICLKEN2 0x0014 -#define CM_ICLKEN3 0x0018 -#define CM_IDLEST 0x0020 -#define CM_IDLEST1 CM_IDLEST -#define CM_IDLEST2 0x0024 -#define OMAP2430_CM_IDLEST3 0x0028 -#define CM_AUTOIDLE 0x0030 -#define CM_AUTOIDLE1 CM_AUTOIDLE -#define CM_AUTOIDLE2 0x0034 -#define CM_AUTOIDLE3 0x0038 -#define CM_CLKSEL 0x0040 -#define CM_CLKSEL1 CM_CLKSEL -#define CM_CLKSEL2 0x0044 -#define OMAP2_CM_CLKSTCTRL 0x0048 - -#ifndef __ASSEMBLER__ - -extern int omap2xxx_cm_apll54_enable(void); -extern void omap2xxx_cm_apll54_disable(void); -extern int omap2xxx_cm_apll96_enable(void); -extern void omap2xxx_cm_apll96_disable(void); - -#endif - -/* CM register bits shared between 24XX and 3430 */ - -/* CM_CLKSEL_GFX */ -#define OMAP_CLKSEL_GFX_SHIFT 0 -#define OMAP_CLKSEL_GFX_MASK (0x7 << 0) -#define OMAP_CLKSEL_GFX_WIDTH 3 - -/* CM_ICLKEN_GFX */ -#define OMAP_EN_GFX_SHIFT 0 -#define OMAP_EN_GFX_MASK (1 << 0) - -/* CM_IDLEST_GFX */ -#define OMAP_ST_GFX_MASK (1 << 0) - -#endif diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx_private.h b/arch/arm/mach-omap2/cm2xxx_3xxx_private.h index 9131829..ca7ca94 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx_private.h +++ b/arch/arm/mach-omap2/cm2xxx_3xxx_private.h @@ -17,7 +17,7 @@ #define __ARCH_ARM_MACH_OMAP2_CM2XXX_3XXX_PRIVATE_H #include "cm.h" -#include "cm2xxx_3xxx.h" +#include #ifndef __ASSEMBLER__ diff --git a/arch/arm/mach-omap2/cm3xxx.h b/arch/arm/mach-omap2/cm3xxx.h index 9c2047f..5fdc14c 100644 --- a/arch/arm/mach-omap2/cm3xxx.h +++ b/arch/arm/mach-omap2/cm3xxx.h @@ -17,7 +17,7 @@ #define __ARCH_ASM_MACH_OMAP2_CM3XXX_H #include "prcm-common.h" -#include "cm2xxx_3xxx.h" +#include #include #define OMAP34XX_CM_REGADDR(module, reg) \ diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index 3185ced..79ce6e8 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c @@ -31,7 +31,7 @@ #include "soc.h" #include "clockdomain.h" #include "clock.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-34xx.h" /* CM_AUTOIDLE_PLL*.AUTO_* bit values */ diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c index b8208b4..1d802fe 100644 --- a/arch/arm/mach-omap2/dsp.c +++ b/arch/arm/mach-omap2/dsp.c @@ -24,7 +24,7 @@ #include #include "control.h" -#include "cm2xxx_3xxx.h" +#include #include "prm2xxx_3xxx.h" #ifdef CONFIG_TIDSPBRIDGE_DVFS #include "omap-pm.h" diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 0b33986..95f28b2 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -33,7 +33,7 @@ #include "omap-pm.h" #include "soc.h" -#include "cm2xxx_3xxx.h" +#include #include "prm2xxx_3xxx.h" #include "pm.h" diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 62649ba..e532d2b 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -22,7 +22,7 @@ #include #include -#include "cm2xxx_3xxx.h" +#include #include "prcm44xx.h" #include "prm2xxx_3xxx.h" #include "prm44xx.h" diff --git a/arch/arm/mach-omap2/powerdomains3xxx_data.c b/arch/arm/mach-omap2/powerdomains3xxx_data.c index 328c103..9db6a8e 100644 --- a/arch/arm/mach-omap2/powerdomains3xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains3xxx_data.c @@ -21,7 +21,7 @@ #include "prcm-common.h" #include "prm2xxx_3xxx.h" #include "prm-regbits-34xx.h" -#include "cm2xxx_3xxx.h" +#include #include "cm-regbits-34xx.h" /* diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c index 7264ae6..5b5260c 100644 --- a/arch/arm/mach-omap2/prm2xxx.c +++ b/arch/arm/mach-omap2/prm2xxx.c @@ -22,7 +22,7 @@ #include "clockdomain.h" #include "prm2xxx.h" #include "prm2xxx_3xxx_private.h" -#include "cm2xxx_3xxx.h" +#include #define OMAP24XX_FORCESTATE_MASK (1 << 18) #define OMAP24XX_AUTOIDLE_MASK (1 << 0) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index a388f8c..90e06b3 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -36,7 +36,7 @@ #include "soc.h" #include "prm2xxx_3xxx.h" #include "pm.h" -#include "cm2xxx_3xxx.h" +#include #include "prm-regbits-34xx.h" #include "control.h" #include "mux.h" diff --git a/include/linux/power/omap/cm2xxx_3xxx.h b/include/linux/power/omap/cm2xxx_3xxx.h new file mode 100644 index 0000000..c4a8ea7 --- /dev/null +++ b/include/linux/power/omap/cm2xxx_3xxx.h @@ -0,0 +1,70 @@ +/* + * OMAP2/3 Clock Management (CM) register definitions + * + * Copyright (C) 2007-2009 Texas Instruments, Inc. + * Copyright (C) 2007-2010 Nokia Corporation + * Paul Walmsley + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * The CM hardware modules on the OMAP2/3 are quite similar to each + * other. The CM modules/instances on OMAP4 are quite different, so + * they are handled in a separate file. + */ +#ifndef __LINUX_POWER_OMAP_CM2XXX_3XXX_H +#define __LINUX_POWER_OMAP_CM2XXX_3XXX_H + +/* + * Module specific CM register offsets from CM_BASE + domain offset + * Use cm_{read,write}_mod_reg() with these registers. + * These register offsets generally appear in more than one PRCM submodule. + */ + +/* Common between OMAP2 and OMAP3 */ + +#define CM_FCLKEN 0x0000 +#define CM_FCLKEN1 CM_FCLKEN +#define CM_CLKEN CM_FCLKEN +#define CM_ICLKEN 0x0010 +#define CM_ICLKEN1 CM_ICLKEN +#define CM_ICLKEN2 0x0014 +#define CM_ICLKEN3 0x0018 +#define CM_IDLEST 0x0020 +#define CM_IDLEST1 CM_IDLEST +#define CM_IDLEST2 0x0024 +#define OMAP2430_CM_IDLEST3 0x0028 +#define CM_AUTOIDLE 0x0030 +#define CM_AUTOIDLE1 CM_AUTOIDLE +#define CM_AUTOIDLE2 0x0034 +#define CM_AUTOIDLE3 0x0038 +#define CM_CLKSEL 0x0040 +#define CM_CLKSEL1 CM_CLKSEL +#define CM_CLKSEL2 0x0044 +#define OMAP2_CM_CLKSTCTRL 0x0048 + +#ifndef __ASSEMBLER__ + +int omap2xxx_cm_apll54_enable(void); +void omap2xxx_cm_apll54_disable(void); +int omap2xxx_cm_apll96_enable(void); +void omap2xxx_cm_apll96_disable(void); + +#endif + +/* CM register bits shared between 24XX and 3430 */ + +/* CM_CLKSEL_GFX */ +#define OMAP_CLKSEL_GFX_SHIFT 0 +#define OMAP_CLKSEL_GFX_MASK (0x7 << 0) +#define OMAP_CLKSEL_GFX_WIDTH 3 + +/* CM_ICLKEN_GFX */ +#define OMAP_EN_GFX_SHIFT 0 +#define OMAP_EN_GFX_MASK (1 << 0) + +/* CM_IDLEST_GFX */ +#define OMAP_ST_GFX_MASK (1 << 0) + +#endif