diff options
Diffstat (limited to 'arch/arm/mach-omap2/include/mach')
-rw-r--r-- | arch/arm/mach-omap2/include/mach/barriers.h | 31 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/debug-macro.S | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/omap-secure.h | 57 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/omap-wakeupgen.h | 39 |
4 files changed, 133 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/include/mach/barriers.h b/arch/arm/mach-omap2/include/mach/barriers.h new file mode 100644 index 000000000000..4fa72c7cc7cd --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/barriers.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * OMAP memory barrier header. | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
5 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
6 | * Richard Woodruff <r-woodruff2@ti.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #ifndef __MACH_BARRIERS_H | ||
23 | #define __MACH_BARRIERS_H | ||
24 | |||
25 | extern void omap_bus_sync(void); | ||
26 | |||
27 | #define rmb() dsb() | ||
28 | #define wmb() do { dsb(); outer_sync(); omap_bus_sync(); } while (0) | ||
29 | #define mb() wmb() | ||
30 | |||
31 | #endif /* __MACH_BARRIERS_H */ | ||
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S index 13f98e59cfef..cdfc2a1f0e75 100644 --- a/arch/arm/mach-omap2/include/mach/debug-macro.S +++ b/arch/arm/mach-omap2/include/mach/debug-macro.S | |||
@@ -66,11 +66,11 @@ omap_uart_lsr: .word 0 | |||
66 | beq 34f @ configure OMAP3UART4 | 66 | beq 34f @ configure OMAP3UART4 |
67 | cmp \rp, #OMAP4UART4 @ only on 44xx | 67 | cmp \rp, #OMAP4UART4 @ only on 44xx |
68 | beq 44f @ configure OMAP4UART4 | 68 | beq 44f @ configure OMAP4UART4 |
69 | cmp \rp, #TI816XUART1 @ ti816x UART offsets different | 69 | cmp \rp, #TI81XXUART1 @ ti81Xx UART offsets different |
70 | beq 81f @ configure UART1 | 70 | beq 81f @ configure UART1 |
71 | cmp \rp, #TI816XUART2 @ ti816x UART offsets different | 71 | cmp \rp, #TI81XXUART2 @ ti81Xx UART offsets different |
72 | beq 82f @ configure UART2 | 72 | beq 82f @ configure UART2 |
73 | cmp \rp, #TI816XUART3 @ ti816x UART offsets different | 73 | cmp \rp, #TI81XXUART3 @ ti81Xx UART offsets different |
74 | beq 83f @ configure UART3 | 74 | beq 83f @ configure UART3 |
75 | cmp \rp, #ZOOM_UART @ only on zoom2/3 | 75 | cmp \rp, #ZOOM_UART @ only on zoom2/3 |
76 | beq 95f @ configure ZOOM_UART | 76 | beq 95f @ configure ZOOM_UART |
@@ -94,11 +94,11 @@ omap_uart_lsr: .word 0 | |||
94 | b 98f | 94 | b 98f |
95 | 44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) | 95 | 44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) |
96 | b 98f | 96 | b 98f |
97 | 81: mov \rp, #UART_OFFSET(TI816X_UART1_BASE) | 97 | 81: mov \rp, #UART_OFFSET(TI81XX_UART1_BASE) |
98 | b 98f | 98 | b 98f |
99 | 82: mov \rp, #UART_OFFSET(TI816X_UART2_BASE) | 99 | 82: mov \rp, #UART_OFFSET(TI81XX_UART2_BASE) |
100 | b 98f | 100 | b 98f |
101 | 83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE) | 101 | 83: mov \rp, #UART_OFFSET(TI81XX_UART3_BASE) |
102 | b 98f | 102 | b 98f |
103 | 103 | ||
104 | 95: ldr \rp, =ZOOM_UART_BASE | 104 | 95: ldr \rp, =ZOOM_UART_BASE |
diff --git a/arch/arm/mach-omap2/include/mach/omap-secure.h b/arch/arm/mach-omap2/include/mach/omap-secure.h new file mode 100644 index 000000000000..c90a43589abe --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/omap-secure.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * omap-secure.h: OMAP Secure infrastructure header. | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
5 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef OMAP_ARCH_OMAP_SECURE_H | ||
12 | #define OMAP_ARCH_OMAP_SECURE_H | ||
13 | |||
14 | /* Monitor error code */ | ||
15 | #define API_HAL_RET_VALUE_NS2S_CONVERSION_ERROR 0xFFFFFFFE | ||
16 | #define API_HAL_RET_VALUE_SERVICE_UNKNWON 0xFFFFFFFF | ||
17 | |||
18 | /* HAL API error codes */ | ||
19 | #define API_HAL_RET_VALUE_OK 0x00 | ||
20 | #define API_HAL_RET_VALUE_FAIL 0x01 | ||
21 | |||
22 | /* Secure HAL API flags */ | ||
23 | #define FLAG_START_CRITICAL 0x4 | ||
24 | #define FLAG_IRQFIQ_MASK 0x3 | ||
25 | #define FLAG_IRQ_ENABLE 0x2 | ||
26 | #define FLAG_FIQ_ENABLE 0x1 | ||
27 | #define NO_FLAG 0x0 | ||
28 | |||
29 | /* Maximum Secure memory storage size */ | ||
30 | #define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K) | ||
31 | |||
32 | /* Secure low power HAL API index */ | ||
33 | #define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a | ||
34 | #define OMAP4_HAL_SAVEHW_INDEX 0x1b | ||
35 | #define OMAP4_HAL_SAVEALL_INDEX 0x1c | ||
36 | #define OMAP4_HAL_SAVEGIC_INDEX 0x1d | ||
37 | |||
38 | /* Secure Monitor mode APIs */ | ||
39 | #define OMAP4_MON_SCU_PWR_INDEX 0x108 | ||
40 | #define OMAP4_MON_L2X0_DBG_CTRL_INDEX 0x100 | ||
41 | #define OMAP4_MON_L2X0_CTRL_INDEX 0x102 | ||
42 | #define OMAP4_MON_L2X0_AUXCTRL_INDEX 0x109 | ||
43 | #define OMAP4_MON_L2X0_PREFETCH_INDEX 0x113 | ||
44 | |||
45 | /* Secure PPA(Primary Protected Application) APIs */ | ||
46 | #define OMAP4_PPA_L2_POR_INDEX 0x23 | ||
47 | #define OMAP4_PPA_CPU_ACTRL_SMP_INDEX 0x25 | ||
48 | |||
49 | #ifndef __ASSEMBLER__ | ||
50 | |||
51 | extern u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs, | ||
52 | u32 arg1, u32 arg2, u32 arg3, u32 arg4); | ||
53 | extern u32 omap_smc2(u32 id, u32 falg, u32 pargs); | ||
54 | extern phys_addr_t omap_secure_ram_mempool_base(void); | ||
55 | |||
56 | #endif /* __ASSEMBLER__ */ | ||
57 | #endif /* OMAP_ARCH_OMAP_SECURE_H */ | ||
diff --git a/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h b/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h new file mode 100644 index 000000000000..d79321b0f2a2 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/omap-wakeupgen.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * OMAP WakeupGen header file | ||
3 | * | ||
4 | * Copyright (C) 2011 Texas Instruments, Inc. | ||
5 | * Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef OMAP_ARCH_WAKEUPGEN_H | ||
12 | #define OMAP_ARCH_WAKEUPGEN_H | ||
13 | |||
14 | #define OMAP_WKG_CONTROL_0 0x00 | ||
15 | #define OMAP_WKG_ENB_A_0 0x10 | ||
16 | #define OMAP_WKG_ENB_B_0 0x14 | ||
17 | #define OMAP_WKG_ENB_C_0 0x18 | ||
18 | #define OMAP_WKG_ENB_D_0 0x1c | ||
19 | #define OMAP_WKG_ENB_SECURE_A_0 0x20 | ||
20 | #define OMAP_WKG_ENB_SECURE_B_0 0x24 | ||
21 | #define OMAP_WKG_ENB_SECURE_C_0 0x28 | ||
22 | #define OMAP_WKG_ENB_SECURE_D_0 0x2c | ||
23 | #define OMAP_WKG_ENB_A_1 0x410 | ||
24 | #define OMAP_WKG_ENB_B_1 0x414 | ||
25 | #define OMAP_WKG_ENB_C_1 0x418 | ||
26 | #define OMAP_WKG_ENB_D_1 0x41c | ||
27 | #define OMAP_WKG_ENB_SECURE_A_1 0x420 | ||
28 | #define OMAP_WKG_ENB_SECURE_B_1 0x424 | ||
29 | #define OMAP_WKG_ENB_SECURE_C_1 0x428 | ||
30 | #define OMAP_WKG_ENB_SECURE_D_1 0x42c | ||
31 | #define OMAP_AUX_CORE_BOOT_0 0x800 | ||
32 | #define OMAP_AUX_CORE_BOOT_1 0x804 | ||
33 | #define OMAP_PTMSYNCREQ_MASK 0xc00 | ||
34 | #define OMAP_PTMSYNCREQ_EN 0xc04 | ||
35 | #define OMAP_TIMESTAMPCYCLELO 0xc08 | ||
36 | #define OMAP_TIMESTAMPCYCLEHI 0xc0c | ||
37 | |||
38 | extern int __init omap_wakeupgen_init(void); | ||
39 | #endif | ||