blob: 0255b8212ea307e1aaddbf1d61a53a8feb483460 [file] [log] [blame]
Travis Geiselbrecht1d0df692008-09-01 02:26:09 -07001/*
2 * Copyright (c) 2008 Travis Geiselbrecht
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files
6 * (the "Software"), to deal in the Software without restriction,
7 * including without limitation the rights to use, copy, modify, merge,
8 * publish, distribute, sublicense, and/or sell copies of the Software,
9 * and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23#ifndef __OMAP5912_H
24#define __OMAP5912_H
25
26/* memory map */
27#define SDRAM_BASE 0x10000000
28
29/* clocks */
30#define DPLL_CTRL (*(volatile unsigned short *)0xfffecf00)
31#define ARM_CKCTL (*(volatile unsigned int *)0xfffece00)
32#define ARM_SYSST (*(volatile unsigned int *)0xfffece18)
33
34/* uart */
35#define UART0_BASE 0xfffb0000
36#define UART1_BASE 0xfffb0800
37#define UART2_BASE 0xfffb9800
38
39#define UART_RHR 0
40#define UART_THR 0
41#define UART_DLL 0
42#define UART_IER 1
43#define UART_DLH 1
44#define UART_IIR 2
45#define UART_FCR 2
46#define UART_EFR 2
47#define UART_LCR 3
48#define UART_MCR 4
49#define UART_LSR 5
50#define UART_MSR 6
51#define UART_TCR 6
52#define UART_SPR 7
53#define UART_TLR 7
54#define UART_MDR1 8
55#define UART_MDR2 9
56#define UART_SFLSR 10
57#define UART_RESUME 11
58#define UART_TXFLL 10
59#define UART_TXFLH 11
60#define UART_SFREGL 12
61#define UART_SFREGH 13
62#define UART_RXFLL 12
63#define UART_RXFLH 13
64#define UART_BLR 14
65#define UART_UASR 14
66#define UART_ACREG 15
67#define UART_SCR 16
68#define UART_SSR 17
69#define UART_EBLR 18
70#define UART_MVR 19
71#define UART_SYSC 20
72
73/* timers */
74#define MPU_TIMER0_BASE 0xfffec500
75#define MPU_TIMER1_BASE 0xfffec600
76#define MPU_TIMER2_BASE 0xfffec700
77#define WATCHDOG_TIMER_BASE 0xfffec800
78#define OS_TIMER_BASE 0xfffb9000
79#define GP_TIMER1_BASE 0xfffb1400
80#define GP_TIMER2_BASE 0xfffb1c00
81#define GP_TIMER3_BASE 0xfffb2400
82#define GP_TIMER4_BASE 0xfffb2c00
83#define GP_TIMER5_BASE 0xfffb3400
84#define GP_TIMER6_BASE 0xfffb3c00
85#define GP_TIMER7_BASE 0xfffb4400
86#define GP_TIMER8_BASE 0xfffb5c00
87
88#define MPU_CNTL_TIMER1 (*(volatile unsigned int *)(MPU_TIMER1_BASE + 0x00))
89#define MPU_LOAD_TIMER1 (*(volatile unsigned int *)(MPU_TIMER1_BASE + 0x04))
90#define MPU_READ_TIMER1 (*(volatile unsigned int *)(MPU_TIMER1_BASE + 0x08))
91#define MPU_CNTL_TIMER2 (*(volatile unsigned int *)(MPU_TIMER2_BASE + 0x00))
92#define MPU_LOAD_TIMER2 (*(volatile unsigned int *)(MPU_TIMER2_BASE + 0x04))
93#define MPU_READ_TIMER2 (*(volatile unsigned int *)(MPU_TIMER2_BASE + 0x08))
94#define MPU_CNTL_TIMER3 (*(volatile unsigned int *)(MPU_TIMER3_BASE + 0x00))
95#define MPU_LOAD_TIMER3 (*(volatile unsigned int *)(MPU_TIMER3_BASE + 0x04))
96#define MPU_READ_TIMER3 (*(volatile unsigned int *)(MPU_TIMER3_BASE + 0x08))
97
98#define OS_TIMER_TICK_VALUE_REG (*(volatile unsigned int *)(OS_TIMER_BASE + 0x00))
99#define OS_TIMER_TICK_COUNTER_REG (*(volatile unsigned int *)(OS_TIMER_BASE + 0x04))
100#define OS_TIMER_CTRL_REG (*(volatile unsigned int *)(OS_TIMER_BASE + 0x08))
101
102
103/* interrupt controller */
104#define INT_VECTORS (32 + 128)
105#define INTCON0_BASE 0xfffecb00
106#define INTCON1_BASE 0xfffe0000
107#define INTCON2_BASE 0xfffe0100
108#define INTCON3_BASE 0xfffe0200
109#define INTCON4_BASE 0xfffe0300
110
111#define INTCON_ITR 0x00
112#define INTCON_MIR 0x04
113#define INTCON_SIR_IRQ 0x10
114#define INTCON_SIR_FIQ 0x14
115#define INTCON_CONTROL 0x18
116#define INTCON_ILR_BASE 0x1c
117#define INTCON_SISR 0x9c
118#define INTCON_GMR 0xa0 /* only on first level controller */
119#define INTCON_STATUS 0xa0 /* only on second level controllers */
120#define INTCON_OCP_CFG 0xa4
121#define INTCON_INTH_REV 0xa8
122
123/* interrupts */
124#define IRQ_TIMER3 16
125#define IRQ_GPTIMER1 17
126#define IRQ_GPTIMER2 18
127#define IRQ_TIMER1 26
128#define IRQ_WD_TIMER 27
129#define IRQ_TIMER2 30
130#define IRQ_OS_TIMER (32 + 22)
131#define IRQ_GPTIMER3 (32 + 34)
132#define IRQ_GPTIMER4 (32 + 35)
133#define IRQ_GPTIMER5 (32 + 36)
134#define IRQ_GPTIMER6 (32 + 37)
135#define IRQ_GPTIMER7 (32 + 38)
136#define IRQ_GPTIMER8 (32 + 39)
137
138#endif
139