diff options
Diffstat (limited to 'arch/arm/mach-omap2/include/mach')
-rw-r--r-- | arch/arm/mach-omap2/include/mach/clkdev.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/debug-macro.S | 59 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/entry-macro.S | 124 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/gpio.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/hardware.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/io.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/irqs.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/smp.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/system.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/timex.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/uncompress.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/vmalloc.h | 20 |
13 files changed, 253 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/include/mach/clkdev.h b/arch/arm/mach-omap2/include/mach/clkdev.h new file mode 100644 index 000000000000..53b027441c56 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/clkdev.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/clkdev.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/clkdev.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S new file mode 100644 index 000000000000..e9f255df9163 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/debug-macro.S | |||
@@ -0,0 +1,59 @@ | |||
1 | /* arch/arm/mach-omap2/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | */ | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 @ MMU enabled? | ||
17 | #ifdef CONFIG_ARCH_OMAP2 | ||
18 | moveq \rx, #0x48000000 @ physical base address | ||
19 | movne \rx, #0xfa000000 @ virtual base | ||
20 | orr \rx, \rx, #0x0006a000 | ||
21 | #ifdef CONFIG_OMAP_LL_DEBUG_UART2 | ||
22 | add \rx, \rx, #0x00002000 @ UART 2 | ||
23 | #endif | ||
24 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | ||
25 | add \rx, \rx, #0x00004000 @ UART 3 | ||
26 | #endif | ||
27 | |||
28 | #elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
29 | moveq \rx, #0x48000000 @ physical base address | ||
30 | movne \rx, #0xfa000000 @ virtual base | ||
31 | orr \rx, \rx, #0x0006a000 | ||
32 | #ifdef CONFIG_OMAP_LL_DEBUG_UART2 | ||
33 | add \rx, \rx, #0x00002000 @ UART 2 | ||
34 | #endif | ||
35 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | ||
36 | add \rx, \rx, #0x00fb0000 @ UART 3 | ||
37 | add \rx, \rx, #0x00006000 | ||
38 | #endif | ||
39 | #endif | ||
40 | .endm | ||
41 | |||
42 | .macro senduart,rd,rx | ||
43 | strb \rd, [\rx] | ||
44 | .endm | ||
45 | |||
46 | .macro busyuart,rd,rx | ||
47 | 1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends | ||
48 | and \rd, \rd, #0x60 | ||
49 | teq \rd, #0x60 | ||
50 | beq 1002f | ||
51 | ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only | ||
52 | and \rd, \rd, #0x60 | ||
53 | teq \rd, #0x60 | ||
54 | bne 1001b | ||
55 | 1002: | ||
56 | .endm | ||
57 | |||
58 | .macro waituart,rd,rx | ||
59 | .endm | ||
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S new file mode 100644 index 000000000000..c7f1720bf282 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for OMAP-based platforms | ||
5 | * | ||
6 | * Copyright (C) 2009 Texas Instruments | ||
7 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | #include <mach/hardware.h> | ||
14 | #include <mach/io.h> | ||
15 | #include <mach/irqs.h> | ||
16 | #include <asm/hardware/gic.h> | ||
17 | |||
18 | #include <plat/omap24xx.h> | ||
19 | #include <plat/omap34xx.h> | ||
20 | |||
21 | /* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */ | ||
22 | #if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430) | ||
23 | #define OMAP2_VA_IC_BASE OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE) | ||
24 | #elif defined(CONFIG_ARCH_OMAP34XX) | ||
25 | #define OMAP2_VA_IC_BASE OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE) | ||
26 | #endif | ||
27 | #if defined(CONFIG_ARCH_OMAP4) | ||
28 | #include <plat/omap44xx.h> | ||
29 | #endif | ||
30 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* Active interrupt offset */ | ||
31 | #define ACTIVEIRQ_MASK 0x7f /* Active interrupt bits */ | ||
32 | |||
33 | .macro disable_fiq | ||
34 | .endm | ||
35 | |||
36 | .macro get_irqnr_preamble, base, tmp | ||
37 | .endm | ||
38 | |||
39 | .macro arch_ret_to_user, tmp1, tmp2 | ||
40 | .endm | ||
41 | |||
42 | #ifndef CONFIG_ARCH_OMAP4 | ||
43 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
44 | ldr \base, =OMAP2_VA_IC_BASE | ||
45 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | ||
46 | cmp \irqnr, #0x0 | ||
47 | bne 2222f | ||
48 | ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ | ||
49 | cmp \irqnr, #0x0 | ||
50 | bne 2222f | ||
51 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | ||
52 | cmp \irqnr, #0x0 | ||
53 | 2222: | ||
54 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | ||
55 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | ||
56 | |||
57 | .endm | ||
58 | #else | ||
59 | #define OMAP44XX_VA_GIC_CPU_BASE OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) | ||
60 | |||
61 | /* | ||
62 | * The interrupt numbering scheme is defined in the | ||
63 | * interrupt controller spec. To wit: | ||
64 | * | ||
65 | * Interrupts 0-15 are IPI | ||
66 | * 16-28 are reserved | ||
67 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
68 | * 32-1020 are global | ||
69 | * 1021-1022 are reserved | ||
70 | * 1023 is "spurious" (no interrupt) | ||
71 | * | ||
72 | * For now, we ignore all local interrupts so only return an | ||
73 | * interrupt if it's between 30 and 1020. The test_for_ipi | ||
74 | * routine below will pick up on IPIs. | ||
75 | * A simple read from the controller will tell us the number | ||
76 | * of the highest priority enabled interrupt. | ||
77 | * We then just need to check whether it is in the | ||
78 | * valid range for an IRQ (30-1020 inclusive). | ||
79 | */ | ||
80 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
81 | ldr \base, =OMAP44XX_VA_GIC_CPU_BASE | ||
82 | ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
83 | |||
84 | ldr \tmp, =1021 | ||
85 | |||
86 | bic \irqnr, \irqstat, #0x1c00 | ||
87 | |||
88 | cmp \irqnr, #29 | ||
89 | cmpcc \irqnr, \irqnr | ||
90 | cmpne \irqnr, \tmp | ||
91 | cmpcs \irqnr, \irqnr | ||
92 | .endm | ||
93 | |||
94 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
95 | * register) is preserved from the macro above. | ||
96 | * If there is an IPI, we immediately signal end of interrupt | ||
97 | * on the controller, since this requires the original irqstat | ||
98 | * value which we won't easily be able to recreate later. | ||
99 | */ | ||
100 | |||
101 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
102 | bic \irqnr, \irqstat, #0x1c00 | ||
103 | cmp \irqnr, #16 | ||
104 | it cc | ||
105 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
106 | it cs | ||
107 | cmpcs \irqnr, \irqnr | ||
108 | .endm | ||
109 | |||
110 | /* As above, this assumes that irqstat and base are preserved */ | ||
111 | |||
112 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
113 | bic \irqnr, \irqstat, #0x1c00 | ||
114 | mov \tmp, #0 | ||
115 | cmp \irqnr, #29 | ||
116 | itt eq | ||
117 | moveq \tmp, #1 | ||
118 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
119 | cmp \tmp, #0 | ||
120 | .endm | ||
121 | #endif | ||
122 | |||
123 | .macro irq_prio_table | ||
124 | .endm | ||
diff --git a/arch/arm/mach-omap2/include/mach/gpio.h b/arch/arm/mach-omap2/include/mach/gpio.h new file mode 100644 index 000000000000..be4d290d57ee --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/gpio.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/gpio.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/gpio.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/hardware.h b/arch/arm/mach-omap2/include/mach/hardware.h new file mode 100644 index 000000000000..78edf9d33f71 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/hardware.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/hardware.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/hardware.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/io.h b/arch/arm/mach-omap2/include/mach/io.h new file mode 100644 index 000000000000..fd78f31aa1ad --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/io.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/io.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/io.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/irqs.h b/arch/arm/mach-omap2/include/mach/irqs.h new file mode 100644 index 000000000000..44dab7725696 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/irqs.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/irqs.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/irqs.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/memory.h b/arch/arm/mach-omap2/include/mach/memory.h new file mode 100644 index 000000000000..ca6d32a917dd --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/memory.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/memory.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/smp.h b/arch/arm/mach-omap2/include/mach/smp.h new file mode 100644 index 000000000000..323675f21b69 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/smp.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/smp.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/smp.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/system.h b/arch/arm/mach-omap2/include/mach/system.h new file mode 100644 index 000000000000..d488721ab90b --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/system.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/system.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/system.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/timex.h b/arch/arm/mach-omap2/include/mach/timex.h new file mode 100644 index 000000000000..de9f8fc40e7c --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/timex.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/timex.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/timex.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/uncompress.h b/arch/arm/mach-omap2/include/mach/uncompress.h new file mode 100644 index 000000000000..78e0557bfd4e --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/uncompress.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/include/mach/uncompress.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/uncompress.h> | ||
diff --git a/arch/arm/mach-omap2/include/mach/vmalloc.h b/arch/arm/mach-omap2/include/mach/vmalloc.h new file mode 100644 index 000000000000..9ce9b6e8ad23 --- /dev/null +++ b/arch/arm/mach-omap2/include/mach/vmalloc.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define VMALLOC_END (PAGE_OFFSET + 0x38000000) | ||