]> git.proxmox.com Git - mirror_edk2.git/blob - Omap35xxPkg/Include/Omap3530/Omap3530Timer.h
26ddcd536d3ff38ce60efd247598896f76ee5bc9
[mirror_edk2.git] / Omap35xxPkg / Include / Omap3530 / Omap3530Timer.h
1 /** @file
2
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __OMAP3530TIMER_H__
10 #define __OMAP3530TIMER_H__
11
12 #define GPTIMER1_BASE (0x48313000)
13 #define GPTIMER2_BASE (0x49032000)
14 #define GPTIMER3_BASE (0x49034000)
15 #define GPTIMER4_BASE (0x49036000)
16 #define GPTIMER5_BASE (0x49038000)
17 #define GPTIMER6_BASE (0x4903A000)
18 #define GPTIMER7_BASE (0x4903C000)
19 #define GPTIMER8_BASE (0x4903E000)
20 #define GPTIMER9_BASE (0x49040000)
21 #define GPTIMER10_BASE (0x48086000)
22 #define GPTIMER11_BASE (0x48088000)
23 #define GPTIMER12_BASE (0x48304000)
24 #define WDTIMER2_BASE (0x48314000)
25
26 #define GPTIMER_TIOCP_CFG (0x0010)
27 #define GPTIMER_TISTAT (0x0014)
28 #define GPTIMER_TISR (0x0018)
29 #define GPTIMER_TIER (0x001C)
30 #define GPTIMER_TWER (0x0020)
31 #define GPTIMER_TCLR (0x0024)
32 #define GPTIMER_TCRR (0x0028)
33 #define GPTIMER_TLDR (0x002C)
34 #define GPTIMER_TTGR (0x0030)
35 #define GPTIMER_TWPS (0x0034)
36 #define GPTIMER_TMAR (0x0038)
37 #define GPTIMER_TCAR1 (0x003C)
38 #define GPTIMER_TSICR (0x0040)
39 #define GPTIMER_TCAR2 (0x0044)
40 #define GPTIMER_TPIR (0x0048)
41 #define GPTIMER_TNIR (0x004C)
42 #define GPTIMER_TCVR (0x0050)
43 #define GPTIMER_TOCR (0x0054)
44 #define GPTIMER_TOWR (0x0058)
45
46 #define WSPR (0x048)
47
48 #define TISR_TCAR_IT_FLAG_MASK BIT2
49 #define TISR_OVF_IT_FLAG_MASK BIT1
50 #define TISR_MAT_IT_FLAG_MASK BIT0
51 #define TISR_ALL_INTERRUPT_MASK (TISR_TCAR_IT_FLAG_MASK | TISR_OVF_IT_FLAG_MASK | TISR_MAT_IT_FLAG_MASK)
52
53 #define TISR_TCAR_IT_FLAG_NOT_PENDING (0UL << 2)
54 #define TISR_OVF_IT_FLAG_NOT_PENDING (0UL << 1)
55 #define TISR_MAT_IT_FLAG_NOT_PENDING (0UL << 0)
56 #define TISR_NO_INTERRUPTS_PENDING (TISR_TCAR_IT_FLAG_NOT_PENDING | TISR_OVF_IT_FLAG_NOT_PENDING | TISR_MAT_IT_FLAG_NOT_PENDING)
57
58 #define TISR_TCAR_IT_FLAG_CLEAR BIT2
59 #define TISR_OVF_IT_FLAG_CLEAR BIT1
60 #define TISR_MAT_IT_FLAG_CLEAR BIT0
61 #define TISR_CLEAR_ALL (TISR_TCAR_IT_FLAG_CLEAR | TISR_OVF_IT_FLAG_CLEAR | TISR_MAT_IT_FLAG_CLEAR)
62
63 #define TCLR_AR_AUTORELOAD BIT1
64 #define TCLR_AR_ONESHOT (0UL << 1)
65 #define TCLR_ST_ON BIT0
66 #define TCLR_ST_OFF (0UL << 0)
67
68 #define TIER_TCAR_IT_ENABLE (BIT2
69 #define TIER_TCAR_IT_DISABLE (0UL << 2)
70 #define TIER_OVF_IT_ENABLE BIT1
71 #define TIER_OVF_IT_DISABLE (0UL << 1)
72 #define TIER_MAT_IT_ENABLE BIT0
73 #define TIER_MAT_IT_DISABLE (0UL << 0)
74
75 #endif // __OMAP3530TIMER_H__
76