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: 27453 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f70.google.com (mail-qg0-f70.google.com [209.85.192.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 17EFB202E0 for ; Mon, 31 Mar 2014 15:18:28 +0000 (UTC) Received: by mail-qg0-f70.google.com with SMTP id e89sf1443027qgf.1 for ; Mon, 31 Mar 2014 08:18:27 -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=xutQ2EvnwA5fVsmJq8rwtORFR79NNv5SCCCzZT7LBtI=; b=jfXxXNBfj3Bu1lmkGSAiTarWyy1OtUSwPXBBGRiTTudYl/JTUJGdgm68zfWtBjkVvs C05bEfi9nM0SqbyDLimNqkLXflGGrP0DIqHgooXhCKKMtu4FYXcsTFgIVGWZfLb9Zo8t YKAWp/073E0fbOU1ZUO7E6FJdCvrVfDxTsEvjdwMVFKF3o97Fo+INk9AclgzK9j4qex8 BQTlPZOGFQNhihcVybgUjt9MSpQRUe1aC/98xiShxdKhnUB3LpMecB9eX5BFusm+UqK8 4g+qLL8JQn7gWdMpiB0qIBnUmA4zdAwD+pPRBqsMmSiK5vBC1PA1kHnxM3dYQmas2CDk 2uOg== X-Gm-Message-State: ALoCoQn7g8oEE+Chg7Wek+fYP99mue3PQ+OTc4y2ih6aQLSuBQRw8b/efcQ4T020zsXcHkAKIcbl X-Received: by 10.58.111.202 with SMTP id ik10mr9819279veb.4.1396279107867; Mon, 31 Mar 2014 08:18:27 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.163 with SMTP id a32ls2472154qgf.73.gmail; Mon, 31 Mar 2014 08:18:27 -0700 (PDT) X-Received: by 10.58.146.5 with SMTP id sy5mr142791veb.43.1396279107790; Mon, 31 Mar 2014 08:18:27 -0700 (PDT) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id uz9si3028532vcb.47.2014.03.31.08.18.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 31 Mar 2014 08:18:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.173 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.173; Received: by mail-ve0-f173.google.com with SMTP id oy12so8117083veb.4 for ; Mon, 31 Mar 2014 08:18:27 -0700 (PDT) X-Received: by 10.52.241.106 with SMTP id wh10mr19862879vdc.16.1396279107695; Mon, 31 Mar 2014 08:18:27 -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 v8csp150747vcv; Mon, 31 Mar 2014 08:18:27 -0700 (PDT) X-Received: by 10.66.158.132 with SMTP id wu4mr26008136pab.66.1396279106833; Mon, 31 Mar 2014 08:18:26 -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.26; Mon, 31 Mar 2014 08:18:26 -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 S1753878AbaCaPSZ (ORCPT + 5 others); 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: 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.173 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: , 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