From patchwork Mon Mar 31 15:16:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 27457 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D14EE202E0 for ; Mon, 31 Mar 2014 15:18:34 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id w5sf17551074qac.0 for ; Mon, 31 Mar 2014 08:18:34 -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=rkrSAq1i1F2OYYXzNe2l/gaFkvqVVrDOwdVQYIgF2/Q=; b=D0aRrk15KVyXuEKo5jrFG4uf31ko6U5eCxtZ7jcQrGV3QBAAHNW9pnF+IopXZ+n1r+ c3kNDAhW4igE6cRkwIn8p/nB4TnmLZEMAvwSsRTXYybvl7/f+IkCqEbKfD75RDUUENc1 vfvu75wCGKAC2vtogHT957dyBih3HGO1O6w++nTvOKybOVoZ3aNOjy7S8QFcBgF1AYV6 rQmZNQK6lRvPu316nxehLFvl1S4u1fRsatNYoauQbq6XO2jfx7CV00y59p0wk53EQz46 TxOwjJD16X081jyvdx7XMdzODiQ6/XVhcUdLD/xh8uf/vM+ApLqoKpvd8uJLOvKkJnww 21lA== X-Gm-Message-State: ALoCoQlepx+YS96sfMei2AYEPpuhl6TzbTO0pTi8Yk6HBofcxlC8QED1CTQmKNbjkpUEIwK7p+LD X-Received: by 10.58.199.170 with SMTP id jl10mr9283376vec.1.1396279114636; Mon, 31 Mar 2014 08:18:34 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.80 with SMTP id w74ls2376524qgd.95.gmail; Mon, 31 Mar 2014 08:18:34 -0700 (PDT) X-Received: by 10.58.1.97 with SMTP id 1mr1807108vel.23.1396279114509; Mon, 31 Mar 2014 08:18:34 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id tn6si2913407vcb.183.2014.03.31.08.18.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 31 Mar 2014 08:18:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id lh14so8243319vcb.6 for ; Mon, 31 Mar 2014 08:18:34 -0700 (PDT) X-Received: by 10.52.175.166 with SMTP id cb6mr19658343vdc.1.1396279114400; Mon, 31 Mar 2014 08:18:34 -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 v8csp150762vcv; Mon, 31 Mar 2014 08:18:33 -0700 (PDT) X-Received: by 10.68.231.196 with SMTP id ti4mr25937976pbc.48.1396279113667; Mon, 31 Mar 2014 08:18:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id uc9si9326144pac.458.2014.03.31.08.18.33; Mon, 31 Mar 2014 08:18:33 -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 S1753816AbaCaPSc (ORCPT + 5 others); Mon, 31 Mar 2014 11:18:32 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:39168 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752932AbaCaPSb (ORCPT ); Mon, 31 Mar 2014 11:18:31 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2VFHweU005184; Mon, 31 Mar 2014 10:17:58 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2VFHwUA023604; Mon, 31 Mar 2014 10:17:58 -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:57 -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 s2VFGm4L013169; Mon, 31 Mar 2014 10:17:56 -0500 From: Tero Kristo To: , , CC: Subject: [PATCH 34/55] ARM: AM33XX: PRM: move parts of the prm33xx.h header file to public location Date: Mon, 31 Mar 2014 18:16:13 +0300 Message-ID: <1396278994-12624-35-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.175 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: , Parts of this file are needed from both the driver and mach-omap2 board code. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/am33xx-restart.c | 2 +- arch/arm/mach-omap2/cm33xx.c | 3 ++- arch/arm/mach-omap2/prm33xx.c | 3 ++- arch/arm/mach-omap2/prm33xx.h | 23 +--------------------- include/linux/power/omap/prm33xx.h | 36 ++++++++++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 25 deletions(-) create mode 100644 include/linux/power/omap/prm33xx.h diff --git a/arch/arm/mach-omap2/am33xx-restart.c b/arch/arm/mach-omap2/am33xx-restart.c index 7286389..9ae249c 100644 --- a/arch/arm/mach-omap2/am33xx-restart.c +++ b/arch/arm/mach-omap2/am33xx-restart.c @@ -10,7 +10,7 @@ #include "common.h" #include "prm-regbits-33xx.h" -#include "prm33xx.h" +#include /** * am3xx_restart - trigger a software restart of the SoC diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c index 7717eeb..43e4f26 100644 --- a/arch/arm/mach-omap2/cm33xx.c +++ b/arch/arm/mach-omap2/cm33xx.c @@ -25,7 +25,8 @@ #include "clockdomain.h" #include #include -#include "prm33xx.h" +#include +#include "prcm-common.h" #define AM33XX_MODULEMODE_SHIFT 0 #define AM33XX_MODULEMODE_MASK (0x3 << 0) diff --git a/arch/arm/mach-omap2/prm33xx.c b/arch/arm/mach-omap2/prm33xx.c index a08b1da..436cd12 100644 --- a/arch/arm/mach-omap2/prm33xx.c +++ b/arch/arm/mach-omap2/prm33xx.c @@ -18,9 +18,10 @@ #include #include #include +#include #include "powerdomain.h" -#include "prm33xx.h" +#include "prm.h" #define AM33XX_LASTPOWERSTATEENTERED_SHIFT 24 #define AM33XX_LASTPOWERSTATEENTERED_MASK (0x3 << 24) diff --git a/arch/arm/mach-omap2/prm33xx.h b/arch/arm/mach-omap2/prm33xx.h index 9b9918d..7825b1c 100644 --- a/arch/arm/mach-omap2/prm33xx.h +++ b/arch/arm/mach-omap2/prm33xx.h @@ -18,23 +18,13 @@ #include "prcm-common.h" #include "prm.h" +#include #define AM33XX_PRM_BASE 0x44E00000 #define AM33XX_PRM_REGADDR(inst, reg) \ AM33XX_L4_WK_IO_ADDRESS(AM33XX_PRM_BASE + (inst) + (reg)) - -/* PRM instances */ -#define AM33XX_PRM_OCP_SOCKET_MOD 0x0B00 -#define AM33XX_PRM_PER_MOD 0x0C00 -#define AM33XX_PRM_WKUP_MOD 0x0D00 -#define AM33XX_PRM_MPU_MOD 0x0E00 -#define AM33XX_PRM_DEVICE_MOD 0x0F00 -#define AM33XX_PRM_RTC_MOD 0x1000 -#define AM33XX_PRM_GFX_MOD 0x1100 -#define AM33XX_PRM_CEFUSE_MOD 0x1200 - /* PRM */ /* PRM.OCP_SOCKET_PRM register offsets */ @@ -117,15 +107,4 @@ #define AM33XX_PM_CEFUSE_PWRSTST_OFFSET 0x0004 #define AM33XX_PM_CEFUSE_PWRSTST AM33XX_PRM_REGADDR(AM33XX_PRM_CEFUSE_MOD, 0x0004) -#ifndef __ASSEMBLER__ -extern u32 am33xx_prm_read_reg(s16 inst, u16 idx); -extern void am33xx_prm_write_reg(u32 val, s16 inst, u16 idx); -extern u32 am33xx_prm_rmw_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx); -extern void am33xx_prm_global_warm_sw_reset(void); -extern int am33xx_prm_is_hardreset_asserted(u8 shift, s16 inst, - u16 rstctrl_offs); -extern int am33xx_prm_assert_hardreset(u8 shift, s16 inst, u16 rstctrl_offs); -extern int am33xx_prm_deassert_hardreset(u8 shift, u8 st_shift, s16 inst, - u16 rstctrl_offs, u16 rstst_offs); -#endif /* ASSEMBLER */ #endif diff --git a/include/linux/power/omap/prm33xx.h b/include/linux/power/omap/prm33xx.h new file mode 100644 index 0000000..ea72bf0 --- /dev/null +++ b/include/linux/power/omap/prm33xx.h @@ -0,0 +1,36 @@ +/* + * AM33XX PRM instance offset macros + * + * Copyright (C) 2011-2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __LINUX_POWER_OMAP_PRM33XX_H +#define __LINUX_POWER_OMAP_PRM33XX_H + +/* PRM instances */ +#define AM33XX_PRM_OCP_SOCKET_MOD 0x0B00 +#define AM33XX_PRM_PER_MOD 0x0C00 +#define AM33XX_PRM_WKUP_MOD 0x0D00 +#define AM33XX_PRM_MPU_MOD 0x0E00 +#define AM33XX_PRM_DEVICE_MOD 0x0F00 +#define AM33XX_PRM_RTC_MOD 0x1000 +#define AM33XX_PRM_GFX_MOD 0x1100 +#define AM33XX_PRM_CEFUSE_MOD 0x1200 + +#ifndef __ASSEMBLER__ +void am33xx_prm_global_warm_sw_reset(void); +int am33xx_prm_is_hardreset_asserted(u8 shift, s16 inst, u16 rstctrl_offs); +int am33xx_prm_assert_hardreset(u8 shift, s16 inst, u16 rstctrl_offs); +int am33xx_prm_deassert_hardreset(u8 shift, u8 st_shift, s16 inst, + u16 rstctrl_offs, u16 rstst_offs); +#endif /* ASSEMBLER */ +#endif