blob: 3300ff6e3cfe80a1d0261db142939b73da7d6d5b [file] [log] [blame]
Paul Walmsleyd198b512010-12-21 15:30:54 -07001/*
2 * OMAP44xx PRCM MPU instance offset macros
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc.
5 * Copyright (C) 2010 Nokia Corporation
6 *
7 * Paul Walmsley (paul@pwsan.com)
8 * Rajendra Nayak (rnayak@ti.com)
9 * Benoit Cousson (b-cousson@ti.com)
10 *
11 * This file is automatically generated from the OMAP hardware databases.
12 * We respectfully ask that any modifications to this file be coordinated
13 * with the public linux-omap@vger.kernel.org mailing list and the
14 * authors above to ensure that the autogeneration scripts are kept
15 * up-to-date with the file contents.
16 *
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
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".
23 */
24
25#ifndef __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H
26#define __ARCH_ARM_MACH_OMAP2_PRCM_MPU44XX_H
27
28#define OMAP4430_PRCM_MPU_BASE 0x48243000
29
Paul Walmsleycdb54c42010-12-21 15:30:55 -070030#define OMAP44XX_PRCM_MPU_REGADDR(inst, reg) \
31 OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE + (inst) + (reg))
Paul Walmsleyd198b512010-12-21 15:30:54 -070032
33/* PRCM_MPU instances */
34
Paul Walmsleycdb54c42010-12-21 15:30:55 -070035#define OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST 0x0000
36#define OMAP4430_PRCM_MPU_DEVICE_PRM_INST 0x0200
37#define OMAP4430_PRCM_MPU_CPU0_INST 0x0400
38#define OMAP4430_PRCM_MPU_CPU1_INST 0x0800
Paul Walmsleyd198b512010-12-21 15:30:54 -070039
Paul Walmsleye4156ee2010-12-21 21:05:15 -070040/* PRCM_MPU clockdomain register offsets (from instance start) */
Santosh Shilimkar51c404b2011-02-04 15:28:57 +053041#define OMAP4430_PRCM_MPU_CPU0_MPU_CDOFFS 0x0018
42#define OMAP4430_PRCM_MPU_CPU1_MPU_CDOFFS 0x0018
Paul Walmsleye4156ee2010-12-21 21:05:15 -070043
44
Paul Walmsleyd198b512010-12-21 15:30:54 -070045/*
46 * PRCM_MPU
47 *
48 * The PRCM_MPU is a local PRCM inside the MPU subsystem. For the PRCM (global)
49 * point of view the PRCM_MPU is a single entity. It shares the same
50 * programming model as the global PRCM and thus can be assimilate as two new
51 * MOD inside the PRCM
52 */
53
54/* PRCM_MPU.OCP_SOCKET_PRCM register offsets */
55#define OMAP4_REVISION_PRCM_OFFSET 0x0000
Paul Walmsleycdb54c42010-12-21 15:30:55 -070056#define OMAP4430_REVISION_PRCM OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST, 0x0000)
Paul Walmsleyd198b512010-12-21 15:30:54 -070057
58/* PRCM_MPU.DEVICE_PRM register offsets */
59#define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000
Paul Walmsleycdb54c42010-12-21 15:30:55 -070060#define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0000)
Paul Walmsleyd198b512010-12-21 15:30:54 -070061#define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004
Paul Walmsleycdb54c42010-12-21 15:30:55 -070062#define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0004)
Paul Walmsleyd198b512010-12-21 15:30:54 -070063
64/* PRCM_MPU.CPU0 register offsets */
65#define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000
Paul Walmsleycdb54c42010-12-21 15:30:55 -070066#define OMAP4430_PM_CPU0_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0000)
Paul Walmsleyd198b512010-12-21 15:30:54 -070067#define OMAP4_PM_CPU0_PWRSTST_OFFSET 0x0004
Paul Walmsleycdb54c42010-12-21 15:30:55 -070068#define OMAP4430_PM_CPU0_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0004)
Paul Walmsleyd198b512010-12-21 15:30:54 -070069#define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET 0x0008
Paul Walmsleycdb54c42010-12-21 15:30:55 -070070#define OMAP4430_RM_CPU0_CPU0_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0008)
Paul Walmsleyd198b512010-12-21 15:30:54 -070071#define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET 0x000c
Paul Walmsleycdb54c42010-12-21 15:30:55 -070072#define OMAP4430_RM_CPU0_CPU0_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x000c)
Paul Walmsleyd198b512010-12-21 15:30:54 -070073#define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET 0x0010
Paul Walmsleycdb54c42010-12-21 15:30:55 -070074#define OMAP4430_RM_CPU0_CPU0_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0010)
Paul Walmsleyd198b512010-12-21 15:30:54 -070075#define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET 0x0014
Paul Walmsleycdb54c42010-12-21 15:30:55 -070076#define OMAP4430_CM_CPU0_CPU0_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0014)
Paul Walmsleyd198b512010-12-21 15:30:54 -070077#define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET 0x0018
Paul Walmsleycdb54c42010-12-21 15:30:55 -070078#define OMAP4430_CM_CPU0_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0018)
Paul Walmsleyd198b512010-12-21 15:30:54 -070079
80/* PRCM_MPU.CPU1 register offsets */
81#define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET 0x0000
Paul Walmsleycdb54c42010-12-21 15:30:55 -070082#define OMAP4430_PM_CPU1_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0000)
Paul Walmsleyd198b512010-12-21 15:30:54 -070083#define OMAP4_PM_CPU1_PWRSTST_OFFSET 0x0004
Paul Walmsleycdb54c42010-12-21 15:30:55 -070084#define OMAP4430_PM_CPU1_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0004)
Paul Walmsleyd198b512010-12-21 15:30:54 -070085#define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET 0x0008
Paul Walmsleycdb54c42010-12-21 15:30:55 -070086#define OMAP4430_RM_CPU1_CPU1_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0008)
Paul Walmsleyd198b512010-12-21 15:30:54 -070087#define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET 0x000c
Paul Walmsleycdb54c42010-12-21 15:30:55 -070088#define OMAP4430_RM_CPU1_CPU1_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x000c)
Paul Walmsleyd198b512010-12-21 15:30:54 -070089#define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET 0x0010
Paul Walmsleycdb54c42010-12-21 15:30:55 -070090#define OMAP4430_RM_CPU1_CPU1_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0010)
Paul Walmsleyd198b512010-12-21 15:30:54 -070091#define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET 0x0014
Paul Walmsleycdb54c42010-12-21 15:30:55 -070092#define OMAP4430_CM_CPU1_CPU1_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0014)
Paul Walmsleyd198b512010-12-21 15:30:54 -070093#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018
Paul Walmsleycdb54c42010-12-21 15:30:55 -070094#define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018)
Paul Walmsleyd198b512010-12-21 15:30:54 -070095
Paul Walmsley2ace8312010-12-21 21:05:14 -070096/* Function prototypes */
97# ifndef __ASSEMBLER__
98extern u32 omap4_prcm_mpu_read_inst_reg(s16 inst, u16 idx);
99extern void omap4_prcm_mpu_write_inst_reg(u32 val, s16 inst, u16 idx);
100extern u32 omap4_prcm_mpu_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst,
101 s16 idx);
102# endif
103
Paul Walmsleyd198b512010-12-21 15:30:54 -0700104#endif