From patchwork Mon Mar 31 15:16: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: 3915751 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4674BBF540 for ; Mon, 31 Mar 2014 15:18:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4459920204 for ; Mon, 31 Mar 2014 15:18:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3D0182037B for ; Mon, 31 Mar 2014 15:18:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753878AbaCaPSZ (ORCPT ); Mon, 31 Mar 2014 11:18:25 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:58793 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753870AbaCaPSY (ORCPT ); Mon, 31 Mar 2014 11:18:24 -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 s2VFHqXQ022186; Mon, 31 Mar 2014 10:17:52 -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 s2VFHqXq014077; Mon, 31 Mar 2014 10:17:52 -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; Mon, 31 Mar 2014 10:17:52 -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 s2VFGm4I013169; Mon, 31 Mar 2014 10:17:48 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 31/55] ARM: OMAP2: export parts of prm2xxx.h header file Date: Mon, 31 Mar 2014 18:16:10 +0300 Message-ID: <1396278994-12624-32-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: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some of these are shared between the PRM driver and mach-omap2 board code. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/cm2xxx.c | 4 +++- arch/arm/mach-omap2/prm2xxx.c | 2 +- arch/arm/mach-omap2/prm2xxx.h | 20 +----------------- arch/arm/mach-omap2/prm_common.c | 2 +- include/linux/power/omap/prm2xxx.h | 39 ++++++++++++++++++++++++++++++++++++ 5 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 include/linux/power/omap/prm2xxx.h diff --git a/arch/arm/mach-omap2/cm2xxx.c b/arch/arm/mach-omap2/cm2xxx.c index f4a070c..b37783a 100644 --- a/arch/arm/mach-omap2/cm2xxx.c +++ b/arch/arm/mach-omap2/cm2xxx.c @@ -18,11 +18,13 @@ #include #include -#include "prm2xxx.h" +#include #include #include "cm2xxx_3xxx_private.h" #include #include "clockdomain.h" +#include "prcm-common.h" +#include "prm2xxx_3xxx.h" /* CM_AUTOIDLE_PLL.AUTO_* bit values for DPLLs */ #define DPLL_AUTOIDLE_DISABLE 0x0 diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c index 5b5260c..849b415 100644 --- a/arch/arm/mach-omap2/prm2xxx.c +++ b/arch/arm/mach-omap2/prm2xxx.c @@ -20,7 +20,7 @@ #include "powerdomain.h" #include "clockdomain.h" -#include "prm2xxx.h" +#include #include "prm2xxx_3xxx_private.h" #include diff --git a/arch/arm/mach-omap2/prm2xxx.h b/arch/arm/mach-omap2/prm2xxx.h index 071bb6d..19ff266 100644 --- a/arch/arm/mach-omap2/prm2xxx.h +++ b/arch/arm/mach-omap2/prm2xxx.h @@ -19,6 +19,7 @@ #include "prcm-common.h" #include "prm.h" #include "prm2xxx_3xxx.h" +#include #define OMAP2420_PRM_REGADDR(module, reg) \ OMAP2_L4_IO_ADDRESS(OMAP2420_PRM_BASE + (module) + (reg)) @@ -35,9 +36,7 @@ * */ -#define OMAP2_PRCM_REVISION_OFFSET 0x0000 #define OMAP2420_PRCM_REVISION OMAP2420_PRM_REGADDR(OCP_MOD, 0x0000) -#define OMAP2_PRCM_SYSCONFIG_OFFSET 0x0010 #define OMAP2420_PRCM_SYSCONFIG OMAP2420_PRM_REGADDR(OCP_MOD, 0x0010) #define OMAP2_PRCM_IRQSTATUS_MPU_OFFSET 0x0018 @@ -45,11 +44,9 @@ #define OMAP2_PRCM_IRQENABLE_MPU_OFFSET 0x001c #define OMAP2420_PRCM_IRQENABLE_MPU OMAP2420_PRM_REGADDR(OCP_MOD, 0x001c) -#define OMAP2_PRCM_VOLTCTRL_OFFSET 0x0050 #define OMAP2420_PRCM_VOLTCTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0050) #define OMAP2_PRCM_VOLTST_OFFSET 0x0054 #define OMAP2420_PRCM_VOLTST OMAP2420_PRM_REGADDR(OCP_MOD, 0x0054) -#define OMAP2_PRCM_CLKSRC_CTRL_OFFSET 0x0060 #define OMAP2420_PRCM_CLKSRC_CTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0060) #define OMAP2_PRCM_CLKOUT_CTRL_OFFSET 0x0070 #define OMAP2420_PRCM_CLKOUT_CTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0070) @@ -59,9 +56,7 @@ #define OMAP2420_PRCM_CLKCFG_CTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0080) #define OMAP2_PRCM_CLKCFG_STATUS_OFFSET 0x0084 #define OMAP2420_PRCM_CLKCFG_STATUS OMAP2420_PRM_REGADDR(OCP_MOD, 0x0084) -#define OMAP2_PRCM_VOLTSETUP_OFFSET 0x0090 #define OMAP2420_PRCM_VOLTSETUP OMAP2420_PRM_REGADDR(OCP_MOD, 0x0090) -#define OMAP2_PRCM_CLKSSETUP_OFFSET 0x0094 #define OMAP2420_PRCM_CLKSSETUP OMAP2420_PRM_REGADDR(OCP_MOD, 0x0094) #define OMAP2_PRCM_POLCTRL_OFFSET 0x0098 #define OMAP2420_PRCM_POLCTRL OMAP2420_PRM_REGADDR(OCP_MOD, 0x0098) @@ -119,17 +114,4 @@ #define OMAP24XX_PRCM_IRQSTATUS_IVA 0x00f8 #define OMAP24XX_PRCM_IRQENABLE_IVA 0x00fc -#ifndef __ASSEMBLER__ -/* Function prototypes */ -extern int omap2xxx_clkdm_sleep(struct clockdomain *clkdm); -extern int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm); - -extern void omap2xxx_prm_dpll_reset(void); -void omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask); -void omap2xxx_prm_init_pm(void); - -extern int __init omap2xxx_prm_init(void); - -#endif - #endif diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index 090d13f..273a338 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -29,7 +29,7 @@ #include #include "prm2xxx_3xxx.h" -#include "prm2xxx.h" +#include #include "prm3xxx.h" #include "prm44xx.h" diff --git a/include/linux/power/omap/prm2xxx.h b/include/linux/power/omap/prm2xxx.h new file mode 100644 index 0000000..32b76d5 --- /dev/null +++ b/include/linux/power/omap/prm2xxx.h @@ -0,0 +1,39 @@ +/* + * OMAP2xxx Power/Reset Management (PRM) register definitions + * + * Copyright (C) 2007-2009, 2011-2012 Texas Instruments, Inc. + * Copyright (C) 2008-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 PRM hardware modules on the OMAP2/3 are quite similar to each + * other. The PRM on OMAP4 has a new register layout, and is handled + * in a separate file. + */ +#ifndef __LINUX_POWER_OMAP_PRM2XXX_H +#define __LINUX_POWER_OMAP_PRM2XXX_H + +#define OMAP2_PRCM_REVISION_OFFSET 0x0000 +#define OMAP2_PRCM_SYSCONFIG_OFFSET 0x0010 +#define OMAP2_PRCM_VOLTCTRL_OFFSET 0x0050 +#define OMAP2_PRCM_CLKSRC_CTRL_OFFSET 0x0060 +#define OMAP2_PRCM_VOLTSETUP_OFFSET 0x0090 +#define OMAP2_PRCM_CLKSSETUP_OFFSET 0x0094 + +#ifndef __ASSEMBLER__ + +struct clockdomain; + +/* Function prototypes */ +int omap2xxx_clkdm_sleep(struct clockdomain *clkdm); +int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm); +void omap2xxx_prm_dpll_reset(void); +void omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask); +void omap2xxx_prm_init_pm(void); +int __init omap2xxx_prm_init(void); +#endif + +#endif