aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/prm44xx.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-21 17:30:54 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 22:01:54 -0500
commitd198b514bd9e94930ee0b9ca1cad0a51f5e29608 (patch)
tree59f6e8127f40085829dfc8468be5f03bf248ef74 /arch/arm/mach-omap2/prm44xx.h
parentf5f9d132d1c212bf3828c7926d95f79e0c20d243 (diff)
OMAP4: PRCM: reorganize existing OMAP4 PRCM header files
Split the existing cm44xx.h file into cm1_44xx.h and cm2_44xx.h files so they match their underlying OMAP hardware modules. Add clockdomain offset information. Add header files for the MPU local PRCM, prcm_mpu44xx.h, and for the SCRM, scrm44xx.h. SCRM register offsets still need to be added; TI should do this. Move the "_MOD" macros out of the prcm-common.h header file, into the header file of the hardware module that they belong to. For example, OMAP4430_PRM_*_MOD macros have been moved into the prm44xx.h header. Adjust #includes of all files that used the old PRCM header file names to point to the new filenames. The autogeneration scripts have been updated accordingly. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: BenoƮt Cousson <b-cousson@ti.com> Cc: Rajendra Nayak <rnayak@ti.com> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com> Tested-by: Kevin Hilman <khilman@deeprootsystems.com> Tested-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/prm44xx.h')
-rw-r--r--arch/arm/mach-omap2/prm44xx.h107
1 files changed, 58 insertions, 49 deletions
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 59839dbabd84..4343881b5ed5 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -17,11 +17,52 @@
17 * This program is free software; you can redistribute it and/or modify 17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License version 2 as 18 * it under the terms of the GNU General Public License version 2 as
19 * published by the Free Software Foundation. 19 * published by the Free Software Foundation.
20 *
21 * XXX This file needs to be updated to align on one of "OMAP4", "OMAP44XX",
22 * or "OMAP4430".
20 */ 23 */
21 24
22#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_H 25#ifndef __ARCH_ARM_MACH_OMAP2_PRM44XX_H
23#define __ARCH_ARM_MACH_OMAP2_PRM44XX_H 26#define __ARCH_ARM_MACH_OMAP2_PRM44XX_H
24 27
28#include "prcm-common.h"
29
30#define OMAP4430_PRM_BASE 0x4a306000
31
32#define OMAP44XX_PRM_REGADDR(module, reg) \
33 OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (module) + (reg))
34
35
36/* PRM instances */
37#define OMAP4430_PRM_OCP_SOCKET_MOD 0x0000
38#define OMAP4430_PRM_CKGEN_MOD 0x0100
39#define OMAP4430_PRM_MPU_MOD 0x0300
40#define OMAP4430_PRM_TESLA_MOD 0x0400
41#define OMAP4430_PRM_ABE_MOD 0x0500
42#define OMAP4430_PRM_ALWAYS_ON_MOD 0x0600
43#define OMAP4430_PRM_CORE_MOD 0x0700
44#define OMAP4430_PRM_IVAHD_MOD 0x0f00
45#define OMAP4430_PRM_CAM_MOD 0x1000
46#define OMAP4430_PRM_DSS_MOD 0x1100
47#define OMAP4430_PRM_GFX_MOD 0x1200
48#define OMAP4430_PRM_L3INIT_MOD 0x1300
49#define OMAP4430_PRM_L4PER_MOD 0x1400
50#define OMAP4430_PRM_CEFUSE_MOD 0x1600
51#define OMAP4430_PRM_WKUP_MOD 0x1700
52#define OMAP4430_PRM_WKUP_CM_MOD 0x1800
53#define OMAP4430_PRM_EMU_MOD 0x1900
54#define OMAP4430_PRM_EMU_CM_MOD 0x1a00
55#define OMAP4430_PRM_DEVICE_MOD 0x1b00
56#define OMAP4430_PRM_INSTR_MOD 0x1f00
57
58
59/* OMAP4 specific register offsets */
60#define OMAP4_RM_RSTCTRL 0x0000
61#define OMAP4_RM_RSTTIME 0x0004
62#define OMAP4_RM_RSTST 0x0008
63#define OMAP4_PM_PWSTCTRL 0x0000
64#define OMAP4_PM_PWSTST 0x0004
65
25 66
26/* PRM */ 67/* PRM */
27 68
@@ -699,54 +740,22 @@
699#define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8 740#define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8
700#define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f8) 741#define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_MOD, 0x00f8)
701 742
702/* 743/* Function prototypes */
703 * PRCM_MPU 744# ifndef __ASSEMBLER__
704 * 745
705 * The PRCM_MPU is a local PRCM inside the MPU subsystem. For the PRCM (global) 746extern u32 omap4_prm_read_mod_reg(s16 module, u16 idx);
706 * point of view the PRCM_MPU is a single entity. It shares the same 747extern void omap4_prm_write_mod_reg(u32 val, s16 module, u16 idx);
707 * programming model as the global PRCM and thus can be assimilate as two new 748extern u32 omap4_prm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx);
708 * MOD inside the PRCM 749extern u32 omap4_prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask);
709 */ 750extern u32 omap4_prm_read_bits_shift(void __iomem *reg, u32 mask);
751extern u32 omap4_prm_rmw_reg_bits(u32 mask, u32 bits, void __iomem *reg);
752extern u32 omap4_prm_set_mod_reg_bits(u32 bits, s16 module, s16 idx);
753extern u32 omap4_prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx);
754
755extern int omap4_prm_is_hardreset_asserted(void __iomem *rstctrl_reg, u8 shift);
756extern int omap4_prm_assert_hardreset(void __iomem *rstctrl_reg, u8 shift);
757extern int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift);
758
759# endif
710 760
711/* PRCM_MPU.OCP_SOCKET_PRCM register offsets */
712#define OMAP4_REVISION_PRCM_OFFSET 0x0000
713#define OMAP4430_REVISION_PRCM OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_MOD, 0x0000)
714
715/* PRCM_MPU.DEVICE_PRM register offsets */
716#define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000
717#define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_MOD, 0x0000)
718#define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004
719#define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_MOD, 0x0004)
720
721/* PRCM_MPU.CPU0 register offsets */
722#define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000
723#define OMAP4430_PM_CPU0_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_MOD, 0x0000)
724#define OMAP4_PM_CPU0_PWRSTST_OFFSET 0x0004
725#define OMAP4430_PM_CPU0_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_MOD, 0x0004)
726#define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET 0x0008
727#define OMAP4430_RM_CPU0_CPU0_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_MOD, 0x0008)
728#define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET 0x000c
729#define OMAP4430_RM_CPU0_CPU0_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_MOD, 0x000c)
730#define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET 0x0010
731#define OMAP4430_RM_CPU0_CPU0_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_MOD, 0x0010)
732#define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET 0x0014
733#define OMAP4430_CM_CPU0_CPU0_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_MOD, 0x0014)
734#define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET 0x0018
735#define OMAP4430_CM_CPU0_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_MOD, 0x0018)
736
737/* PRCM_MPU.CPU1 register offsets */
738#define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET 0x0000
739#define OMAP4430_PM_CPU1_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_MOD, 0x0000)
740#define OMAP4_PM_CPU1_PWRSTST_OFFSET 0x0004
741#define OMAP4430_PM_CPU1_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_MOD, 0x0004)
742#define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET 0x0008
743#define OMAP4430_RM_CPU1_CPU1_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_MOD, 0x0008)
744#define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET 0x000c
745#define OMAP4430_RM_CPU1_CPU1_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_MOD, 0x000c)
746#define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET 0x0010
747#define OMAP4430_RM_CPU1_CPU1_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_MOD, 0x0010)
748#define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET 0x0014
749#define OMAP4430_CM_CPU1_CPU1_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_MOD, 0x0014)
750#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018
751#define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_MOD, 0x0018)
752#endif 761#endif