diff options
Diffstat (limited to 'arch/arm/plat-omap/include')
-rw-r--r-- | arch/arm/plat-omap/include/mach/debug-macro.S | 70 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/entry-macro.S | 172 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/mtd-xip.h | 61 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/omapfb.h | 398 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/vmalloc.h | 21 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/blizzard.h (renamed from arch/arm/plat-omap/include/mach/blizzard.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/board-ams-delta.h (renamed from arch/arm/plat-omap/include/mach/board-ams-delta.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/board-sx1.h (renamed from arch/arm/plat-omap/include/mach/board-sx1.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/board-voiceblue.h (renamed from arch/arm/plat-omap/include/mach/board-voiceblue.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/board.h (renamed from arch/arm/plat-omap/include/mach/board.h) | 29 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clkdev.h (renamed from arch/arm/plat-omap/include/mach/clkdev.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clkdev_omap.h | 41 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clock.h (renamed from arch/arm/plat-omap/include/mach/clock.h) | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clockdomain.h (renamed from arch/arm/plat-omap/include/mach/clockdomain.h) | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/common.h (renamed from arch/arm/plat-omap/include/mach/common.h) | 38 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/control.h (renamed from arch/arm/plat-omap/include/mach/control.h) | 114 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/cpu.h (renamed from arch/arm/plat-omap/include/mach/cpu.h) | 100 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/display.h | 575 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/dma.h (renamed from arch/arm/plat-omap/include/mach/dma.h) | 65 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/dmtimer.h (renamed from arch/arm/plat-omap/include/mach/dmtimer.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/dsp_common.h (renamed from arch/arm/plat-omap/include/mach/dsp_common.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/fpga.h (renamed from arch/arm/plat-omap/include/mach/fpga.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/gpio-switch.h (renamed from arch/arm/plat-omap/include/mach/gpio-switch.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/gpio.h (renamed from arch/arm/plat-omap/include/mach/gpio.h) | 3 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/gpmc-smc91x.h (renamed from arch/arm/plat-omap/include/mach/gpmc-smc91x.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/gpmc.h (renamed from arch/arm/plat-omap/include/mach/gpmc.h) | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/hardware.h (renamed from arch/arm/plat-omap/include/mach/hardware.h) | 16 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/hwa742.h (renamed from arch/arm/plat-omap/include/mach/hwa742.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/i2c.h | 39 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/io.h (renamed from arch/arm/plat-omap/include/mach/io.h) | 124 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/iommu.h (renamed from arch/arm/plat-omap/include/mach/iommu.h) | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/iommu2.h (renamed from arch/arm/plat-omap/include/mach/iommu2.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/iovmm.h (renamed from arch/arm/plat-omap/include/mach/iovmm.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/irda.h (renamed from arch/arm/plat-omap/include/mach/irda.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/irqs.h (renamed from arch/arm/plat-omap/include/mach/irqs.h) | 234 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/keypad.h (renamed from arch/arm/plat-omap/include/mach/keypad.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/lcd_mipid.h (renamed from arch/arm/plat-omap/include/mach/lcd_mipid.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/led.h (renamed from arch/arm/plat-omap/include/mach/led.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mailbox.h (renamed from arch/arm/plat-omap/include/mach/mailbox.h) | 23 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mcbsp.h (renamed from arch/arm/plat-omap/include/mach/mcbsp.h) | 8 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mcspi.h (renamed from arch/arm/plat-omap/include/mach/mcspi.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/memory.h (renamed from arch/arm/plat-omap/include/mach/memory.h) | 7 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/menelaus.h (renamed from arch/arm/plat-omap/include/mach/menelaus.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mmc.h (renamed from arch/arm/plat-omap/include/mach/mmc.h) | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/mux.h (renamed from arch/arm/plat-omap/include/mach/mux.h) | 328 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/nand.h (renamed from arch/arm/plat-omap/include/mach/nand.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap-alsa.h (renamed from arch/arm/plat-omap/include/mach/omap-alsa.h) | 4 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap-pm.h (renamed from arch/arm/plat-omap/include/mach/omap-pm.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap1510.h (renamed from arch/arm/plat-omap/include/mach/omap1510.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap16xx.h (renamed from arch/arm/plat-omap/include/mach/omap16xx.h) | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap24xx.h (renamed from arch/arm/plat-omap/include/mach/omap24xx.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap34xx.h (renamed from arch/arm/plat-omap/include/mach/omap34xx.h) | 11 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap44xx.h (renamed from arch/arm/plat-omap/include/mach/omap44xx.h) | 16 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap730.h (renamed from arch/arm/plat-omap/include/mach/omap730.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap7xx.h | 104 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap850.h (renamed from arch/arm/plat-omap/include/mach/omap850.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_device.h (renamed from arch/arm/plat-omap/include/mach/omap_device.h) | 10 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h (renamed from arch/arm/plat-omap/include/mach/omap_hwmod.h) | 28 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/onenand.h (renamed from arch/arm/plat-omap/include/mach/onenand.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/param.h (renamed from arch/arm/plat-omap/include/mach/param.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/powerdomain.h (renamed from arch/arm/plat-omap/include/mach/powerdomain.h) | 19 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/prcm.h (renamed from arch/arm/plat-omap/include/mach/prcm.h) | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/sdrc.h (renamed from arch/arm/plat-omap/include/mach/sdrc.h) | 23 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/serial.h (renamed from arch/arm/plat-omap/include/mach/serial.h) | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/smp.h (renamed from arch/arm/plat-omap/include/mach/smp.h) | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/sram.h (renamed from arch/arm/plat-omap/include/mach/sram.h) | 7 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/system.h (renamed from arch/arm/plat-omap/include/mach/system.h) | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/tc.h (renamed from arch/arm/plat-omap/include/mach/tc.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/timer-gp.h (renamed from arch/arm/plat-omap/include/mach/timer-gp.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/timex.h (renamed from arch/arm/plat-omap/include/mach/timex.h) | 0 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/uncompress.h (renamed from arch/arm/plat-omap/include/mach/uncompress.h) | 11 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/usb.h (renamed from arch/arm/plat-omap/include/mach/usb.h) | 19 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/vram.h | 62 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/vrfb.h | 50 |
74 files changed, 1507 insertions, 1360 deletions
diff --git a/arch/arm/plat-omap/include/mach/debug-macro.S b/arch/arm/plat-omap/include/mach/debug-macro.S deleted file mode 100644 index ac24050e3416..000000000000 --- a/arch/arm/plat-omap/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* arch/arm/plat-omap/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_OMAP1 | ||
18 | moveq \rx, #0xff000000 @ physical base address | ||
19 | movne \rx, #0xfe000000 @ virtual base | ||
20 | orr \rx, \rx, #0x00fb0000 | ||
21 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | ||
22 | orr \rx, \rx, #0x00009000 @ UART 3 | ||
23 | #endif | ||
24 | #if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) | ||
25 | orr \rx, \rx, #0x00000800 @ UART 2 & 3 | ||
26 | #endif | ||
27 | |||
28 | #elif CONFIG_ARCH_OMAP2 | ||
29 | moveq \rx, #0x48000000 @ physical base address | ||
30 | movne \rx, #0xd8000000 @ 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, #0x00004000 @ UART 3 | ||
37 | #endif | ||
38 | |||
39 | #elif defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
40 | moveq \rx, #0x48000000 @ physical base address | ||
41 | movne \rx, #0xd8000000 @ virtual base | ||
42 | orr \rx, \rx, #0x0006a000 | ||
43 | #ifdef CONFIG_OMAP_LL_DEBUG_UART2 | ||
44 | add \rx, \rx, #0x00002000 @ UART 2 | ||
45 | #endif | ||
46 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | ||
47 | add \rx, \rx, #0x00fb0000 @ UART 3 | ||
48 | add \rx, \rx, #0x00006000 | ||
49 | #endif | ||
50 | #endif | ||
51 | .endm | ||
52 | |||
53 | .macro senduart,rd,rx | ||
54 | strb \rd, [\rx] | ||
55 | .endm | ||
56 | |||
57 | .macro busyuart,rd,rx | ||
58 | 1001: ldrb \rd, [\rx, #(0x5 << 2)] @ OMAP-1510 and friends | ||
59 | and \rd, \rd, #0x60 | ||
60 | teq \rd, #0x60 | ||
61 | beq 1002f | ||
62 | ldrb \rd, [\rx, #(0x5 << 0)] @ OMAP-730 only | ||
63 | and \rd, \rd, #0x60 | ||
64 | teq \rd, #0x60 | ||
65 | bne 1001b | ||
66 | 1002: | ||
67 | .endm | ||
68 | |||
69 | .macro waituart,rd,rx | ||
70 | .endm | ||
diff --git a/arch/arm/plat-omap/include/mach/entry-macro.S b/arch/arm/plat-omap/include/mach/entry-macro.S deleted file mode 100644 index a5592991634d..000000000000 --- a/arch/arm/plat-omap/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
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 | #if defined(CONFIG_ARCH_OMAP1) | ||
19 | |||
20 | #if defined(CONFIG_ARCH_OMAP730) && \ | ||
21 | (defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)) | ||
22 | #error "FIXME: OMAP730 doesn't support multiple-OMAP" | ||
23 | #elif defined(CONFIG_ARCH_OMAP730) | ||
24 | #define INT_IH2_IRQ INT_730_IH2_IRQ | ||
25 | #elif defined(CONFIG_ARCH_OMAP15XX) | ||
26 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | ||
27 | #elif defined(CONFIG_ARCH_OMAP16XX) | ||
28 | #define INT_IH2_IRQ INT_1610_IH2_IRQ | ||
29 | #else | ||
30 | #warning "IH2 IRQ defaulted" | ||
31 | #define INT_IH2_IRQ INT_1510_IH2_IRQ | ||
32 | #endif | ||
33 | |||
34 | .macro disable_fiq | ||
35 | .endm | ||
36 | |||
37 | .macro get_irqnr_preamble, base, tmp | ||
38 | .endm | ||
39 | |||
40 | .macro arch_ret_to_user, tmp1, tmp2 | ||
41 | .endm | ||
42 | |||
43 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
44 | ldr \base, =OMAP1_IO_ADDRESS(OMAP_IH1_BASE) | ||
45 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | ||
46 | ldr \tmp, [\base, #IRQ_MIR_REG_OFFSET] | ||
47 | mov \irqstat, #0xffffffff | ||
48 | bic \tmp, \irqstat, \tmp | ||
49 | tst \irqnr, \tmp | ||
50 | beq 1510f | ||
51 | |||
52 | ldr \irqnr, [\base, #IRQ_SIR_FIQ_REG_OFFSET] | ||
53 | cmp \irqnr, #0 | ||
54 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
55 | cmpeq \irqnr, #INT_IH2_IRQ | ||
56 | ldreq \base, =OMAP1_IO_ADDRESS(OMAP_IH2_BASE) | ||
57 | ldreq \irqnr, [\base, #IRQ_SIR_IRQ_REG_OFFSET] | ||
58 | addeqs \irqnr, \irqnr, #32 | ||
59 | 1510: | ||
60 | .endm | ||
61 | |||
62 | #endif | ||
63 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) || \ | ||
64 | defined(CONFIG_ARCH_OMAP4) | ||
65 | |||
66 | #include <mach/omap24xx.h> | ||
67 | #include <mach/omap34xx.h> | ||
68 | |||
69 | /* REVISIT: This should be set dynamically if CONFIG_MULTI_OMAP2 is selected */ | ||
70 | #if defined(CONFIG_ARCH_OMAP2420) || defined(CONFIG_ARCH_OMAP2430) | ||
71 | #define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP24XX_IC_BASE) | ||
72 | #elif defined(CONFIG_ARCH_OMAP34XX) | ||
73 | #define OMAP2_VA_IC_BASE OMAP2_IO_ADDRESS(OMAP34XX_IC_BASE) | ||
74 | #endif | ||
75 | #if defined(CONFIG_ARCH_OMAP4) | ||
76 | #include <mach/omap44xx.h> | ||
77 | #endif | ||
78 | #define INTCPS_SIR_IRQ_OFFSET 0x0040 /* Active interrupt offset */ | ||
79 | #define ACTIVEIRQ_MASK 0x7f /* Active interrupt bits */ | ||
80 | |||
81 | .macro disable_fiq | ||
82 | .endm | ||
83 | |||
84 | .macro get_irqnr_preamble, base, tmp | ||
85 | .endm | ||
86 | |||
87 | .macro arch_ret_to_user, tmp1, tmp2 | ||
88 | .endm | ||
89 | |||
90 | #ifndef CONFIG_ARCH_OMAP4 | ||
91 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
92 | ldr \base, =OMAP2_VA_IC_BASE | ||
93 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | ||
94 | cmp \irqnr, #0x0 | ||
95 | bne 2222f | ||
96 | ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ | ||
97 | cmp \irqnr, #0x0 | ||
98 | bne 2222f | ||
99 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | ||
100 | cmp \irqnr, #0x0 | ||
101 | 2222: | ||
102 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | ||
103 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | ||
104 | |||
105 | .endm | ||
106 | #else | ||
107 | /* | ||
108 | * The interrupt numbering scheme is defined in the | ||
109 | * interrupt controller spec. To wit: | ||
110 | * | ||
111 | * Interrupts 0-15 are IPI | ||
112 | * 16-28 are reserved | ||
113 | * 29-31 are local. We allow 30 to be used for the watchdog. | ||
114 | * 32-1020 are global | ||
115 | * 1021-1022 are reserved | ||
116 | * 1023 is "spurious" (no interrupt) | ||
117 | * | ||
118 | * For now, we ignore all local interrupts so only return an | ||
119 | * interrupt if it's between 30 and 1020. The test_for_ipi | ||
120 | * routine below will pick up on IPIs. | ||
121 | * A simple read from the controller will tell us the number | ||
122 | * of the highest priority enabled interrupt. | ||
123 | * We then just need to check whether it is in the | ||
124 | * valid range for an IRQ (30-1020 inclusive). | ||
125 | */ | ||
126 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
127 | ldr \base, =OMAP44XX_VA_GIC_CPU_BASE | ||
128 | ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
129 | |||
130 | ldr \tmp, =1021 | ||
131 | |||
132 | bic \irqnr, \irqstat, #0x1c00 | ||
133 | |||
134 | cmp \irqnr, #29 | ||
135 | cmpcc \irqnr, \irqnr | ||
136 | cmpne \irqnr, \tmp | ||
137 | cmpcs \irqnr, \irqnr | ||
138 | .endm | ||
139 | |||
140 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
141 | * register) is preserved from the macro above. | ||
142 | * If there is an IPI, we immediately signal end of interrupt | ||
143 | * on the controller, since this requires the original irqstat | ||
144 | * value which we won't easily be able to recreate later. | ||
145 | */ | ||
146 | |||
147 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
148 | bic \irqnr, \irqstat, #0x1c00 | ||
149 | cmp \irqnr, #16 | ||
150 | it cc | ||
151 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
152 | it cs | ||
153 | cmpcs \irqnr, \irqnr | ||
154 | .endm | ||
155 | |||
156 | /* As above, this assumes that irqstat and base are preserved */ | ||
157 | |||
158 | .macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
159 | bic \irqnr, \irqstat, #0x1c00 | ||
160 | mov \tmp, #0 | ||
161 | cmp \irqnr, #29 | ||
162 | itt eq | ||
163 | moveq \tmp, #1 | ||
164 | streq \irqstat, [\base, #GIC_CPU_EOI] | ||
165 | cmp \tmp, #0 | ||
166 | .endm | ||
167 | #endif | ||
168 | |||
169 | .macro irq_prio_table | ||
170 | .endm | ||
171 | |||
172 | #endif | ||
diff --git a/arch/arm/plat-omap/include/mach/mtd-xip.h b/arch/arm/plat-omap/include/mach/mtd-xip.h deleted file mode 100644 index f82a8dcaad94..000000000000 --- a/arch/arm/plat-omap/include/mach/mtd-xip.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
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/plat-omap/include/mach/omapfb.h b/arch/arm/plat-omap/include/mach/omapfb.h deleted file mode 100644 index b226bdf45739..000000000000 --- a/arch/arm/plat-omap/include/mach/omapfb.h +++ /dev/null | |||
@@ -1,398 +0,0 @@ | |||
1 | /* | ||
2 | * File: arch/arm/plat-omap/include/mach/omapfb.h | ||
3 | * | ||
4 | * Framebuffer driver for TI OMAP boards | ||
5 | * | ||
6 | * Copyright (C) 2004 Nokia Corporation | ||
7 | * Author: Imre Deak <imre.deak@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License along | ||
20 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
22 | */ | ||
23 | |||
24 | #ifndef __OMAPFB_H | ||
25 | #define __OMAPFB_H | ||
26 | |||
27 | #include <asm/ioctl.h> | ||
28 | #include <asm/types.h> | ||
29 | |||
30 | /* IOCTL commands. */ | ||
31 | |||
32 | #define OMAP_IOW(num, dtype) _IOW('O', num, dtype) | ||
33 | #define OMAP_IOR(num, dtype) _IOR('O', num, dtype) | ||
34 | #define OMAP_IOWR(num, dtype) _IOWR('O', num, dtype) | ||
35 | #define OMAP_IO(num) _IO('O', num) | ||
36 | |||
37 | #define OMAPFB_MIRROR OMAP_IOW(31, int) | ||
38 | #define OMAPFB_SYNC_GFX OMAP_IO(37) | ||
39 | #define OMAPFB_VSYNC OMAP_IO(38) | ||
40 | #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) | ||
41 | #define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps) | ||
42 | #define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) | ||
43 | #define OMAPFB_LCD_TEST OMAP_IOW(45, int) | ||
44 | #define OMAPFB_CTRL_TEST OMAP_IOW(46, int) | ||
45 | #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old) | ||
46 | #define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key) | ||
47 | #define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key) | ||
48 | #define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info) | ||
49 | #define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info) | ||
50 | #define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window) | ||
51 | #define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info) | ||
52 | #define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info) | ||
53 | |||
54 | #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff | ||
55 | #define OMAPFB_CAPS_LCDC_MASK 0x00fff000 | ||
56 | #define OMAPFB_CAPS_PANEL_MASK 0xff000000 | ||
57 | |||
58 | #define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000 | ||
59 | #define OMAPFB_CAPS_TEARSYNC 0x00002000 | ||
60 | #define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000 | ||
61 | #define OMAPFB_CAPS_PLANE_SCALE 0x00008000 | ||
62 | #define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000 | ||
63 | #define OMAPFB_CAPS_WINDOW_SCALE 0x00020000 | ||
64 | #define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000 | ||
65 | #define OMAPFB_CAPS_WINDOW_ROTATE 0x00080000 | ||
66 | #define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000 | ||
67 | |||
68 | /* Values from DSP must map to lower 16-bits */ | ||
69 | #define OMAPFB_FORMAT_MASK 0x00ff | ||
70 | #define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100 | ||
71 | #define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200 | ||
72 | #define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400 | ||
73 | #define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800 | ||
74 | #define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000 | ||
75 | |||
76 | #define OMAPFB_EVENT_READY 1 | ||
77 | #define OMAPFB_EVENT_DISABLED 2 | ||
78 | |||
79 | #define OMAPFB_MEMTYPE_SDRAM 0 | ||
80 | #define OMAPFB_MEMTYPE_SRAM 1 | ||
81 | #define OMAPFB_MEMTYPE_MAX 1 | ||
82 | |||
83 | enum omapfb_color_format { | ||
84 | OMAPFB_COLOR_RGB565 = 0, | ||
85 | OMAPFB_COLOR_YUV422, | ||
86 | OMAPFB_COLOR_YUV420, | ||
87 | OMAPFB_COLOR_CLUT_8BPP, | ||
88 | OMAPFB_COLOR_CLUT_4BPP, | ||
89 | OMAPFB_COLOR_CLUT_2BPP, | ||
90 | OMAPFB_COLOR_CLUT_1BPP, | ||
91 | OMAPFB_COLOR_RGB444, | ||
92 | OMAPFB_COLOR_YUY422, | ||
93 | }; | ||
94 | |||
95 | struct omapfb_update_window { | ||
96 | __u32 x, y; | ||
97 | __u32 width, height; | ||
98 | __u32 format; | ||
99 | __u32 out_x, out_y; | ||
100 | __u32 out_width, out_height; | ||
101 | __u32 reserved[8]; | ||
102 | }; | ||
103 | |||
104 | struct omapfb_update_window_old { | ||
105 | __u32 x, y; | ||
106 | __u32 width, height; | ||
107 | __u32 format; | ||
108 | }; | ||
109 | |||
110 | enum omapfb_plane { | ||
111 | OMAPFB_PLANE_GFX = 0, | ||
112 | OMAPFB_PLANE_VID1, | ||
113 | OMAPFB_PLANE_VID2, | ||
114 | }; | ||
115 | |||
116 | enum omapfb_channel_out { | ||
117 | OMAPFB_CHANNEL_OUT_LCD = 0, | ||
118 | OMAPFB_CHANNEL_OUT_DIGIT, | ||
119 | }; | ||
120 | |||
121 | struct omapfb_plane_info { | ||
122 | __u32 pos_x; | ||
123 | __u32 pos_y; | ||
124 | __u8 enabled; | ||
125 | __u8 channel_out; | ||
126 | __u8 mirror; | ||
127 | __u8 reserved1; | ||
128 | __u32 out_width; | ||
129 | __u32 out_height; | ||
130 | __u32 reserved2[12]; | ||
131 | }; | ||
132 | |||
133 | struct omapfb_mem_info { | ||
134 | __u32 size; | ||
135 | __u8 type; | ||
136 | __u8 reserved[3]; | ||
137 | }; | ||
138 | |||
139 | struct omapfb_caps { | ||
140 | __u32 ctrl; | ||
141 | __u32 plane_color; | ||
142 | __u32 wnd_color; | ||
143 | }; | ||
144 | |||
145 | enum omapfb_color_key_type { | ||
146 | OMAPFB_COLOR_KEY_DISABLED = 0, | ||
147 | OMAPFB_COLOR_KEY_GFX_DST, | ||
148 | OMAPFB_COLOR_KEY_VID_SRC, | ||
149 | }; | ||
150 | |||
151 | struct omapfb_color_key { | ||
152 | __u8 channel_out; | ||
153 | __u32 background; | ||
154 | __u32 trans_key; | ||
155 | __u8 key_type; | ||
156 | }; | ||
157 | |||
158 | enum omapfb_update_mode { | ||
159 | OMAPFB_UPDATE_DISABLED = 0, | ||
160 | OMAPFB_AUTO_UPDATE, | ||
161 | OMAPFB_MANUAL_UPDATE | ||
162 | }; | ||
163 | |||
164 | #ifdef __KERNEL__ | ||
165 | |||
166 | #include <linux/completion.h> | ||
167 | #include <linux/interrupt.h> | ||
168 | #include <linux/fb.h> | ||
169 | #include <linux/mutex.h> | ||
170 | |||
171 | #include <mach/board.h> | ||
172 | |||
173 | #define OMAP_LCDC_INV_VSYNC 0x0001 | ||
174 | #define OMAP_LCDC_INV_HSYNC 0x0002 | ||
175 | #define OMAP_LCDC_INV_PIX_CLOCK 0x0004 | ||
176 | #define OMAP_LCDC_INV_OUTPUT_EN 0x0008 | ||
177 | #define OMAP_LCDC_HSVS_RISING_EDGE 0x0010 | ||
178 | #define OMAP_LCDC_HSVS_OPPOSITE 0x0020 | ||
179 | |||
180 | #define OMAP_LCDC_SIGNAL_MASK 0x003f | ||
181 | |||
182 | #define OMAP_LCDC_PANEL_TFT 0x0100 | ||
183 | |||
184 | #define OMAPFB_PLANE_XRES_MIN 8 | ||
185 | #define OMAPFB_PLANE_YRES_MIN 8 | ||
186 | |||
187 | #ifdef CONFIG_ARCH_OMAP1 | ||
188 | #define OMAPFB_PLANE_NUM 1 | ||
189 | #else | ||
190 | #define OMAPFB_PLANE_NUM 3 | ||
191 | #endif | ||
192 | |||
193 | struct omapfb_device; | ||
194 | |||
195 | struct lcd_panel { | ||
196 | const char *name; | ||
197 | int config; /* TFT/STN, signal inversion */ | ||
198 | int bpp; /* Pixel format in fb mem */ | ||
199 | int data_lines; /* Lines on LCD HW interface */ | ||
200 | |||
201 | int x_res, y_res; | ||
202 | int pixel_clock; /* In kHz */ | ||
203 | int hsw; /* Horizontal synchronization | ||
204 | pulse width */ | ||
205 | int hfp; /* Horizontal front porch */ | ||
206 | int hbp; /* Horizontal back porch */ | ||
207 | int vsw; /* Vertical synchronization | ||
208 | pulse width */ | ||
209 | int vfp; /* Vertical front porch */ | ||
210 | int vbp; /* Vertical back porch */ | ||
211 | int acb; /* ac-bias pin frequency */ | ||
212 | int pcd; /* pixel clock divider. | ||
213 | Obsolete use pixel_clock instead */ | ||
214 | |||
215 | int (*init) (struct lcd_panel *panel, | ||
216 | struct omapfb_device *fbdev); | ||
217 | void (*cleanup) (struct lcd_panel *panel); | ||
218 | int (*enable) (struct lcd_panel *panel); | ||
219 | void (*disable) (struct lcd_panel *panel); | ||
220 | unsigned long (*get_caps) (struct lcd_panel *panel); | ||
221 | int (*set_bklight_level)(struct lcd_panel *panel, | ||
222 | unsigned int level); | ||
223 | unsigned int (*get_bklight_level)(struct lcd_panel *panel); | ||
224 | unsigned int (*get_bklight_max) (struct lcd_panel *panel); | ||
225 | int (*run_test) (struct lcd_panel *panel, int test_num); | ||
226 | }; | ||
227 | |||
228 | struct extif_timings { | ||
229 | int cs_on_time; | ||
230 | int cs_off_time; | ||
231 | int we_on_time; | ||
232 | int we_off_time; | ||
233 | int re_on_time; | ||
234 | int re_off_time; | ||
235 | int we_cycle_time; | ||
236 | int re_cycle_time; | ||
237 | int cs_pulse_width; | ||
238 | int access_time; | ||
239 | |||
240 | int clk_div; | ||
241 | |||
242 | u32 tim[5]; /* set by extif->convert_timings */ | ||
243 | |||
244 | int converted; | ||
245 | }; | ||
246 | |||
247 | struct lcd_ctrl_extif { | ||
248 | int (*init) (struct omapfb_device *fbdev); | ||
249 | void (*cleanup) (void); | ||
250 | void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div); | ||
251 | unsigned long (*get_max_tx_rate)(void); | ||
252 | int (*convert_timings) (struct extif_timings *timings); | ||
253 | void (*set_timings) (const struct extif_timings *timings); | ||
254 | void (*set_bits_per_cycle)(int bpc); | ||
255 | void (*write_command) (const void *buf, unsigned int len); | ||
256 | void (*read_data) (void *buf, unsigned int len); | ||
257 | void (*write_data) (const void *buf, unsigned int len); | ||
258 | void (*transfer_area) (int width, int height, | ||
259 | void (callback)(void * data), void *data); | ||
260 | int (*setup_tearsync) (unsigned pin_cnt, | ||
261 | unsigned hs_pulse_time, unsigned vs_pulse_time, | ||
262 | int hs_pol_inv, int vs_pol_inv, int div); | ||
263 | int (*enable_tearsync) (int enable, unsigned line); | ||
264 | |||
265 | unsigned long max_transmit_size; | ||
266 | }; | ||
267 | |||
268 | struct omapfb_notifier_block { | ||
269 | struct notifier_block nb; | ||
270 | void *data; | ||
271 | int plane_idx; | ||
272 | }; | ||
273 | |||
274 | typedef int (*omapfb_notifier_callback_t)(struct notifier_block *, | ||
275 | unsigned long event, | ||
276 | void *fbi); | ||
277 | |||
278 | struct omapfb_mem_region { | ||
279 | u32 paddr; | ||
280 | void __iomem *vaddr; | ||
281 | unsigned long size; | ||
282 | u8 type; /* OMAPFB_PLANE_MEM_* */ | ||
283 | unsigned alloc:1; /* allocated by the driver */ | ||
284 | unsigned map:1; /* kernel mapped by the driver */ | ||
285 | }; | ||
286 | |||
287 | struct omapfb_mem_desc { | ||
288 | int region_cnt; | ||
289 | struct omapfb_mem_region region[OMAPFB_PLANE_NUM]; | ||
290 | }; | ||
291 | |||
292 | struct lcd_ctrl { | ||
293 | const char *name; | ||
294 | void *data; | ||
295 | |||
296 | int (*init) (struct omapfb_device *fbdev, | ||
297 | int ext_mode, | ||
298 | struct omapfb_mem_desc *req_md); | ||
299 | void (*cleanup) (void); | ||
300 | void (*bind_client) (struct omapfb_notifier_block *nb); | ||
301 | void (*get_caps) (int plane, struct omapfb_caps *caps); | ||
302 | int (*set_update_mode)(enum omapfb_update_mode mode); | ||
303 | enum omapfb_update_mode (*get_update_mode)(void); | ||
304 | int (*setup_plane) (int plane, int channel_out, | ||
305 | unsigned long offset, | ||
306 | int screen_width, | ||
307 | int pos_x, int pos_y, int width, | ||
308 | int height, int color_mode); | ||
309 | int (*set_rotate) (int angle); | ||
310 | int (*setup_mem) (int plane, size_t size, | ||
311 | int mem_type, unsigned long *paddr); | ||
312 | int (*mmap) (struct fb_info *info, | ||
313 | struct vm_area_struct *vma); | ||
314 | int (*set_scale) (int plane, | ||
315 | int orig_width, int orig_height, | ||
316 | int out_width, int out_height); | ||
317 | int (*enable_plane) (int plane, int enable); | ||
318 | int (*update_window) (struct fb_info *fbi, | ||
319 | struct omapfb_update_window *win, | ||
320 | void (*callback)(void *), | ||
321 | void *callback_data); | ||
322 | void (*sync) (void); | ||
323 | void (*suspend) (void); | ||
324 | void (*resume) (void); | ||
325 | int (*run_test) (int test_num); | ||
326 | int (*setcolreg) (u_int regno, u16 red, u16 green, | ||
327 | u16 blue, u16 transp, | ||
328 | int update_hw_mem); | ||
329 | int (*set_color_key) (struct omapfb_color_key *ck); | ||
330 | int (*get_color_key) (struct omapfb_color_key *ck); | ||
331 | }; | ||
332 | |||
333 | enum omapfb_state { | ||
334 | OMAPFB_DISABLED = 0, | ||
335 | OMAPFB_SUSPENDED= 99, | ||
336 | OMAPFB_ACTIVE = 100 | ||
337 | }; | ||
338 | |||
339 | struct omapfb_plane_struct { | ||
340 | int idx; | ||
341 | struct omapfb_plane_info info; | ||
342 | enum omapfb_color_format color_mode; | ||
343 | struct omapfb_device *fbdev; | ||
344 | }; | ||
345 | |||
346 | struct omapfb_device { | ||
347 | int state; | ||
348 | int ext_lcdc; /* Using external | ||
349 | LCD controller */ | ||
350 | struct mutex rqueue_mutex; | ||
351 | |||
352 | int palette_size; | ||
353 | u32 pseudo_palette[17]; | ||
354 | |||
355 | struct lcd_panel *panel; /* LCD panel */ | ||
356 | const struct lcd_ctrl *ctrl; /* LCD controller */ | ||
357 | const struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */ | ||
358 | struct lcd_ctrl_extif *ext_if; /* LCD ctrl external | ||
359 | interface */ | ||
360 | struct device *dev; | ||
361 | struct fb_var_screeninfo new_var; /* for mode changes */ | ||
362 | |||
363 | struct omapfb_mem_desc mem_desc; | ||
364 | struct fb_info *fb_info[OMAPFB_PLANE_NUM]; | ||
365 | }; | ||
366 | |||
367 | struct omapfb_platform_data { | ||
368 | struct omap_lcd_config lcd; | ||
369 | struct omapfb_mem_desc mem_desc; | ||
370 | void *ctrl_platform_data; | ||
371 | }; | ||
372 | |||
373 | #ifdef CONFIG_ARCH_OMAP1 | ||
374 | extern struct lcd_ctrl omap1_lcd_ctrl; | ||
375 | #else | ||
376 | extern struct lcd_ctrl omap2_disp_ctrl; | ||
377 | #endif | ||
378 | |||
379 | extern void omapfb_reserve_sdram(void); | ||
380 | extern void omapfb_register_panel(struct lcd_panel *panel); | ||
381 | extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval); | ||
382 | extern void omapfb_notify_clients(struct omapfb_device *fbdev, | ||
383 | unsigned long event); | ||
384 | extern int omapfb_register_client(struct omapfb_notifier_block *nb, | ||
385 | omapfb_notifier_callback_t callback, | ||
386 | void *callback_data); | ||
387 | extern int omapfb_unregister_client(struct omapfb_notifier_block *nb); | ||
388 | extern int omapfb_update_window_async(struct fb_info *fbi, | ||
389 | struct omapfb_update_window *win, | ||
390 | void (*callback)(void *), | ||
391 | void *callback_data); | ||
392 | |||
393 | /* in arch/arm/plat-omap/fb.c */ | ||
394 | extern void omapfb_set_ctrl_platform_data(void *pdata); | ||
395 | |||
396 | #endif /* __KERNEL__ */ | ||
397 | |||
398 | #endif /* __OMAPFB_H */ | ||
diff --git a/arch/arm/plat-omap/include/mach/vmalloc.h b/arch/arm/plat-omap/include/mach/vmalloc.h deleted file mode 100644 index b97dfafeebda..000000000000 --- a/arch/arm/plat-omap/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
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 + 0x18000000) | ||
21 | |||
diff --git a/arch/arm/plat-omap/include/mach/blizzard.h b/arch/arm/plat-omap/include/plat/blizzard.h index 8d160f171372..8d160f171372 100644 --- a/arch/arm/plat-omap/include/mach/blizzard.h +++ b/arch/arm/plat-omap/include/plat/blizzard.h | |||
diff --git a/arch/arm/plat-omap/include/mach/board-ams-delta.h b/arch/arm/plat-omap/include/plat/board-ams-delta.h index 51b102dc906b..51b102dc906b 100644 --- a/arch/arm/plat-omap/include/mach/board-ams-delta.h +++ b/arch/arm/plat-omap/include/plat/board-ams-delta.h | |||
diff --git a/arch/arm/plat-omap/include/mach/board-sx1.h b/arch/arm/plat-omap/include/plat/board-sx1.h index 355adbdaae33..355adbdaae33 100644 --- a/arch/arm/plat-omap/include/mach/board-sx1.h +++ b/arch/arm/plat-omap/include/plat/board-sx1.h | |||
diff --git a/arch/arm/plat-omap/include/mach/board-voiceblue.h b/arch/arm/plat-omap/include/plat/board-voiceblue.h index 27916b210f57..27916b210f57 100644 --- a/arch/arm/plat-omap/include/mach/board-voiceblue.h +++ b/arch/arm/plat-omap/include/plat/board-voiceblue.h | |||
diff --git a/arch/arm/plat-omap/include/mach/board.h b/arch/arm/plat-omap/include/plat/board.h index 8e913c322810..376ce18216ff 100644 --- a/arch/arm/plat-omap/include/mach/board.h +++ b/arch/arm/plat-omap/include/plat/board.h | |||
@@ -12,7 +12,19 @@ | |||
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | 14 | ||
15 | #include <mach/gpio-switch.h> | 15 | #include <plat/gpio-switch.h> |
16 | |||
17 | /* | ||
18 | * OMAP35x EVM revision | ||
19 | * Run time detection of EVM revision is done by reading Ethernet | ||
20 | * PHY ID - | ||
21 | * GEN_1 = 0x01150000 | ||
22 | * GEN_2 = 0x92200000 | ||
23 | */ | ||
24 | enum { | ||
25 | OMAP3EVM_BOARD_GEN_1 = 0, /* EVM Rev between A - D */ | ||
26 | OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */ | ||
27 | }; | ||
16 | 28 | ||
17 | /* Different peripheral ids */ | 29 | /* Different peripheral ids */ |
18 | #define OMAP_TAG_CLOCK 0x4f01 | 30 | #define OMAP_TAG_CLOCK 0x4f01 |
@@ -102,15 +114,6 @@ struct omap_pwm_led_platform_data { | |||
102 | void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off); | 114 | void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off); |
103 | }; | 115 | }; |
104 | 116 | ||
105 | /* See arch/arm/plat-omap/include/mach/gpio-switch.h for definitions */ | ||
106 | struct omap_gpio_switch_config { | ||
107 | char name[12]; | ||
108 | u16 gpio; | ||
109 | int flags:4; | ||
110 | int type:4; | ||
111 | int key_code:24; /* Linux key code */ | ||
112 | }; | ||
113 | |||
114 | struct omap_uart_config { | 117 | struct omap_uart_config { |
115 | /* Bit field of UARTs present; bit 0 --> UART1 */ | 118 | /* Bit field of UARTs present; bit 0 --> UART1 */ |
116 | unsigned int enabled_uarts; | 119 | unsigned int enabled_uarts; |
@@ -157,4 +160,10 @@ extern int omap_board_config_size; | |||
157 | /* for TI reference platforms sharing the same debug card */ | 160 | /* for TI reference platforms sharing the same debug card */ |
158 | extern int debug_card_init(u32 addr, unsigned gpio); | 161 | extern int debug_card_init(u32 addr, unsigned gpio); |
159 | 162 | ||
163 | /* OMAP3EVM revision */ | ||
164 | #if defined(CONFIG_MACH_OMAP3EVM) | ||
165 | u8 get_omap3_evm_rev(void); | ||
166 | #else | ||
167 | #define get_omap3_evm_rev() (-EINVAL) | ||
168 | #endif | ||
160 | #endif | 169 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/clkdev.h b/arch/arm/plat-omap/include/plat/clkdev.h index 730c49d1ebd8..730c49d1ebd8 100644 --- a/arch/arm/plat-omap/include/mach/clkdev.h +++ b/arch/arm/plat-omap/include/plat/clkdev.h | |||
diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h new file mode 100644 index 000000000000..35b36caf5f91 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * clkdev <-> OMAP integration | ||
3 | * | ||
4 | * Russell King <linux@arm.linux.org.uk> | ||
5 | * | ||
6 | */ | ||
7 | |||
8 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H | ||
9 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_CLKDEV_OMAP_H | ||
10 | |||
11 | #include <asm/clkdev.h> | ||
12 | |||
13 | struct omap_clk { | ||
14 | u16 cpu; | ||
15 | struct clk_lookup lk; | ||
16 | }; | ||
17 | |||
18 | #define CLK(dev, con, ck, cp) \ | ||
19 | { \ | ||
20 | .cpu = cp, \ | ||
21 | .lk = { \ | ||
22 | .dev_id = dev, \ | ||
23 | .con_id = con, \ | ||
24 | .clk = ck, \ | ||
25 | }, \ | ||
26 | } | ||
27 | |||
28 | |||
29 | #define CK_310 (1 << 0) | ||
30 | #define CK_7XX (1 << 1) | ||
31 | #define CK_1510 (1 << 2) | ||
32 | #define CK_16XX (1 << 3) | ||
33 | #define CK_243X (1 << 4) | ||
34 | #define CK_242X (1 << 5) | ||
35 | #define CK_343X (1 << 6) | ||
36 | #define CK_3430ES1 (1 << 7) | ||
37 | #define CK_3430ES2 (1 << 8) | ||
38 | #define CK_443X (1 << 9) | ||
39 | |||
40 | #endif | ||
41 | |||
diff --git a/arch/arm/plat-omap/include/mach/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 4b8b0d65cbf2..309b6d1dccdb 100644 --- a/arch/arm/plat-omap/include/mach/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __ARCH_ARM_OMAP_CLOCK_H | 13 | #ifndef __ARCH_ARM_OMAP_CLOCK_H |
14 | #define __ARCH_ARM_OMAP_CLOCK_H | 14 | #define __ARCH_ARM_OMAP_CLOCK_H |
15 | 15 | ||
16 | #include <linux/list.h> | ||
17 | |||
16 | struct module; | 18 | struct module; |
17 | struct clk; | 19 | struct clk; |
18 | struct clockdomain; | 20 | struct clockdomain; |
@@ -148,6 +150,8 @@ extern const struct clkops clkops_null; | |||
148 | #define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */ | 150 | #define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */ |
149 | #define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */ | 151 | #define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */ |
150 | #define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */ | 152 | #define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */ |
153 | #define CLOCK_IN_OMAP4430 (1 << 13) | ||
154 | #define ALWAYS_ENABLED (1 << 14) | ||
151 | /* bits 13-31 are currently free */ | 155 | /* bits 13-31 are currently free */ |
152 | 156 | ||
153 | /* Clksel_rate flags */ | 157 | /* Clksel_rate flags */ |
@@ -156,6 +160,7 @@ extern const struct clkops clkops_null; | |||
156 | #define RATE_IN_243X (1 << 2) | 160 | #define RATE_IN_243X (1 << 2) |
157 | #define RATE_IN_343X (1 << 3) /* rates common to all 343X */ | 161 | #define RATE_IN_343X (1 << 3) /* rates common to all 343X */ |
158 | #define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */ | 162 | #define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */ |
163 | #define RATE_IN_4430 (1 << 5) | ||
159 | 164 | ||
160 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) | 165 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) |
161 | 166 | ||
diff --git a/arch/arm/plat-omap/include/mach/clockdomain.h b/arch/arm/plat-omap/include/plat/clockdomain.h index 99ebd886f134..eb734826e64e 100644 --- a/arch/arm/plat-omap/include/mach/clockdomain.h +++ b/arch/arm/plat-omap/include/plat/clockdomain.h | |||
@@ -16,9 +16,9 @@ | |||
16 | #ifndef __ASM_ARM_ARCH_OMAP_CLOCKDOMAIN_H | 16 | #ifndef __ASM_ARM_ARCH_OMAP_CLOCKDOMAIN_H |
17 | #define __ASM_ARM_ARCH_OMAP_CLOCKDOMAIN_H | 17 | #define __ASM_ARM_ARCH_OMAP_CLOCKDOMAIN_H |
18 | 18 | ||
19 | #include <mach/powerdomain.h> | 19 | #include <plat/powerdomain.h> |
20 | #include <mach/clock.h> | 20 | #include <plat/clock.h> |
21 | #include <mach/cpu.h> | 21 | #include <plat/cpu.h> |
22 | 22 | ||
23 | /* Clockdomain capability flags */ | 23 | /* Clockdomain capability flags */ |
24 | #define CLKDM_CAN_FORCE_SLEEP (1 << 0) | 24 | #define CLKDM_CAN_FORCE_SLEEP (1 << 0) |
diff --git a/arch/arm/plat-omap/include/mach/common.h b/arch/arm/plat-omap/include/plat/common.h index fdeab421b4dc..32c22272425d 100644 --- a/arch/arm/plat-omap/include/mach/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -27,24 +27,15 @@ | |||
27 | #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H | 27 | #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H |
28 | #define __ARCH_ARM_MACH_OMAP_COMMON_H | 28 | #define __ARCH_ARM_MACH_OMAP_COMMON_H |
29 | 29 | ||
30 | #include <linux/i2c.h> | 30 | #include <plat/i2c.h> |
31 | 31 | ||
32 | struct sys_timer; | 32 | struct sys_timer; |
33 | 33 | ||
34 | /* used by omap-smp.c and board-4430sdp.c */ | ||
35 | extern void __iomem *gic_cpu_base_addr; | ||
36 | |||
34 | extern void omap_map_common_io(void); | 37 | extern void omap_map_common_io(void); |
35 | extern struct sys_timer omap_timer; | 38 | extern struct sys_timer omap_timer; |
36 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) | ||
37 | extern int omap_register_i2c_bus(int bus_id, u32 clkrate, | ||
38 | struct i2c_board_info const *info, | ||
39 | unsigned len); | ||
40 | #else | ||
41 | static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, | ||
42 | struct i2c_board_info const *info, | ||
43 | unsigned len) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
47 | #endif | ||
48 | 39 | ||
49 | /* IO bases for various OMAP processors */ | 40 | /* IO bases for various OMAP processors */ |
50 | struct omap_globals { | 41 | struct omap_globals { |
@@ -55,6 +46,7 @@ struct omap_globals { | |||
55 | void __iomem *ctrl; /* System Control Module */ | 46 | void __iomem *ctrl; /* System Control Module */ |
56 | void __iomem *prm; /* Power and Reset Management */ | 47 | void __iomem *prm; /* Power and Reset Management */ |
57 | void __iomem *cm; /* Clock Management */ | 48 | void __iomem *cm; /* Clock Management */ |
49 | void __iomem *cm2; | ||
58 | }; | 50 | }; |
59 | 51 | ||
60 | void omap2_set_globals_242x(void); | 52 | void omap2_set_globals_242x(void); |
@@ -68,4 +60,24 @@ void omap2_set_globals_sdrc(struct omap_globals *); | |||
68 | void omap2_set_globals_control(struct omap_globals *); | 60 | void omap2_set_globals_control(struct omap_globals *); |
69 | void omap2_set_globals_prcm(struct omap_globals *); | 61 | void omap2_set_globals_prcm(struct omap_globals *); |
70 | 62 | ||
63 | /** | ||
64 | * omap_test_timeout - busy-loop, testing a condition | ||
65 | * @cond: condition to test until it evaluates to true | ||
66 | * @timeout: maximum number of microseconds in the timeout | ||
67 | * @index: loop index (integer) | ||
68 | * | ||
69 | * Loop waiting for @cond to become true or until at least @timeout | ||
70 | * microseconds have passed. To use, define some integer @index in the | ||
71 | * calling code. After running, if @index == @timeout, then the loop has | ||
72 | * timed out. | ||
73 | */ | ||
74 | #define omap_test_timeout(cond, timeout, index) \ | ||
75 | ({ \ | ||
76 | for (index = 0; index < timeout; index++) { \ | ||
77 | if (cond) \ | ||
78 | break; \ | ||
79 | udelay(1); \ | ||
80 | } \ | ||
81 | }) | ||
82 | |||
71 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ | 83 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ |
diff --git a/arch/arm/plat-omap/include/mach/control.h b/arch/arm/plat-omap/include/plat/control.h index 826d317cdbec..2ae884378638 100644 --- a/arch/arm/plat-omap/include/mach/control.h +++ b/arch/arm/plat-omap/include/plat/control.h | |||
@@ -20,15 +20,18 @@ | |||
20 | 20 | ||
21 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
22 | #define OMAP242X_CTRL_REGADDR(reg) \ | 22 | #define OMAP242X_CTRL_REGADDR(reg) \ |
23 | OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) | 23 | OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) |
24 | #define OMAP243X_CTRL_REGADDR(reg) \ | 24 | #define OMAP243X_CTRL_REGADDR(reg) \ |
25 | OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | 25 | OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) |
26 | #define OMAP343X_CTRL_REGADDR(reg) \ | 26 | #define OMAP343X_CTRL_REGADDR(reg) \ |
27 | OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | 27 | OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) |
28 | #else | 28 | #else |
29 | #define OMAP242X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) | 29 | #define OMAP242X_CTRL_REGADDR(reg) \ |
30 | #define OMAP243X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | 30 | OMAP2_L4_IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) |
31 | #define OMAP343X_CTRL_REGADDR(reg) OMAP2_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | 31 | #define OMAP243X_CTRL_REGADDR(reg) \ |
32 | OMAP2_L4_IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | ||
33 | #define OMAP343X_CTRL_REGADDR(reg) \ | ||
34 | OMAP2_L4_IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | ||
32 | #endif /* __ASSEMBLY__ */ | 35 | #endif /* __ASSEMBLY__ */ |
33 | 36 | ||
34 | /* | 37 | /* |
@@ -109,6 +112,8 @@ | |||
109 | #define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0) | 112 | #define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0) |
110 | #define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4) | 113 | #define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4) |
111 | 114 | ||
115 | #define OMAP343X_CONTROL_PADCONF_SYSNIRQ (OMAP2_CONTROL_INTERFACE + 0x01b0) | ||
116 | |||
112 | /* 34xx-only CONTROL_GENERAL register offsets */ | 117 | /* 34xx-only CONTROL_GENERAL register offsets */ |
113 | #define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000) | 118 | #define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000) |
114 | #define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008) | 119 | #define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008) |
@@ -141,8 +146,51 @@ | |||
141 | #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) | 146 | #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) |
142 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | 147 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) |
143 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | 148 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) |
144 | #define OMAP343X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x02b0) | 149 | #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ |
145 | #define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02b4) | 150 | + ((i) >> 1) * 4 + (!(i) & 1) * 2) |
151 | #define OMAP343X_CONTROL_PROG_IO0 (OMAP2_CONTROL_GENERAL + 0x01D4) | ||
152 | #define OMAP343X_CONTROL_PROG_IO1 (OMAP2_CONTROL_GENERAL + 0x01D8) | ||
153 | #define OMAP343X_CONTROL_DSS_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E0) | ||
154 | #define OMAP343X_CONTROL_CORE_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E4) | ||
155 | #define OMAP343X_CONTROL_PER_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01E8) | ||
156 | #define OMAP343X_CONTROL_USBHOST_DPLL_SPREADING (OMAP2_CONTROL_GENERAL + 0x01EC) | ||
157 | #define OMAP343X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x02B0) | ||
158 | #define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02B4) | ||
159 | #define OMAP343X_CONTROL_SRAMLDO4 (OMAP2_CONTROL_GENERAL + 0x02B8) | ||
160 | #define OMAP343X_CONTROL_SRAMLDO5 (OMAP2_CONTROL_GENERAL + 0x02C0) | ||
161 | #define OMAP343X_CONTROL_CSI (OMAP2_CONTROL_GENERAL + 0x02C4) | ||
162 | |||
163 | |||
164 | /* 34xx PADCONF register offsets */ | ||
165 | #define OMAP343X_PADCONF_ETK(i) (OMAP2_CONTROL_PADCONFS + 0x5a8 + \ | ||
166 | (i)*2) | ||
167 | #define OMAP343X_PADCONF_ETK_CLK OMAP343X_PADCONF_ETK(0) | ||
168 | #define OMAP343X_PADCONF_ETK_CTL OMAP343X_PADCONF_ETK(1) | ||
169 | #define OMAP343X_PADCONF_ETK_D0 OMAP343X_PADCONF_ETK(2) | ||
170 | #define OMAP343X_PADCONF_ETK_D1 OMAP343X_PADCONF_ETK(3) | ||
171 | #define OMAP343X_PADCONF_ETK_D2 OMAP343X_PADCONF_ETK(4) | ||
172 | #define OMAP343X_PADCONF_ETK_D3 OMAP343X_PADCONF_ETK(5) | ||
173 | #define OMAP343X_PADCONF_ETK_D4 OMAP343X_PADCONF_ETK(6) | ||
174 | #define OMAP343X_PADCONF_ETK_D5 OMAP343X_PADCONF_ETK(7) | ||
175 | #define OMAP343X_PADCONF_ETK_D6 OMAP343X_PADCONF_ETK(8) | ||
176 | #define OMAP343X_PADCONF_ETK_D7 OMAP343X_PADCONF_ETK(9) | ||
177 | #define OMAP343X_PADCONF_ETK_D8 OMAP343X_PADCONF_ETK(10) | ||
178 | #define OMAP343X_PADCONF_ETK_D9 OMAP343X_PADCONF_ETK(11) | ||
179 | #define OMAP343X_PADCONF_ETK_D10 OMAP343X_PADCONF_ETK(12) | ||
180 | #define OMAP343X_PADCONF_ETK_D11 OMAP343X_PADCONF_ETK(13) | ||
181 | #define OMAP343X_PADCONF_ETK_D12 OMAP343X_PADCONF_ETK(14) | ||
182 | #define OMAP343X_PADCONF_ETK_D13 OMAP343X_PADCONF_ETK(15) | ||
183 | #define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16) | ||
184 | #define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17) | ||
185 | |||
186 | /* 34xx GENERAL_WKUP regist offsets */ | ||
187 | #define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \ | ||
188 | 0x008 + (i)) | ||
189 | #define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008) | ||
190 | #define OMAP343X_CONTROL_WKUP_DEBOBS1 (OMAP343X_CONTROL_GENERAL_WKUP + 0x00C) | ||
191 | #define OMAP343X_CONTROL_WKUP_DEBOBS2 (OMAP343X_CONTROL_GENERAL_WKUP + 0x010) | ||
192 | #define OMAP343X_CONTROL_WKUP_DEBOBS3 (OMAP343X_CONTROL_GENERAL_WKUP + 0x014) | ||
193 | #define OMAP343X_CONTROL_WKUP_DEBOBS4 (OMAP343X_CONTROL_GENERAL_WKUP + 0x018) | ||
146 | 194 | ||
147 | /* 34xx D2D idle-related pins, handled by PM core */ | 195 | /* 34xx D2D idle-related pins, handled by PM core */ |
148 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 | 196 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 |
@@ -193,6 +241,9 @@ | |||
193 | #define OMAP2_PBIASLITEPWRDNZ0 (1 << 1) | 241 | #define OMAP2_PBIASLITEPWRDNZ0 (1 << 1) |
194 | #define OMAP2_PBIASLITEVMODE0 (1 << 0) | 242 | #define OMAP2_PBIASLITEVMODE0 (1 << 0) |
195 | 243 | ||
244 | /* CONTROL_PROG_IO1 bits */ | ||
245 | #define OMAP3630_PRG_SDMMC1_SPEEDCTRL (1 << 20) | ||
246 | |||
196 | /* CONTROL_IVA2_BOOTMOD bits */ | 247 | /* CONTROL_IVA2_BOOTMOD bits */ |
197 | #define OMAP3_IVA2_BOOTMOD_SHIFT 0 | 248 | #define OMAP3_IVA2_BOOTMOD_SHIFT 0 |
198 | #define OMAP3_IVA2_BOOTMOD_MASK (0xf << 0) | 249 | #define OMAP3_IVA2_BOOTMOD_MASK (0xf << 0) |
@@ -202,6 +253,44 @@ | |||
202 | #define OMAP3_PADCONF_WAKEUPEVENT0 (1 << 15) | 253 | #define OMAP3_PADCONF_WAKEUPEVENT0 (1 << 15) |
203 | #define OMAP3_PADCONF_WAKEUPENABLE0 (1 << 14) | 254 | #define OMAP3_PADCONF_WAKEUPENABLE0 (1 << 14) |
204 | 255 | ||
256 | #define OMAP343X_SCRATCHPAD_ROM (OMAP343X_CTRL_BASE + 0x860) | ||
257 | #define OMAP343X_SCRATCHPAD (OMAP343X_CTRL_BASE + 0x910) | ||
258 | #define OMAP343X_SCRATCHPAD_ROM_OFFSET 0x19C | ||
259 | |||
260 | /* | ||
261 | * CONTROL OMAP STATUS register to identify OMAP3 features | ||
262 | */ | ||
263 | #define OMAP3_CONTROL_OMAP_STATUS 0x044c | ||
264 | |||
265 | #define OMAP3_SGX_SHIFT 13 | ||
266 | #define OMAP3_SGX_MASK (3 << OMAP3_SGX_SHIFT) | ||
267 | #define FEAT_SGX_FULL 0 | ||
268 | #define FEAT_SGX_HALF 1 | ||
269 | #define FEAT_SGX_NONE 2 | ||
270 | |||
271 | #define OMAP3_IVA_SHIFT 12 | ||
272 | #define OMAP3_IVA_MASK (1 << OMAP3_SGX_SHIFT) | ||
273 | #define FEAT_IVA 0 | ||
274 | #define FEAT_IVA_NONE 1 | ||
275 | |||
276 | #define OMAP3_L2CACHE_SHIFT 10 | ||
277 | #define OMAP3_L2CACHE_MASK (3 << OMAP3_L2CACHE_SHIFT) | ||
278 | #define FEAT_L2CACHE_NONE 0 | ||
279 | #define FEAT_L2CACHE_64KB 1 | ||
280 | #define FEAT_L2CACHE_128KB 2 | ||
281 | #define FEAT_L2CACHE_256KB 3 | ||
282 | |||
283 | #define OMAP3_ISP_SHIFT 5 | ||
284 | #define OMAP3_ISP_MASK (1<< OMAP3_ISP_SHIFT) | ||
285 | #define FEAT_ISP 0 | ||
286 | #define FEAT_ISP_NONE 1 | ||
287 | |||
288 | #define OMAP3_NEON_SHIFT 4 | ||
289 | #define OMAP3_NEON_MASK (1<< OMAP3_NEON_SHIFT) | ||
290 | #define FEAT_NEON 0 | ||
291 | #define FEAT_NEON_NONE 1 | ||
292 | |||
293 | |||
205 | #ifndef __ASSEMBLY__ | 294 | #ifndef __ASSEMBLY__ |
206 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ | 295 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ |
207 | defined(CONFIG_ARCH_OMAP4) | 296 | defined(CONFIG_ARCH_OMAP4) |
@@ -212,6 +301,15 @@ extern u32 omap_ctrl_readl(u16 offset); | |||
212 | extern void omap_ctrl_writeb(u8 val, u16 offset); | 301 | extern void omap_ctrl_writeb(u8 val, u16 offset); |
213 | extern void omap_ctrl_writew(u16 val, u16 offset); | 302 | extern void omap_ctrl_writew(u16 val, u16 offset); |
214 | extern void omap_ctrl_writel(u32 val, u16 offset); | 303 | extern void omap_ctrl_writel(u32 val, u16 offset); |
304 | |||
305 | extern void omap3_save_scratchpad_contents(void); | ||
306 | extern void omap3_clear_scratchpad_contents(void); | ||
307 | extern u32 *get_restore_pointer(void); | ||
308 | extern u32 *get_es3_restore_pointer(void); | ||
309 | extern u32 omap3_arm_context[128]; | ||
310 | extern void omap3_control_save_context(void); | ||
311 | extern void omap3_control_restore_context(void); | ||
312 | |||
215 | #else | 313 | #else |
216 | #define omap_ctrl_base_get() 0 | 314 | #define omap_ctrl_base_get() 0 |
217 | #define omap_ctrl_readb(x) 0 | 315 | #define omap_ctrl_readb(x) 0 |
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index f129efb3075e..9a028bdebb06 100644 --- a/arch/arm/plat-omap/include/mach/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #ifndef __ASM_ARCH_OMAP_CPU_H | 30 | #ifndef __ASM_ARCH_OMAP_CPU_H |
31 | #define __ASM_ARCH_OMAP_CPU_H | 31 | #define __ASM_ARCH_OMAP_CPU_H |
32 | 32 | ||
33 | #include <linux/bitops.h> | ||
34 | |||
33 | /* | 35 | /* |
34 | * Omap device type i.e. EMU/HS/TST/GP/BAD | 36 | * Omap device type i.e. EMU/HS/TST/GP/BAD |
35 | */ | 37 | */ |
@@ -57,6 +59,23 @@ struct omap_chip_id { | |||
57 | unsigned int omap_rev(void); | 59 | unsigned int omap_rev(void); |
58 | 60 | ||
59 | /* | 61 | /* |
62 | * Define CPU revision bits | ||
63 | * | ||
64 | * Verbose meaning of the revision bits may be different for a silicon | ||
65 | * family. This difference can be handled separately. | ||
66 | */ | ||
67 | #define OMAP_REVBITS_00 0x00 | ||
68 | #define OMAP_REVBITS_10 0x10 | ||
69 | #define OMAP_REVBITS_20 0x20 | ||
70 | #define OMAP_REVBITS_30 0x30 | ||
71 | #define OMAP_REVBITS_40 0x40 | ||
72 | |||
73 | /* | ||
74 | * Get the CPU revision for OMAP devices | ||
75 | */ | ||
76 | #define GET_OMAP_REVISION() ((omap_rev() >> 8) & 0xff) | ||
77 | |||
78 | /* | ||
60 | * Test if multicore OMAP support is needed | 79 | * Test if multicore OMAP support is needed |
61 | */ | 80 | */ |
62 | #undef MULTI_OMAP1 | 81 | #undef MULTI_OMAP1 |
@@ -157,10 +176,13 @@ IS_OMAP_CLASS(15xx, 0x15) | |||
157 | IS_OMAP_CLASS(16xx, 0x16) | 176 | IS_OMAP_CLASS(16xx, 0x16) |
158 | IS_OMAP_CLASS(24xx, 0x24) | 177 | IS_OMAP_CLASS(24xx, 0x24) |
159 | IS_OMAP_CLASS(34xx, 0x34) | 178 | IS_OMAP_CLASS(34xx, 0x34) |
179 | IS_OMAP_CLASS(44xx, 0x44) | ||
160 | 180 | ||
161 | IS_OMAP_SUBCLASS(242x, 0x242) | 181 | IS_OMAP_SUBCLASS(242x, 0x242) |
162 | IS_OMAP_SUBCLASS(243x, 0x243) | 182 | IS_OMAP_SUBCLASS(243x, 0x243) |
163 | IS_OMAP_SUBCLASS(343x, 0x343) | 183 | IS_OMAP_SUBCLASS(343x, 0x343) |
184 | IS_OMAP_SUBCLASS(363x, 0x363) | ||
185 | IS_OMAP_SUBCLASS(443x, 0x443) | ||
164 | 186 | ||
165 | #define cpu_is_omap7xx() 0 | 187 | #define cpu_is_omap7xx() 0 |
166 | #define cpu_is_omap15xx() 0 | 188 | #define cpu_is_omap15xx() 0 |
@@ -264,6 +286,8 @@ IS_OMAP_SUBCLASS(343x, 0x343) | |||
264 | * cpu_is_omap2423(): True for OMAP2423 | 286 | * cpu_is_omap2423(): True for OMAP2423 |
265 | * cpu_is_omap2430(): True for OMAP2430 | 287 | * cpu_is_omap2430(): True for OMAP2430 |
266 | * cpu_is_omap3430(): True for OMAP3430 | 288 | * cpu_is_omap3430(): True for OMAP3430 |
289 | * cpu_is_omap3505(): True for OMAP3505 | ||
290 | * cpu_is_omap3517(): True for OMAP3517 | ||
267 | */ | 291 | */ |
268 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) | 292 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) |
269 | 293 | ||
@@ -287,6 +311,8 @@ IS_OMAP_TYPE(2422, 0x2422) | |||
287 | IS_OMAP_TYPE(2423, 0x2423) | 311 | IS_OMAP_TYPE(2423, 0x2423) |
288 | IS_OMAP_TYPE(2430, 0x2430) | 312 | IS_OMAP_TYPE(2430, 0x2430) |
289 | IS_OMAP_TYPE(3430, 0x3430) | 313 | IS_OMAP_TYPE(3430, 0x3430) |
314 | IS_OMAP_TYPE(3505, 0x3505) | ||
315 | IS_OMAP_TYPE(3517, 0x3517) | ||
290 | 316 | ||
291 | #define cpu_is_omap310() 0 | 317 | #define cpu_is_omap310() 0 |
292 | #define cpu_is_omap730() 0 | 318 | #define cpu_is_omap730() 0 |
@@ -301,7 +327,14 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
301 | #define cpu_is_omap2422() 0 | 327 | #define cpu_is_omap2422() 0 |
302 | #define cpu_is_omap2423() 0 | 328 | #define cpu_is_omap2423() 0 |
303 | #define cpu_is_omap2430() 0 | 329 | #define cpu_is_omap2430() 0 |
330 | #define cpu_is_omap3503() 0 | ||
331 | #define cpu_is_omap3515() 0 | ||
332 | #define cpu_is_omap3525() 0 | ||
333 | #define cpu_is_omap3530() 0 | ||
334 | #define cpu_is_omap3505() 0 | ||
335 | #define cpu_is_omap3517() 0 | ||
304 | #define cpu_is_omap3430() 0 | 336 | #define cpu_is_omap3430() 0 |
337 | #define cpu_is_omap3630() 0 | ||
305 | 338 | ||
306 | /* | 339 | /* |
307 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish | 340 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish |
@@ -351,14 +384,34 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
351 | 384 | ||
352 | #if defined(CONFIG_ARCH_OMAP34XX) | 385 | #if defined(CONFIG_ARCH_OMAP34XX) |
353 | # undef cpu_is_omap3430 | 386 | # undef cpu_is_omap3430 |
387 | # undef cpu_is_omap3503 | ||
388 | # undef cpu_is_omap3515 | ||
389 | # undef cpu_is_omap3525 | ||
390 | # undef cpu_is_omap3530 | ||
391 | # undef cpu_is_omap3505 | ||
392 | # undef cpu_is_omap3517 | ||
354 | # define cpu_is_omap3430() is_omap3430() | 393 | # define cpu_is_omap3430() is_omap3430() |
394 | # define cpu_is_omap3503() (cpu_is_omap3430() && \ | ||
395 | (!omap3_has_iva()) && \ | ||
396 | (!omap3_has_sgx())) | ||
397 | # define cpu_is_omap3515() (cpu_is_omap3430() && \ | ||
398 | (!omap3_has_iva()) && \ | ||
399 | (omap3_has_sgx())) | ||
400 | # define cpu_is_omap3525() (cpu_is_omap3430() && \ | ||
401 | (!omap3_has_sgx()) && \ | ||
402 | (omap3_has_iva())) | ||
403 | # define cpu_is_omap3530() (cpu_is_omap3430()) | ||
404 | # define cpu_is_omap3505() is_omap3505() | ||
405 | # define cpu_is_omap3517() is_omap3517() | ||
406 | # undef cpu_is_omap3630 | ||
407 | # define cpu_is_omap3630() is_omap363x() | ||
355 | #endif | 408 | #endif |
356 | 409 | ||
357 | # if defined(CONFIG_ARCH_OMAP4) | 410 | # if defined(CONFIG_ARCH_OMAP4) |
358 | # undef cpu_is_omap44xx | 411 | # undef cpu_is_omap44xx |
359 | # undef cpu_is_omap443x | 412 | # undef cpu_is_omap443x |
360 | # define cpu_is_omap44xx() 1 | 413 | # define cpu_is_omap44xx() is_omap44xx() |
361 | # define cpu_is_omap443x() 1 | 414 | # define cpu_is_omap443x() is_omap443x() |
362 | # endif | 415 | # endif |
363 | 416 | ||
364 | /* Macros to detect if we have OMAP1 or OMAP2 */ | 417 | /* Macros to detect if we have OMAP1 or OMAP2 */ |
@@ -382,7 +435,18 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
382 | #define OMAP3430_REV_ES3_0 0x34303034 | 435 | #define OMAP3430_REV_ES3_0 0x34303034 |
383 | #define OMAP3430_REV_ES3_1 0x34304034 | 436 | #define OMAP3430_REV_ES3_1 0x34304034 |
384 | 437 | ||
385 | #define OMAP443X_CLASS 0x44300034 | 438 | #define OMAP3630_REV_ES1_0 0x36300034 |
439 | |||
440 | #define OMAP35XX_CLASS 0x35000034 | ||
441 | #define OMAP3503_REV(v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8)) | ||
442 | #define OMAP3515_REV(v) (OMAP35XX_CLASS | (0x3515 << 16) | (v << 8)) | ||
443 | #define OMAP3525_REV(v) (OMAP35XX_CLASS | (0x3525 << 16) | (v << 8)) | ||
444 | #define OMAP3530_REV(v) (OMAP35XX_CLASS | (0x3530 << 16) | (v << 8)) | ||
445 | #define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8)) | ||
446 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) | ||
447 | |||
448 | #define OMAP443X_CLASS 0x44300044 | ||
449 | #define OMAP4430_REV_ES1_0 0x44300044 | ||
386 | 450 | ||
387 | /* | 451 | /* |
388 | * omap_chip bits | 452 | * omap_chip bits |
@@ -405,6 +469,7 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
405 | #define CHIP_IS_OMAP3430ES2 (1 << 4) | 469 | #define CHIP_IS_OMAP3430ES2 (1 << 4) |
406 | #define CHIP_IS_OMAP3430ES3_0 (1 << 5) | 470 | #define CHIP_IS_OMAP3430ES3_0 (1 << 5) |
407 | #define CHIP_IS_OMAP3430ES3_1 (1 << 6) | 471 | #define CHIP_IS_OMAP3430ES3_1 (1 << 6) |
472 | #define CHIP_IS_OMAP3630ES1 (1 << 7) | ||
408 | 473 | ||
409 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | 474 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) |
410 | 475 | ||
@@ -416,11 +481,36 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
416 | */ | 481 | */ |
417 | #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \ | 482 | #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \ |
418 | CHIP_IS_OMAP3430ES3_0 | \ | 483 | CHIP_IS_OMAP3430ES3_0 | \ |
419 | CHIP_IS_OMAP3430ES3_1) | 484 | CHIP_IS_OMAP3430ES3_1 | \ |
420 | #define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1) | 485 | CHIP_IS_OMAP3630ES1) |
486 | #define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \ | ||
487 | CHIP_IS_OMAP3630ES1) | ||
421 | 488 | ||
422 | 489 | ||
423 | int omap_chip_is(struct omap_chip_id oci); | 490 | int omap_chip_is(struct omap_chip_id oci); |
424 | void omap2_check_revision(void); | 491 | void omap2_check_revision(void); |
425 | 492 | ||
493 | /* | ||
494 | * Runtime detection of OMAP3 features | ||
495 | */ | ||
496 | extern u32 omap3_features; | ||
497 | |||
498 | #define OMAP3_HAS_L2CACHE BIT(0) | ||
499 | #define OMAP3_HAS_IVA BIT(1) | ||
500 | #define OMAP3_HAS_SGX BIT(2) | ||
501 | #define OMAP3_HAS_NEON BIT(3) | ||
502 | #define OMAP3_HAS_ISP BIT(4) | ||
503 | |||
504 | #define OMAP3_HAS_FEATURE(feat,flag) \ | ||
505 | static inline unsigned int omap3_has_ ##feat(void) \ | ||
506 | { \ | ||
507 | return (omap3_features & OMAP3_HAS_ ##flag); \ | ||
508 | } \ | ||
509 | |||
510 | OMAP3_HAS_FEATURE(l2cache, L2CACHE) | ||
511 | OMAP3_HAS_FEATURE(sgx, SGX) | ||
512 | OMAP3_HAS_FEATURE(iva, IVA) | ||
513 | OMAP3_HAS_FEATURE(neon, NEON) | ||
514 | OMAP3_HAS_FEATURE(isp, ISP) | ||
515 | |||
426 | #endif | 516 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h new file mode 100644 index 000000000000..c66e464732df --- /dev/null +++ b/arch/arm/plat-omap/include/plat/display.h | |||
@@ -0,0 +1,575 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/display.h | ||
3 | * | ||
4 | * Copyright (C) 2008 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along with | ||
17 | * this program. If not, see <http://www.gnu.org/licenses/>. | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_OMAP_DISPLAY_H | ||
21 | #define __ASM_ARCH_OMAP_DISPLAY_H | ||
22 | |||
23 | #include <linux/list.h> | ||
24 | #include <linux/kobject.h> | ||
25 | #include <linux/device.h> | ||
26 | #include <asm/atomic.h> | ||
27 | |||
28 | #define DISPC_IRQ_FRAMEDONE (1 << 0) | ||
29 | #define DISPC_IRQ_VSYNC (1 << 1) | ||
30 | #define DISPC_IRQ_EVSYNC_EVEN (1 << 2) | ||
31 | #define DISPC_IRQ_EVSYNC_ODD (1 << 3) | ||
32 | #define DISPC_IRQ_ACBIAS_COUNT_STAT (1 << 4) | ||
33 | #define DISPC_IRQ_PROG_LINE_NUM (1 << 5) | ||
34 | #define DISPC_IRQ_GFX_FIFO_UNDERFLOW (1 << 6) | ||
35 | #define DISPC_IRQ_GFX_END_WIN (1 << 7) | ||
36 | #define DISPC_IRQ_PAL_GAMMA_MASK (1 << 8) | ||
37 | #define DISPC_IRQ_OCP_ERR (1 << 9) | ||
38 | #define DISPC_IRQ_VID1_FIFO_UNDERFLOW (1 << 10) | ||
39 | #define DISPC_IRQ_VID1_END_WIN (1 << 11) | ||
40 | #define DISPC_IRQ_VID2_FIFO_UNDERFLOW (1 << 12) | ||
41 | #define DISPC_IRQ_VID2_END_WIN (1 << 13) | ||
42 | #define DISPC_IRQ_SYNC_LOST (1 << 14) | ||
43 | #define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15) | ||
44 | #define DISPC_IRQ_WAKEUP (1 << 16) | ||
45 | |||
46 | struct omap_dss_device; | ||
47 | struct omap_overlay_manager; | ||
48 | |||
49 | enum omap_display_type { | ||
50 | OMAP_DISPLAY_TYPE_NONE = 0, | ||
51 | OMAP_DISPLAY_TYPE_DPI = 1 << 0, | ||
52 | OMAP_DISPLAY_TYPE_DBI = 1 << 1, | ||
53 | OMAP_DISPLAY_TYPE_SDI = 1 << 2, | ||
54 | OMAP_DISPLAY_TYPE_DSI = 1 << 3, | ||
55 | OMAP_DISPLAY_TYPE_VENC = 1 << 4, | ||
56 | }; | ||
57 | |||
58 | enum omap_plane { | ||
59 | OMAP_DSS_GFX = 0, | ||
60 | OMAP_DSS_VIDEO1 = 1, | ||
61 | OMAP_DSS_VIDEO2 = 2 | ||
62 | }; | ||
63 | |||
64 | enum omap_channel { | ||
65 | OMAP_DSS_CHANNEL_LCD = 0, | ||
66 | OMAP_DSS_CHANNEL_DIGIT = 1, | ||
67 | }; | ||
68 | |||
69 | enum omap_color_mode { | ||
70 | OMAP_DSS_COLOR_CLUT1 = 1 << 0, /* BITMAP 1 */ | ||
71 | OMAP_DSS_COLOR_CLUT2 = 1 << 1, /* BITMAP 2 */ | ||
72 | OMAP_DSS_COLOR_CLUT4 = 1 << 2, /* BITMAP 4 */ | ||
73 | OMAP_DSS_COLOR_CLUT8 = 1 << 3, /* BITMAP 8 */ | ||
74 | OMAP_DSS_COLOR_RGB12U = 1 << 4, /* RGB12, 16-bit container */ | ||
75 | OMAP_DSS_COLOR_ARGB16 = 1 << 5, /* ARGB16 */ | ||
76 | OMAP_DSS_COLOR_RGB16 = 1 << 6, /* RGB16 */ | ||
77 | OMAP_DSS_COLOR_RGB24U = 1 << 7, /* RGB24, 32-bit container */ | ||
78 | OMAP_DSS_COLOR_RGB24P = 1 << 8, /* RGB24, 24-bit container */ | ||
79 | OMAP_DSS_COLOR_YUV2 = 1 << 9, /* YUV2 4:2:2 co-sited */ | ||
80 | OMAP_DSS_COLOR_UYVY = 1 << 10, /* UYVY 4:2:2 co-sited */ | ||
81 | OMAP_DSS_COLOR_ARGB32 = 1 << 11, /* ARGB32 */ | ||
82 | OMAP_DSS_COLOR_RGBA32 = 1 << 12, /* RGBA32 */ | ||
83 | OMAP_DSS_COLOR_RGBX32 = 1 << 13, /* RGBx32 */ | ||
84 | |||
85 | OMAP_DSS_COLOR_GFX_OMAP2 = | ||
86 | OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 | | ||
87 | OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 | | ||
88 | OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 | | ||
89 | OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P, | ||
90 | |||
91 | OMAP_DSS_COLOR_VID_OMAP2 = | ||
92 | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | | ||
93 | OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 | | ||
94 | OMAP_DSS_COLOR_UYVY, | ||
95 | |||
96 | OMAP_DSS_COLOR_GFX_OMAP3 = | ||
97 | OMAP_DSS_COLOR_CLUT1 | OMAP_DSS_COLOR_CLUT2 | | ||
98 | OMAP_DSS_COLOR_CLUT4 | OMAP_DSS_COLOR_CLUT8 | | ||
99 | OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 | | ||
100 | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | | ||
101 | OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_ARGB32 | | ||
102 | OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32, | ||
103 | |||
104 | OMAP_DSS_COLOR_VID1_OMAP3 = | ||
105 | OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_RGB16 | | ||
106 | OMAP_DSS_COLOR_RGB24U | OMAP_DSS_COLOR_RGB24P | | ||
107 | OMAP_DSS_COLOR_YUV2 | OMAP_DSS_COLOR_UYVY, | ||
108 | |||
109 | OMAP_DSS_COLOR_VID2_OMAP3 = | ||
110 | OMAP_DSS_COLOR_RGB12U | OMAP_DSS_COLOR_ARGB16 | | ||
111 | OMAP_DSS_COLOR_RGB16 | OMAP_DSS_COLOR_RGB24U | | ||
112 | OMAP_DSS_COLOR_RGB24P | OMAP_DSS_COLOR_YUV2 | | ||
113 | OMAP_DSS_COLOR_UYVY | OMAP_DSS_COLOR_ARGB32 | | ||
114 | OMAP_DSS_COLOR_RGBA32 | OMAP_DSS_COLOR_RGBX32, | ||
115 | }; | ||
116 | |||
117 | enum omap_lcd_display_type { | ||
118 | OMAP_DSS_LCD_DISPLAY_STN, | ||
119 | OMAP_DSS_LCD_DISPLAY_TFT, | ||
120 | }; | ||
121 | |||
122 | enum omap_dss_load_mode { | ||
123 | OMAP_DSS_LOAD_CLUT_AND_FRAME = 0, | ||
124 | OMAP_DSS_LOAD_CLUT_ONLY = 1, | ||
125 | OMAP_DSS_LOAD_FRAME_ONLY = 2, | ||
126 | OMAP_DSS_LOAD_CLUT_ONCE_FRAME = 3, | ||
127 | }; | ||
128 | |||
129 | enum omap_dss_trans_key_type { | ||
130 | OMAP_DSS_COLOR_KEY_GFX_DST = 0, | ||
131 | OMAP_DSS_COLOR_KEY_VID_SRC = 1, | ||
132 | }; | ||
133 | |||
134 | enum omap_rfbi_te_mode { | ||
135 | OMAP_DSS_RFBI_TE_MODE_1 = 1, | ||
136 | OMAP_DSS_RFBI_TE_MODE_2 = 2, | ||
137 | }; | ||
138 | |||
139 | enum omap_panel_config { | ||
140 | OMAP_DSS_LCD_IVS = 1<<0, | ||
141 | OMAP_DSS_LCD_IHS = 1<<1, | ||
142 | OMAP_DSS_LCD_IPC = 1<<2, | ||
143 | OMAP_DSS_LCD_IEO = 1<<3, | ||
144 | OMAP_DSS_LCD_RF = 1<<4, | ||
145 | OMAP_DSS_LCD_ONOFF = 1<<5, | ||
146 | |||
147 | OMAP_DSS_LCD_TFT = 1<<20, | ||
148 | }; | ||
149 | |||
150 | enum omap_dss_venc_type { | ||
151 | OMAP_DSS_VENC_TYPE_COMPOSITE, | ||
152 | OMAP_DSS_VENC_TYPE_SVIDEO, | ||
153 | }; | ||
154 | |||
155 | enum omap_display_caps { | ||
156 | OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE = 1 << 0, | ||
157 | OMAP_DSS_DISPLAY_CAP_TEAR_ELIM = 1 << 1, | ||
158 | }; | ||
159 | |||
160 | enum omap_dss_update_mode { | ||
161 | OMAP_DSS_UPDATE_DISABLED = 0, | ||
162 | OMAP_DSS_UPDATE_AUTO, | ||
163 | OMAP_DSS_UPDATE_MANUAL, | ||
164 | }; | ||
165 | |||
166 | enum omap_dss_display_state { | ||
167 | OMAP_DSS_DISPLAY_DISABLED = 0, | ||
168 | OMAP_DSS_DISPLAY_ACTIVE, | ||
169 | OMAP_DSS_DISPLAY_SUSPENDED, | ||
170 | }; | ||
171 | |||
172 | /* XXX perhaps this should be removed */ | ||
173 | enum omap_dss_overlay_managers { | ||
174 | OMAP_DSS_OVL_MGR_LCD, | ||
175 | OMAP_DSS_OVL_MGR_TV, | ||
176 | }; | ||
177 | |||
178 | enum omap_dss_rotation_type { | ||
179 | OMAP_DSS_ROT_DMA = 0, | ||
180 | OMAP_DSS_ROT_VRFB = 1, | ||
181 | }; | ||
182 | |||
183 | /* clockwise rotation angle */ | ||
184 | enum omap_dss_rotation_angle { | ||
185 | OMAP_DSS_ROT_0 = 0, | ||
186 | OMAP_DSS_ROT_90 = 1, | ||
187 | OMAP_DSS_ROT_180 = 2, | ||
188 | OMAP_DSS_ROT_270 = 3, | ||
189 | }; | ||
190 | |||
191 | enum omap_overlay_caps { | ||
192 | OMAP_DSS_OVL_CAP_SCALE = 1 << 0, | ||
193 | OMAP_DSS_OVL_CAP_DISPC = 1 << 1, | ||
194 | }; | ||
195 | |||
196 | enum omap_overlay_manager_caps { | ||
197 | OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, | ||
198 | }; | ||
199 | |||
200 | /* RFBI */ | ||
201 | |||
202 | struct rfbi_timings { | ||
203 | int cs_on_time; | ||
204 | int cs_off_time; | ||
205 | int we_on_time; | ||
206 | int we_off_time; | ||
207 | int re_on_time; | ||
208 | int re_off_time; | ||
209 | int we_cycle_time; | ||
210 | int re_cycle_time; | ||
211 | int cs_pulse_width; | ||
212 | int access_time; | ||
213 | |||
214 | int clk_div; | ||
215 | |||
216 | u32 tim[5]; /* set by rfbi_convert_timings() */ | ||
217 | |||
218 | int converted; | ||
219 | }; | ||
220 | |||
221 | void omap_rfbi_write_command(const void *buf, u32 len); | ||
222 | void omap_rfbi_read_data(void *buf, u32 len); | ||
223 | void omap_rfbi_write_data(const void *buf, u32 len); | ||
224 | void omap_rfbi_write_pixels(const void __iomem *buf, int scr_width, | ||
225 | u16 x, u16 y, | ||
226 | u16 w, u16 h); | ||
227 | int omap_rfbi_enable_te(bool enable, unsigned line); | ||
228 | int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode, | ||
229 | unsigned hs_pulse_time, unsigned vs_pulse_time, | ||
230 | int hs_pol_inv, int vs_pol_inv, int extif_div); | ||
231 | |||
232 | /* DSI */ | ||
233 | void dsi_bus_lock(void); | ||
234 | void dsi_bus_unlock(void); | ||
235 | int dsi_vc_dcs_write(int channel, u8 *data, int len); | ||
236 | int dsi_vc_dcs_write_nosync(int channel, u8 *data, int len); | ||
237 | int dsi_vc_dcs_read(int channel, u8 dcs_cmd, u8 *buf, int buflen); | ||
238 | int dsi_vc_set_max_rx_packet_size(int channel, u16 len); | ||
239 | int dsi_vc_send_null(int channel); | ||
240 | int dsi_vc_send_bta_sync(int channel); | ||
241 | |||
242 | /* Board specific data */ | ||
243 | struct omap_dss_board_info { | ||
244 | int (*get_last_off_on_transaction_id)(struct device *dev); | ||
245 | int num_devices; | ||
246 | struct omap_dss_device **devices; | ||
247 | struct omap_dss_device *default_device; | ||
248 | }; | ||
249 | |||
250 | struct omap_video_timings { | ||
251 | /* Unit: pixels */ | ||
252 | u16 x_res; | ||
253 | /* Unit: pixels */ | ||
254 | u16 y_res; | ||
255 | /* Unit: KHz */ | ||
256 | u32 pixel_clock; | ||
257 | /* Unit: pixel clocks */ | ||
258 | u16 hsw; /* Horizontal synchronization pulse width */ | ||
259 | /* Unit: pixel clocks */ | ||
260 | u16 hfp; /* Horizontal front porch */ | ||
261 | /* Unit: pixel clocks */ | ||
262 | u16 hbp; /* Horizontal back porch */ | ||
263 | /* Unit: line clocks */ | ||
264 | u16 vsw; /* Vertical synchronization pulse width */ | ||
265 | /* Unit: line clocks */ | ||
266 | u16 vfp; /* Vertical front porch */ | ||
267 | /* Unit: line clocks */ | ||
268 | u16 vbp; /* Vertical back porch */ | ||
269 | }; | ||
270 | |||
271 | #ifdef CONFIG_OMAP2_DSS_VENC | ||
272 | /* Hardcoded timings for tv modes. Venc only uses these to | ||
273 | * identify the mode, and does not actually use the configs | ||
274 | * itself. However, the configs should be something that | ||
275 | * a normal monitor can also show */ | ||
276 | const extern struct omap_video_timings omap_dss_pal_timings; | ||
277 | const extern struct omap_video_timings omap_dss_ntsc_timings; | ||
278 | #endif | ||
279 | |||
280 | struct omap_overlay_info { | ||
281 | bool enabled; | ||
282 | |||
283 | u32 paddr; | ||
284 | void __iomem *vaddr; | ||
285 | u16 screen_width; | ||
286 | u16 width; | ||
287 | u16 height; | ||
288 | enum omap_color_mode color_mode; | ||
289 | u8 rotation; | ||
290 | enum omap_dss_rotation_type rotation_type; | ||
291 | bool mirror; | ||
292 | |||
293 | u16 pos_x; | ||
294 | u16 pos_y; | ||
295 | u16 out_width; /* if 0, out_width == width */ | ||
296 | u16 out_height; /* if 0, out_height == height */ | ||
297 | u8 global_alpha; | ||
298 | }; | ||
299 | |||
300 | struct omap_overlay { | ||
301 | struct kobject kobj; | ||
302 | struct list_head list; | ||
303 | |||
304 | /* static fields */ | ||
305 | const char *name; | ||
306 | int id; | ||
307 | enum omap_color_mode supported_modes; | ||
308 | enum omap_overlay_caps caps; | ||
309 | |||
310 | /* dynamic fields */ | ||
311 | struct omap_overlay_manager *manager; | ||
312 | struct omap_overlay_info info; | ||
313 | |||
314 | /* if true, info has been changed, but not applied() yet */ | ||
315 | bool info_dirty; | ||
316 | |||
317 | int (*set_manager)(struct omap_overlay *ovl, | ||
318 | struct omap_overlay_manager *mgr); | ||
319 | int (*unset_manager)(struct omap_overlay *ovl); | ||
320 | |||
321 | int (*set_overlay_info)(struct omap_overlay *ovl, | ||
322 | struct omap_overlay_info *info); | ||
323 | void (*get_overlay_info)(struct omap_overlay *ovl, | ||
324 | struct omap_overlay_info *info); | ||
325 | |||
326 | int (*wait_for_go)(struct omap_overlay *ovl); | ||
327 | }; | ||
328 | |||
329 | struct omap_overlay_manager_info { | ||
330 | u32 default_color; | ||
331 | |||
332 | enum omap_dss_trans_key_type trans_key_type; | ||
333 | u32 trans_key; | ||
334 | bool trans_enabled; | ||
335 | |||
336 | bool alpha_enabled; | ||
337 | }; | ||
338 | |||
339 | struct omap_overlay_manager { | ||
340 | struct kobject kobj; | ||
341 | struct list_head list; | ||
342 | |||
343 | /* static fields */ | ||
344 | const char *name; | ||
345 | int id; | ||
346 | enum omap_overlay_manager_caps caps; | ||
347 | int num_overlays; | ||
348 | struct omap_overlay **overlays; | ||
349 | enum omap_display_type supported_displays; | ||
350 | |||
351 | /* dynamic fields */ | ||
352 | struct omap_dss_device *device; | ||
353 | struct omap_overlay_manager_info info; | ||
354 | |||
355 | bool device_changed; | ||
356 | /* if true, info has been changed but not applied() yet */ | ||
357 | bool info_dirty; | ||
358 | |||
359 | int (*set_device)(struct omap_overlay_manager *mgr, | ||
360 | struct omap_dss_device *dssdev); | ||
361 | int (*unset_device)(struct omap_overlay_manager *mgr); | ||
362 | |||
363 | int (*set_manager_info)(struct omap_overlay_manager *mgr, | ||
364 | struct omap_overlay_manager_info *info); | ||
365 | void (*get_manager_info)(struct omap_overlay_manager *mgr, | ||
366 | struct omap_overlay_manager_info *info); | ||
367 | |||
368 | int (*apply)(struct omap_overlay_manager *mgr); | ||
369 | int (*wait_for_go)(struct omap_overlay_manager *mgr); | ||
370 | }; | ||
371 | |||
372 | struct omap_dss_device { | ||
373 | struct device dev; | ||
374 | |||
375 | enum omap_display_type type; | ||
376 | |||
377 | union { | ||
378 | struct { | ||
379 | u8 data_lines; | ||
380 | } dpi; | ||
381 | |||
382 | struct { | ||
383 | u8 channel; | ||
384 | u8 data_lines; | ||
385 | } rfbi; | ||
386 | |||
387 | struct { | ||
388 | u8 datapairs; | ||
389 | } sdi; | ||
390 | |||
391 | struct { | ||
392 | u8 clk_lane; | ||
393 | u8 clk_pol; | ||
394 | u8 data1_lane; | ||
395 | u8 data1_pol; | ||
396 | u8 data2_lane; | ||
397 | u8 data2_pol; | ||
398 | |||
399 | struct { | ||
400 | u16 regn; | ||
401 | u16 regm; | ||
402 | u16 regm3; | ||
403 | u16 regm4; | ||
404 | |||
405 | u16 lp_clk_div; | ||
406 | |||
407 | u16 lck_div; | ||
408 | u16 pck_div; | ||
409 | } div; | ||
410 | |||
411 | bool ext_te; | ||
412 | u8 ext_te_gpio; | ||
413 | } dsi; | ||
414 | |||
415 | struct { | ||
416 | enum omap_dss_venc_type type; | ||
417 | bool invert_polarity; | ||
418 | } venc; | ||
419 | } phy; | ||
420 | |||
421 | struct { | ||
422 | struct omap_video_timings timings; | ||
423 | |||
424 | int acbi; /* ac-bias pin transitions per interrupt */ | ||
425 | /* Unit: line clocks */ | ||
426 | int acb; /* ac-bias pin frequency */ | ||
427 | |||
428 | enum omap_panel_config config; | ||
429 | |||
430 | u8 recommended_bpp; | ||
431 | |||
432 | struct omap_dss_device *ctrl; | ||
433 | } panel; | ||
434 | |||
435 | struct { | ||
436 | u8 pixel_size; | ||
437 | struct rfbi_timings rfbi_timings; | ||
438 | struct omap_dss_device *panel; | ||
439 | } ctrl; | ||
440 | |||
441 | int reset_gpio; | ||
442 | |||
443 | int max_backlight_level; | ||
444 | |||
445 | const char *name; | ||
446 | |||
447 | /* used to match device to driver */ | ||
448 | const char *driver_name; | ||
449 | |||
450 | void *data; | ||
451 | |||
452 | struct omap_dss_driver *driver; | ||
453 | |||
454 | /* helper variable for driver suspend/resume */ | ||
455 | bool activate_after_resume; | ||
456 | |||
457 | enum omap_display_caps caps; | ||
458 | |||
459 | struct omap_overlay_manager *manager; | ||
460 | |||
461 | enum omap_dss_display_state state; | ||
462 | |||
463 | int (*enable)(struct omap_dss_device *dssdev); | ||
464 | void (*disable)(struct omap_dss_device *dssdev); | ||
465 | |||
466 | int (*suspend)(struct omap_dss_device *dssdev); | ||
467 | int (*resume)(struct omap_dss_device *dssdev); | ||
468 | |||
469 | void (*get_resolution)(struct omap_dss_device *dssdev, | ||
470 | u16 *xres, u16 *yres); | ||
471 | int (*get_recommended_bpp)(struct omap_dss_device *dssdev); | ||
472 | |||
473 | int (*check_timings)(struct omap_dss_device *dssdev, | ||
474 | struct omap_video_timings *timings); | ||
475 | void (*set_timings)(struct omap_dss_device *dssdev, | ||
476 | struct omap_video_timings *timings); | ||
477 | void (*get_timings)(struct omap_dss_device *dssdev, | ||
478 | struct omap_video_timings *timings); | ||
479 | int (*update)(struct omap_dss_device *dssdev, | ||
480 | u16 x, u16 y, u16 w, u16 h); | ||
481 | int (*sync)(struct omap_dss_device *dssdev); | ||
482 | int (*wait_vsync)(struct omap_dss_device *dssdev); | ||
483 | |||
484 | int (*set_update_mode)(struct omap_dss_device *dssdev, | ||
485 | enum omap_dss_update_mode); | ||
486 | enum omap_dss_update_mode (*get_update_mode) | ||
487 | (struct omap_dss_device *dssdev); | ||
488 | |||
489 | int (*enable_te)(struct omap_dss_device *dssdev, bool enable); | ||
490 | int (*get_te)(struct omap_dss_device *dssdev); | ||
491 | |||
492 | u8 (*get_rotate)(struct omap_dss_device *dssdev); | ||
493 | int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate); | ||
494 | |||
495 | bool (*get_mirror)(struct omap_dss_device *dssdev); | ||
496 | int (*set_mirror)(struct omap_dss_device *dssdev, bool enable); | ||
497 | |||
498 | int (*run_test)(struct omap_dss_device *dssdev, int test); | ||
499 | int (*memory_read)(struct omap_dss_device *dssdev, | ||
500 | void *buf, size_t size, | ||
501 | u16 x, u16 y, u16 w, u16 h); | ||
502 | |||
503 | int (*set_wss)(struct omap_dss_device *dssdev, u32 wss); | ||
504 | u32 (*get_wss)(struct omap_dss_device *dssdev); | ||
505 | |||
506 | /* platform specific */ | ||
507 | int (*platform_enable)(struct omap_dss_device *dssdev); | ||
508 | void (*platform_disable)(struct omap_dss_device *dssdev); | ||
509 | int (*set_backlight)(struct omap_dss_device *dssdev, int level); | ||
510 | int (*get_backlight)(struct omap_dss_device *dssdev); | ||
511 | }; | ||
512 | |||
513 | struct omap_dss_driver { | ||
514 | struct device_driver driver; | ||
515 | |||
516 | int (*probe)(struct omap_dss_device *); | ||
517 | void (*remove)(struct omap_dss_device *); | ||
518 | |||
519 | int (*enable)(struct omap_dss_device *display); | ||
520 | void (*disable)(struct omap_dss_device *display); | ||
521 | int (*suspend)(struct omap_dss_device *display); | ||
522 | int (*resume)(struct omap_dss_device *display); | ||
523 | int (*run_test)(struct omap_dss_device *display, int test); | ||
524 | |||
525 | void (*setup_update)(struct omap_dss_device *dssdev, | ||
526 | u16 x, u16 y, u16 w, u16 h); | ||
527 | |||
528 | int (*enable_te)(struct omap_dss_device *dssdev, bool enable); | ||
529 | int (*wait_for_te)(struct omap_dss_device *dssdev); | ||
530 | |||
531 | u8 (*get_rotate)(struct omap_dss_device *dssdev); | ||
532 | int (*set_rotate)(struct omap_dss_device *dssdev, u8 rotate); | ||
533 | |||
534 | bool (*get_mirror)(struct omap_dss_device *dssdev); | ||
535 | int (*set_mirror)(struct omap_dss_device *dssdev, bool enable); | ||
536 | |||
537 | int (*memory_read)(struct omap_dss_device *dssdev, | ||
538 | void *buf, size_t size, | ||
539 | u16 x, u16 y, u16 w, u16 h); | ||
540 | }; | ||
541 | |||
542 | int omap_dss_register_driver(struct omap_dss_driver *); | ||
543 | void omap_dss_unregister_driver(struct omap_dss_driver *); | ||
544 | |||
545 | int omap_dss_register_device(struct omap_dss_device *); | ||
546 | void omap_dss_unregister_device(struct omap_dss_device *); | ||
547 | |||
548 | void omap_dss_get_device(struct omap_dss_device *dssdev); | ||
549 | void omap_dss_put_device(struct omap_dss_device *dssdev); | ||
550 | #define for_each_dss_dev(d) while ((d = omap_dss_get_next_device(d)) != NULL) | ||
551 | struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from); | ||
552 | struct omap_dss_device *omap_dss_find_device(void *data, | ||
553 | int (*match)(struct omap_dss_device *dssdev, void *data)); | ||
554 | |||
555 | int omap_dss_start_device(struct omap_dss_device *dssdev); | ||
556 | void omap_dss_stop_device(struct omap_dss_device *dssdev); | ||
557 | |||
558 | int omap_dss_get_num_overlay_managers(void); | ||
559 | struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); | ||
560 | |||
561 | int omap_dss_get_num_overlays(void); | ||
562 | struct omap_overlay *omap_dss_get_overlay(int num); | ||
563 | |||
564 | typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); | ||
565 | int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | ||
566 | int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); | ||
567 | |||
568 | int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout); | ||
569 | int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, | ||
570 | unsigned long timeout); | ||
571 | |||
572 | #define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver) | ||
573 | #define to_dss_device(x) container_of((x), struct omap_dss_device, dev) | ||
574 | |||
575 | #endif | ||
diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/plat/dma.h index 72f680b7180d..4ede9e17a0be 100644 --- a/arch/arm/plat-omap/include/mach/dma.h +++ b/arch/arm/plat-omap/include/plat/dma.h | |||
@@ -401,33 +401,6 @@ | |||
401 | 401 | ||
402 | /*----------------------------------------------------------------------------*/ | 402 | /*----------------------------------------------------------------------------*/ |
403 | 403 | ||
404 | /* Hardware registers for LCD DMA */ | ||
405 | #define OMAP1510_DMA_LCD_BASE (0xfffedb00) | ||
406 | #define OMAP1510_DMA_LCD_CTRL (OMAP1510_DMA_LCD_BASE + 0x00) | ||
407 | #define OMAP1510_DMA_LCD_TOP_F1_L (OMAP1510_DMA_LCD_BASE + 0x02) | ||
408 | #define OMAP1510_DMA_LCD_TOP_F1_U (OMAP1510_DMA_LCD_BASE + 0x04) | ||
409 | #define OMAP1510_DMA_LCD_BOT_F1_L (OMAP1510_DMA_LCD_BASE + 0x06) | ||
410 | #define OMAP1510_DMA_LCD_BOT_F1_U (OMAP1510_DMA_LCD_BASE + 0x08) | ||
411 | |||
412 | #define OMAP1610_DMA_LCD_BASE (0xfffee300) | ||
413 | #define OMAP1610_DMA_LCD_CSDP (OMAP1610_DMA_LCD_BASE + 0xc0) | ||
414 | #define OMAP1610_DMA_LCD_CCR (OMAP1610_DMA_LCD_BASE + 0xc2) | ||
415 | #define OMAP1610_DMA_LCD_CTRL (OMAP1610_DMA_LCD_BASE + 0xc4) | ||
416 | #define OMAP1610_DMA_LCD_TOP_B1_L (OMAP1610_DMA_LCD_BASE + 0xc8) | ||
417 | #define OMAP1610_DMA_LCD_TOP_B1_U (OMAP1610_DMA_LCD_BASE + 0xca) | ||
418 | #define OMAP1610_DMA_LCD_BOT_B1_L (OMAP1610_DMA_LCD_BASE + 0xcc) | ||
419 | #define OMAP1610_DMA_LCD_BOT_B1_U (OMAP1610_DMA_LCD_BASE + 0xce) | ||
420 | #define OMAP1610_DMA_LCD_TOP_B2_L (OMAP1610_DMA_LCD_BASE + 0xd0) | ||
421 | #define OMAP1610_DMA_LCD_TOP_B2_U (OMAP1610_DMA_LCD_BASE + 0xd2) | ||
422 | #define OMAP1610_DMA_LCD_BOT_B2_L (OMAP1610_DMA_LCD_BASE + 0xd4) | ||
423 | #define OMAP1610_DMA_LCD_BOT_B2_U (OMAP1610_DMA_LCD_BASE + 0xd6) | ||
424 | #define OMAP1610_DMA_LCD_SRC_EI_B1 (OMAP1610_DMA_LCD_BASE + 0xd8) | ||
425 | #define OMAP1610_DMA_LCD_SRC_FI_B1_L (OMAP1610_DMA_LCD_BASE + 0xda) | ||
426 | #define OMAP1610_DMA_LCD_SRC_EN_B1 (OMAP1610_DMA_LCD_BASE + 0xe0) | ||
427 | #define OMAP1610_DMA_LCD_SRC_FN_B1 (OMAP1610_DMA_LCD_BASE + 0xe4) | ||
428 | #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea) | ||
429 | #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4) | ||
430 | |||
431 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) | 404 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) |
432 | #define OMAP_DMA_DROP_IRQ (1 << 1) | 405 | #define OMAP_DMA_DROP_IRQ (1 << 1) |
433 | #define OMAP_DMA_HALF_IRQ (1 << 2) | 406 | #define OMAP_DMA_HALF_IRQ (1 << 2) |
@@ -441,6 +414,8 @@ | |||
441 | #define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10) | 414 | #define OMAP2_DMA_SUPERVISOR_ERR_IRQ (1 << 10) |
442 | #define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11) | 415 | #define OMAP2_DMA_MISALIGNED_ERR_IRQ (1 << 11) |
443 | 416 | ||
417 | #define OMAP_DMA_CCR_EN (1 << 7) | ||
418 | |||
444 | #define OMAP_DMA_DATA_TYPE_S8 0x00 | 419 | #define OMAP_DMA_DATA_TYPE_S8 0x00 |
445 | #define OMAP_DMA_DATA_TYPE_S16 0x01 | 420 | #define OMAP_DMA_DATA_TYPE_S16 0x01 |
446 | #define OMAP_DMA_DATA_TYPE_S32 0x02 | 421 | #define OMAP_DMA_DATA_TYPE_S32 0x02 |
@@ -503,14 +478,6 @@ | |||
503 | #define DMA_CH_PRIO_HIGH 0x1 | 478 | #define DMA_CH_PRIO_HIGH 0x1 |
504 | #define DMA_CH_PRIO_LOW 0x0 /* Def */ | 479 | #define DMA_CH_PRIO_LOW 0x0 /* Def */ |
505 | 480 | ||
506 | /* LCD DMA block numbers */ | ||
507 | enum { | ||
508 | OMAP_LCD_DMA_B1_TOP, | ||
509 | OMAP_LCD_DMA_B1_BOTTOM, | ||
510 | OMAP_LCD_DMA_B2_TOP, | ||
511 | OMAP_LCD_DMA_B2_BOTTOM | ||
512 | }; | ||
513 | |||
514 | enum omap_dma_burst_mode { | 481 | enum omap_dma_burst_mode { |
515 | OMAP_DMA_DATA_BURST_DIS = 0, | 482 | OMAP_DMA_DATA_BURST_DIS = 0, |
516 | OMAP_DMA_DATA_BURST_4, | 483 | OMAP_DMA_DATA_BURST_4, |
@@ -633,6 +600,11 @@ extern void omap_set_dma_dst_endian_type(int lch, enum end_type etype); | |||
633 | extern void omap_set_dma_src_endian_type(int lch, enum end_type etype); | 600 | extern void omap_set_dma_src_endian_type(int lch, enum end_type etype); |
634 | extern int omap_get_dma_index(int lch, int *ei, int *fi); | 601 | extern int omap_get_dma_index(int lch, int *ei, int *fi); |
635 | 602 | ||
603 | void omap_dma_global_context_save(void); | ||
604 | void omap_dma_global_context_restore(void); | ||
605 | |||
606 | extern void omap_dma_disable_irq(int lch); | ||
607 | |||
636 | /* Chaining APIs */ | 608 | /* Chaining APIs */ |
637 | #ifndef CONFIG_ARCH_OMAP1 | 609 | #ifndef CONFIG_ARCH_OMAP1 |
638 | extern int omap_request_dma_chain(int dev_id, const char *dev_name, | 610 | extern int omap_request_dma_chain(int dev_id, const char *dev_name, |
@@ -656,20 +628,13 @@ extern int omap_modify_dma_chain_params(int chain_id, | |||
656 | extern int omap_dma_chain_status(int chain_id); | 628 | extern int omap_dma_chain_status(int chain_id); |
657 | #endif | 629 | #endif |
658 | 630 | ||
659 | /* LCD DMA functions */ | 631 | #if defined(CONFIG_ARCH_OMAP1) && defined(CONFIG_FB_OMAP) |
660 | extern int omap_request_lcd_dma(void (*callback)(u16 status, void *data), | 632 | #include <mach/lcd_dma.h> |
661 | void *data); | 633 | #else |
662 | extern void omap_free_lcd_dma(void); | 634 | static inline int omap_lcd_dma_running(void) |
663 | extern void omap_setup_lcd_dma(void); | 635 | { |
664 | extern void omap_enable_lcd_dma(void); | 636 | return 0; |
665 | extern void omap_stop_lcd_dma(void); | 637 | } |
666 | extern void omap_set_lcd_dma_ext_controller(int external); | 638 | #endif |
667 | extern void omap_set_lcd_dma_single_transfer(int single); | ||
668 | extern void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres, | ||
669 | int data_type); | ||
670 | extern void omap_set_lcd_dma_b1_rotation(int rotate); | ||
671 | extern void omap_set_lcd_dma_b1_vxres(unsigned long vxres); | ||
672 | extern void omap_set_lcd_dma_b1_mirror(int mirror); | ||
673 | extern void omap_set_lcd_dma_b1_scale(unsigned int xscale, unsigned int yscale); | ||
674 | 639 | ||
675 | #endif /* __ASM_ARCH_DMA_H */ | 640 | #endif /* __ASM_ARCH_DMA_H */ |
diff --git a/arch/arm/plat-omap/include/mach/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index 20f1054c0a80..20f1054c0a80 100644 --- a/arch/arm/plat-omap/include/mach/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
diff --git a/arch/arm/plat-omap/include/mach/dsp_common.h b/arch/arm/plat-omap/include/plat/dsp_common.h index da97736f3efa..da97736f3efa 100644 --- a/arch/arm/plat-omap/include/mach/dsp_common.h +++ b/arch/arm/plat-omap/include/plat/dsp_common.h | |||
diff --git a/arch/arm/plat-omap/include/mach/fpga.h b/arch/arm/plat-omap/include/plat/fpga.h index f1864a652f7a..f1864a652f7a 100644 --- a/arch/arm/plat-omap/include/mach/fpga.h +++ b/arch/arm/plat-omap/include/plat/fpga.h | |||
diff --git a/arch/arm/plat-omap/include/mach/gpio-switch.h b/arch/arm/plat-omap/include/plat/gpio-switch.h index 10da0e07c0cf..10da0e07c0cf 100644 --- a/arch/arm/plat-omap/include/mach/gpio-switch.h +++ b/arch/arm/plat-omap/include/plat/gpio-switch.h | |||
diff --git a/arch/arm/plat-omap/include/mach/gpio.h b/arch/arm/plat-omap/include/plat/gpio.h index 633ff688b928..de7c54731cbe 100644 --- a/arch/arm/plat-omap/include/mach/gpio.h +++ b/arch/arm/plat-omap/include/plat/gpio.h | |||
@@ -76,7 +76,8 @@ extern void omap2_gpio_prepare_for_retention(void); | |||
76 | extern void omap2_gpio_resume_after_retention(void); | 76 | extern void omap2_gpio_resume_after_retention(void); |
77 | extern void omap_set_gpio_debounce(int gpio, int enable); | 77 | extern void omap_set_gpio_debounce(int gpio, int enable); |
78 | extern void omap_set_gpio_debounce_time(int gpio, int enable); | 78 | extern void omap_set_gpio_debounce_time(int gpio, int enable); |
79 | 79 | extern void omap_gpio_save_context(void); | |
80 | extern void omap_gpio_restore_context(void); | ||
80 | /*-------------------------------------------------------------------------*/ | 81 | /*-------------------------------------------------------------------------*/ |
81 | 82 | ||
82 | /* Wrappers for "new style" GPIO calls, using the new infrastructure | 83 | /* Wrappers for "new style" GPIO calls, using the new infrastructure |
diff --git a/arch/arm/plat-omap/include/mach/gpmc-smc91x.h b/arch/arm/plat-omap/include/plat/gpmc-smc91x.h index b64fbee4d567..b64fbee4d567 100644 --- a/arch/arm/plat-omap/include/mach/gpmc-smc91x.h +++ b/arch/arm/plat-omap/include/plat/gpmc-smc91x.h | |||
diff --git a/arch/arm/plat-omap/include/mach/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h index 9c99cda77ba6..e081338e0b23 100644 --- a/arch/arm/plat-omap/include/mach/gpmc.h +++ b/arch/arm/plat-omap/include/plat/gpmc.h | |||
@@ -45,13 +45,14 @@ | |||
45 | #define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1) | 45 | #define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1) |
46 | #define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10) | 46 | #define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10) |
47 | #define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0) | 47 | #define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0) |
48 | #define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(1) | 48 | #define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(2) |
49 | #define GPMC_CONFIG1_MUXADDDATA (1 << 9) | 49 | #define GPMC_CONFIG1_MUXADDDATA (1 << 9) |
50 | #define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4) | 50 | #define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4) |
51 | #define GPMC_CONFIG1_FCLK_DIV(val) (val & 3) | 51 | #define GPMC_CONFIG1_FCLK_DIV(val) (val & 3) |
52 | #define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1)) | 52 | #define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1)) |
53 | #define GPMC_CONFIG1_FCLK_DIV3 (GPMC_CONFIG1_FCLK_DIV(2)) | 53 | #define GPMC_CONFIG1_FCLK_DIV3 (GPMC_CONFIG1_FCLK_DIV(2)) |
54 | #define GPMC_CONFIG1_FCLK_DIV4 (GPMC_CONFIG1_FCLK_DIV(3)) | 54 | #define GPMC_CONFIG1_FCLK_DIV4 (GPMC_CONFIG1_FCLK_DIV(3)) |
55 | #define GPMC_CONFIG7_CSVALID (1 << 6) | ||
55 | 56 | ||
56 | /* | 57 | /* |
57 | * Note that all values in this struct are in nanoseconds, while | 58 | * Note that all values in this struct are in nanoseconds, while |
@@ -107,6 +108,8 @@ extern int gpmc_prefetch_enable(int cs, int dma_mode, | |||
107 | unsigned int u32_count, int is_write); | 108 | unsigned int u32_count, int is_write); |
108 | extern void gpmc_prefetch_reset(void); | 109 | extern void gpmc_prefetch_reset(void); |
109 | extern int gpmc_prefetch_status(void); | 110 | extern int gpmc_prefetch_status(void); |
111 | extern void omap3_gpmc_save_context(void); | ||
112 | extern void omap3_gpmc_restore_context(void); | ||
110 | extern void __init gpmc_init(void); | 113 | extern void __init gpmc_init(void); |
111 | 114 | ||
112 | #endif | 115 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h index 26c1fbff08aa..d5b26adfb890 100644 --- a/arch/arm/plat-omap/include/mach/hardware.h +++ b/arch/arm/plat-omap/include/plat/hardware.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #include <asm/sizes.h> | 39 | #include <asm/sizes.h> |
40 | #ifndef __ASSEMBLER__ | 40 | #ifndef __ASSEMBLER__ |
41 | #include <asm/types.h> | 41 | #include <asm/types.h> |
42 | #include <mach/cpu.h> | 42 | #include <plat/cpu.h> |
43 | #endif | 43 | #endif |
44 | #include <mach/serial.h> | 44 | #include <plat/serial.h> |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * --------------------------------------------------------------------------- | 47 | * --------------------------------------------------------------------------- |
@@ -280,11 +280,11 @@ | |||
280 | * --------------------------------------------------------------------------- | 280 | * --------------------------------------------------------------------------- |
281 | */ | 281 | */ |
282 | 282 | ||
283 | #include "omap730.h" | 283 | #include <plat/omap7xx.h> |
284 | #include "omap1510.h" | 284 | #include <plat/omap1510.h> |
285 | #include "omap16xx.h" | 285 | #include <plat/omap16xx.h> |
286 | #include "omap24xx.h" | 286 | #include <plat/omap24xx.h> |
287 | #include "omap34xx.h" | 287 | #include <plat/omap34xx.h> |
288 | #include "omap44xx.h" | 288 | #include <plat/omap44xx.h> |
289 | 289 | ||
290 | #endif /* __ASM_ARCH_OMAP_HARDWARE_H */ | 290 | #endif /* __ASM_ARCH_OMAP_HARDWARE_H */ |
diff --git a/arch/arm/plat-omap/include/mach/hwa742.h b/arch/arm/plat-omap/include/plat/hwa742.h index 886248d32b49..886248d32b49 100644 --- a/arch/arm/plat-omap/include/mach/hwa742.h +++ b/arch/arm/plat-omap/include/plat/hwa742.h | |||
diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h new file mode 100644 index 000000000000..585d9ca68b97 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/i2c.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Helper module for board specific I2C bus registration | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * version 2 as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
18 | * 02110-1301 USA | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/i2c.h> | ||
23 | |||
24 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) | ||
25 | extern int omap_register_i2c_bus(int bus_id, u32 clkrate, | ||
26 | struct i2c_board_info const *info, | ||
27 | unsigned len); | ||
28 | #else | ||
29 | static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, | ||
30 | struct i2c_board_info const *info, | ||
31 | unsigned len) | ||
32 | { | ||
33 | return 0; | ||
34 | } | ||
35 | #endif | ||
36 | |||
37 | int omap_plat_register_i2c_bus(int bus_id, u32 clkrate, | ||
38 | struct i2c_board_info const *info, | ||
39 | unsigned len); | ||
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/plat/io.h index 8d32df32b0b1..7e5319f907d1 100644 --- a/arch/arm/plat-omap/include/mach/io.h +++ b/arch/arm/plat-omap/include/plat/io.h | |||
@@ -63,8 +63,24 @@ | |||
63 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | 63 | #define OMAP1_IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ |
64 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) | 64 | #define OMAP1_IO_ADDRESS(pa) IOMEM((pa) - OMAP1_IO_OFFSET) |
65 | 65 | ||
66 | #define OMAP2_IO_OFFSET 0x90000000 | 66 | #define OMAP2_L3_IO_OFFSET 0x90000000 |
67 | #define OMAP2_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_IO_OFFSET) /* L3 and L4 */ | 67 | #define OMAP2_L3_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_L3_IO_OFFSET) /* L3 */ |
68 | |||
69 | |||
70 | #define OMAP2_L4_IO_OFFSET 0xb2000000 | ||
71 | #define OMAP2_L4_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_L4_IO_OFFSET) /* L4 */ | ||
72 | |||
73 | #define OMAP4_L3_IO_OFFSET 0xb4000000 | ||
74 | #define OMAP4_L3_IO_ADDRESS(pa) IOMEM((pa) + OMAP4_L3_IO_OFFSET) /* L3 */ | ||
75 | |||
76 | #define OMAP4_L3_PER_IO_OFFSET 0xb1100000 | ||
77 | #define OMAP4_L3_PER_IO_ADDRESS(pa) IOMEM((pa) + OMAP4_L3_PER_IO_OFFSET) | ||
78 | |||
79 | #define OMAP4_GPMC_IO_OFFSET 0xa9000000 | ||
80 | #define OMAP4_GPMC_IO_ADDRESS(pa) IOMEM((pa) + OMAP4_GPMC_IO_OFFSET) | ||
81 | |||
82 | #define OMAP2_EMU_IO_OFFSET 0xaa800000 /* Emulation */ | ||
83 | #define OMAP2_EMU_IO_ADDRESS(pa) IOMEM((pa) + OMAP2_EMU_IO_OFFSET) | ||
68 | 84 | ||
69 | /* | 85 | /* |
70 | * ---------------------------------------------------------------------------- | 86 | * ---------------------------------------------------------------------------- |
@@ -83,24 +99,27 @@ | |||
83 | */ | 99 | */ |
84 | 100 | ||
85 | /* We map both L3 and L4 on OMAP2 */ | 101 | /* We map both L3 and L4 on OMAP2 */ |
86 | #define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 */ | 102 | #define L3_24XX_PHYS L3_24XX_BASE /* 0x68000000 --> 0xf8000000*/ |
87 | #define L3_24XX_VIRT 0xf8000000 | 103 | #define L3_24XX_VIRT (L3_24XX_PHYS + OMAP2_L3_IO_OFFSET) |
88 | #define L3_24XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */ | 104 | #define L3_24XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */ |
89 | #define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 */ | 105 | #define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 --> 0xfa000000 */ |
90 | #define L4_24XX_VIRT 0xd8000000 | 106 | #define L4_24XX_VIRT (L4_24XX_PHYS + OMAP2_L4_IO_OFFSET) |
91 | #define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */ | 107 | #define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */ |
92 | 108 | ||
93 | #define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 */ | 109 | #define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 --> 0xfb000000 */ |
94 | #define L4_WK_243X_VIRT 0xd9000000 | 110 | #define L4_WK_243X_VIRT (L4_WK_243X_PHYS + OMAP2_L4_IO_OFFSET) |
95 | #define L4_WK_243X_SIZE SZ_1M | 111 | #define L4_WK_243X_SIZE SZ_1M |
96 | #define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */ | 112 | #define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE |
97 | #define OMAP243X_GPMC_VIRT 0xFE000000 | 113 | #define OMAP243X_GPMC_VIRT (OMAP243X_GPMC_PHYS + OMAP2_L3_IO_OFFSET) |
114 | /* 0x6e000000 --> 0xfe000000 */ | ||
98 | #define OMAP243X_GPMC_SIZE SZ_1M | 115 | #define OMAP243X_GPMC_SIZE SZ_1M |
99 | #define OMAP243X_SDRC_PHYS OMAP243X_SDRC_BASE | 116 | #define OMAP243X_SDRC_PHYS OMAP243X_SDRC_BASE |
100 | #define OMAP243X_SDRC_VIRT 0xFD000000 | 117 | /* 0x6D000000 --> 0xfd000000 */ |
118 | #define OMAP243X_SDRC_VIRT (OMAP243X_SDRC_PHYS + OMAP2_L3_IO_OFFSET) | ||
101 | #define OMAP243X_SDRC_SIZE SZ_1M | 119 | #define OMAP243X_SDRC_SIZE SZ_1M |
102 | #define OMAP243X_SMS_PHYS OMAP243X_SMS_BASE | 120 | #define OMAP243X_SMS_PHYS OMAP243X_SMS_BASE |
103 | #define OMAP243X_SMS_VIRT 0xFC000000 | 121 | /* 0x6c000000 --> 0xfc000000 */ |
122 | #define OMAP243X_SMS_VIRT (OMAP243X_SMS_PHYS + OMAP2_L3_IO_OFFSET) | ||
104 | #define OMAP243X_SMS_SIZE SZ_1M | 123 | #define OMAP243X_SMS_SIZE SZ_1M |
105 | 124 | ||
106 | /* DSP */ | 125 | /* DSP */ |
@@ -121,12 +140,12 @@ | |||
121 | */ | 140 | */ |
122 | 141 | ||
123 | /* We map both L3 and L4 on OMAP3 */ | 142 | /* We map both L3 and L4 on OMAP3 */ |
124 | #define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */ | 143 | #define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 --> 0xf8000000 */ |
125 | #define L3_34XX_VIRT 0xf8000000 | 144 | #define L3_34XX_VIRT (L3_34XX_PHYS + OMAP2_L3_IO_OFFSET) |
126 | #define L3_34XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */ | 145 | #define L3_34XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */ |
127 | 146 | ||
128 | #define L4_34XX_PHYS L4_34XX_BASE /* 0x48000000 */ | 147 | #define L4_34XX_PHYS L4_34XX_BASE /* 0x48000000 --> 0xfa000000 */ |
129 | #define L4_34XX_VIRT 0xd8000000 | 148 | #define L4_34XX_VIRT (L4_34XX_PHYS + OMAP2_L4_IO_OFFSET) |
130 | #define L4_34XX_SIZE SZ_4M /* 1MB of 128MB used, want 1MB sect */ | 149 | #define L4_34XX_SIZE SZ_4M /* 1MB of 128MB used, want 1MB sect */ |
131 | 150 | ||
132 | /* | 151 | /* |
@@ -134,28 +153,33 @@ | |||
134 | * VPOM3430 was not working for Int controller | 153 | * VPOM3430 was not working for Int controller |
135 | */ | 154 | */ |
136 | 155 | ||
137 | #define L4_WK_34XX_PHYS L4_WK_34XX_BASE /* 0x48300000 */ | 156 | #define L4_WK_34XX_PHYS L4_WK_34XX_BASE /* 0x48300000 --> 0xfa300000 */ |
138 | #define L4_WK_34XX_VIRT 0xd8300000 | 157 | #define L4_WK_34XX_VIRT (L4_WK_34XX_PHYS + OMAP2_L4_IO_OFFSET) |
139 | #define L4_WK_34XX_SIZE SZ_1M | 158 | #define L4_WK_34XX_SIZE SZ_1M |
140 | 159 | ||
141 | #define L4_PER_34XX_PHYS L4_PER_34XX_BASE /* 0x49000000 */ | 160 | #define L4_PER_34XX_PHYS L4_PER_34XX_BASE |
142 | #define L4_PER_34XX_VIRT 0xd9000000 | 161 | /* 0x49000000 --> 0xfb000000 */ |
162 | #define L4_PER_34XX_VIRT (L4_PER_34XX_PHYS + OMAP2_L4_IO_OFFSET) | ||
143 | #define L4_PER_34XX_SIZE SZ_1M | 163 | #define L4_PER_34XX_SIZE SZ_1M |
144 | 164 | ||
145 | #define L4_EMU_34XX_PHYS L4_EMU_34XX_BASE /* 0x54000000 */ | 165 | #define L4_EMU_34XX_PHYS L4_EMU_34XX_BASE |
146 | #define L4_EMU_34XX_VIRT 0xe4000000 | 166 | /* 0x54000000 --> 0xfe800000 */ |
147 | #define L4_EMU_34XX_SIZE SZ_64M | 167 | #define L4_EMU_34XX_VIRT (L4_EMU_34XX_PHYS + OMAP2_EMU_IO_OFFSET) |
168 | #define L4_EMU_34XX_SIZE SZ_8M | ||
148 | 169 | ||
149 | #define OMAP34XX_GPMC_PHYS OMAP34XX_GPMC_BASE /* 0x6E000000 */ | 170 | #define OMAP34XX_GPMC_PHYS OMAP34XX_GPMC_BASE |
150 | #define OMAP34XX_GPMC_VIRT 0xFE000000 | 171 | /* 0x6e000000 --> 0xfe000000 */ |
172 | #define OMAP34XX_GPMC_VIRT (OMAP34XX_GPMC_PHYS + OMAP2_L3_IO_OFFSET) | ||
151 | #define OMAP34XX_GPMC_SIZE SZ_1M | 173 | #define OMAP34XX_GPMC_SIZE SZ_1M |
152 | 174 | ||
153 | #define OMAP343X_SMS_PHYS OMAP343X_SMS_BASE /* 0x6C000000 */ | 175 | #define OMAP343X_SMS_PHYS OMAP343X_SMS_BASE |
154 | #define OMAP343X_SMS_VIRT 0xFC000000 | 176 | /* 0x6c000000 --> 0xfc000000 */ |
177 | #define OMAP343X_SMS_VIRT (OMAP343X_SMS_PHYS + OMAP2_L3_IO_OFFSET) | ||
155 | #define OMAP343X_SMS_SIZE SZ_1M | 178 | #define OMAP343X_SMS_SIZE SZ_1M |
156 | 179 | ||
157 | #define OMAP343X_SDRC_PHYS OMAP343X_SDRC_BASE /* 0x6D000000 */ | 180 | #define OMAP343X_SDRC_PHYS OMAP343X_SDRC_BASE |
158 | #define OMAP343X_SDRC_VIRT 0xFD000000 | 181 | /* 0x6D000000 --> 0xfd000000 */ |
182 | #define OMAP343X_SDRC_VIRT (OMAP343X_SDRC_PHYS + OMAP2_L3_IO_OFFSET) | ||
159 | #define OMAP343X_SDRC_SIZE SZ_1M | 183 | #define OMAP343X_SDRC_SIZE SZ_1M |
160 | 184 | ||
161 | /* DSP */ | 185 | /* DSP */ |
@@ -176,32 +200,54 @@ | |||
176 | */ | 200 | */ |
177 | 201 | ||
178 | /* We map both L3 and L4 on OMAP4 */ | 202 | /* We map both L3 and L4 on OMAP4 */ |
179 | #define L3_44XX_PHYS L3_44XX_BASE | 203 | #define L3_44XX_PHYS L3_44XX_BASE /* 0x44000000 --> 0xf8000000 */ |
180 | #define L3_44XX_VIRT 0xd4000000 | 204 | #define L3_44XX_VIRT (L3_44XX_PHYS + OMAP4_L3_IO_OFFSET) |
181 | #define L3_44XX_SIZE SZ_1M | 205 | #define L3_44XX_SIZE SZ_1M |
182 | 206 | ||
183 | #define L4_44XX_PHYS L4_44XX_BASE | 207 | #define L4_44XX_PHYS L4_44XX_BASE /* 0x4a000000 --> 0xfc000000 */ |
184 | #define L4_44XX_VIRT 0xda000000 | 208 | #define L4_44XX_VIRT (L4_44XX_PHYS + OMAP2_L4_IO_OFFSET) |
185 | #define L4_44XX_SIZE SZ_4M | 209 | #define L4_44XX_SIZE SZ_4M |
186 | 210 | ||
187 | 211 | ||
188 | #define L4_WK_44XX_PHYS L4_WK_44XX_BASE | 212 | #define L4_WK_44XX_PHYS L4_WK_44XX_BASE /* 0x4a300000 --> 0xfc300000 */ |
189 | #define L4_WK_44XX_VIRT 0xda300000 | 213 | #define L4_WK_44XX_VIRT (L4_WK_44XX_PHYS + OMAP2_L4_IO_OFFSET) |
190 | #define L4_WK_44XX_SIZE SZ_1M | 214 | #define L4_WK_44XX_SIZE SZ_1M |
191 | 215 | ||
192 | #define L4_PER_44XX_PHYS L4_PER_44XX_BASE | 216 | #define L4_PER_44XX_PHYS L4_PER_44XX_BASE |
193 | #define L4_PER_44XX_VIRT 0xd8000000 | 217 | /* 0x48000000 --> 0xfa000000 */ |
218 | #define L4_PER_44XX_VIRT (L4_PER_44XX_PHYS + OMAP2_L4_IO_OFFSET) | ||
194 | #define L4_PER_44XX_SIZE SZ_4M | 219 | #define L4_PER_44XX_SIZE SZ_4M |
195 | 220 | ||
221 | #define L4_ABE_44XX_PHYS L4_ABE_44XX_BASE | ||
222 | /* 0x49000000 --> 0xfb000000 */ | ||
223 | #define L4_ABE_44XX_VIRT (L4_ABE_44XX_PHYS + OMAP2_L4_IO_OFFSET) | ||
224 | #define L4_ABE_44XX_SIZE SZ_1M | ||
225 | |||
196 | #define L4_EMU_44XX_PHYS L4_EMU_44XX_BASE | 226 | #define L4_EMU_44XX_PHYS L4_EMU_44XX_BASE |
197 | #define L4_EMU_44XX_VIRT 0xe4000000 | 227 | /* 0x54000000 --> 0xfe800000 */ |
198 | #define L4_EMU_44XX_SIZE SZ_64M | 228 | #define L4_EMU_44XX_VIRT (L4_EMU_44XX_PHYS + OMAP2_EMU_IO_OFFSET) |
229 | #define L4_EMU_44XX_SIZE SZ_8M | ||
199 | 230 | ||
200 | #define OMAP44XX_GPMC_PHYS OMAP44XX_GPMC_BASE | 231 | #define OMAP44XX_GPMC_PHYS OMAP44XX_GPMC_BASE |
201 | #define OMAP44XX_GPMC_VIRT 0xe0000000 | 232 | /* 0x50000000 --> 0xf9000000 */ |
233 | #define OMAP44XX_GPMC_VIRT (OMAP44XX_GPMC_PHYS + OMAP4_GPMC_IO_OFFSET) | ||
202 | #define OMAP44XX_GPMC_SIZE SZ_1M | 234 | #define OMAP44XX_GPMC_SIZE SZ_1M |
203 | 235 | ||
204 | 236 | ||
237 | #define OMAP44XX_EMIF1_PHYS OMAP44XX_EMIF1_BASE | ||
238 | /* 0x4c000000 --> 0xfd100000 */ | ||
239 | #define OMAP44XX_EMIF1_VIRT (OMAP44XX_EMIF1_PHYS + OMAP4_L3_PER_IO_OFFSET) | ||
240 | #define OMAP44XX_EMIF1_SIZE SZ_1M | ||
241 | |||
242 | #define OMAP44XX_EMIF2_PHYS OMAP44XX_EMIF2_BASE | ||
243 | /* 0x4d000000 --> 0xfd200000 */ | ||
244 | #define OMAP44XX_EMIF2_VIRT (OMAP44XX_EMIF2_PHYS + OMAP4_L3_PER_IO_OFFSET) | ||
245 | #define OMAP44XX_EMIF2_SIZE SZ_1M | ||
246 | |||
247 | #define OMAP44XX_DMM_PHYS OMAP44XX_DMM_BASE | ||
248 | /* 0x4e000000 --> 0xfd300000 */ | ||
249 | #define OMAP44XX_DMM_VIRT (OMAP44XX_DMM_PHYS + OMAP4_L3_PER_IO_OFFSET) | ||
250 | #define OMAP44XX_DMM_SIZE SZ_1M | ||
205 | /* | 251 | /* |
206 | * ---------------------------------------------------------------------------- | 252 | * ---------------------------------------------------------------------------- |
207 | * Omap specific register access | 253 | * Omap specific register access |
diff --git a/arch/arm/plat-omap/include/mach/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 46d41ac83dbf..0752af9d099e 100644 --- a/arch/arm/plat-omap/include/mach/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h | |||
@@ -107,7 +107,7 @@ struct iommu_platform_data { | |||
107 | #if defined(CONFIG_ARCH_OMAP1) | 107 | #if defined(CONFIG_ARCH_OMAP1) |
108 | #error "iommu for this processor not implemented yet" | 108 | #error "iommu for this processor not implemented yet" |
109 | #else | 109 | #else |
110 | #include <mach/iommu2.h> | 110 | #include <plat/iommu2.h> |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | /* | 113 | /* |
diff --git a/arch/arm/plat-omap/include/mach/iommu2.h b/arch/arm/plat-omap/include/plat/iommu2.h index 10ad05f410e9..10ad05f410e9 100644 --- a/arch/arm/plat-omap/include/mach/iommu2.h +++ b/arch/arm/plat-omap/include/plat/iommu2.h | |||
diff --git a/arch/arm/plat-omap/include/mach/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h index bdc7ce5d7a4a..bdc7ce5d7a4a 100644 --- a/arch/arm/plat-omap/include/mach/iovmm.h +++ b/arch/arm/plat-omap/include/plat/iovmm.h | |||
diff --git a/arch/arm/plat-omap/include/mach/irda.h b/arch/arm/plat-omap/include/plat/irda.h index 40f60339d1c6..40f60339d1c6 100644 --- a/arch/arm/plat-omap/include/mach/irda.h +++ b/arch/arm/plat-omap/include/plat/irda.h | |||
diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 28a165058b61..ce5dd2d1dc21 100644 --- a/arch/arm/plat-omap/include/mach/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -86,49 +86,26 @@ | |||
86 | #define INT_1610_SSR_FIFO_0 29 | 86 | #define INT_1610_SSR_FIFO_0 29 |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * OMAP-730 specific IRQ numbers for interrupt handler 1 | 89 | * OMAP-7xx specific IRQ numbers for interrupt handler 1 |
90 | */ | 90 | */ |
91 | #define INT_730_IH2_FIQ 0 | 91 | #define INT_7XX_IH2_FIQ 0 |
92 | #define INT_730_IH2_IRQ 1 | 92 | #define INT_7XX_IH2_IRQ 1 |
93 | #define INT_730_USB_NON_ISO 2 | 93 | #define INT_7XX_USB_NON_ISO 2 |
94 | #define INT_730_USB_ISO 3 | 94 | #define INT_7XX_USB_ISO 3 |
95 | #define INT_730_ICR 4 | 95 | #define INT_7XX_ICR 4 |
96 | #define INT_730_EAC 5 | 96 | #define INT_7XX_EAC 5 |
97 | #define INT_730_GPIO_BANK1 6 | 97 | #define INT_7XX_GPIO_BANK1 6 |
98 | #define INT_730_GPIO_BANK2 7 | 98 | #define INT_7XX_GPIO_BANK2 7 |
99 | #define INT_730_GPIO_BANK3 8 | 99 | #define INT_7XX_GPIO_BANK3 8 |
100 | #define INT_730_McBSP2TX 10 | 100 | #define INT_7XX_McBSP2TX 10 |
101 | #define INT_730_McBSP2RX 11 | 101 | #define INT_7XX_McBSP2RX 11 |
102 | #define INT_730_McBSP2RX_OVF 12 | 102 | #define INT_7XX_McBSP2RX_OVF 12 |
103 | #define INT_730_LCD_LINE 14 | 103 | #define INT_7XX_LCD_LINE 14 |
104 | #define INT_730_GSM_PROTECT 15 | 104 | #define INT_7XX_GSM_PROTECT 15 |
105 | #define INT_730_TIMER3 16 | 105 | #define INT_7XX_TIMER3 16 |
106 | #define INT_730_GPIO_BANK5 17 | 106 | #define INT_7XX_GPIO_BANK5 17 |
107 | #define INT_730_GPIO_BANK6 18 | 107 | #define INT_7XX_GPIO_BANK6 18 |
108 | #define INT_730_SPGIO_WR 29 | 108 | #define INT_7XX_SPGIO_WR 29 |
109 | |||
110 | /* | ||
111 | * OMAP-850 specific IRQ numbers for interrupt handler 1 | ||
112 | */ | ||
113 | #define INT_850_IH2_FIQ 0 | ||
114 | #define INT_850_IH2_IRQ 1 | ||
115 | #define INT_850_USB_NON_ISO 2 | ||
116 | #define INT_850_USB_ISO 3 | ||
117 | #define INT_850_ICR 4 | ||
118 | #define INT_850_EAC 5 | ||
119 | #define INT_850_GPIO_BANK1 6 | ||
120 | #define INT_850_GPIO_BANK2 7 | ||
121 | #define INT_850_GPIO_BANK3 8 | ||
122 | #define INT_850_McBSP2TX 10 | ||
123 | #define INT_850_McBSP2RX 11 | ||
124 | #define INT_850_McBSP2RX_OVF 12 | ||
125 | #define INT_850_LCD_LINE 14 | ||
126 | #define INT_850_GSM_PROTECT 15 | ||
127 | #define INT_850_TIMER3 16 | ||
128 | #define INT_850_GPIO_BANK5 17 | ||
129 | #define INT_850_GPIO_BANK6 18 | ||
130 | #define INT_850_SPGIO_WR 29 | ||
131 | |||
132 | 109 | ||
133 | /* | 110 | /* |
134 | * IRQ numbers for interrupt handler 2 | 111 | * IRQ numbers for interrupt handler 2 |
@@ -206,120 +183,62 @@ | |||
206 | #define INT_1610_SHA1MD5 (91 + IH2_BASE) | 183 | #define INT_1610_SHA1MD5 (91 + IH2_BASE) |
207 | 184 | ||
208 | /* | 185 | /* |
209 | * OMAP-730 specific IRQ numbers for interrupt handler 2 | 186 | * OMAP-7xx specific IRQ numbers for interrupt handler 2 |
210 | */ | 187 | */ |
211 | #define INT_730_HW_ERRORS (0 + IH2_BASE) | 188 | #define INT_7XX_HW_ERRORS (0 + IH2_BASE) |
212 | #define INT_730_NFIQ_PWR_FAIL (1 + IH2_BASE) | 189 | #define INT_7XX_NFIQ_PWR_FAIL (1 + IH2_BASE) |
213 | #define INT_730_CFCD (2 + IH2_BASE) | 190 | #define INT_7XX_CFCD (2 + IH2_BASE) |
214 | #define INT_730_CFIREQ (3 + IH2_BASE) | 191 | #define INT_7XX_CFIREQ (3 + IH2_BASE) |
215 | #define INT_730_I2C (4 + IH2_BASE) | 192 | #define INT_7XX_I2C (4 + IH2_BASE) |
216 | #define INT_730_PCC (5 + IH2_BASE) | 193 | #define INT_7XX_PCC (5 + IH2_BASE) |
217 | #define INT_730_MPU_EXT_NIRQ (6 + IH2_BASE) | 194 | #define INT_7XX_MPU_EXT_NIRQ (6 + IH2_BASE) |
218 | #define INT_730_SPI_100K_1 (7 + IH2_BASE) | 195 | #define INT_7XX_SPI_100K_1 (7 + IH2_BASE) |
219 | #define INT_730_SYREN_SPI (8 + IH2_BASE) | 196 | #define INT_7XX_SYREN_SPI (8 + IH2_BASE) |
220 | #define INT_730_VLYNQ (9 + IH2_BASE) | 197 | #define INT_7XX_VLYNQ (9 + IH2_BASE) |
221 | #define INT_730_GPIO_BANK4 (10 + IH2_BASE) | 198 | #define INT_7XX_GPIO_BANK4 (10 + IH2_BASE) |
222 | #define INT_730_McBSP1TX (11 + IH2_BASE) | 199 | #define INT_7XX_McBSP1TX (11 + IH2_BASE) |
223 | #define INT_730_McBSP1RX (12 + IH2_BASE) | 200 | #define INT_7XX_McBSP1RX (12 + IH2_BASE) |
224 | #define INT_730_McBSP1RX_OF (13 + IH2_BASE) | 201 | #define INT_7XX_McBSP1RX_OF (13 + IH2_BASE) |
225 | #define INT_730_UART_MODEM_IRDA_2 (14 + IH2_BASE) | 202 | #define INT_7XX_UART_MODEM_IRDA_2 (14 + IH2_BASE) |
226 | #define INT_730_UART_MODEM_1 (15 + IH2_BASE) | 203 | #define INT_7XX_UART_MODEM_1 (15 + IH2_BASE) |
227 | #define INT_730_MCSI (16 + IH2_BASE) | 204 | #define INT_7XX_MCSI (16 + IH2_BASE) |
228 | #define INT_730_uWireTX (17 + IH2_BASE) | 205 | #define INT_7XX_uWireTX (17 + IH2_BASE) |
229 | #define INT_730_uWireRX (18 + IH2_BASE) | 206 | #define INT_7XX_uWireRX (18 + IH2_BASE) |
230 | #define INT_730_SMC_CD (19 + IH2_BASE) | 207 | #define INT_7XX_SMC_CD (19 + IH2_BASE) |
231 | #define INT_730_SMC_IREQ (20 + IH2_BASE) | 208 | #define INT_7XX_SMC_IREQ (20 + IH2_BASE) |
232 | #define INT_730_HDQ_1WIRE (21 + IH2_BASE) | 209 | #define INT_7XX_HDQ_1WIRE (21 + IH2_BASE) |
233 | #define INT_730_TIMER32K (22 + IH2_BASE) | 210 | #define INT_7XX_TIMER32K (22 + IH2_BASE) |
234 | #define INT_730_MMC_SDIO (23 + IH2_BASE) | 211 | #define INT_7XX_MMC_SDIO (23 + IH2_BASE) |
235 | #define INT_730_UPLD (24 + IH2_BASE) | 212 | #define INT_7XX_UPLD (24 + IH2_BASE) |
236 | #define INT_730_USB_HHC_1 (27 + IH2_BASE) | 213 | #define INT_7XX_USB_HHC_1 (27 + IH2_BASE) |
237 | #define INT_730_USB_HHC_2 (28 + IH2_BASE) | 214 | #define INT_7XX_USB_HHC_2 (28 + IH2_BASE) |
238 | #define INT_730_USB_GENI (29 + IH2_BASE) | 215 | #define INT_7XX_USB_GENI (29 + IH2_BASE) |
239 | #define INT_730_USB_OTG (30 + IH2_BASE) | 216 | #define INT_7XX_USB_OTG (30 + IH2_BASE) |
240 | #define INT_730_CAMERA_IF (31 + IH2_BASE) | 217 | #define INT_7XX_CAMERA_IF (31 + IH2_BASE) |
241 | #define INT_730_RNG (32 + IH2_BASE) | 218 | #define INT_7XX_RNG (32 + IH2_BASE) |
242 | #define INT_730_DUAL_MODE_TIMER (33 + IH2_BASE) | 219 | #define INT_7XX_DUAL_MODE_TIMER (33 + IH2_BASE) |
243 | #define INT_730_DBB_RF_EN (34 + IH2_BASE) | 220 | #define INT_7XX_DBB_RF_EN (34 + IH2_BASE) |
244 | #define INT_730_MPUIO_KEYPAD (35 + IH2_BASE) | 221 | #define INT_7XX_MPUIO_KEYPAD (35 + IH2_BASE) |
245 | #define INT_730_SHA1_MD5 (36 + IH2_BASE) | 222 | #define INT_7XX_SHA1_MD5 (36 + IH2_BASE) |
246 | #define INT_730_SPI_100K_2 (37 + IH2_BASE) | 223 | #define INT_7XX_SPI_100K_2 (37 + IH2_BASE) |
247 | #define INT_730_RNG_IDLE (38 + IH2_BASE) | 224 | #define INT_7XX_RNG_IDLE (38 + IH2_BASE) |
248 | #define INT_730_MPUIO (39 + IH2_BASE) | 225 | #define INT_7XX_MPUIO (39 + IH2_BASE) |
249 | #define INT_730_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE) | 226 | #define INT_7XX_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE) |
250 | #define INT_730_LLPC_OE_FALLING (41 + IH2_BASE) | 227 | #define INT_7XX_LLPC_OE_FALLING (41 + IH2_BASE) |
251 | #define INT_730_LLPC_OE_RISING (42 + IH2_BASE) | 228 | #define INT_7XX_LLPC_OE_RISING (42 + IH2_BASE) |
252 | #define INT_730_LLPC_VSYNC (43 + IH2_BASE) | 229 | #define INT_7XX_LLPC_VSYNC (43 + IH2_BASE) |
253 | #define INT_730_WAKE_UP_REQ (46 + IH2_BASE) | 230 | #define INT_7XX_WAKE_UP_REQ (46 + IH2_BASE) |
254 | #define INT_730_DMA_CH6 (53 + IH2_BASE) | 231 | #define INT_7XX_DMA_CH6 (53 + IH2_BASE) |
255 | #define INT_730_DMA_CH7 (54 + IH2_BASE) | 232 | #define INT_7XX_DMA_CH7 (54 + IH2_BASE) |
256 | #define INT_730_DMA_CH8 (55 + IH2_BASE) | 233 | #define INT_7XX_DMA_CH8 (55 + IH2_BASE) |
257 | #define INT_730_DMA_CH9 (56 + IH2_BASE) | 234 | #define INT_7XX_DMA_CH9 (56 + IH2_BASE) |
258 | #define INT_730_DMA_CH10 (57 + IH2_BASE) | 235 | #define INT_7XX_DMA_CH10 (57 + IH2_BASE) |
259 | #define INT_730_DMA_CH11 (58 + IH2_BASE) | 236 | #define INT_7XX_DMA_CH11 (58 + IH2_BASE) |
260 | #define INT_730_DMA_CH12 (59 + IH2_BASE) | 237 | #define INT_7XX_DMA_CH12 (59 + IH2_BASE) |
261 | #define INT_730_DMA_CH13 (60 + IH2_BASE) | 238 | #define INT_7XX_DMA_CH13 (60 + IH2_BASE) |
262 | #define INT_730_DMA_CH14 (61 + IH2_BASE) | 239 | #define INT_7XX_DMA_CH14 (61 + IH2_BASE) |
263 | #define INT_730_DMA_CH15 (62 + IH2_BASE) | 240 | #define INT_7XX_DMA_CH15 (62 + IH2_BASE) |
264 | #define INT_730_NAND (63 + IH2_BASE) | 241 | #define INT_7XX_NAND (63 + IH2_BASE) |
265 | |||
266 | /* | ||
267 | * OMAP-850 specific IRQ numbers for interrupt handler 2 | ||
268 | */ | ||
269 | #define INT_850_HW_ERRORS (0 + IH2_BASE) | ||
270 | #define INT_850_NFIQ_PWR_FAIL (1 + IH2_BASE) | ||
271 | #define INT_850_CFCD (2 + IH2_BASE) | ||
272 | #define INT_850_CFIREQ (3 + IH2_BASE) | ||
273 | #define INT_850_I2C (4 + IH2_BASE) | ||
274 | #define INT_850_PCC (5 + IH2_BASE) | ||
275 | #define INT_850_MPU_EXT_NIRQ (6 + IH2_BASE) | ||
276 | #define INT_850_SPI_100K_1 (7 + IH2_BASE) | ||
277 | #define INT_850_SYREN_SPI (8 + IH2_BASE) | ||
278 | #define INT_850_VLYNQ (9 + IH2_BASE) | ||
279 | #define INT_850_GPIO_BANK4 (10 + IH2_BASE) | ||
280 | #define INT_850_McBSP1TX (11 + IH2_BASE) | ||
281 | #define INT_850_McBSP1RX (12 + IH2_BASE) | ||
282 | #define INT_850_McBSP1RX_OF (13 + IH2_BASE) | ||
283 | #define INT_850_UART_MODEM_IRDA_2 (14 + IH2_BASE) | ||
284 | #define INT_850_UART_MODEM_1 (15 + IH2_BASE) | ||
285 | #define INT_850_MCSI (16 + IH2_BASE) | ||
286 | #define INT_850_uWireTX (17 + IH2_BASE) | ||
287 | #define INT_850_uWireRX (18 + IH2_BASE) | ||
288 | #define INT_850_SMC_CD (19 + IH2_BASE) | ||
289 | #define INT_850_SMC_IREQ (20 + IH2_BASE) | ||
290 | #define INT_850_HDQ_1WIRE (21 + IH2_BASE) | ||
291 | #define INT_850_TIMER32K (22 + IH2_BASE) | ||
292 | #define INT_850_MMC_SDIO (23 + IH2_BASE) | ||
293 | #define INT_850_UPLD (24 + IH2_BASE) | ||
294 | #define INT_850_USB_HHC_1 (27 + IH2_BASE) | ||
295 | #define INT_850_USB_HHC_2 (28 + IH2_BASE) | ||
296 | #define INT_850_USB_GENI (29 + IH2_BASE) | ||
297 | #define INT_850_USB_OTG (30 + IH2_BASE) | ||
298 | #define INT_850_CAMERA_IF (31 + IH2_BASE) | ||
299 | #define INT_850_RNG (32 + IH2_BASE) | ||
300 | #define INT_850_DUAL_MODE_TIMER (33 + IH2_BASE) | ||
301 | #define INT_850_DBB_RF_EN (34 + IH2_BASE) | ||
302 | #define INT_850_MPUIO_KEYPAD (35 + IH2_BASE) | ||
303 | #define INT_850_SHA1_MD5 (36 + IH2_BASE) | ||
304 | #define INT_850_SPI_100K_2 (37 + IH2_BASE) | ||
305 | #define INT_850_RNG_IDLE (38 + IH2_BASE) | ||
306 | #define INT_850_MPUIO (39 + IH2_BASE) | ||
307 | #define INT_850_LLPC_LCD_CTRL_CAN_BE_OFF (40 + IH2_BASE) | ||
308 | #define INT_850_LLPC_OE_FALLING (41 + IH2_BASE) | ||
309 | #define INT_850_LLPC_OE_RISING (42 + IH2_BASE) | ||
310 | #define INT_850_LLPC_VSYNC (43 + IH2_BASE) | ||
311 | #define INT_850_WAKE_UP_REQ (46 + IH2_BASE) | ||
312 | #define INT_850_DMA_CH6 (53 + IH2_BASE) | ||
313 | #define INT_850_DMA_CH7 (54 + IH2_BASE) | ||
314 | #define INT_850_DMA_CH8 (55 + IH2_BASE) | ||
315 | #define INT_850_DMA_CH9 (56 + IH2_BASE) | ||
316 | #define INT_850_DMA_CH10 (57 + IH2_BASE) | ||
317 | #define INT_850_DMA_CH11 (58 + IH2_BASE) | ||
318 | #define INT_850_DMA_CH12 (59 + IH2_BASE) | ||
319 | #define INT_850_DMA_CH13 (60 + IH2_BASE) | ||
320 | #define INT_850_DMA_CH14 (61 + IH2_BASE) | ||
321 | #define INT_850_DMA_CH15 (62 + IH2_BASE) | ||
322 | #define INT_850_NAND (63 + IH2_BASE) | ||
323 | 242 | ||
324 | #define INT_24XX_SYS_NIRQ 7 | 243 | #define INT_24XX_SYS_NIRQ 7 |
325 | #define INT_24XX_SDMA_IRQ0 12 | 244 | #define INT_24XX_SDMA_IRQ0 12 |
@@ -558,9 +477,14 @@ | |||
558 | 477 | ||
559 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) | 478 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) |
560 | 479 | ||
480 | #define INTCPS_NR_MIR_REGS 3 | ||
481 | #define INTCPS_NR_IRQS 96 | ||
482 | |||
561 | #ifndef __ASSEMBLY__ | 483 | #ifndef __ASSEMBLY__ |
562 | extern void omap_init_irq(void); | 484 | extern void omap_init_irq(void); |
563 | extern int omap_irq_pending(void); | 485 | extern int omap_irq_pending(void); |
486 | void omap_intc_save_context(void); | ||
487 | void omap_intc_restore_context(void); | ||
564 | #endif | 488 | #endif |
565 | 489 | ||
566 | #include <mach/hardware.h> | 490 | #include <mach/hardware.h> |
diff --git a/arch/arm/plat-omap/include/mach/keypad.h b/arch/arm/plat-omap/include/plat/keypad.h index 3ae52ccc793c..3ae52ccc793c 100644 --- a/arch/arm/plat-omap/include/mach/keypad.h +++ b/arch/arm/plat-omap/include/plat/keypad.h | |||
diff --git a/arch/arm/plat-omap/include/mach/lcd_mipid.h b/arch/arm/plat-omap/include/plat/lcd_mipid.h index 8e52c6572281..8e52c6572281 100644 --- a/arch/arm/plat-omap/include/mach/lcd_mipid.h +++ b/arch/arm/plat-omap/include/plat/lcd_mipid.h | |||
diff --git a/arch/arm/plat-omap/include/mach/led.h b/arch/arm/plat-omap/include/plat/led.h index 25e451e7e2fd..25e451e7e2fd 100644 --- a/arch/arm/plat-omap/include/mach/led.h +++ b/arch/arm/plat-omap/include/plat/led.h | |||
diff --git a/arch/arm/plat-omap/include/mach/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h index b7a6991814ec..729166b76a7c 100644 --- a/arch/arm/plat-omap/include/mach/mailbox.h +++ b/arch/arm/plat-omap/include/plat/mailbox.h | |||
@@ -6,9 +6,9 @@ | |||
6 | #include <linux/wait.h> | 6 | #include <linux/wait.h> |
7 | #include <linux/workqueue.h> | 7 | #include <linux/workqueue.h> |
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <linux/interrupt.h> | ||
9 | 10 | ||
10 | typedef u32 mbox_msg_t; | 11 | typedef u32 mbox_msg_t; |
11 | typedef void (mbox_receiver_t)(mbox_msg_t msg); | ||
12 | struct omap_mbox; | 12 | struct omap_mbox; |
13 | 13 | ||
14 | typedef int __bitwise omap_mbox_irq_t; | 14 | typedef int __bitwise omap_mbox_irq_t; |
@@ -29,8 +29,10 @@ struct omap_mbox_ops { | |||
29 | int (*fifo_empty)(struct omap_mbox *mbox); | 29 | int (*fifo_empty)(struct omap_mbox *mbox); |
30 | int (*fifo_full)(struct omap_mbox *mbox); | 30 | int (*fifo_full)(struct omap_mbox *mbox); |
31 | /* irq */ | 31 | /* irq */ |
32 | void (*enable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); | 32 | void (*enable_irq)(struct omap_mbox *mbox, |
33 | void (*disable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); | 33 | omap_mbox_irq_t irq); |
34 | void (*disable_irq)(struct omap_mbox *mbox, | ||
35 | omap_mbox_irq_t irq); | ||
34 | void (*ack_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); | 36 | void (*ack_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); |
35 | int (*is_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); | 37 | int (*is_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq); |
36 | /* ctx */ | 38 | /* ctx */ |
@@ -42,6 +44,7 @@ struct omap_mbox_queue { | |||
42 | spinlock_t lock; | 44 | spinlock_t lock; |
43 | struct request_queue *queue; | 45 | struct request_queue *queue; |
44 | struct work_struct work; | 46 | struct work_struct work; |
47 | struct tasklet_struct tasklet; | ||
45 | int (*callback)(void *); | 48 | int (*callback)(void *); |
46 | struct omap_mbox *mbox; | 49 | struct omap_mbox *mbox; |
47 | }; | 50 | }; |
@@ -64,7 +67,7 @@ struct omap_mbox { | |||
64 | void (*err_notify)(void); | 67 | void (*err_notify)(void); |
65 | }; | 68 | }; |
66 | 69 | ||
67 | int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg, void *); | 70 | int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg); |
68 | void omap_mbox_init_seq(struct omap_mbox *); | 71 | void omap_mbox_init_seq(struct omap_mbox *); |
69 | 72 | ||
70 | struct omap_mbox *omap_mbox_get(const char *); | 73 | struct omap_mbox *omap_mbox_get(const char *); |
@@ -93,4 +96,16 @@ static inline void omap_mbox_restore_ctx(struct omap_mbox *mbox) | |||
93 | mbox->ops->restore_ctx(mbox); | 96 | mbox->ops->restore_ctx(mbox); |
94 | } | 97 | } |
95 | 98 | ||
99 | static inline void omap_mbox_enable_irq(struct omap_mbox *mbox, | ||
100 | omap_mbox_irq_t irq) | ||
101 | { | ||
102 | mbox->ops->enable_irq(mbox, irq); | ||
103 | } | ||
104 | |||
105 | static inline void omap_mbox_disable_irq(struct omap_mbox *mbox, | ||
106 | omap_mbox_irq_t irq) | ||
107 | { | ||
108 | mbox->ops->disable_irq(mbox, irq); | ||
109 | } | ||
110 | |||
96 | #endif /* MAILBOX_H */ | 111 | #endif /* MAILBOX_H */ |
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index e0d6eca222cc..4f22e5bb7ff7 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
@@ -28,10 +28,10 @@ | |||
28 | #include <linux/spinlock.h> | 28 | #include <linux/spinlock.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <mach/clock.h> | 31 | #include <plat/clock.h> |
32 | 32 | ||
33 | #define OMAP730_MCBSP1_BASE 0xfffb1000 | 33 | #define OMAP7XX_MCBSP1_BASE 0xfffb1000 |
34 | #define OMAP730_MCBSP2_BASE 0xfffb1800 | 34 | #define OMAP7XX_MCBSP2_BASE 0xfffb1800 |
35 | 35 | ||
36 | #define OMAP1510_MCBSP1_BASE 0xe1011800 | 36 | #define OMAP1510_MCBSP1_BASE 0xe1011800 |
37 | #define OMAP1510_MCBSP2_BASE 0xfffb1000 | 37 | #define OMAP1510_MCBSP2_BASE 0xfffb1000 |
@@ -58,7 +58,7 @@ | |||
58 | #define OMAP44XX_MCBSP3_BASE 0x49026000 | 58 | #define OMAP44XX_MCBSP3_BASE 0x49026000 |
59 | #define OMAP44XX_MCBSP4_BASE 0x48074000 | 59 | #define OMAP44XX_MCBSP4_BASE 0x48074000 |
60 | 60 | ||
61 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) | 61 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) |
62 | 62 | ||
63 | #define OMAP_MCBSP_REG_DRR2 0x00 | 63 | #define OMAP_MCBSP_REG_DRR2 0x00 |
64 | #define OMAP_MCBSP_REG_DRR1 0x02 | 64 | #define OMAP_MCBSP_REG_DRR1 0x02 |
diff --git a/arch/arm/plat-omap/include/mach/mcspi.h b/arch/arm/plat-omap/include/plat/mcspi.h index 1254e4945b6f..1254e4945b6f 100644 --- a/arch/arm/plat-omap/include/mach/mcspi.h +++ b/arch/arm/plat-omap/include/plat/mcspi.h | |||
diff --git a/arch/arm/plat-omap/include/mach/memory.h b/arch/arm/plat-omap/include/plat/memory.h index 9ad41dc484c1..3325f7b49eaa 100644 --- a/arch/arm/plat-omap/include/mach/memory.h +++ b/arch/arm/plat-omap/include/plat/memory.h | |||
@@ -68,6 +68,13 @@ | |||
68 | __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \ | 68 | __dma = __dma - PHYS_OFFSET + OMAP1510_LB_OFFSET; \ |
69 | __dma; }) | 69 | __dma; }) |
70 | 70 | ||
71 | #define __arch_dma_to_page(dev, addr) \ | ||
72 | ({ dma_addr_t __dma = addr; \ | ||
73 | if (is_lbus_device(dev)) \ | ||
74 | __dma += PHYS_OFFSET - OMAP1510_LB_OFFSET; \ | ||
75 | phys_to_page(__dma); \ | ||
76 | }) | ||
77 | |||
71 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ | 78 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ |
72 | lbus_to_virt(addr) : \ | 79 | lbus_to_virt(addr) : \ |
73 | __phys_to_virt(addr)); }) | 80 | __phys_to_virt(addr)); }) |
diff --git a/arch/arm/plat-omap/include/mach/menelaus.h b/arch/arm/plat-omap/include/plat/menelaus.h index 3122bf68c7ce..3122bf68c7ce 100644 --- a/arch/arm/plat-omap/include/mach/menelaus.h +++ b/arch/arm/plat-omap/include/plat/menelaus.h | |||
diff --git a/arch/arm/plat-omap/include/mach/mmc.h b/arch/arm/plat-omap/include/plat/mmc.h index 7229b9593301..29937137bf3e 100644 --- a/arch/arm/plat-omap/include/mach/mmc.h +++ b/arch/arm/plat-omap/include/plat/mmc.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/mmc/host.h> | 16 | #include <linux/mmc/host.h> |
17 | 17 | ||
18 | #include <mach/board.h> | 18 | #include <plat/board.h> |
19 | 19 | ||
20 | #define OMAP15XX_NR_MMC 1 | 20 | #define OMAP15XX_NR_MMC 1 |
21 | #define OMAP16XX_NR_MMC 2 | 21 | #define OMAP16XX_NR_MMC 2 |
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/plat/mux.h index 0f49d2d563d9..8f069cc80350 100644 --- a/arch/arm/plat-omap/include/mach/mux.h +++ b/arch/arm/plat-omap/include/plat/mux.h | |||
@@ -51,23 +51,13 @@ | |||
51 | .pu_pd_reg = PU_PD_SEL_##reg, \ | 51 | .pu_pd_reg = PU_PD_SEL_##reg, \ |
52 | .pu_pd_val = status, | 52 | .pu_pd_val = status, |
53 | 53 | ||
54 | #define MUX_REG_730(reg, mode_offset, mode) .mux_reg_name = "OMAP730_IO_CONF_"#reg, \ | 54 | #define MUX_REG_7XX(reg, mode_offset, mode) .mux_reg_name = "OMAP7XX_IO_CONF_"#reg, \ |
55 | .mux_reg = OMAP730_IO_CONF_##reg, \ | 55 | .mux_reg = OMAP7XX_IO_CONF_##reg, \ |
56 | .mask_offset = mode_offset, \ | 56 | .mask_offset = mode_offset, \ |
57 | .mask = mode, | 57 | .mask = mode, |
58 | 58 | ||
59 | #define PULL_REG_730(reg, bit, status) .pull_name = "OMAP730_IO_CONF_"#reg, \ | 59 | #define PULL_REG_7XX(reg, bit, status) .pull_name = "OMAP7XX_IO_CONF_"#reg, \ |
60 | .pull_reg = OMAP730_IO_CONF_##reg, \ | 60 | .pull_reg = OMAP7XX_IO_CONF_##reg, \ |
61 | .pull_bit = bit, \ | ||
62 | .pull_val = status, | ||
63 | |||
64 | #define MUX_REG_850(reg, mode_offset, mode) .mux_reg_name = "OMAP850_IO_CONF_"#reg, \ | ||
65 | .mux_reg = OMAP850_IO_CONF_##reg, \ | ||
66 | .mask_offset = mode_offset, \ | ||
67 | .mask = mode, | ||
68 | |||
69 | #define PULL_REG_850(reg, bit, status) .pull_name = "OMAP850_IO_CONF_"#reg, \ | ||
70 | .pull_reg = OMAP850_IO_CONF_##reg, \ | ||
71 | .pull_bit = bit, \ | 61 | .pull_bit = bit, \ |
72 | .pull_val = status, | 62 | .pull_val = status, |
73 | 63 | ||
@@ -84,21 +74,12 @@ | |||
84 | #define PU_PD_REG(reg, status) .pu_pd_reg = PU_PD_SEL_##reg, \ | 74 | #define PU_PD_REG(reg, status) .pu_pd_reg = PU_PD_SEL_##reg, \ |
85 | .pu_pd_val = status, | 75 | .pu_pd_val = status, |
86 | 76 | ||
87 | #define MUX_REG_730(reg, mode_offset, mode) \ | 77 | #define MUX_REG_7XX(reg, mode_offset, mode) \ |
88 | .mux_reg = OMAP730_IO_CONF_##reg, \ | 78 | .mux_reg = OMAP7XX_IO_CONF_##reg, \ |
89 | .mask_offset = mode_offset, \ | ||
90 | .mask = mode, | ||
91 | |||
92 | #define PULL_REG_730(reg, bit, status) .pull_reg = OMAP730_IO_CONF_##reg, \ | ||
93 | .pull_bit = bit, \ | ||
94 | .pull_val = status, | ||
95 | |||
96 | #define MUX_REG_850(reg, mode_offset, mode) \ | ||
97 | .mux_reg = OMAP850_IO_CONF_##reg, \ | ||
98 | .mask_offset = mode_offset, \ | 79 | .mask_offset = mode_offset, \ |
99 | .mask = mode, | 80 | .mask = mode, |
100 | 81 | ||
101 | #define PULL_REG_850(reg, bit, status) .pull_reg = OMAP850_IO_CONF_##reg, \ | 82 | #define PULL_REG_7XX(reg, bit, status) .pull_reg = OMAP7XX_IO_CONF_##reg, \ |
102 | .pull_bit = bit, \ | 83 | .pull_bit = bit, \ |
103 | .pull_val = status, | 84 | .pull_val = status, |
104 | 85 | ||
@@ -118,32 +99,21 @@ | |||
118 | 99 | ||
119 | /* | 100 | /* |
120 | * OMAP730/850 has a slightly different config for the pin mux. | 101 | * OMAP730/850 has a slightly different config for the pin mux. |
121 | * - config regs are the OMAP730_IO_CONF_x regs (see omap730.h) regs and | 102 | * - config regs are the OMAP7XX_IO_CONF_x regs (see omap730.h) regs and |
122 | * not the FUNC_MUX_CTRL_x regs from hardware.h | 103 | * not the FUNC_MUX_CTRL_x regs from hardware.h |
123 | * - for pull-up/down, only has one enable bit which is is in the same register | 104 | * - for pull-up/down, only has one enable bit which is is in the same register |
124 | * as mux config | 105 | * as mux config |
125 | */ | 106 | */ |
126 | #define MUX_CFG_730(desc, mux_reg, mode_offset, mode, \ | 107 | #define MUX_CFG_7XX(desc, mux_reg, mode_offset, mode, \ |
127 | pull_bit, pull_status, debug_status)\ | ||
128 | { \ | ||
129 | .name = desc, \ | ||
130 | .debug = debug_status, \ | ||
131 | MUX_REG_730(mux_reg, mode_offset, mode) \ | ||
132 | PULL_REG_730(mux_reg, pull_bit, pull_status) \ | ||
133 | PU_PD_REG(NA, 0) \ | ||
134 | }, | ||
135 | |||
136 | #define MUX_CFG_850(desc, mux_reg, mode_offset, mode, \ | ||
137 | pull_bit, pull_status, debug_status)\ | 108 | pull_bit, pull_status, debug_status)\ |
138 | { \ | 109 | { \ |
139 | .name = desc, \ | 110 | .name = desc, \ |
140 | .debug = debug_status, \ | 111 | .debug = debug_status, \ |
141 | MUX_REG_850(mux_reg, mode_offset, mode) \ | 112 | MUX_REG_7XX(mux_reg, mode_offset, mode) \ |
142 | PULL_REG_850(mux_reg, pull_bit, pull_status) \ | 113 | PULL_REG_7XX(mux_reg, pull_bit, pull_status) \ |
143 | PU_PD_REG(NA, 0) \ | 114 | PU_PD_REG(NA, 0) \ |
144 | }, | 115 | }, |
145 | 116 | ||
146 | |||
147 | #define MUX_CFG_24XX(desc, reg_offset, mode, \ | 117 | #define MUX_CFG_24XX(desc, reg_offset, mode, \ |
148 | pull_en, pull_mode, dbg) \ | 118 | pull_en, pull_mode, dbg) \ |
149 | { \ | 119 | { \ |
@@ -160,58 +130,11 @@ | |||
160 | #define OMAP2_PULL_UP (1 << 4) | 130 | #define OMAP2_PULL_UP (1 << 4) |
161 | #define OMAP2_ALTELECTRICALSEL (1 << 5) | 131 | #define OMAP2_ALTELECTRICALSEL (1 << 5) |
162 | 132 | ||
163 | /* 34xx specific mux bit defines */ | ||
164 | #define OMAP3_INPUT_EN (1 << 8) | ||
165 | #define OMAP3_OFF_EN (1 << 9) | ||
166 | #define OMAP3_OFFOUT_EN (1 << 10) | ||
167 | #define OMAP3_OFFOUT_VAL (1 << 11) | ||
168 | #define OMAP3_OFF_PULL_EN (1 << 12) | ||
169 | #define OMAP3_OFF_PULL_UP (1 << 13) | ||
170 | #define OMAP3_WAKEUP_EN (1 << 14) | ||
171 | |||
172 | /* 34xx mux mode options for each pin. See TRM for options */ | ||
173 | #define OMAP34XX_MUX_MODE0 0 | ||
174 | #define OMAP34XX_MUX_MODE1 1 | ||
175 | #define OMAP34XX_MUX_MODE2 2 | ||
176 | #define OMAP34XX_MUX_MODE3 3 | ||
177 | #define OMAP34XX_MUX_MODE4 4 | ||
178 | #define OMAP34XX_MUX_MODE5 5 | ||
179 | #define OMAP34XX_MUX_MODE6 6 | ||
180 | #define OMAP34XX_MUX_MODE7 7 | ||
181 | |||
182 | /* 34xx active pin states */ | ||
183 | #define OMAP34XX_PIN_OUTPUT 0 | ||
184 | #define OMAP34XX_PIN_INPUT OMAP3_INPUT_EN | ||
185 | #define OMAP34XX_PIN_INPUT_PULLUP (OMAP2_PULL_ENA | OMAP3_INPUT_EN \ | ||
186 | | OMAP2_PULL_UP) | ||
187 | #define OMAP34XX_PIN_INPUT_PULLDOWN (OMAP2_PULL_ENA | OMAP3_INPUT_EN) | ||
188 | |||
189 | /* 34xx off mode states */ | ||
190 | #define OMAP34XX_PIN_OFF_NONE 0 | ||
191 | #define OMAP34XX_PIN_OFF_OUTPUT_HIGH (OMAP3_OFF_EN | OMAP3_OFFOUT_EN \ | ||
192 | | OMAP3_OFFOUT_VAL) | ||
193 | #define OMAP34XX_PIN_OFF_OUTPUT_LOW (OMAP3_OFF_EN | OMAP3_OFFOUT_EN) | ||
194 | #define OMAP34XX_PIN_OFF_INPUT_PULLUP (OMAP3_OFF_EN | OMAP3_OFF_PULL_EN \ | ||
195 | | OMAP3_OFF_PULL_UP) | ||
196 | #define OMAP34XX_PIN_OFF_INPUT_PULLDOWN (OMAP3_OFF_EN | OMAP3_OFF_PULL_EN) | ||
197 | #define OMAP34XX_PIN_OFF_WAKEUPENABLE OMAP3_WAKEUP_EN | ||
198 | |||
199 | #define MUX_CFG_34XX(desc, reg_offset, mux_value) { \ | ||
200 | .name = desc, \ | ||
201 | .debug = 0, \ | ||
202 | .mux_reg = reg_offset, \ | ||
203 | .mux_val = mux_value \ | ||
204 | }, | ||
205 | |||
206 | struct pin_config { | 133 | struct pin_config { |
207 | char *name; | 134 | char *name; |
208 | const unsigned int mux_reg; | 135 | const unsigned int mux_reg; |
209 | unsigned char debug; | 136 | unsigned char debug; |
210 | 137 | ||
211 | #if defined(CONFIG_ARCH_OMAP34XX) | ||
212 | u16 mux_val; /* Wake-up, off mode, pull, mux mode */ | ||
213 | #endif | ||
214 | |||
215 | #if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP24XX) | 138 | #if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP24XX) |
216 | const unsigned char mask_offset; | 139 | const unsigned char mask_offset; |
217 | const unsigned char mask; | 140 | const unsigned char mask; |
@@ -232,45 +155,36 @@ struct pin_config { | |||
232 | 155 | ||
233 | }; | 156 | }; |
234 | 157 | ||
235 | enum omap730_index { | 158 | enum omap7xx_index { |
236 | /* OMAP 730 keyboard */ | 159 | /* OMAP 730 keyboard */ |
237 | E2_730_KBR0, | 160 | E2_7XX_KBR0, |
238 | J7_730_KBR1, | 161 | J7_7XX_KBR1, |
239 | E1_730_KBR2, | 162 | E1_7XX_KBR2, |
240 | F3_730_KBR3, | 163 | F3_7XX_KBR3, |
241 | D2_730_KBR4, | 164 | D2_7XX_KBR4, |
242 | C2_730_KBC0, | 165 | C2_7XX_KBC0, |
243 | D3_730_KBC1, | 166 | D3_7XX_KBC1, |
244 | E4_730_KBC2, | 167 | E4_7XX_KBC2, |
245 | F4_730_KBC3, | 168 | F4_7XX_KBC3, |
246 | E3_730_KBC4, | 169 | E3_7XX_KBC4, |
247 | |||
248 | /* USB */ | ||
249 | AA17_730_USB_DM, | ||
250 | W16_730_USB_PU_EN, | ||
251 | W17_730_USB_VBUSI, | ||
252 | }; | ||
253 | |||
254 | enum omap850_index { | ||
255 | /* OMAP 850 keyboard */ | ||
256 | E2_850_KBR0, | ||
257 | J7_850_KBR1, | ||
258 | E1_850_KBR2, | ||
259 | F3_850_KBR3, | ||
260 | D2_850_KBR4, | ||
261 | C2_850_KBC0, | ||
262 | D3_850_KBC1, | ||
263 | E4_850_KBC2, | ||
264 | F4_850_KBC3, | ||
265 | E3_850_KBC4, | ||
266 | 170 | ||
267 | /* USB */ | 171 | /* USB */ |
268 | AA17_850_USB_DM, | 172 | AA17_7XX_USB_DM, |
269 | W16_850_USB_PU_EN, | 173 | W16_7XX_USB_PU_EN, |
270 | W17_850_USB_VBUSI, | 174 | W17_7XX_USB_VBUSI, |
175 | W18_7XX_USB_DMCK_OUT, | ||
176 | W19_7XX_USB_DCRST, | ||
177 | |||
178 | /* MMC */ | ||
179 | MMC_7XX_CMD, | ||
180 | MMC_7XX_CLK, | ||
181 | MMC_7XX_DAT0, | ||
182 | |||
183 | /* I2C */ | ||
184 | I2C_7XX_SCL, | ||
185 | I2C_7XX_SDA, | ||
271 | }; | 186 | }; |
272 | 187 | ||
273 | |||
274 | enum omap1xxx_index { | 188 | enum omap1xxx_index { |
275 | /* UART1 (BT_UART_GATING)*/ | 189 | /* UART1 (BT_UART_GATING)*/ |
276 | UART1_TX = 0, | 190 | UART1_TX = 0, |
@@ -726,172 +640,6 @@ enum omap24xx_index { | |||
726 | 640 | ||
727 | }; | 641 | }; |
728 | 642 | ||
729 | enum omap34xx_index { | ||
730 | /* 34xx I2C */ | ||
731 | K21_34XX_I2C1_SCL, | ||
732 | J21_34XX_I2C1_SDA, | ||
733 | AF15_34XX_I2C2_SCL, | ||
734 | AE15_34XX_I2C2_SDA, | ||
735 | AF14_34XX_I2C3_SCL, | ||
736 | AG14_34XX_I2C3_SDA, | ||
737 | AD26_34XX_I2C4_SCL, | ||
738 | AE26_34XX_I2C4_SDA, | ||
739 | |||
740 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 1*/ | ||
741 | Y8_3430_USB1HS_PHY_CLK, | ||
742 | Y9_3430_USB1HS_PHY_STP, | ||
743 | AA14_3430_USB1HS_PHY_DIR, | ||
744 | AA11_3430_USB1HS_PHY_NXT, | ||
745 | W13_3430_USB1HS_PHY_DATA0, | ||
746 | W12_3430_USB1HS_PHY_DATA1, | ||
747 | W11_3430_USB1HS_PHY_DATA2, | ||
748 | Y11_3430_USB1HS_PHY_DATA3, | ||
749 | W9_3430_USB1HS_PHY_DATA4, | ||
750 | Y12_3430_USB1HS_PHY_DATA5, | ||
751 | W8_3430_USB1HS_PHY_DATA6, | ||
752 | Y13_3430_USB1HS_PHY_DATA7, | ||
753 | |||
754 | /* PHY - HSUSB: 12-pin ULPI PHY: Port 2*/ | ||
755 | AA8_3430_USB2HS_PHY_CLK, | ||
756 | AA10_3430_USB2HS_PHY_STP, | ||
757 | AA9_3430_USB2HS_PHY_DIR, | ||
758 | AB11_3430_USB2HS_PHY_NXT, | ||
759 | AB10_3430_USB2HS_PHY_DATA0, | ||
760 | AB9_3430_USB2HS_PHY_DATA1, | ||
761 | W3_3430_USB2HS_PHY_DATA2, | ||
762 | T4_3430_USB2HS_PHY_DATA3, | ||
763 | T3_3430_USB2HS_PHY_DATA4, | ||
764 | R3_3430_USB2HS_PHY_DATA5, | ||
765 | R4_3430_USB2HS_PHY_DATA6, | ||
766 | T2_3430_USB2HS_PHY_DATA7, | ||
767 | |||
768 | |||
769 | /* TLL - HSUSB: 12-pin TLL Port 1*/ | ||
770 | Y8_3430_USB1HS_TLL_CLK, | ||
771 | Y9_3430_USB1HS_TLL_STP, | ||
772 | AA14_3430_USB1HS_TLL_DIR, | ||
773 | AA11_3430_USB1HS_TLL_NXT, | ||
774 | W13_3430_USB1HS_TLL_DATA0, | ||
775 | W12_3430_USB1HS_TLL_DATA1, | ||
776 | W11_3430_USB1HS_TLL_DATA2, | ||
777 | Y11_3430_USB1HS_TLL_DATA3, | ||
778 | W9_3430_USB1HS_TLL_DATA4, | ||
779 | Y12_3430_USB1HS_TLL_DATA5, | ||
780 | W8_3430_USB1HS_TLL_DATA6, | ||
781 | Y13_3430_USB1HS_TLL_DATA7, | ||
782 | |||
783 | /* TLL - HSUSB: 12-pin TLL Port 2*/ | ||
784 | AA8_3430_USB2HS_TLL_CLK, | ||
785 | AA10_3430_USB2HS_TLL_STP, | ||
786 | AA9_3430_USB2HS_TLL_DIR, | ||
787 | AB11_3430_USB2HS_TLL_NXT, | ||
788 | AB10_3430_USB2HS_TLL_DATA0, | ||
789 | AB9_3430_USB2HS_TLL_DATA1, | ||
790 | W3_3430_USB2HS_TLL_DATA2, | ||
791 | T4_3430_USB2HS_TLL_DATA3, | ||
792 | T3_3430_USB2HS_TLL_DATA4, | ||
793 | R3_3430_USB2HS_TLL_DATA5, | ||
794 | R4_3430_USB2HS_TLL_DATA6, | ||
795 | T2_3430_USB2HS_TLL_DATA7, | ||
796 | |||
797 | /* TLL - HSUSB: 12-pin TLL Port 3*/ | ||
798 | AA6_3430_USB3HS_TLL_CLK, | ||
799 | AB3_3430_USB3HS_TLL_STP, | ||
800 | AA3_3430_USB3HS_TLL_DIR, | ||
801 | Y3_3430_USB3HS_TLL_NXT, | ||
802 | AA5_3430_USB3HS_TLL_DATA0, | ||
803 | Y4_3430_USB3HS_TLL_DATA1, | ||
804 | Y5_3430_USB3HS_TLL_DATA2, | ||
805 | W5_3430_USB3HS_TLL_DATA3, | ||
806 | AB12_3430_USB3HS_TLL_DATA4, | ||
807 | AB13_3430_USB3HS_TLL_DATA5, | ||
808 | AA13_3430_USB3HS_TLL_DATA6, | ||
809 | AA12_3430_USB3HS_TLL_DATA7, | ||
810 | |||
811 | /* PHY FSUSB: FS Serial for Port 1 (multiple PHY modes supported) */ | ||
812 | AF10_3430_USB1FS_PHY_MM1_RXDP, | ||
813 | AG9_3430_USB1FS_PHY_MM1_RXDM, | ||
814 | W13_3430_USB1FS_PHY_MM1_RXRCV, | ||
815 | W12_3430_USB1FS_PHY_MM1_TXSE0, | ||
816 | W11_3430_USB1FS_PHY_MM1_TXDAT, | ||
817 | Y11_3430_USB1FS_PHY_MM1_TXEN_N, | ||
818 | |||
819 | /* PHY FSUSB: FS Serial for Port 2 (multiple PHY modes supported) */ | ||
820 | AF7_3430_USB2FS_PHY_MM2_RXDP, | ||
821 | AH7_3430_USB2FS_PHY_MM2_RXDM, | ||
822 | AB10_3430_USB2FS_PHY_MM2_RXRCV, | ||
823 | AB9_3430_USB2FS_PHY_MM2_TXSE0, | ||
824 | W3_3430_USB2FS_PHY_MM2_TXDAT, | ||
825 | T4_3430_USB2FS_PHY_MM2_TXEN_N, | ||
826 | |||
827 | /* PHY FSUSB: FS Serial for Port 3 (multiple PHY modes supported) */ | ||
828 | AH3_3430_USB3FS_PHY_MM3_RXDP, | ||
829 | AE3_3430_USB3FS_PHY_MM3_RXDM, | ||
830 | AD1_3430_USB3FS_PHY_MM3_RXRCV, | ||
831 | AE1_3430_USB3FS_PHY_MM3_TXSE0, | ||
832 | AD2_3430_USB3FS_PHY_MM3_TXDAT, | ||
833 | AC1_3430_USB3FS_PHY_MM3_TXEN_N, | ||
834 | |||
835 | /* 34xx GPIO | ||
836 | * - normally these are bidirectional, no internal pullup/pulldown | ||
837 | * - "_UP" suffix (GPIO3_UP) if internal pullup is configured | ||
838 | * - "_DOWN" suffix (GPIO3_DOWN) with internal pulldown | ||
839 | * - "_OUT" suffix (GPIO3_OUT) for output-only pins (unlike 24xx) | ||
840 | */ | ||
841 | AF26_34XX_GPIO0, | ||
842 | AF22_34XX_GPIO9, | ||
843 | AG9_34XX_GPIO23, | ||
844 | AH8_34XX_GPIO29, | ||
845 | U8_34XX_GPIO54_OUT, | ||
846 | U8_34XX_GPIO54_DOWN, | ||
847 | L8_34XX_GPIO63, | ||
848 | G25_34XX_GPIO86_OUT, | ||
849 | AG4_34XX_GPIO134_OUT, | ||
850 | AF4_34XX_GPIO135_OUT, | ||
851 | AE4_34XX_GPIO136_OUT, | ||
852 | AF6_34XX_GPIO140_UP, | ||
853 | AE6_34XX_GPIO141, | ||
854 | AF5_34XX_GPIO142, | ||
855 | AE5_34XX_GPIO143, | ||
856 | H19_34XX_GPIO164_OUT, | ||
857 | J25_34XX_GPIO170, | ||
858 | |||
859 | /* OMAP3 SDRC CKE signals to SDR/DDR ram chips */ | ||
860 | H16_34XX_SDRC_CKE0, | ||
861 | H17_34XX_SDRC_CKE1, | ||
862 | |||
863 | /* MMC1 */ | ||
864 | N28_3430_MMC1_CLK, | ||
865 | M27_3430_MMC1_CMD, | ||
866 | N27_3430_MMC1_DAT0, | ||
867 | N26_3430_MMC1_DAT1, | ||
868 | N25_3430_MMC1_DAT2, | ||
869 | P28_3430_MMC1_DAT3, | ||
870 | P27_3430_MMC1_DAT4, | ||
871 | P26_3430_MMC1_DAT5, | ||
872 | R27_3430_MMC1_DAT6, | ||
873 | R25_3430_MMC1_DAT7, | ||
874 | |||
875 | /* MMC2 */ | ||
876 | AE2_3430_MMC2_CLK, | ||
877 | AG5_3430_MMC2_CMD, | ||
878 | AH5_3430_MMC2_DAT0, | ||
879 | AH4_3430_MMC2_DAT1, | ||
880 | AG4_3430_MMC2_DAT2, | ||
881 | AF4_3430_MMC2_DAT3, | ||
882 | |||
883 | /* MMC3 */ | ||
884 | AF10_3430_MMC3_CLK, | ||
885 | AC3_3430_MMC3_CMD, | ||
886 | AE11_3430_MMC3_DAT0, | ||
887 | AH9_3430_MMC3_DAT1, | ||
888 | AF13_3430_MMC3_DAT2, | ||
889 | AF13_3430_MMC3_DAT3, | ||
890 | |||
891 | /* SYS_NIRQ T2 INT1 */ | ||
892 | AF26_34XX_SYS_NIRQ, | ||
893 | }; | ||
894 | |||
895 | struct omap_mux_cfg { | 643 | struct omap_mux_cfg { |
896 | struct pin_config *pins; | 644 | struct pin_config *pins; |
897 | unsigned long size; | 645 | unsigned long size; |
@@ -901,14 +649,14 @@ struct omap_mux_cfg { | |||
901 | #ifdef CONFIG_OMAP_MUX | 649 | #ifdef CONFIG_OMAP_MUX |
902 | /* setup pin muxing in Linux */ | 650 | /* setup pin muxing in Linux */ |
903 | extern int omap1_mux_init(void); | 651 | extern int omap1_mux_init(void); |
904 | extern int omap2_mux_init(void); | ||
905 | extern int omap_mux_register(struct omap_mux_cfg *); | 652 | extern int omap_mux_register(struct omap_mux_cfg *); |
906 | extern int omap_cfg_reg(unsigned long reg_cfg); | 653 | extern int omap_cfg_reg(unsigned long reg_cfg); |
907 | #else | 654 | #else |
908 | /* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ | 655 | /* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ |
909 | static inline int omap1_mux_init(void) { return 0; } | 656 | static inline int omap1_mux_init(void) { return 0; } |
910 | static inline int omap2_mux_init(void) { return 0; } | ||
911 | static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } | 657 | static inline int omap_cfg_reg(unsigned long reg_cfg) { return 0; } |
912 | #endif | 658 | #endif |
913 | 659 | ||
660 | extern int omap2_mux_init(void); | ||
661 | |||
914 | #endif | 662 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/nand.h b/arch/arm/plat-omap/include/plat/nand.h index 631a7bed1eef..631a7bed1eef 100644 --- a/arch/arm/plat-omap/include/mach/nand.h +++ b/arch/arm/plat-omap/include/plat/nand.h | |||
diff --git a/arch/arm/plat-omap/include/mach/omap-alsa.h b/arch/arm/plat-omap/include/plat/omap-alsa.h index bdf30a0f87f2..b53055b390d0 100644 --- a/arch/arm/plat-omap/include/mach/omap-alsa.h +++ b/arch/arm/plat-omap/include/plat/omap-alsa.h | |||
@@ -40,10 +40,10 @@ | |||
40 | #ifndef __OMAP_ALSA_H | 40 | #ifndef __OMAP_ALSA_H |
41 | #define __OMAP_ALSA_H | 41 | #define __OMAP_ALSA_H |
42 | 42 | ||
43 | #include <mach/dma.h> | 43 | #include <plat/dma.h> |
44 | #include <sound/core.h> | 44 | #include <sound/core.h> |
45 | #include <sound/pcm.h> | 45 | #include <sound/pcm.h> |
46 | #include <mach/mcbsp.h> | 46 | #include <plat/mcbsp.h> |
47 | #include <linux/platform_device.h> | 47 | #include <linux/platform_device.h> |
48 | 48 | ||
49 | #define DMA_BUF_SIZE (1024 * 8) | 49 | #define DMA_BUF_SIZE (1024 * 8) |
diff --git a/arch/arm/plat-omap/include/mach/omap-pm.h b/arch/arm/plat-omap/include/plat/omap-pm.h index 3ee41d711492..3ee41d711492 100644 --- a/arch/arm/plat-omap/include/mach/omap-pm.h +++ b/arch/arm/plat-omap/include/plat/omap-pm.h | |||
diff --git a/arch/arm/plat-omap/include/mach/omap1510.h b/arch/arm/plat-omap/include/plat/omap1510.h index d24004668138..d24004668138 100644 --- a/arch/arm/plat-omap/include/mach/omap1510.h +++ b/arch/arm/plat-omap/include/plat/omap1510.h | |||
diff --git a/arch/arm/plat-omap/include/mach/omap16xx.h b/arch/arm/plat-omap/include/plat/omap16xx.h index 0e69b504c25f..7560b4d583a3 100644 --- a/arch/arm/plat-omap/include/mach/omap16xx.h +++ b/arch/arm/plat-omap/include/plat/omap16xx.h | |||
@@ -124,7 +124,7 @@ | |||
124 | #define TIPB_SWITCH_BASE (0xfffbc800) | 124 | #define TIPB_SWITCH_BASE (0xfffbc800) |
125 | #define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160) | 125 | #define OMAP16XX_MMCSD2_SSW_MPU_CONF (TIPB_SWITCH_BASE + 0x160) |
126 | 126 | ||
127 | /* UART3 Registers Maping through MPU bus */ | 127 | /* UART3 Registers Mapping through MPU bus */ |
128 | #define UART3_RHR (OMAP_UART3_BASE + 0) | 128 | #define UART3_RHR (OMAP_UART3_BASE + 0) |
129 | #define UART3_THR (OMAP_UART3_BASE + 0) | 129 | #define UART3_THR (OMAP_UART3_BASE + 0) |
130 | #define UART3_DLL (OMAP_UART3_BASE + 0) | 130 | #define UART3_DLL (OMAP_UART3_BASE + 0) |
diff --git a/arch/arm/plat-omap/include/mach/omap24xx.h b/arch/arm/plat-omap/include/plat/omap24xx.h index 696edfc145a6..696edfc145a6 100644 --- a/arch/arm/plat-omap/include/mach/omap24xx.h +++ b/arch/arm/plat-omap/include/plat/omap24xx.h | |||
diff --git a/arch/arm/plat-omap/include/mach/omap34xx.h b/arch/arm/plat-omap/include/plat/omap34xx.h index f8d186a73712..077f05979f86 100644 --- a/arch/arm/plat-omap/include/mach/omap34xx.h +++ b/arch/arm/plat-omap/include/plat/omap34xx.h | |||
@@ -72,16 +72,15 @@ | |||
72 | #define OMAP3430_ISP_CSI2A_END (OMAP3430_ISP_CSI2A_BASE + 0x16F) | 72 | #define OMAP3430_ISP_CSI2A_END (OMAP3430_ISP_CSI2A_BASE + 0x16F) |
73 | #define OMAP3430_ISP_CSI2PHY_END (OMAP3430_ISP_CSI2PHY_BASE + 0x007) | 73 | #define OMAP3430_ISP_CSI2PHY_END (OMAP3430_ISP_CSI2PHY_BASE + 0x007) |
74 | 74 | ||
75 | #define OMAP34XX_IVA_INTC_BASE 0x40000000 | ||
76 | #define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000) | 75 | #define OMAP34XX_HSUSB_OTG_BASE (L4_34XX_BASE + 0xAB000) |
77 | #define OMAP34XX_HSUSB_HOST_BASE (L4_34XX_BASE + 0x64000) | ||
78 | #define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000) | 76 | #define OMAP34XX_USBTLL_BASE (L4_34XX_BASE + 0x62000) |
77 | #define OMAP34XX_UHH_CONFIG_BASE (L4_34XX_BASE + 0x64000) | ||
78 | #define OMAP34XX_OHCI_BASE (L4_34XX_BASE + 0x64400) | ||
79 | #define OMAP34XX_EHCI_BASE (L4_34XX_BASE + 0x64800) | ||
80 | #define OMAP34XX_SR1_BASE 0x480C9000 | ||
81 | #define OMAP34XX_SR2_BASE 0x480CB000 | ||
79 | 82 | ||
80 | #define OMAP34XX_MAILBOX_BASE (L4_34XX_BASE + 0x94000) | 83 | #define OMAP34XX_MAILBOX_BASE (L4_34XX_BASE + 0x94000) |
81 | 84 | ||
82 | #define OMAP34XX_DSP_BASE 0x58000000 | ||
83 | #define OMAP34XX_DSP_MEM_BASE (OMAP34XX_DSP_BASE + 0x0) | ||
84 | #define OMAP34XX_DSP_IPI_BASE (OMAP34XX_DSP_BASE + 0x1000000) | ||
85 | #define OMAP34XX_DSP_MMU_BASE (OMAP34XX_DSP_BASE + 0x2000000) | ||
86 | #endif /* __ASM_ARCH_OMAP34XX_H */ | 85 | #endif /* __ASM_ARCH_OMAP34XX_H */ |
87 | 86 | ||
diff --git a/arch/arm/plat-omap/include/mach/omap44xx.h b/arch/arm/plat-omap/include/plat/omap44xx.h index b3ba5ac7b4a4..ef870de43c29 100644 --- a/arch/arm/plat-omap/include/mach/omap44xx.h +++ b/arch/arm/plat-omap/include/plat/omap44xx.h | |||
@@ -22,9 +22,14 @@ | |||
22 | #define L4_PER_44XX_BASE 0x48000000 | 22 | #define L4_PER_44XX_BASE 0x48000000 |
23 | #define L4_EMU_44XX_BASE 0x54000000 | 23 | #define L4_EMU_44XX_BASE 0x54000000 |
24 | #define L3_44XX_BASE 0x44000000 | 24 | #define L3_44XX_BASE 0x44000000 |
25 | #define OMAP44XX_EMIF1_BASE 0x4c000000 | ||
26 | #define OMAP44XX_EMIF2_BASE 0x4d000000 | ||
27 | #define OMAP44XX_DMM_BASE 0x4e000000 | ||
25 | #define OMAP4430_32KSYNCT_BASE 0x4a304000 | 28 | #define OMAP4430_32KSYNCT_BASE 0x4a304000 |
26 | #define OMAP4430_CM_BASE 0x4a004000 | 29 | #define OMAP4430_CM1_BASE 0x4a004000 |
27 | #define OMAP4430_PRM_BASE 0x48306000 | 30 | #define OMAP4430_CM_BASE OMAP4430_CM1_BASE |
31 | #define OMAP4430_CM2_BASE 0x4a008000 | ||
32 | #define OMAP4430_PRM_BASE 0x4a306000 | ||
28 | #define OMAP44XX_GPMC_BASE 0x50000000 | 33 | #define OMAP44XX_GPMC_BASE 0x50000000 |
29 | #define OMAP443X_SCM_BASE 0x4a002000 | 34 | #define OMAP443X_SCM_BASE 0x4a002000 |
30 | #define OMAP443X_CTRL_BASE OMAP443X_SCM_BASE | 35 | #define OMAP443X_CTRL_BASE OMAP443X_SCM_BASE |
@@ -33,14 +38,11 @@ | |||
33 | #define IRQ_SIR_IRQ 0x0040 | 38 | #define IRQ_SIR_IRQ 0x0040 |
34 | #define OMAP44XX_GIC_DIST_BASE 0x48241000 | 39 | #define OMAP44XX_GIC_DIST_BASE 0x48241000 |
35 | #define OMAP44XX_GIC_CPU_BASE 0x48240100 | 40 | #define OMAP44XX_GIC_CPU_BASE 0x48240100 |
36 | #define OMAP44XX_VA_GIC_CPU_BASE OMAP2_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE) | ||
37 | #define OMAP44XX_SCU_BASE 0x48240000 | 41 | #define OMAP44XX_SCU_BASE 0x48240000 |
38 | #define OMAP44XX_VA_SCU_BASE OMAP2_IO_ADDRESS(OMAP44XX_SCU_BASE) | ||
39 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 | 42 | #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 |
40 | #define OMAP44XX_VA_LOCAL_TWD_BASE OMAP2_IO_ADDRESS(OMAP44XX_LOCAL_TWD_BASE) | ||
41 | #define OMAP44XX_LOCAL_TWD_SIZE 0x00000100 | ||
42 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 | 43 | #define OMAP44XX_WKUPGEN_BASE 0x48281000 |
43 | #define OMAP44XX_VA_WKUPGEN_BASE OMAP2_IO_ADDRESS(OMAP44XX_WKUPGEN_BASE) | 44 | |
45 | #define OMAP44XX_MAILBOX_BASE (L4_44XX_BASE + 0xF4000) | ||
44 | 46 | ||
45 | #endif /* __ASM_ARCH_OMAP44XX_H */ | 47 | #endif /* __ASM_ARCH_OMAP44XX_H */ |
46 | 48 | ||
diff --git a/arch/arm/plat-omap/include/mach/omap730.h b/arch/arm/plat-omap/include/plat/omap730.h index 14272bc1a6fd..14272bc1a6fd 100644 --- a/arch/arm/plat-omap/include/mach/omap730.h +++ b/arch/arm/plat-omap/include/plat/omap730.h | |||
diff --git a/arch/arm/plat-omap/include/plat/omap7xx.h b/arch/arm/plat-omap/include/plat/omap7xx.h new file mode 100644 index 000000000000..53f52414b0e9 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/omap7xx.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* arch/arm/plat-omap/include/mach/omap7xx.h | ||
2 | * | ||
3 | * Hardware definitions for TI OMAP7XX processor. | ||
4 | * | ||
5 | * Cleanup for Linux-2.6 by Dirk Behme <dirk.behme@de.bosch.com> | ||
6 | * Adapted for omap850 by Zebediah C. McClure <zmc@lurian.net> | ||
7 | * Adapted for omap7xx by Alistair Buxton <a.j.buxton@gmail.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
15 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
16 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
17 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
20 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
21 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License along | ||
26 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
27 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
28 | */ | ||
29 | |||
30 | #ifndef __ASM_ARCH_OMAP7XX_H | ||
31 | #define __ASM_ARCH_OMAP7XX_H | ||
32 | |||
33 | /* | ||
34 | * ---------------------------------------------------------------------------- | ||
35 | * Base addresses | ||
36 | * ---------------------------------------------------------------------------- | ||
37 | */ | ||
38 | |||
39 | /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ | ||
40 | |||
41 | #define OMAP7XX_DSP_BASE 0xE0000000 | ||
42 | #define OMAP7XX_DSP_SIZE 0x50000 | ||
43 | #define OMAP7XX_DSP_START 0xE0000000 | ||
44 | |||
45 | #define OMAP7XX_DSPREG_BASE 0xE1000000 | ||
46 | #define OMAP7XX_DSPREG_SIZE SZ_128K | ||
47 | #define OMAP7XX_DSPREG_START 0xE1000000 | ||
48 | |||
49 | /* | ||
50 | * ---------------------------------------------------------------------------- | ||
51 | * OMAP7XX specific configuration registers | ||
52 | * ---------------------------------------------------------------------------- | ||
53 | */ | ||
54 | #define OMAP7XX_CONFIG_BASE 0xfffe1000 | ||
55 | #define OMAP7XX_IO_CONF_0 0xfffe1070 | ||
56 | #define OMAP7XX_IO_CONF_1 0xfffe1074 | ||
57 | #define OMAP7XX_IO_CONF_2 0xfffe1078 | ||
58 | #define OMAP7XX_IO_CONF_3 0xfffe107c | ||
59 | #define OMAP7XX_IO_CONF_4 0xfffe1080 | ||
60 | #define OMAP7XX_IO_CONF_5 0xfffe1084 | ||
61 | #define OMAP7XX_IO_CONF_6 0xfffe1088 | ||
62 | #define OMAP7XX_IO_CONF_7 0xfffe108c | ||
63 | #define OMAP7XX_IO_CONF_8 0xfffe1090 | ||
64 | #define OMAP7XX_IO_CONF_9 0xfffe1094 | ||
65 | #define OMAP7XX_IO_CONF_10 0xfffe1098 | ||
66 | #define OMAP7XX_IO_CONF_11 0xfffe109c | ||
67 | #define OMAP7XX_IO_CONF_12 0xfffe10a0 | ||
68 | #define OMAP7XX_IO_CONF_13 0xfffe10a4 | ||
69 | |||
70 | #define OMAP7XX_MODE_1 0xfffe1010 | ||
71 | #define OMAP7XX_MODE_2 0xfffe1014 | ||
72 | |||
73 | /* CSMI specials: in terms of base + offset */ | ||
74 | #define OMAP7XX_MODE2_OFFSET 0x14 | ||
75 | |||
76 | /* | ||
77 | * ---------------------------------------------------------------------------- | ||
78 | * OMAP7XX traffic controller configuration registers | ||
79 | * ---------------------------------------------------------------------------- | ||
80 | */ | ||
81 | #define OMAP7XX_FLASH_CFG_0 0xfffecc10 | ||
82 | #define OMAP7XX_FLASH_ACFG_0 0xfffecc50 | ||
83 | #define OMAP7XX_FLASH_CFG_1 0xfffecc14 | ||
84 | #define OMAP7XX_FLASH_ACFG_1 0xfffecc54 | ||
85 | |||
86 | /* | ||
87 | * ---------------------------------------------------------------------------- | ||
88 | * OMAP7XX DSP control registers | ||
89 | * ---------------------------------------------------------------------------- | ||
90 | */ | ||
91 | #define OMAP7XX_ICR_BASE 0xfffbb800 | ||
92 | #define OMAP7XX_DSP_M_CTL 0xfffbb804 | ||
93 | #define OMAP7XX_DSP_MMU_BASE 0xfffed200 | ||
94 | |||
95 | /* | ||
96 | * ---------------------------------------------------------------------------- | ||
97 | * OMAP7XX PCC_UPLD configuration registers | ||
98 | * ---------------------------------------------------------------------------- | ||
99 | */ | ||
100 | #define OMAP7XX_PCC_UPLD_CTRL_BASE (0xfffe0900) | ||
101 | #define OMAP7XX_PCC_UPLD_CTRL (OMAP7XX_PCC_UPLD_CTRL_BASE + 0x00) | ||
102 | |||
103 | #endif /* __ASM_ARCH_OMAP7XX_H */ | ||
104 | |||
diff --git a/arch/arm/plat-omap/include/mach/omap850.h b/arch/arm/plat-omap/include/plat/omap850.h index c33f67981712..c33f67981712 100644 --- a/arch/arm/plat-omap/include/mach/omap850.h +++ b/arch/arm/plat-omap/include/plat/omap850.h | |||
diff --git a/arch/arm/plat-omap/include/mach/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index bd0e136db337..dc1fac1d805c 100644 --- a/arch/arm/plat-omap/include/mach/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
36 | 36 | ||
37 | #include <mach/omap_hwmod.h> | 37 | #include <plat/omap_hwmod.h> |
38 | 38 | ||
39 | /* omap_device._state values */ | 39 | /* omap_device._state values */ |
40 | #define OMAP_DEVICE_STATE_UNKNOWN 0 | 40 | #define OMAP_DEVICE_STATE_UNKNOWN 0 |
@@ -50,8 +50,8 @@ | |||
50 | * @pm_lats: ptr to an omap_device_pm_latency table | 50 | * @pm_lats: ptr to an omap_device_pm_latency table |
51 | * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats | 51 | * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats |
52 | * @pm_lat_level: array index of the last odpl entry executed - -1 if never | 52 | * @pm_lat_level: array index of the last odpl entry executed - -1 if never |
53 | * @dev_wakeup_lat: dev wakeup latency in microseconds | 53 | * @dev_wakeup_lat: dev wakeup latency in nanoseconds |
54 | * @_dev_wakeup_lat_limit: dev wakeup latency limit in usec - set by OMAP PM | 54 | * @_dev_wakeup_lat_limit: dev wakeup latency limit in nsec - set by OMAP PM |
55 | * @_state: one of OMAP_DEVICE_STATE_* (see above) | 55 | * @_state: one of OMAP_DEVICE_STATE_* (see above) |
56 | * @flags: device flags | 56 | * @flags: device flags |
57 | * | 57 | * |
@@ -137,5 +137,7 @@ struct omap_device_pm_latency { | |||
137 | }; | 137 | }; |
138 | 138 | ||
139 | 139 | ||
140 | #endif | 140 | /* Get omap_device pointer from platform_device pointer */ |
141 | #define to_omap_device(x) container_of((x), struct omap_device, pdev) | ||
141 | 142 | ||
143 | #endif | ||
diff --git a/arch/arm/plat-omap/include/mach/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 1f79c20e2929..007935a921ea 100644 --- a/arch/arm/plat-omap/include/mach/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/kernel.h> | 35 | #include <linux/kernel.h> |
36 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
37 | 37 | ||
38 | #include <mach/cpu.h> | 38 | #include <plat/cpu.h> |
39 | 39 | ||
40 | struct omap_device; | 40 | struct omap_device; |
41 | 41 | ||
@@ -50,6 +50,8 @@ struct omap_device; | |||
50 | #define SYSC_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT) | 50 | #define SYSC_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT) |
51 | #define SYSC_SOFTRESET_SHIFT 1 | 51 | #define SYSC_SOFTRESET_SHIFT 1 |
52 | #define SYSC_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT) | 52 | #define SYSC_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT) |
53 | #define SYSC_AUTOIDLE_SHIFT 0 | ||
54 | #define SYSC_AUTOIDLE_MASK (1 << SYSC_AUTOIDLE_SHIFT) | ||
53 | 55 | ||
54 | /* OCP SYSSTATUS bit shifts/masks */ | 56 | /* OCP SYSSTATUS bit shifts/masks */ |
55 | #define SYSS_RESETDONE_SHIFT 0 | 57 | #define SYSS_RESETDONE_SHIFT 0 |
@@ -62,7 +64,21 @@ struct omap_device; | |||
62 | 64 | ||
63 | 65 | ||
64 | /** | 66 | /** |
65 | * struct omap_hwmod_dma_info - MPU address space handled by the hwmod | 67 | * struct omap_hwmod_irq_info - MPU IRQs used by the hwmod |
68 | * @name: name of the IRQ channel (module local name) | ||
69 | * @irq_ch: IRQ channel ID | ||
70 | * | ||
71 | * @name should be something short, e.g., "tx" or "rx". It is for use | ||
72 | * by platform_get_resource_byname(). It is defined locally to the | ||
73 | * hwmod. | ||
74 | */ | ||
75 | struct omap_hwmod_irq_info { | ||
76 | const char *name; | ||
77 | u16 irq; | ||
78 | }; | ||
79 | |||
80 | /** | ||
81 | * struct omap_hwmod_dma_info - DMA channels used by the hwmod | ||
66 | * @name: name of the DMA channel (module local name) | 82 | * @name: name of the DMA channel (module local name) |
67 | * @dma_ch: DMA channel ID | 83 | * @dma_ch: DMA channel ID |
68 | * | 84 | * |
@@ -294,13 +310,17 @@ struct omap_hwmod_omap4_prcm { | |||
294 | * SDRAM controller, etc. | 310 | * SDRAM controller, etc. |
295 | * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM | 311 | * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM |
296 | * controller, etc. | 312 | * controller, etc. |
313 | * HWMOD_NO_AUTOIDLE: disable module autoidle (OCP_SYSCONFIG.AUTOIDLE) | ||
314 | * when module is enabled, rather than the default, which is to | ||
315 | * enable autoidle | ||
297 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup | 316 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup |
298 | */ | 317 | */ |
299 | #define HWMOD_SWSUP_SIDLE (1 << 0) | 318 | #define HWMOD_SWSUP_SIDLE (1 << 0) |
300 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) | 319 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) |
301 | #define HWMOD_INIT_NO_RESET (1 << 2) | 320 | #define HWMOD_INIT_NO_RESET (1 << 2) |
302 | #define HWMOD_INIT_NO_IDLE (1 << 3) | 321 | #define HWMOD_INIT_NO_IDLE (1 << 3) |
303 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 4) | 322 | #define HWMOD_NO_OCP_AUTOIDLE (1 << 4) |
323 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5) | ||
304 | 324 | ||
305 | /* | 325 | /* |
306 | * omap_hwmod._int_flags definitions | 326 | * omap_hwmod._int_flags definitions |
@@ -373,7 +393,7 @@ struct omap_hwmod_omap4_prcm { | |||
373 | struct omap_hwmod { | 393 | struct omap_hwmod { |
374 | const char *name; | 394 | const char *name; |
375 | struct omap_device *od; | 395 | struct omap_device *od; |
376 | u8 *mpu_irqs; | 396 | struct omap_hwmod_irq_info *mpu_irqs; |
377 | struct omap_hwmod_dma_info *sdma_chs; | 397 | struct omap_hwmod_dma_info *sdma_chs; |
378 | union { | 398 | union { |
379 | struct omap_hwmod_omap2_prcm omap2; | 399 | struct omap_hwmod_omap2_prcm omap2; |
diff --git a/arch/arm/plat-omap/include/mach/onenand.h b/arch/arm/plat-omap/include/plat/onenand.h index 72f433d7d827..72f433d7d827 100644 --- a/arch/arm/plat-omap/include/mach/onenand.h +++ b/arch/arm/plat-omap/include/plat/onenand.h | |||
diff --git a/arch/arm/plat-omap/include/mach/param.h b/arch/arm/plat-omap/include/plat/param.h index 1eb4dc326979..1eb4dc326979 100644 --- a/arch/arm/plat-omap/include/mach/param.h +++ b/arch/arm/plat-omap/include/plat/param.h | |||
diff --git a/arch/arm/plat-omap/include/mach/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h index fa6461423bd0..0b960051eaed 100644 --- a/arch/arm/plat-omap/include/mach/powerdomain.h +++ b/arch/arm/plat-omap/include/plat/powerdomain.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #include <asm/atomic.h> | 20 | #include <asm/atomic.h> |
21 | 21 | ||
22 | #include <mach/cpu.h> | 22 | #include <plat/cpu.h> |
23 | 23 | ||
24 | 24 | ||
25 | /* Powerdomain basic power states */ | 25 | /* Powerdomain basic power states */ |
@@ -28,6 +28,8 @@ | |||
28 | #define PWRDM_POWER_INACTIVE 0x2 | 28 | #define PWRDM_POWER_INACTIVE 0x2 |
29 | #define PWRDM_POWER_ON 0x3 | 29 | #define PWRDM_POWER_ON 0x3 |
30 | 30 | ||
31 | #define PWRDM_MAX_PWRSTS 4 | ||
32 | |||
31 | /* Powerdomain allowable state bitfields */ | 33 | /* Powerdomain allowable state bitfields */ |
32 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ | 34 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ |
33 | (1 << PWRDM_POWER_ON)) | 35 | (1 << PWRDM_POWER_ON)) |
@@ -40,7 +42,10 @@ | |||
40 | 42 | ||
41 | /* Powerdomain flags */ | 43 | /* Powerdomain flags */ |
42 | #define PWRDM_HAS_HDWR_SAR (1 << 0) /* hardware save-and-restore support */ | 44 | #define PWRDM_HAS_HDWR_SAR (1 << 0) /* hardware save-and-restore support */ |
43 | 45 | #define PWRDM_HAS_MPU_QUIRK (1 << 1) /* MPU pwr domain has MEM bank 0 bits | |
46 | * in MEM bank 1 position. This is | ||
47 | * true for OMAP3430 | ||
48 | */ | ||
44 | 49 | ||
45 | /* | 50 | /* |
46 | * Number of memory banks that are power-controllable. On OMAP3430, the | 51 | * Number of memory banks that are power-controllable. On OMAP3430, the |
@@ -85,15 +90,15 @@ struct powerdomain { | |||
85 | /* Used to represent the OMAP chip types containing this pwrdm */ | 90 | /* Used to represent the OMAP chip types containing this pwrdm */ |
86 | const struct omap_chip_id omap_chip; | 91 | const struct omap_chip_id omap_chip; |
87 | 92 | ||
88 | /* Bit shift of this powerdomain's PM_WKDEP/CM_SLEEPDEP bit */ | ||
89 | const u8 dep_bit; | ||
90 | |||
91 | /* Powerdomains that can be told to wake this powerdomain up */ | 93 | /* Powerdomains that can be told to wake this powerdomain up */ |
92 | struct pwrdm_dep *wkdep_srcs; | 94 | struct pwrdm_dep *wkdep_srcs; |
93 | 95 | ||
94 | /* Powerdomains that can be told to keep this pwrdm from inactivity */ | 96 | /* Powerdomains that can be told to keep this pwrdm from inactivity */ |
95 | struct pwrdm_dep *sleepdep_srcs; | 97 | struct pwrdm_dep *sleepdep_srcs; |
96 | 98 | ||
99 | /* Bit shift of this powerdomain's PM_WKDEP/CM_SLEEPDEP bit */ | ||
100 | const u8 dep_bit; | ||
101 | |||
97 | /* Possible powerdomain power states */ | 102 | /* Possible powerdomain power states */ |
98 | const u8 pwrsts; | 103 | const u8 pwrsts; |
99 | 104 | ||
@@ -118,11 +123,11 @@ struct powerdomain { | |||
118 | struct list_head node; | 123 | struct list_head node; |
119 | 124 | ||
120 | int state; | 125 | int state; |
121 | unsigned state_counter[4]; | 126 | unsigned state_counter[PWRDM_MAX_PWRSTS]; |
122 | 127 | ||
123 | #ifdef CONFIG_PM_DEBUG | 128 | #ifdef CONFIG_PM_DEBUG |
124 | s64 timer; | 129 | s64 timer; |
125 | s64 state_timer[4]; | 130 | s64 state_timer[PWRDM_MAX_PWRSTS]; |
126 | #endif | 131 | #endif |
127 | }; | 132 | }; |
128 | 133 | ||
diff --git a/arch/arm/plat-omap/include/mach/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h index cda2a70397b4..e63e94e18975 100644 --- a/arch/arm/plat-omap/include/mach/prcm.h +++ b/arch/arm/plat-omap/include/plat/prcm.h | |||
@@ -27,9 +27,13 @@ u32 omap_prcm_get_reset_sources(void); | |||
27 | void omap_prcm_arch_reset(char mode); | 27 | void omap_prcm_arch_reset(char mode); |
28 | int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, const char *name); | 28 | int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, const char *name); |
29 | 29 | ||
30 | #endif | 30 | #define START_PADCONF_SAVE 0x2 |
31 | #define PADCONF_SAVE_DONE 0x1 | ||
31 | 32 | ||
33 | void omap3_prcm_save_context(void); | ||
34 | void omap3_prcm_restore_context(void); | ||
32 | 35 | ||
36 | #endif | ||
33 | 37 | ||
34 | 38 | ||
35 | 39 | ||
diff --git a/arch/arm/plat-omap/include/mach/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h index 1c09c78a48f2..7b76f50564ba 100644 --- a/arch/arm/plat-omap/include/mach/sdrc.h +++ b/arch/arm/plat-omap/include/plat/sdrc.h | |||
@@ -44,6 +44,12 @@ | |||
44 | #define SDRC_RFR_CTRL_1 0x0D4 | 44 | #define SDRC_RFR_CTRL_1 0x0D4 |
45 | #define SDRC_MANUAL_1 0x0D8 | 45 | #define SDRC_MANUAL_1 0x0D8 |
46 | 46 | ||
47 | #define SDRC_POWER_AUTOCOUNT_SHIFT 8 | ||
48 | #define SDRC_POWER_AUTOCOUNT_MASK (0xffff << SDRC_POWER_AUTOCOUNT_SHIFT) | ||
49 | #define SDRC_POWER_CLKCTRL_SHIFT 4 | ||
50 | #define SDRC_POWER_CLKCTRL_MASK (0x3 << SDRC_POWER_CLKCTRL_SHIFT) | ||
51 | #define SDRC_SELF_REFRESH_ON_AUTOCOUNT (0x2 << SDRC_POWER_CLKCTRL_SHIFT) | ||
52 | |||
47 | /* | 53 | /* |
48 | * These values represent the number of memory clock cycles between | 54 | * These values represent the number of memory clock cycles between |
49 | * autorefresh initiation. They assume 1 refresh per 64 ms (JEDEC), 8192 | 55 | * autorefresh initiation. They assume 1 refresh per 64 ms (JEDEC), 8192 |
@@ -80,15 +86,18 @@ | |||
80 | */ | 86 | */ |
81 | 87 | ||
82 | #define OMAP242X_SMS_REGADDR(reg) \ | 88 | #define OMAP242X_SMS_REGADDR(reg) \ |
83 | (void __iomem *)OMAP2_IO_ADDRESS(OMAP2420_SMS_BASE + reg) | 89 | (void __iomem *)OMAP2_L3_IO_ADDRESS(OMAP2420_SMS_BASE + reg) |
84 | #define OMAP243X_SMS_REGADDR(reg) \ | 90 | #define OMAP243X_SMS_REGADDR(reg) \ |
85 | (void __iomem *)OMAP2_IO_ADDRESS(OMAP243X_SMS_BASE + reg) | 91 | (void __iomem *)OMAP2_L3_IO_ADDRESS(OMAP243X_SMS_BASE + reg) |
86 | #define OMAP343X_SMS_REGADDR(reg) \ | 92 | #define OMAP343X_SMS_REGADDR(reg) \ |
87 | (void __iomem *)OMAP2_IO_ADDRESS(OMAP343X_SMS_BASE + reg) | 93 | (void __iomem *)OMAP2_L3_IO_ADDRESS(OMAP343X_SMS_BASE + reg) |
88 | 94 | ||
89 | /* SMS register offsets - read/write with sms_{read,write}_reg() */ | 95 | /* SMS register offsets - read/write with sms_{read,write}_reg() */ |
90 | 96 | ||
91 | #define SMS_SYSCONFIG 0x010 | 97 | #define SMS_SYSCONFIG 0x010 |
98 | #define SMS_ROT_CONTROL(context) (0x180 + 0x10 * context) | ||
99 | #define SMS_ROT_SIZE(context) (0x184 + 0x10 * context) | ||
100 | #define SMS_ROT_PHYSICAL_BA(context) (0x188 + 0x10 * context) | ||
92 | /* REVISIT: fill in other SMS registers here */ | 101 | /* REVISIT: fill in other SMS registers here */ |
93 | 102 | ||
94 | 103 | ||
@@ -120,6 +129,12 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | |||
120 | int omap2_sdrc_get_params(unsigned long r, | 129 | int omap2_sdrc_get_params(unsigned long r, |
121 | struct omap_sdrc_params **sdrc_cs0, | 130 | struct omap_sdrc_params **sdrc_cs0, |
122 | struct omap_sdrc_params **sdrc_cs1); | 131 | struct omap_sdrc_params **sdrc_cs1); |
132 | void omap2_sms_save_context(void); | ||
133 | void omap2_sms_restore_context(void); | ||
134 | |||
135 | void omap2_sms_write_rot_control(u32 val, unsigned ctx); | ||
136 | void omap2_sms_write_rot_size(u32 val, unsigned ctx); | ||
137 | void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx); | ||
123 | 138 | ||
124 | #ifdef CONFIG_ARCH_OMAP2 | 139 | #ifdef CONFIG_ARCH_OMAP2 |
125 | 140 | ||
diff --git a/arch/arm/plat-omap/include/mach/serial.h b/arch/arm/plat-omap/include/plat/serial.h index e249186d26e2..f5a4a92393ef 100644 --- a/arch/arm/plat-omap/include/mach/serial.h +++ b/arch/arm/plat-omap/include/plat/serial.h | |||
@@ -20,26 +20,22 @@ | |||
20 | #define OMAP_UART1_BASE 0xfffb0000 | 20 | #define OMAP_UART1_BASE 0xfffb0000 |
21 | #define OMAP_UART2_BASE 0xfffb0800 | 21 | #define OMAP_UART2_BASE 0xfffb0800 |
22 | #define OMAP_UART3_BASE 0xfffb9800 | 22 | #define OMAP_UART3_BASE 0xfffb9800 |
23 | #define OMAP_MAX_NR_PORTS 3 | ||
24 | #elif defined(CONFIG_ARCH_OMAP2) | 23 | #elif defined(CONFIG_ARCH_OMAP2) |
25 | /* OMAP2 serial ports */ | 24 | /* OMAP2 serial ports */ |
26 | #define OMAP_UART1_BASE 0x4806a000 | 25 | #define OMAP_UART1_BASE 0x4806a000 |
27 | #define OMAP_UART2_BASE 0x4806c000 | 26 | #define OMAP_UART2_BASE 0x4806c000 |
28 | #define OMAP_UART3_BASE 0x4806e000 | 27 | #define OMAP_UART3_BASE 0x4806e000 |
29 | #define OMAP_MAX_NR_PORTS 3 | ||
30 | #elif defined(CONFIG_ARCH_OMAP3) | 28 | #elif defined(CONFIG_ARCH_OMAP3) |
31 | /* OMAP3 serial ports */ | 29 | /* OMAP3 serial ports */ |
32 | #define OMAP_UART1_BASE 0x4806a000 | 30 | #define OMAP_UART1_BASE 0x4806a000 |
33 | #define OMAP_UART2_BASE 0x4806c000 | 31 | #define OMAP_UART2_BASE 0x4806c000 |
34 | #define OMAP_UART3_BASE 0x49020000 | 32 | #define OMAP_UART3_BASE 0x49020000 |
35 | #define OMAP_MAX_NR_PORTS 3 | ||
36 | #elif defined(CONFIG_ARCH_OMAP4) | 33 | #elif defined(CONFIG_ARCH_OMAP4) |
37 | /* OMAP4 serial ports */ | 34 | /* OMAP4 serial ports */ |
38 | #define OMAP_UART1_BASE 0x4806a000 | 35 | #define OMAP_UART1_BASE 0x4806a000 |
39 | #define OMAP_UART2_BASE 0x4806c000 | 36 | #define OMAP_UART2_BASE 0x4806c000 |
40 | #define OMAP_UART3_BASE 0x48020000 | 37 | #define OMAP_UART3_BASE 0x48020000 |
41 | #define OMAP_UART4_BASE 0x4806e000 | 38 | #define OMAP_UART4_BASE 0x4806e000 |
42 | #define OMAP_MAX_NR_PORTS 4 | ||
43 | #endif | 39 | #endif |
44 | 40 | ||
45 | #define OMAP1510_BASE_BAUD (12000000/16) | 41 | #define OMAP1510_BASE_BAUD (12000000/16) |
@@ -57,6 +53,7 @@ | |||
57 | #ifndef __ASSEMBLER__ | 53 | #ifndef __ASSEMBLER__ |
58 | extern void __init omap_serial_early_init(void); | 54 | extern void __init omap_serial_early_init(void); |
59 | extern void omap_serial_init(void); | 55 | extern void omap_serial_init(void); |
56 | extern void omap_serial_init_port(int port); | ||
60 | extern int omap_uart_can_sleep(void); | 57 | extern int omap_uart_can_sleep(void); |
61 | extern void omap_uart_check_wakeup(void); | 58 | extern void omap_uart_check_wakeup(void); |
62 | extern void omap_uart_prepare_suspend(void); | 59 | extern void omap_uart_prepare_suspend(void); |
diff --git a/arch/arm/plat-omap/include/mach/smp.h b/arch/arm/plat-omap/include/plat/smp.h index dcaa8fde7063..8983d54c4fd2 100644 --- a/arch/arm/plat-omap/include/mach/smp.h +++ b/arch/arm/plat-omap/include/plat/smp.h | |||
@@ -28,6 +28,8 @@ | |||
28 | 28 | ||
29 | /* Needed for secondary core boot */ | 29 | /* Needed for secondary core boot */ |
30 | extern void omap_secondary_startup(void); | 30 | extern void omap_secondary_startup(void); |
31 | extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask); | ||
32 | extern void omap_auxcoreboot_addr(u32 cpu_addr); | ||
31 | 33 | ||
32 | /* | 34 | /* |
33 | * We use Soft IRQ1 as the IPI | 35 | * We use Soft IRQ1 as the IPI |
diff --git a/arch/arm/plat-omap/include/mach/sram.h b/arch/arm/plat-omap/include/plat/sram.h index 8974e3fc2691..16a1b458d53c 100644 --- a/arch/arm/plat-omap/include/mach/sram.h +++ b/arch/arm/plat-omap/include/plat/sram.h | |||
@@ -27,6 +27,7 @@ extern u32 omap3_configure_core_dpll( | |||
27 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, | 27 | u32 sdrc_actim_ctrl_b_0, u32 sdrc_mr_0, |
28 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, | 28 | u32 sdrc_rfr_ctrl_1, u32 sdrc_actim_ctrl_a_1, |
29 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); | 29 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); |
30 | extern void omap3_sram_restore_context(void); | ||
30 | 31 | ||
31 | /* Do not use these */ | 32 | /* Do not use these */ |
32 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); | 33 | extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl); |
@@ -68,4 +69,10 @@ extern u32 omap3_sram_configure_core_dpll( | |||
68 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); | 69 | u32 sdrc_actim_ctrl_b_1, u32 sdrc_mr_1); |
69 | extern unsigned long omap3_sram_configure_core_dpll_sz; | 70 | extern unsigned long omap3_sram_configure_core_dpll_sz; |
70 | 71 | ||
72 | #ifdef CONFIG_PM | ||
73 | extern void omap_push_sram_idle(void); | ||
74 | #else | ||
75 | static inline void omap_push_sram_idle(void) {} | ||
76 | #endif /* CONFIG_PM */ | ||
77 | |||
71 | #endif | 78 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/system.h b/arch/arm/plat-omap/include/plat/system.h index ed8ec7477261..c58a4ef42a45 100644 --- a/arch/arm/plat-omap/include/mach/system.h +++ b/arch/arm/plat-omap/include/plat/system.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include <asm/mach-types.h> | 9 | #include <asm/mach-types.h> |
10 | #include <mach/hardware.h> | 10 | #include <mach/hardware.h> |
11 | 11 | ||
12 | #include <mach/prcm.h> | 12 | #include <plat/prcm.h> |
13 | 13 | ||
14 | #ifndef CONFIG_MACH_VOICEBLUE | 14 | #ifndef CONFIG_MACH_VOICEBLUE |
15 | #define voiceblue_reset() do {} while (0) | 15 | #define voiceblue_reset() do {} while (0) |
diff --git a/arch/arm/plat-omap/include/mach/tc.h b/arch/arm/plat-omap/include/plat/tc.h index d2fcd789bb9a..d2fcd789bb9a 100644 --- a/arch/arm/plat-omap/include/mach/tc.h +++ b/arch/arm/plat-omap/include/plat/tc.h | |||
diff --git a/arch/arm/plat-omap/include/mach/timer-gp.h b/arch/arm/plat-omap/include/plat/timer-gp.h index c88d346b59d9..c88d346b59d9 100644 --- a/arch/arm/plat-omap/include/mach/timer-gp.h +++ b/arch/arm/plat-omap/include/plat/timer-gp.h | |||
diff --git a/arch/arm/plat-omap/include/mach/timex.h b/arch/arm/plat-omap/include/plat/timex.h index 6d35767bc48f..6d35767bc48f 100644 --- a/arch/arm/plat-omap/include/mach/timex.h +++ b/arch/arm/plat-omap/include/plat/timex.h | |||
diff --git a/arch/arm/plat-omap/include/mach/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index 0814c5f210c3..13c305d62127 100644 --- a/arch/arm/plat-omap/include/mach/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -19,12 +19,13 @@ | |||
19 | 19 | ||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <linux/serial_reg.h> | 21 | #include <linux/serial_reg.h> |
22 | #include <mach/serial.h> | 22 | #include <plat/serial.h> |
23 | 23 | ||
24 | unsigned int system_rev; | 24 | unsigned int system_rev; |
25 | 25 | ||
26 | #define UART_OMAP_MDR1 0x08 /* mode definition register */ | 26 | #define UART_OMAP_MDR1 0x08 /* mode definition register */ |
27 | #define OMAP_ID_730 0x355F | 27 | #define OMAP_ID_730 0x355F |
28 | #define OMAP_ID_850 0x362C | ||
28 | #define ID_MASK 0x7fff | 29 | #define ID_MASK 0x7fff |
29 | #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0) | 30 | #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0) |
30 | #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK | 31 | #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK |
@@ -43,8 +44,12 @@ static void putc(int c) | |||
43 | uart = (volatile u8 *)(OMAP_UART3_BASE); | 44 | uart = (volatile u8 *)(OMAP_UART3_BASE); |
44 | #elif defined(CONFIG_OMAP_LL_DEBUG_UART2) | 45 | #elif defined(CONFIG_OMAP_LL_DEBUG_UART2) |
45 | uart = (volatile u8 *)(OMAP_UART2_BASE); | 46 | uart = (volatile u8 *)(OMAP_UART2_BASE); |
46 | #else | 47 | #elif defined(CONFIG_OMAP_LL_DEBUG_UART1) |
47 | uart = (volatile u8 *)(OMAP_UART1_BASE); | 48 | uart = (volatile u8 *)(OMAP_UART1_BASE); |
49 | #elif defined(CONFIG_OMAP_LL_DEBUG_NONE) | ||
50 | return; | ||
51 | #else | ||
52 | return; | ||
48 | #endif | 53 | #endif |
49 | 54 | ||
50 | #ifdef CONFIG_ARCH_OMAP1 | 55 | #ifdef CONFIG_ARCH_OMAP1 |
@@ -53,7 +58,7 @@ static void putc(int c) | |||
53 | /* MMU is not on, so cpu_is_omapXXXX() won't work here */ | 58 | /* MMU is not on, so cpu_is_omapXXXX() won't work here */ |
54 | unsigned int omap_id = omap_get_id(); | 59 | unsigned int omap_id = omap_get_id(); |
55 | 60 | ||
56 | if (omap_id == OMAP_ID_730) | 61 | if (omap_id == OMAP_ID_730 || omap_id == OMAP_ID_850) |
57 | shift = 0; | 62 | shift = 0; |
58 | 63 | ||
59 | if (check_port(uart, shift)) | 64 | if (check_port(uart, shift)) |
diff --git a/arch/arm/plat-omap/include/mach/usb.h b/arch/arm/plat-omap/include/plat/usb.h index f337e1761e2c..33a500eb2f93 100644 --- a/arch/arm/plat-omap/include/mach/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -3,7 +3,22 @@ | |||
3 | #ifndef __ASM_ARCH_OMAP_USB_H | 3 | #ifndef __ASM_ARCH_OMAP_USB_H |
4 | #define __ASM_ARCH_OMAP_USB_H | 4 | #define __ASM_ARCH_OMAP_USB_H |
5 | 5 | ||
6 | #include <mach/board.h> | 6 | #include <plat/board.h> |
7 | |||
8 | #define OMAP3_HS_USB_PORTS 3 | ||
9 | enum ehci_hcd_omap_mode { | ||
10 | EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
11 | EHCI_HCD_OMAP_MODE_PHY, | ||
12 | EHCI_HCD_OMAP_MODE_TLL, | ||
13 | }; | ||
14 | |||
15 | struct ehci_hcd_omap_platform_data { | ||
16 | enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS]; | ||
17 | unsigned phy_reset:1; | ||
18 | |||
19 | /* have to be valid if phy_reset is true and portx is in phy mode */ | ||
20 | int reset_gpio_port[OMAP3_HS_USB_PORTS]; | ||
21 | }; | ||
7 | 22 | ||
8 | /*-------------------------------------------------------------------------*/ | 23 | /*-------------------------------------------------------------------------*/ |
9 | 24 | ||
@@ -29,6 +44,8 @@ | |||
29 | 44 | ||
30 | extern void usb_musb_init(void); | 45 | extern void usb_musb_init(void); |
31 | 46 | ||
47 | extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata); | ||
48 | |||
32 | #endif | 49 | #endif |
33 | 50 | ||
34 | void omap_usb_init(struct omap_usb_config *pdata); | 51 | void omap_usb_init(struct omap_usb_config *pdata); |
diff --git a/arch/arm/plat-omap/include/plat/vram.h b/arch/arm/plat-omap/include/plat/vram.h new file mode 100644 index 000000000000..edd4987758a6 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/vram.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * VRAM manager for OMAP | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __OMAP_VRAM_H__ | ||
22 | #define __OMAP_VRAM_H__ | ||
23 | |||
24 | #include <linux/types.h> | ||
25 | |||
26 | #define OMAP_VRAM_MEMTYPE_SDRAM 0 | ||
27 | #define OMAP_VRAM_MEMTYPE_SRAM 1 | ||
28 | #define OMAP_VRAM_MEMTYPE_MAX 1 | ||
29 | |||
30 | extern int omap_vram_add_region(unsigned long paddr, size_t size); | ||
31 | extern int omap_vram_free(unsigned long paddr, size_t size); | ||
32 | extern int omap_vram_alloc(int mtype, size_t size, unsigned long *paddr); | ||
33 | extern int omap_vram_reserve(unsigned long paddr, size_t size); | ||
34 | extern void omap_vram_get_info(unsigned long *vram, unsigned long *free_vram, | ||
35 | unsigned long *largest_free_block); | ||
36 | |||
37 | #ifdef CONFIG_OMAP2_VRAM | ||
38 | extern void omap_vram_set_sdram_vram(u32 size, u32 start); | ||
39 | extern void omap_vram_set_sram_vram(u32 size, u32 start); | ||
40 | |||
41 | extern void omap_vram_reserve_sdram(void); | ||
42 | extern unsigned long omap_vram_reserve_sram(unsigned long sram_pstart, | ||
43 | unsigned long sram_vstart, | ||
44 | unsigned long sram_size, | ||
45 | unsigned long pstart_avail, | ||
46 | unsigned long size_avail); | ||
47 | #else | ||
48 | static inline void omap_vram_set_sdram_vram(u32 size, u32 start) { } | ||
49 | static inline void omap_vram_set_sram_vram(u32 size, u32 start) { } | ||
50 | |||
51 | static inline void omap_vram_reserve_sdram(void) { } | ||
52 | static inline unsigned long omap_vram_reserve_sram(unsigned long sram_pstart, | ||
53 | unsigned long sram_vstart, | ||
54 | unsigned long sram_size, | ||
55 | unsigned long pstart_avail, | ||
56 | unsigned long size_avail) | ||
57 | { | ||
58 | return 0; | ||
59 | } | ||
60 | #endif | ||
61 | |||
62 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/vrfb.h b/arch/arm/plat-omap/include/plat/vrfb.h new file mode 100644 index 000000000000..d8a03ced3b10 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/vrfb.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * VRFB Rotation Engine | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.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 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __OMAP_VRFB_H__ | ||
22 | #define __OMAP_VRFB_H__ | ||
23 | |||
24 | #define OMAP_VRFB_LINE_LEN 2048 | ||
25 | |||
26 | struct vrfb { | ||
27 | u8 context; | ||
28 | void __iomem *vaddr[4]; | ||
29 | unsigned long paddr[4]; | ||
30 | u16 xres; | ||
31 | u16 yres; | ||
32 | u16 xoffset; | ||
33 | u16 yoffset; | ||
34 | u8 bytespp; | ||
35 | bool yuv_mode; | ||
36 | }; | ||
37 | |||
38 | extern int omap_vrfb_request_ctx(struct vrfb *vrfb); | ||
39 | extern void omap_vrfb_release_ctx(struct vrfb *vrfb); | ||
40 | extern void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
41 | u8 bytespp); | ||
42 | extern u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp); | ||
43 | extern u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp); | ||
44 | extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
45 | u16 width, u16 height, | ||
46 | unsigned bytespp, bool yuv_mode); | ||
47 | extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot); | ||
48 | extern void omap_vrfb_restore_context(void); | ||
49 | |||
50 | #endif /* __VRFB_H */ | ||