diff options
Diffstat (limited to 'arch/arm/mach-omap1/include/mach')
-rw-r--r-- | arch/arm/mach-omap1/include/mach/clkdev.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/debug-macro.S | 45 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/entry-macro.S | 58 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/gpio.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/hardware.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/io.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/irqs.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/memory.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/mtd-xip.h | 61 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/smp.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/system.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/timex.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/uncompress.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap1/include/mach/vmalloc.h | 20 |
14 files changed, 234 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/include/mach/clkdev.h b/arch/arm/mach-omap1/include/mach/clkdev.h new file mode 100644 index 000000000000..ea8640e4603e --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/clkdev.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/clkdev.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/clkdev.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/debug-macro.S b/arch/arm/mach-omap1/include/mach/debug-macro.S new file mode 100644 index 000000000000..aedb746fc33c --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/debug-macro.S | |||
@@ -0,0 +1,45 @@ | |||
1 | /* arch/arm/mach-omap1/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 | moveq \rx, #0xff000000 @ physical base address | ||
18 | movne \rx, #0xfe000000 @ virtual base | ||
19 | orr \rx, \rx, #0x00fb0000 | ||
20 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | ||
21 | orr \rx, \rx, #0x00009000 @ UART 3 | ||
22 | #endif | ||
23 | #if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) | ||
24 | orr \rx, \rx, #0x00000800 @ UART 2 & 3 | ||
25 | #endif | ||
26 | .endm | ||
27 | |||
28 | .macro senduart,rd,rx | ||
29 | strb \rd, [\rx] | ||
30 | .endm | ||
31 | |||
32 | .macro busyuart,rd,rx | ||
33 | 1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends | ||
34 | and \rd, \rd, #0x60 | ||
35 | teq \rd, #0x60 | ||
36 | beq 1002f | ||
37 | ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only | ||
38 | and \rd, \rd, #0x60 | ||
39 | teq \rd, #0x60 | ||
40 | bne 1001b | ||
41 | 1002: | ||
42 | .endm | ||
43 | |||
44 | .macro waituart,rd,rx | ||
45 | .endm | ||
diff --git a/arch/arm/mach-omap1/include/mach/entry-macro.S b/arch/arm/mach-omap1/include/mach/entry-macro.S new file mode 100644 index 000000000000..df9060edda28 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/entry-macro.S | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for OMAP-based platforms | ||
5 | * | ||
6 | * Copyright (C) 2009 Texas Instruments | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/io.h> | ||
14 | #include <mach/irqs.h> | ||
15 | #include <asm/hardware/gic.h> | ||
16 | |||
17 | #if (defined(CONFIG_ARCH_OMAP730)||defined(CONFIG_ARCH_OMAP850)) && \ | ||
18 | (defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)) | ||
19 | #error "FIXME: OMAP7XX doesn't support multiple-OMAP" | ||
20 | #elif defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) | ||
21 | #define INT_IH2_IRQ INT_7XX_IH2_IRQ | ||
22 | #elif defined(CONFIG_ARCH_OMAP15XX) | ||
23 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | ||
24 | #elif defined(CONFIG_ARCH_OMAP16XX) | ||
25 | #define INT_IH2_IRQ INT_1610_IH2_IRQ | ||
26 | #else | ||
27 | #warning "IH2 IRQ defaulted" | ||
28 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | ||
29 | #endif | ||
30 | |||
31 | .macro disable_fiq | ||
32 | .endm | ||
33 | |||
34 | .macro get_irqnr_preamble, base, tmp | ||
35 | .endm | ||
36 | |||
37 | .macro arch_ret_to_user, tmp1, tmp2 | ||
38 | .endm | ||
39 | |||
40 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
41 | ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) | ||
42 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | ||
43 | ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] | ||
44 | mov \irqstat, #0xffffffff | ||
45 | bic \tmp, \irqstat, \tmp | ||
46 | tst \irqnr, \tmp | ||
47 | beq 1510f | ||
48 | |||
49 | ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] | ||
50 | cmp \irqnr, #0 | ||
51 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
52 | cmpeq \irqnr, #INT_IH2_IRQ | ||
53 | ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) | ||
54 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
55 | addeqs \irqnr, \irqnr, #32 | ||
56 | 1510: | ||
57 | .endm | ||
58 | |||
diff --git a/arch/arm/mach-omap1/include/mach/gpio.h b/arch/arm/mach-omap1/include/mach/gpio.h new file mode 100644 index 000000000000..e737706a8fe1 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/gpio.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/gpio.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/gpio.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/hardware.h b/arch/arm/mach-omap1/include/mach/hardware.h new file mode 100644 index 000000000000..a3f6287b2007 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/hardware.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/hardware.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/hardware.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/io.h b/arch/arm/mach-omap1/include/mach/io.h new file mode 100644 index 000000000000..57bdf74a3e64 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/io.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/io.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/io.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/irqs.h b/arch/arm/mach-omap1/include/mach/irqs.h new file mode 100644 index 000000000000..9292fdc1cb0b --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/irqs.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/irqs.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/irqs.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/memory.h b/arch/arm/mach-omap1/include/mach/memory.h new file mode 100644 index 000000000000..e9b600c113ef --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/memory.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/memory.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/memory.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/mtd-xip.h b/arch/arm/mach-omap1/include/mach/mtd-xip.h new file mode 100644 index 000000000000..f82a8dcaad94 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/mtd-xip.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * MTD primitives for XIP support. Architecture specific functions. | ||
3 | * | ||
4 | * Do not include this file directly. It's included from linux/mtd/xip.h | ||
5 | * | ||
6 | * Author: Vladimir Barinov <vbarinov@embeddedalley.com> | ||
7 | * | ||
8 | * (c) 2005 MontaVista Software, Inc. This file is licensed under the | ||
9 | * terms of the GNU General Public License version 2. This program is | ||
10 | * licensed "as is" without any warranty of any kind, whether express or | ||
11 | * implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ARCH_OMAP_MTD_XIP_H__ | ||
15 | #define __ARCH_OMAP_MTD_XIP_H__ | ||
16 | |||
17 | #include <mach/hardware.h> | ||
18 | #define OMAP_MPU_TIMER_BASE (0xfffec500) | ||
19 | #define OMAP_MPU_TIMER_OFFSET 0x100 | ||
20 | |||
21 | typedef struct { | ||
22 | u32 cntl; /* CNTL_TIMER, R/W */ | ||
23 | u32 load_tim; /* LOAD_TIM, W */ | ||
24 | u32 read_tim; /* READ_TIM, R */ | ||
25 | } xip_omap_mpu_timer_regs_t; | ||
26 | |||
27 | #define xip_omap_mpu_timer_base(n) \ | ||
28 | ((volatile xip_omap_mpu_timer_regs_t*)OMAP1_IO_ADDRESS(OMAP_MPU_TIMER_BASE + \ | ||
29 | (n)*OMAP_MPU_TIMER_OFFSET)) | ||
30 | |||
31 | static inline unsigned long xip_omap_mpu_timer_read(int nr) | ||
32 | { | ||
33 | volatile xip_omap_mpu_timer_regs_t* timer = xip_omap_mpu_timer_base(nr); | ||
34 | return timer->read_tim; | ||
35 | } | ||
36 | |||
37 | #define xip_irqpending() \ | ||
38 | (omap_readl(OMAP_IH1_ITR) & ~omap_readl(OMAP_IH1_MIR)) | ||
39 | #define xip_currtime() (~xip_omap_mpu_timer_read(0)) | ||
40 | |||
41 | /* | ||
42 | * It's permitted to do approxmation for xip_elapsed_since macro | ||
43 | * (see linux/mtd/xip.h) | ||
44 | */ | ||
45 | |||
46 | #ifdef CONFIG_MACH_OMAP_PERSEUS2 | ||
47 | #define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 7) | ||
48 | #else | ||
49 | #define xip_elapsed_since(x) (signed)((~xip_omap_mpu_timer_read(0) - (x)) / 6) | ||
50 | #endif | ||
51 | |||
52 | /* | ||
53 | * xip_cpu_idle() is used when waiting for a delay equal or larger than | ||
54 | * the system timer tick period. This should put the CPU into idle mode | ||
55 | * to save power and to be woken up only when some interrupts are pending. | ||
56 | * As above, this should not rely upon standard kernel code. | ||
57 | */ | ||
58 | |||
59 | #define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (1)) | ||
60 | |||
61 | #endif /* __ARCH_OMAP_MTD_XIP_H__ */ | ||
diff --git a/arch/arm/mach-omap1/include/mach/smp.h b/arch/arm/mach-omap1/include/mach/smp.h new file mode 100644 index 000000000000..80a371c06e59 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/smp.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/smp.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/smp.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/system.h b/arch/arm/mach-omap1/include/mach/system.h new file mode 100644 index 000000000000..a6c1b3a16dfc --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/system.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/system.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/system.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/timex.h b/arch/arm/mach-omap1/include/mach/timex.h new file mode 100644 index 000000000000..4793790d53cc --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/timex.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/timex.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/timex.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/uncompress.h b/arch/arm/mach-omap1/include/mach/uncompress.h new file mode 100644 index 000000000000..0ff22dc075c7 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/uncompress.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/include/mach/uncompress.h | ||
3 | */ | ||
4 | |||
5 | #include <plat/uncompress.h> | ||
diff --git a/arch/arm/mach-omap1/include/mach/vmalloc.h b/arch/arm/mach-omap1/include/mach/vmalloc.h new file mode 100644 index 000000000000..1b2af14df151 --- /dev/null +++ b/arch/arm/mach-omap1/include/mach/vmalloc.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap1/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 + 0x18000000) | ||