From patchwork Mon Mar 31 15:16:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 27454 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D89F9202E0 for ; Mon, 31 Mar 2014 15:18:30 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf20348061pdb.0 for ; Mon, 31 Mar 2014 08:18:30 -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=7LCmzhVoMZl19yXzOQWek6GqnvKodZdJfAWCO3lsjYM=; b=OXEa2yEjyRV0faVIXMnuYCoWTvosDhpJTJC10C1Pz42A9cuusDyaSKPuPqe9AnIqnO IvSqiCZqbuymDt4CL461A6kMJ+wvhCnRgwOLxNg8KvY/hR9xBncXdhO41wm/IAs35r7N Cuyr9mam/K79nd2HDLZ8wW22lEZ+DlziiemhypbXCe2UzN79SBs9bsZI2e2u6+y33mqH 0ItBbDDmv2w37Dq6Ir7aAzqchYv949NMSaoAjqysV17YthXfybI+kXkncJ9PfW9qS98v h4/wGiot3x7ubkdtHOWcUS1AbYYiK09BZAw9A8ORsCAuXyttRmQ8XnJaWgEbL+9J7j/R fwhg== X-Gm-Message-State: ALoCoQmAd70jPW/z6nfPOW90q7c+XlFvNzp63ceg7fNSoqZcY2/z8NpBu7MgTiRnAOF/Q5+WnwRS X-Received: by 10.68.231.233 with SMTP id tj9mr10338630pbc.2.1396279110003; Mon, 31 Mar 2014 08:18:30 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.105.161 with SMTP id c30ls135466qgf.88.gmail; Mon, 31 Mar 2014 08:18:29 -0700 (PDT) X-Received: by 10.221.27.8 with SMTP id ro8mr496195vcb.30.1396279109875; Mon, 31 Mar 2014 08:18:29 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id b7si3032847vev.40.2014.03.31.08.18.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 31 Mar 2014 08:18:29 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 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.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so8350739veb.14 for ; Mon, 31 Mar 2014 08:18:29 -0700 (PDT) X-Received: by 10.220.170.202 with SMTP id e10mr2505784vcz.20.1396279109732; Mon, 31 Mar 2014 08:18:29 -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 v8csp150751vcv; Mon, 31 Mar 2014 08:18:29 -0700 (PDT) X-Received: by 10.66.151.205 with SMTP id us13mr25662773pab.93.1396279108823; Mon, 31 Mar 2014 08:18:28 -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.28; Mon, 31 Mar 2014 08:18:28 -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 S1753880AbaCaPS0 (ORCPT + 5 others); Mon, 31 Mar 2014 11:18:26 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:58796 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753879AbaCaPSZ (ORCPT ); Mon, 31 Mar 2014 11:18:25 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2VFHmix022180; Mon, 31 Mar 2014 10:17:48 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2VFHm1p014070; Mon, 31 Mar 2014 10:17:48 -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:47 -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 s2VFGm4H013169; Mon, 31 Mar 2014 10:17:46 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 30/55] ARM: OMAP2+: CM: move cm.h header to public location Date: Mon, 31 Mar 2014 18:16:09 +0300 Message-ID: <1396278994-12624-31-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.128.169 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/clock.c | 2 +- arch/arm/mach-omap2/clock2xxx.c | 2 +- arch/arm/mach-omap2/clockdomains33xx_data.c | 2 +- arch/arm/mach-omap2/cm.h | 64 --------------------------- arch/arm/mach-omap2/cm2xxx.c | 2 +- arch/arm/mach-omap2/cm2xxx_3xxx_private.h | 2 +- arch/arm/mach-omap2/cm33xx.c | 2 +- arch/arm/mach-omap2/cm33xx.h | 2 +- arch/arm/mach-omap2/cm3xxx.c | 2 +- arch/arm/mach-omap2/cm44xx.c | 2 +- arch/arm/mach-omap2/cm_common.c | 2 +- arch/arm/mach-omap2/cminst44xx.c | 2 +- arch/arm/mach-omap2/io.c | 2 +- arch/arm/mach-omap2/powerdomain-common.c | 2 +- include/linux/power/omap/cm.h | 64 +++++++++++++++++++++++++++ 15 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 arch/arm/mach-omap2/cm.h create mode 100644 include/linux/power/omap/cm.h diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 4ac6e3d..4276c46 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c @@ -31,7 +31,7 @@ #include "soc.h" #include "clockdomain.h" #include "clock.h" -#include "cm.h" +#include #include "cm2xxx.h" #include "cm3xxx.h" #include "cm-regbits-24xx.h" diff --git a/arch/arm/mach-omap2/clock2xxx.c b/arch/arm/mach-omap2/clock2xxx.c index b870f6a..4c996dd 100644 --- a/arch/arm/mach-omap2/clock2xxx.c +++ b/arch/arm/mach-omap2/clock2xxx.c @@ -25,7 +25,7 @@ #include "soc.h" #include "clock.h" #include "clock2xxx.h" -#include "cm.h" +#include #include "cm-regbits-24xx.h" struct clk_hw *dclk_hw; diff --git a/arch/arm/mach-omap2/clockdomains33xx_data.c b/arch/arm/mach-omap2/clockdomains33xx_data.c index 32c90fd..e86f84e 100644 --- a/arch/arm/mach-omap2/clockdomains33xx_data.c +++ b/arch/arm/mach-omap2/clockdomains33xx_data.c @@ -18,7 +18,7 @@ #include #include "clockdomain.h" -#include "cm.h" +#include #include "cm33xx.h" #include "cm-regbits-33xx.h" diff --git a/arch/arm/mach-omap2/cm.h b/arch/arm/mach-omap2/cm.h deleted file mode 100644 index 93473f9..0000000 --- a/arch/arm/mach-omap2/cm.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * OMAP2+ Clock Management prototypes - * - * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc. - * Copyright (C) 2007-2009 Nokia Corporation - * - * Written by 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. - */ -#ifndef __ARCH_ASM_MACH_OMAP2_CM_H -#define __ARCH_ASM_MACH_OMAP2_CM_H - -/* - * MAX_MODULE_READY_TIME: max duration in microseconds to wait for the - * PRCM to request that a module exit the inactive state in the case of - * OMAP2 & 3. - * In the case of OMAP4 this is the max duration in microseconds for the - * module to reach the functionnal state from an inactive state. - */ -#define MAX_MODULE_READY_TIME 2000 - -# ifndef __ASSEMBLER__ -extern void __iomem *cm_base; -extern void __iomem *cm2_base; -extern void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2); -# endif - -/* - * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for - * the PRCM to request that a module enter the inactive state in the - * case of OMAP2 & 3. In the case of OMAP4 this is the max duration - * in microseconds for the module to reach the inactive state from - * a functional state. - * XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during - * kernel init. - */ -#define MAX_MODULE_DISABLE_TIME 5000 - -# ifndef __ASSEMBLER__ - -/** - * struct cm_ll_data - fn ptrs to per-SoC CM function implementations - * @split_idlest_reg: ptr to the SoC CM-specific split_idlest_reg impl - * @wait_module_ready: ptr to the SoC CM-specific wait_module_ready impl - */ -struct cm_ll_data { - int (*split_idlest_reg)(void __iomem *idlest_reg, s16 *prcm_inst, - u8 *idlest_reg_id); - int (*wait_module_ready)(s16 prcm_mod, u8 idlest_id, u8 idlest_shift); -}; - -extern int cm_split_idlest_reg(void __iomem *idlest_reg, s16 *prcm_inst, - u8 *idlest_reg_id); -extern int cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift); - -extern int cm_register(struct cm_ll_data *cld); -extern int cm_unregister(struct cm_ll_data *cld); - -# endif - -#endif diff --git a/arch/arm/mach-omap2/cm2xxx.c b/arch/arm/mach-omap2/cm2xxx.c index 6f04031..f4a070c 100644 --- a/arch/arm/mach-omap2/cm2xxx.c +++ b/arch/arm/mach-omap2/cm2xxx.c @@ -19,7 +19,7 @@ #include #include "prm2xxx.h" -#include "cm.h" +#include #include "cm2xxx_3xxx_private.h" #include #include "clockdomain.h" diff --git a/arch/arm/mach-omap2/cm2xxx_3xxx_private.h b/arch/arm/mach-omap2/cm2xxx_3xxx_private.h index ca7ca94..a28dff0 100644 --- a/arch/arm/mach-omap2/cm2xxx_3xxx_private.h +++ b/arch/arm/mach-omap2/cm2xxx_3xxx_private.h @@ -16,7 +16,7 @@ #ifndef __ARCH_ARM_MACH_OMAP2_CM2XXX_3XXX_PRIVATE_H #define __ARCH_ARM_MACH_OMAP2_CM2XXX_3XXX_PRIVATE_H -#include "cm.h" +#include #include #ifndef __ASSEMBLER__ diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c index 7a7b2e7..7717eeb 100644 --- a/arch/arm/mach-omap2/cm33xx.c +++ b/arch/arm/mach-omap2/cm33xx.c @@ -23,7 +23,7 @@ #include #include "clockdomain.h" -#include "cm.h" +#include #include #include "prm33xx.h" diff --git a/arch/arm/mach-omap2/cm33xx.h b/arch/arm/mach-omap2/cm33xx.h index 67f1d49..d8c4278 100644 --- a/arch/arm/mach-omap2/cm33xx.h +++ b/arch/arm/mach-omap2/cm33xx.h @@ -17,7 +17,7 @@ #ifndef __ARCH_ARM_MACH_OMAP2_CM_33XX_H #define __ARCH_ARM_MACH_OMAP2_CM_33XX_H -#include "cm.h" +#include #include /* CM base address */ diff --git a/arch/arm/mach-omap2/cm3xxx.c b/arch/arm/mach-omap2/cm3xxx.c index cbba617..0818156 100644 --- a/arch/arm/mach-omap2/cm3xxx.c +++ b/arch/arm/mach-omap2/cm3xxx.c @@ -19,7 +19,7 @@ #include #include "prm2xxx_3xxx.h" -#include "cm.h" +#include #include "cm2xxx_3xxx_private.h" #include #include "clockdomain.h" diff --git a/arch/arm/mach-omap2/cm44xx.c b/arch/arm/mach-omap2/cm44xx.c index c440ba7..506974b 100644 --- a/arch/arm/mach-omap2/cm44xx.c +++ b/arch/arm/mach-omap2/cm44xx.c @@ -18,7 +18,7 @@ #include #include -#include "cm.h" +#include #include "cm1_44xx.h" #include "cm2_44xx.h" diff --git a/arch/arm/mach-omap2/cm_common.c b/arch/arm/mach-omap2/cm_common.c index 8655538..3843f1f 100644 --- a/arch/arm/mach-omap2/cm_common.c +++ b/arch/arm/mach-omap2/cm_common.c @@ -18,7 +18,7 @@ #include #include -#include "cm.h" +#include #include "prcm-common.h" /* diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 2f780df..b577a8e 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c @@ -22,7 +22,7 @@ #include #include "clockdomain.h" -#include "cm.h" +#include #include "cm1_44xx.h" #include "cm2_44xx.h" #include diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 6212c10..ed677bb 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -46,7 +46,7 @@ #include "cm2xxx.h" #include "cm3xxx.h" #include "prm.h" -#include "cm.h" +#include #include "prcm_mpu44xx.h" #include "prminst44xx.h" #include diff --git a/arch/arm/mach-omap2/powerdomain-common.c b/arch/arm/mach-omap2/powerdomain-common.c index 2c62cd9..8c511e3 100644 --- a/arch/arm/mach-omap2/powerdomain-common.c +++ b/arch/arm/mach-omap2/powerdomain-common.c @@ -15,7 +15,7 @@ #include #include #include "pm.h" -#include "cm.h" +#include #include "prm-regbits-34xx.h" #include "prm-regbits-44xx.h" diff --git a/include/linux/power/omap/cm.h b/include/linux/power/omap/cm.h new file mode 100644 index 0000000..cff447a --- /dev/null +++ b/include/linux/power/omap/cm.h @@ -0,0 +1,64 @@ +/* + * OMAP2+ Clock Management prototypes + * + * Copyright (C) 2007-2009, 2012 Texas Instruments, Inc. + * Copyright (C) 2007-2009 Nokia Corporation + * + * Written by 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. + */ +#ifndef __LINUX_POWER_OMAP_CM_H +#define __LINUX_POWER_OMAP_CM_H + +/* + * MAX_MODULE_READY_TIME: max duration in microseconds to wait for the + * PRCM to request that a module exit the inactive state in the case of + * OMAP2 & 3. + * In the case of OMAP4 this is the max duration in microseconds for the + * module to reach the functionnal state from an inactive state. + */ +#define MAX_MODULE_READY_TIME 2000 + +# ifndef __ASSEMBLER__ +extern void __iomem *cm_base; +extern void __iomem *cm2_base; +void omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2); +# endif + +/* + * MAX_MODULE_DISABLE_TIME: max duration in microseconds to wait for + * the PRCM to request that a module enter the inactive state in the + * case of OMAP2 & 3. In the case of OMAP4 this is the max duration + * in microseconds for the module to reach the inactive state from + * a functional state. + * XXX FSUSB on OMAP4430 takes ~4ms to idle after reset during + * kernel init. + */ +#define MAX_MODULE_DISABLE_TIME 5000 + +# ifndef __ASSEMBLER__ + +/** + * struct cm_ll_data - fn ptrs to per-SoC CM function implementations + * @split_idlest_reg: ptr to the SoC CM-specific split_idlest_reg impl + * @wait_module_ready: ptr to the SoC CM-specific wait_module_ready impl + */ +struct cm_ll_data { + int (*split_idlest_reg)(void __iomem *idlest_reg, s16 *prcm_inst, + u8 *idlest_reg_id); + int (*wait_module_ready)(s16 prcm_mod, u8 idlest_id, u8 idlest_shift); +}; + +int cm_split_idlest_reg(void __iomem *idlest_reg, s16 *prcm_inst, + u8 *idlest_reg_id); +int cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift); + +int cm_register(struct cm_ll_data *cld); +int cm_unregister(struct cm_ll_data *cld); + +# endif + +#endif