diff options
26 files changed, 767 insertions, 238 deletions
diff --git a/include/asm-arm/arch-omap/board-h4.h b/include/asm-arm/arch-omap/board-h4.h index 79138dcfb4ac..d64ee9211eed 100644 --- a/include/asm-arm/arch-omap/board-h4.h +++ b/include/asm-arm/arch-omap/board-h4.h | |||
@@ -30,6 +30,9 @@ | |||
30 | #define __ASM_ARCH_OMAP_H4_H | 30 | #define __ASM_ARCH_OMAP_H4_H |
31 | 31 | ||
32 | /* Placeholder for H4 specific defines */ | 32 | /* Placeholder for H4 specific defines */ |
33 | /* GPMC CS1 */ | ||
34 | #define OMAP24XX_ETHR_START 0x08000300 | ||
35 | #define OMAP24XX_ETHR_GPIO_IRQ 92 | ||
33 | 36 | ||
34 | #endif /* __ASM_ARCH_OMAP_H4_H */ | 37 | #endif /* __ASM_ARCH_OMAP_H4_H */ |
35 | 38 | ||
diff --git a/include/asm-arm/arch-omap/board-innovator.h b/include/asm-arm/arch-omap/board-innovator.h index 0f1abaefe4de..79574e0ed13d 100644 --- a/include/asm-arm/arch-omap/board-innovator.h +++ b/include/asm-arm/arch-omap/board-innovator.h | |||
@@ -36,31 +36,6 @@ | |||
36 | #define OMAP1510P1_EMIFS_PRI_VALUE 0x00 | 36 | #define OMAP1510P1_EMIFS_PRI_VALUE 0x00 |
37 | #define OMAP1510P1_EMIFF_PRI_VALUE 0x00 | 37 | #define OMAP1510P1_EMIFF_PRI_VALUE 0x00 |
38 | 38 | ||
39 | /* | ||
40 | * These definitions define an area of FLASH set aside | ||
41 | * for the use of MTD/JFFS2. This is the area of flash | ||
42 | * that a JFFS2 filesystem will reside which is mounted | ||
43 | * at boot with the "root=/dev/mtdblock/0 rw" | ||
44 | * command line option. The flash address used here must | ||
45 | * fall within the legal range defined by rrload for storing | ||
46 | * the filesystem component. This address will be sufficiently | ||
47 | * deep into the overall flash range to avoid the other | ||
48 | * components also stored in flash such as the bootloader, | ||
49 | * the bootloader params, and the kernel. | ||
50 | * The SW2 settings for the map below are: | ||
51 | * 1 off, 2 off, 3 on, 4 off. | ||
52 | */ | ||
53 | |||
54 | /* Intel flash_0, partitioned as expected by rrload */ | ||
55 | #define OMAP_FLASH_0_BASE 0xD8000000 | ||
56 | #define OMAP_FLASH_0_START 0x00000000 | ||
57 | #define OMAP_FLASH_0_SIZE SZ_16M | ||
58 | |||
59 | /* Intel flash_1, used for cramfs or other flash file systems */ | ||
60 | #define OMAP_FLASH_1_BASE 0xD9000000 | ||
61 | #define OMAP_FLASH_1_START 0x01000000 | ||
62 | #define OMAP_FLASH_1_SIZE SZ_16M | ||
63 | |||
64 | #define NR_FPGA_IRQS 24 | 39 | #define NR_FPGA_IRQS 24 |
65 | #define NR_IRQS IH_BOARD_BASE + NR_FPGA_IRQS | 40 | #define NR_IRQS IH_BOARD_BASE + NR_FPGA_IRQS |
66 | 41 | ||
diff --git a/include/asm-arm/arch-omap/board-perseus2.h b/include/asm-arm/arch-omap/board-perseus2.h index 0c224cc74fe4..691e52a52b43 100644 --- a/include/asm-arm/arch-omap/board-perseus2.h +++ b/include/asm-arm/arch-omap/board-perseus2.h | |||
@@ -36,23 +36,14 @@ | |||
36 | #define OMAP_SDRAM_DEVICE D256M_1X16_4B | 36 | #define OMAP_SDRAM_DEVICE D256M_1X16_4B |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | /* | ||
40 | * These definitions define an area of FLASH set aside | ||
41 | * for the use of MTD/JFFS2. This is the area of flash | ||
42 | * that a JFFS2 filesystem will reside which is mounted | ||
43 | * at boot with the "root=/dev/mtdblock/0 rw" | ||
44 | * command line option. | ||
45 | */ | ||
46 | |||
47 | /* Intel flash_0, partitioned as expected by rrload */ | ||
48 | #define OMAP_FLASH_0_BASE 0xD8000000 /* VA */ | ||
49 | #define OMAP_FLASH_0_START 0x00000000 /* PA */ | ||
50 | #define OMAP_FLASH_0_SIZE SZ_32M | ||
51 | |||
52 | #define MAXIRQNUM IH_BOARD_BASE | 39 | #define MAXIRQNUM IH_BOARD_BASE |
53 | #define MAXFIQNUM MAXIRQNUM | 40 | #define MAXFIQNUM MAXIRQNUM |
54 | #define MAXSWINUM MAXIRQNUM | 41 | #define MAXSWINUM MAXIRQNUM |
55 | 42 | ||
56 | #define NR_IRQS (MAXIRQNUM + 1) | 43 | #define NR_IRQS (MAXIRQNUM + 1) |
57 | 44 | ||
45 | /* Samsung NAND flash at CS2B or CS3(NAND Boot) */ | ||
46 | #define OMAP_NAND_FLASH_START1 0x0A000000 /* CS2B */ | ||
47 | #define OMAP_NAND_FLASH_START2 0x0C000000 /* CS3 */ | ||
48 | |||
58 | #endif | 49 | #endif |
diff --git a/include/asm-arm/arch-omap/board-voiceblue.h b/include/asm-arm/arch-omap/board-voiceblue.h index 33977b8956fb..ed6d346ee123 100644 --- a/include/asm-arm/arch-omap/board-voiceblue.h +++ b/include/asm-arm/arch-omap/board-voiceblue.h | |||
@@ -11,11 +11,6 @@ | |||
11 | #ifndef __ASM_ARCH_VOICEBLUE_H | 11 | #ifndef __ASM_ARCH_VOICEBLUE_H |
12 | #define __ASM_ARCH_VOICEBLUE_H | 12 | #define __ASM_ARCH_VOICEBLUE_H |
13 | 13 | ||
14 | #if (EXTERNAL_MAX_NR_PORTS < 4) | ||
15 | #undef EXTERNAL_MAX_NR_PORTS | ||
16 | #define EXTERNAL_MAX_NR_PORTS 4 | ||
17 | #endif | ||
18 | |||
19 | extern void voiceblue_wdt_enable(void); | 14 | extern void voiceblue_wdt_enable(void); |
20 | extern void voiceblue_wdt_disable(void); | 15 | extern void voiceblue_wdt_disable(void); |
21 | extern void voiceblue_wdt_ping(void); | 16 | extern void voiceblue_wdt_ping(void); |
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index 95bd625480c1..a0040cd86639 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h | |||
@@ -30,10 +30,23 @@ struct omap_clock_config { | |||
30 | u8 system_clock_type; | 30 | u8 system_clock_type; |
31 | }; | 31 | }; |
32 | 32 | ||
33 | struct omap_mmc_conf { | ||
34 | unsigned enabled:1; | ||
35 | /* nomux means "standard" muxing is wrong on this board, and that | ||
36 | * board-specific code handled it before common init logic. | ||
37 | */ | ||
38 | unsigned nomux:1; | ||
39 | /* switch pin can be for card detect (default) or card cover */ | ||
40 | unsigned cover:1; | ||
41 | /* 4 wire signaling is optional, and is only used for SD/SDIO */ | ||
42 | unsigned wire4:1; | ||
43 | s16 power_pin; | ||
44 | s16 switch_pin; | ||
45 | s16 wp_pin; | ||
46 | }; | ||
47 | |||
33 | struct omap_mmc_config { | 48 | struct omap_mmc_config { |
34 | u8 mmc_blocks; | 49 | struct omap_mmc_conf mmc[2]; |
35 | s16 mmc1_power_pin, mmc2_power_pin; | ||
36 | s16 mmc1_switch_pin, mmc2_switch_pin; | ||
37 | }; | 50 | }; |
38 | 51 | ||
39 | struct omap_serial_console_config { | 52 | struct omap_serial_console_config { |
diff --git a/include/asm-arm/arch-omap/cpu.h b/include/asm-arm/arch-omap/cpu.h index e8786713ee5c..1119e2b53e72 100644 --- a/include/asm-arm/arch-omap/cpu.h +++ b/include/asm-arm/arch-omap/cpu.h | |||
@@ -38,146 +38,179 @@ extern unsigned int system_rev; | |||
38 | /* | 38 | /* |
39 | * Test if multicore OMAP support is needed | 39 | * Test if multicore OMAP support is needed |
40 | */ | 40 | */ |
41 | #undef MULTI_OMAP | 41 | #undef MULTI_OMAP1 |
42 | #undef MULTI_OMAP2 | ||
42 | #undef OMAP_NAME | 43 | #undef OMAP_NAME |
43 | 44 | ||
44 | #ifdef CONFIG_ARCH_OMAP730 | 45 | #ifdef CONFIG_ARCH_OMAP730 |
45 | # ifdef OMAP_NAME | 46 | # ifdef OMAP_NAME |
46 | # undef MULTI_OMAP | 47 | # undef MULTI_OMAP1 |
47 | # define MULTI_OMAP | 48 | # define MULTI_OMAP1 |
48 | # else | 49 | # else |
49 | # define OMAP_NAME omap730 | 50 | # define OMAP_NAME omap730 |
50 | # endif | 51 | # endif |
51 | #endif | 52 | #endif |
52 | #ifdef CONFIG_ARCH_OMAP1510 | 53 | #ifdef CONFIG_ARCH_OMAP1510 |
53 | # ifdef OMAP_NAME | 54 | # ifdef OMAP_NAME |
54 | # undef MULTI_OMAP | 55 | # undef MULTI_OMAP1 |
55 | # define MULTI_OMAP | 56 | # define MULTI_OMAP1 |
56 | # else | 57 | # else |
57 | # define OMAP_NAME omap1510 | 58 | # define OMAP_NAME omap1510 |
58 | # endif | 59 | # endif |
59 | #endif | 60 | #endif |
60 | #ifdef CONFIG_ARCH_OMAP16XX | 61 | #ifdef CONFIG_ARCH_OMAP16XX |
61 | # ifdef OMAP_NAME | 62 | # ifdef OMAP_NAME |
62 | # undef MULTI_OMAP | 63 | # undef MULTI_OMAP1 |
63 | # define MULTI_OMAP | 64 | # define MULTI_OMAP1 |
64 | # else | 65 | # else |
65 | # define OMAP_NAME omap1610 | 66 | # define OMAP_NAME omap16xx |
66 | # endif | 67 | # endif |
67 | #endif | 68 | #endif |
68 | #ifdef CONFIG_ARCH_OMAP16XX | 69 | #ifdef CONFIG_ARCH_OMAP24XX |
69 | # ifdef OMAP_NAME | 70 | # if (defined(OMAP_NAME) || defined(MULTI_OMAP1)) |
70 | # undef MULTI_OMAP | 71 | # error "OMAP1 and OMAP2 can't be selected at the same time" |
71 | # define MULTI_OMAP | ||
72 | # else | 72 | # else |
73 | # define OMAP_NAME omap1710 | 73 | # undef MULTI_OMAP2 |
74 | # define OMAP_NAME omap24xx | ||
74 | # endif | 75 | # endif |
75 | #endif | 76 | #endif |
76 | 77 | ||
77 | /* | 78 | /* |
78 | * Generate various OMAP cpu specific macros, and cpu class | 79 | * Macros to group OMAP into cpu classes. |
79 | * specific macros | 80 | * These can be used in most places. |
81 | * cpu_is_omap7xx(): True for OMAP730 | ||
82 | * cpu_is_omap15xx(): True for OMAP1510 and OMAP5910 | ||
83 | * cpu_is_omap16xx(): True for OMAP1610, OMAP5912 and OMAP1710 | ||
84 | * cpu_is_omap24xx(): True for OMAP2420 | ||
80 | */ | 85 | */ |
81 | #define GET_OMAP_TYPE ((system_rev >> 24) & 0xff) | ||
82 | #define GET_OMAP_CLASS (system_rev & 0xff) | 86 | #define GET_OMAP_CLASS (system_rev & 0xff) |
83 | 87 | ||
84 | #define IS_OMAP_TYPE(type, id) \ | ||
85 | static inline int is_omap ##type (void) \ | ||
86 | { \ | ||
87 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
88 | } | ||
89 | |||
90 | #define IS_OMAP_CLASS(class, id) \ | 88 | #define IS_OMAP_CLASS(class, id) \ |
91 | static inline int is_omap ##class (void) \ | 89 | static inline int is_omap ##class (void) \ |
92 | { \ | 90 | { \ |
93 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | 91 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ |
94 | } | 92 | } |
95 | 93 | ||
96 | IS_OMAP_TYPE(730, 0x07) | ||
97 | IS_OMAP_TYPE(1510, 0x15) | ||
98 | IS_OMAP_TYPE(1610, 0x16) | ||
99 | IS_OMAP_TYPE(5912, 0x16) | ||
100 | IS_OMAP_TYPE(1710, 0x17) | ||
101 | IS_OMAP_TYPE(2420, 0x24) | ||
102 | |||
103 | IS_OMAP_CLASS(7xx, 0x07) | 94 | IS_OMAP_CLASS(7xx, 0x07) |
104 | IS_OMAP_CLASS(15xx, 0x15) | 95 | IS_OMAP_CLASS(15xx, 0x15) |
105 | IS_OMAP_CLASS(16xx, 0x16) | 96 | IS_OMAP_CLASS(16xx, 0x16) |
106 | IS_OMAP_CLASS(24xx, 0x24) | 97 | IS_OMAP_CLASS(24xx, 0x24) |
107 | 98 | ||
108 | /* | 99 | #define cpu_is_omap7xx() 0 |
109 | * Macros to group OMAP types into cpu classes. | 100 | #define cpu_is_omap15xx() 0 |
110 | * These can be used in most places. | 101 | #define cpu_is_omap16xx() 0 |
111 | * cpu_is_omap15xx(): True for 1510 and 5910 | 102 | #define cpu_is_omap24xx() 0 |
112 | * cpu_is_omap16xx(): True for 1610, 5912 and 1710 | 103 | |
113 | */ | 104 | #if defined(MULTI_OMAP1) |
114 | #if defined(MULTI_OMAP) | 105 | # if defined(CONFIG_ARCH_OMAP730) |
115 | # define cpu_is_omap7xx() is_omap7xx() | 106 | # undef cpu_is_omap7xx |
116 | # define cpu_is_omap15xx() is_omap15xx() | 107 | # define cpu_is_omap7xx() is_omap7xx() |
117 | # if !(defined(CONFIG_ARCH_OMAP1510) || defined(CONFIG_ARCH_OMAP730)) | 108 | # endif |
118 | # define cpu_is_omap16xx() 1 | 109 | # if defined(CONFIG_ARCH_OMAP1510) |
119 | # else | 110 | # undef cpu_is_omap15xx |
111 | # define cpu_is_omap15xx() is_omap15xx() | ||
112 | # endif | ||
113 | # if defined(CONFIG_ARCH_OMAP16XX) | ||
114 | # undef cpu_is_omap16xx | ||
120 | # define cpu_is_omap16xx() is_omap16xx() | 115 | # define cpu_is_omap16xx() is_omap16xx() |
121 | # endif | 116 | # endif |
122 | #else | 117 | #else |
123 | # if defined(CONFIG_ARCH_OMAP730) | 118 | # if defined(CONFIG_ARCH_OMAP730) |
119 | # undef cpu_is_omap7xx | ||
124 | # define cpu_is_omap7xx() 1 | 120 | # define cpu_is_omap7xx() 1 |
125 | # else | ||
126 | # define cpu_is_omap7xx() 0 | ||
127 | # endif | 121 | # endif |
128 | # if defined(CONFIG_ARCH_OMAP1510) | 122 | # if defined(CONFIG_ARCH_OMAP1510) |
123 | # undef cpu_is_omap15xx | ||
129 | # define cpu_is_omap15xx() 1 | 124 | # define cpu_is_omap15xx() 1 |
130 | # else | ||
131 | # define cpu_is_omap15xx() 0 | ||
132 | # endif | 125 | # endif |
133 | # if defined(CONFIG_ARCH_OMAP16XX) | 126 | # if defined(CONFIG_ARCH_OMAP16XX) |
127 | # undef cpu_is_omap16xx | ||
134 | # define cpu_is_omap16xx() 1 | 128 | # define cpu_is_omap16xx() 1 |
135 | # else | 129 | # endif |
136 | # define cpu_is_omap16xx() 0 | 130 | # if defined(CONFIG_ARCH_OMAP24XX) |
131 | # undef cpu_is_omap24xx | ||
132 | # define cpu_is_omap24xx() 1 | ||
137 | # endif | 133 | # endif |
138 | #endif | 134 | #endif |
139 | 135 | ||
140 | #if defined(MULTI_OMAP) | 136 | /* |
141 | # define cpu_is_omap730() is_omap730() | 137 | * Macros to detect individual cpu types. |
142 | # define cpu_is_omap1510() is_omap1510() | 138 | * These are only rarely needed. |
143 | # define cpu_is_omap1610() is_omap1610() | 139 | * cpu_is_omap730(): True for OMAP730 |
144 | # define cpu_is_omap5912() is_omap5912() | 140 | * cpu_is_omap1510(): True for OMAP1510 |
145 | # define cpu_is_omap1710() is_omap1710() | 141 | * cpu_is_omap1610(): True for OMAP1610 |
142 | * cpu_is_omap1611(): True for OMAP1611 | ||
143 | * cpu_is_omap5912(): True for OMAP5912 | ||
144 | * cpu_is_omap1621(): True for OMAP1621 | ||
145 | * cpu_is_omap1710(): True for OMAP1710 | ||
146 | * cpu_is_omap2420(): True for OMAP2420 | ||
147 | */ | ||
148 | #define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff) | ||
149 | |||
150 | #define IS_OMAP_TYPE(type, id) \ | ||
151 | static inline int is_omap ##type (void) \ | ||
152 | { \ | ||
153 | return (GET_OMAP_TYPE == (id)) ? 1 : 0; \ | ||
154 | } | ||
155 | |||
156 | IS_OMAP_TYPE(730, 0x0730) | ||
157 | IS_OMAP_TYPE(1510, 0x1510) | ||
158 | IS_OMAP_TYPE(1610, 0x1610) | ||
159 | IS_OMAP_TYPE(1611, 0x1611) | ||
160 | IS_OMAP_TYPE(5912, 0x1611) | ||
161 | IS_OMAP_TYPE(1621, 0x1621) | ||
162 | IS_OMAP_TYPE(1710, 0x1710) | ||
163 | IS_OMAP_TYPE(2420, 0x2420) | ||
164 | |||
165 | #define cpu_is_omap730() 0 | ||
166 | #define cpu_is_omap1510() 0 | ||
167 | #define cpu_is_omap1610() 0 | ||
168 | #define cpu_is_omap5912() 0 | ||
169 | #define cpu_is_omap1611() 0 | ||
170 | #define cpu_is_omap1621() 0 | ||
171 | #define cpu_is_omap1710() 0 | ||
172 | #define cpu_is_omap2420() 0 | ||
173 | |||
174 | #if defined(MULTI_OMAP1) | ||
175 | # if defined(CONFIG_ARCH_OMAP730) | ||
176 | # undef cpu_is_omap730 | ||
177 | # define cpu_is_omap730() is_omap730() | ||
178 | # endif | ||
179 | # if defined(CONFIG_ARCH_OMAP1510) | ||
180 | # undef cpu_is_omap1510 | ||
181 | # define cpu_is_omap1510() is_omap1510() | ||
182 | # endif | ||
146 | #else | 183 | #else |
147 | # if defined(CONFIG_ARCH_OMAP730) | 184 | # if defined(CONFIG_ARCH_OMAP730) |
185 | # undef cpu_is_omap730 | ||
148 | # define cpu_is_omap730() 1 | 186 | # define cpu_is_omap730() 1 |
149 | # else | ||
150 | # define cpu_is_omap730() 0 | ||
151 | # endif | 187 | # endif |
152 | # if defined(CONFIG_ARCH_OMAP1510) | 188 | # if defined(CONFIG_ARCH_OMAP1510) |
189 | # undef cpu_is_omap1510 | ||
153 | # define cpu_is_omap1510() 1 | 190 | # define cpu_is_omap1510() 1 |
154 | # else | ||
155 | # define cpu_is_omap1510() 0 | ||
156 | # endif | 191 | # endif |
157 | # if defined(CONFIG_ARCH_OMAP16XX) | 192 | #endif |
158 | # define cpu_is_omap1610() 1 | 193 | |
159 | # else | 194 | /* |
160 | # define cpu_is_omap1610() 0 | 195 | * Whether we have MULTI_OMAP1 or not, we still need to distinguish |
161 | # endif | 196 | * between 1611B/5912 and 1710. |
162 | # if defined(CONFIG_ARCH_OMAP16XX) | 197 | */ |
163 | # define cpu_is_omap5912() 1 | 198 | #if defined(CONFIG_ARCH_OMAP16XX) |
164 | # else | 199 | # undef cpu_is_omap1610 |
165 | # define cpu_is_omap5912() 0 | 200 | # undef cpu_is_omap1611 |
166 | # endif | 201 | # undef cpu_is_omap5912 |
167 | # if defined(CONFIG_ARCH_OMAP16XX) | 202 | # undef cpu_is_omap1621 |
203 | # undef cpu_is_omap1710 | ||
168 | # define cpu_is_omap1610() is_omap1610() | 204 | # define cpu_is_omap1610() is_omap1610() |
205 | # define cpu_is_omap1611() is_omap1611() | ||
169 | # define cpu_is_omap5912() is_omap5912() | 206 | # define cpu_is_omap5912() is_omap5912() |
207 | # define cpu_is_omap1621() is_omap1621() | ||
170 | # define cpu_is_omap1710() is_omap1710() | 208 | # define cpu_is_omap1710() is_omap1710() |
171 | # else | 209 | #endif |
172 | # define cpu_is_omap1610() 0 | 210 | |
173 | # define cpu_is_omap5912() 0 | 211 | #if defined(CONFIG_ARCH_OMAP2420) |
174 | # define cpu_is_omap1710() 0 | 212 | # undef cpu_is_omap2420 |
175 | # endif | ||
176 | # if defined(CONFIG_ARCH_OMAP2420) | ||
177 | # define cpu_is_omap2420() 1 | 213 | # define cpu_is_omap2420() 1 |
178 | # else | ||
179 | # define cpu_is_omap2420() 0 | ||
180 | # endif | ||
181 | #endif | 214 | #endif |
182 | 215 | ||
183 | #endif | 216 | #endif |
diff --git a/include/asm-arm/arch-omap/debug-macro.S b/include/asm-arm/arch-omap/debug-macro.S index 83bb458afd0b..ca4f577f9675 100644 --- a/include/asm-arm/arch-omap/debug-macro.S +++ b/include/asm-arm/arch-omap/debug-macro.S | |||
@@ -14,6 +14,7 @@ | |||
14 | .macro addruart,rx | 14 | .macro addruart,rx |
15 | mrc p15, 0, \rx, c1, c0 | 15 | mrc p15, 0, \rx, c1, c0 |
16 | tst \rx, #1 @ MMU enabled? | 16 | tst \rx, #1 @ MMU enabled? |
17 | #ifdef CONFIG_ARCH_OMAP1 | ||
17 | moveq \rx, #0xff000000 @ physical base address | 18 | moveq \rx, #0xff000000 @ physical base address |
18 | movne \rx, #0xfe000000 @ virtual base | 19 | movne \rx, #0xfe000000 @ virtual base |
19 | orr \rx, \rx, #0x00fb0000 | 20 | orr \rx, \rx, #0x00fb0000 |
@@ -23,6 +24,18 @@ | |||
23 | #if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) | 24 | #if defined(CONFIG_OMAP_LL_DEBUG_UART2) || defined(CONFIG_OMAP_LL_DEBUG_UART3) |
24 | orr \rx, \rx, #0x00000800 @ UART 2 & 3 | 25 | orr \rx, \rx, #0x00000800 @ UART 2 & 3 |
25 | #endif | 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 | #endif | ||
26 | .endm | 39 | .endm |
27 | 40 | ||
28 | .macro senduart,rd,rx | 41 | .macro senduart,rd,rx |
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index ce114ce5af5d..04ebef5c6e95 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h | |||
@@ -240,6 +240,7 @@ extern void omap_dma_unlink_lch (int lch_head, int lch_queue); | |||
240 | 240 | ||
241 | extern dma_addr_t omap_get_dma_src_pos(int lch); | 241 | extern dma_addr_t omap_get_dma_src_pos(int lch); |
242 | extern dma_addr_t omap_get_dma_dst_pos(int lch); | 242 | extern dma_addr_t omap_get_dma_dst_pos(int lch); |
243 | extern int omap_get_dma_src_addr_counter(int lch); | ||
243 | extern void omap_clear_dma(int lch); | 244 | extern void omap_clear_dma(int lch); |
244 | extern int omap_dma_running(void); | 245 | extern int omap_dma_running(void); |
245 | 246 | ||
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h new file mode 100644 index 000000000000..11772c792f3e --- /dev/null +++ b/include/asm-arm/arch-omap/dmtimer.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arm/arch-omap/dmtimer.h | ||
3 | * | ||
4 | * OMAP Dual-Mode Timers | ||
5 | * | ||
6 | * Copyright (C) 2005 Nokia Corporation | ||
7 | * Author: Lauri Leukkunen <lauri.leukkunen@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 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 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
20 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
21 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
22 | * | ||
23 | * You should have received a copy of the GNU General Public License along | ||
24 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
25 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
26 | */ | ||
27 | |||
28 | #ifndef __ASM_ARCH_TIMER_H | ||
29 | #define __ASM_ARCH_TIMER_H | ||
30 | |||
31 | #include <linux/list.h> | ||
32 | |||
33 | #define OMAP_TIMER_SRC_ARMXOR 0x00 | ||
34 | #define OMAP_TIMER_SRC_32_KHZ 0x01 | ||
35 | #define OMAP_TIMER_SRC_EXT_CLK 0x02 | ||
36 | |||
37 | /* timer control reg bits */ | ||
38 | #define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) | ||
39 | #define OMAP_TIMER_CTRL_PT (1 << 12) | ||
40 | #define OMAP_TIMER_CTRL_TRG_OVERFLOW (0x1 << 10) | ||
41 | #define OMAP_TIMER_CTRL_TRG_OFANDMATCH (0x2 << 10) | ||
42 | #define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) | ||
43 | #define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) | ||
44 | #define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) | ||
45 | #define OMAP_TIMER_CTRL_SCPWM (1 << 7) | ||
46 | #define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ | ||
47 | #define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ | ||
48 | #define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */ | ||
49 | #define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ | ||
50 | #define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ | ||
51 | |||
52 | /* timer interrupt enable bits */ | ||
53 | #define OMAP_TIMER_INT_CAPTURE (1 << 2) | ||
54 | #define OMAP_TIMER_INT_OVERFLOW (1 << 1) | ||
55 | #define OMAP_TIMER_INT_MATCH (1 << 0) | ||
56 | |||
57 | |||
58 | struct omap_dm_timer { | ||
59 | struct list_head timer_list; | ||
60 | |||
61 | u32 base; | ||
62 | unsigned int irq; | ||
63 | }; | ||
64 | |||
65 | u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg); | ||
66 | void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value); | ||
67 | |||
68 | struct omap_dm_timer * omap_dm_timer_request(void); | ||
69 | void omap_dm_timer_free(struct omap_dm_timer *timer); | ||
70 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); | ||
71 | |||
72 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); | ||
73 | void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value); | ||
74 | void omap_dm_timer_enable_compare(struct omap_dm_timer *timer); | ||
75 | void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer); | ||
76 | |||
77 | void omap_dm_timer_trigger(struct omap_dm_timer *timer); | ||
78 | void omap_dm_timer_start(struct omap_dm_timer *timer); | ||
79 | void omap_dm_timer_stop(struct omap_dm_timer *timer); | ||
80 | |||
81 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load); | ||
82 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match); | ||
83 | |||
84 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); | ||
85 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); | ||
86 | |||
87 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); | ||
88 | void omap_dm_timer_reset_counter(struct omap_dm_timer *timer); | ||
89 | |||
90 | int omap_dm_timers_active(void); | ||
91 | |||
92 | #endif /* __ASM_ARCH_TIMER_H */ | ||
diff --git a/include/asm-arm/arch-omap/dsp.h b/include/asm-arm/arch-omap/dsp.h new file mode 100644 index 000000000000..57bf4f39ca58 --- /dev/null +++ b/include/asm-arm/arch-omap/dsp.h | |||
@@ -0,0 +1,244 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/dsp.h | ||
3 | * | ||
4 | * Header for OMAP DSP driver | ||
5 | * | ||
6 | * Copyright (C) 2002-2005 Nokia Corporation | ||
7 | * | ||
8 | * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | * 2005/06/01: DSP Gateway version 3.3 | ||
25 | */ | ||
26 | |||
27 | #ifndef ASM_ARCH_DSP_H | ||
28 | #define ASM_ARCH_DSP_H | ||
29 | |||
30 | |||
31 | /* | ||
32 | * for /dev/dspctl/ctl | ||
33 | */ | ||
34 | #define OMAP_DSP_IOCTL_RESET 1 | ||
35 | #define OMAP_DSP_IOCTL_RUN 2 | ||
36 | #define OMAP_DSP_IOCTL_SETRSTVECT 3 | ||
37 | #define OMAP_DSP_IOCTL_CPU_IDLE 4 | ||
38 | #define OMAP_DSP_IOCTL_MPUI_WORDSWAP_ON 5 | ||
39 | #define OMAP_DSP_IOCTL_MPUI_WORDSWAP_OFF 6 | ||
40 | #define OMAP_DSP_IOCTL_MPUI_BYTESWAP_ON 7 | ||
41 | #define OMAP_DSP_IOCTL_MPUI_BYTESWAP_OFF 8 | ||
42 | #define OMAP_DSP_IOCTL_GBL_IDLE 9 | ||
43 | #define OMAP_DSP_IOCTL_DSPCFG 10 | ||
44 | #define OMAP_DSP_IOCTL_DSPUNCFG 11 | ||
45 | #define OMAP_DSP_IOCTL_TASKCNT 12 | ||
46 | #define OMAP_DSP_IOCTL_POLL 13 | ||
47 | #define OMAP_DSP_IOCTL_REGMEMR 40 | ||
48 | #define OMAP_DSP_IOCTL_REGMEMW 41 | ||
49 | #define OMAP_DSP_IOCTL_REGIOR 42 | ||
50 | #define OMAP_DSP_IOCTL_REGIOW 43 | ||
51 | #define OMAP_DSP_IOCTL_GETVAR 44 | ||
52 | #define OMAP_DSP_IOCTL_SETVAR 45 | ||
53 | #define OMAP_DSP_IOCTL_RUNLEVEL 50 | ||
54 | #define OMAP_DSP_IOCTL_SUSPEND 51 | ||
55 | #define OMAP_DSP_IOCTL_RESUME 52 | ||
56 | #define OMAP_DSP_IOCTL_FBEN 53 | ||
57 | #define OMAP_DSP_IOCTL_FBDIS 54 | ||
58 | #define OMAP_DSP_IOCTL_MBSEND 99 | ||
59 | |||
60 | /* | ||
61 | * for taskdev | ||
62 | * (ioctls below should be >= 0x10000) | ||
63 | */ | ||
64 | #define OMAP_DSP_TASK_IOCTL_BFLSH 0x10000 | ||
65 | #define OMAP_DSP_TASK_IOCTL_SETBSZ 0x10001 | ||
66 | #define OMAP_DSP_TASK_IOCTL_LOCK 0x10002 | ||
67 | #define OMAP_DSP_TASK_IOCTL_UNLOCK 0x10003 | ||
68 | #define OMAP_DSP_TASK_IOCTL_GETNAME 0x10004 | ||
69 | |||
70 | /* | ||
71 | * for /dev/dspctl/mem | ||
72 | */ | ||
73 | #define OMAP_DSP_MEM_IOCTL_EXMAP 1 | ||
74 | #define OMAP_DSP_MEM_IOCTL_EXUNMAP 2 | ||
75 | #define OMAP_DSP_MEM_IOCTL_EXMAP_FLUSH 3 | ||
76 | #define OMAP_DSP_MEM_IOCTL_FBEXPORT 5 | ||
77 | #define OMAP_DSP_MEM_IOCTL_MMUITACK 7 | ||
78 | #define OMAP_DSP_MEM_IOCTL_MMUINIT 9 | ||
79 | #define OMAP_DSP_MEM_IOCTL_KMEM_RESERVE 11 | ||
80 | #define OMAP_DSP_MEM_IOCTL_KMEM_RELEASE 12 | ||
81 | |||
82 | struct omap_dsp_mapinfo { | ||
83 | unsigned long dspadr; | ||
84 | unsigned long size; | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * for /dev/dspctl/twch | ||
89 | */ | ||
90 | #define OMAP_DSP_TWCH_IOCTL_MKDEV 1 | ||
91 | #define OMAP_DSP_TWCH_IOCTL_RMDEV 2 | ||
92 | #define OMAP_DSP_TWCH_IOCTL_TADD 11 | ||
93 | #define OMAP_DSP_TWCH_IOCTL_TDEL 12 | ||
94 | #define OMAP_DSP_TWCH_IOCTL_TKILL 13 | ||
95 | |||
96 | #define OMAP_DSP_DEVSTATE_NOTASK 0x00000001 | ||
97 | #define OMAP_DSP_DEVSTATE_ATTACHED 0x00000002 | ||
98 | #define OMAP_DSP_DEVSTATE_GARBAGE 0x00000004 | ||
99 | #define OMAP_DSP_DEVSTATE_INVALID 0x00000008 | ||
100 | #define OMAP_DSP_DEVSTATE_ADDREQ 0x00000100 | ||
101 | #define OMAP_DSP_DEVSTATE_DELREQ 0x00000200 | ||
102 | #define OMAP_DSP_DEVSTATE_ADDFAIL 0x00001000 | ||
103 | #define OMAP_DSP_DEVSTATE_ADDING 0x00010000 | ||
104 | #define OMAP_DSP_DEVSTATE_DELING 0x00020000 | ||
105 | #define OMAP_DSP_DEVSTATE_KILLING 0x00040000 | ||
106 | #define OMAP_DSP_DEVSTATE_STATE_MASK 0x7fffffff | ||
107 | #define OMAP_DSP_DEVSTATE_STALE 0x80000000 | ||
108 | |||
109 | struct omap_dsp_taddinfo { | ||
110 | unsigned char minor; | ||
111 | unsigned long taskadr; | ||
112 | }; | ||
113 | #define OMAP_DSP_TADD_ABORTADR 0xffffffff | ||
114 | |||
115 | |||
116 | /* | ||
117 | * error cause definition (for error detection device) | ||
118 | */ | ||
119 | #define OMAP_DSP_ERRDT_WDT 0x00000001 | ||
120 | #define OMAP_DSP_ERRDT_MMU 0x00000002 | ||
121 | |||
122 | |||
123 | /* | ||
124 | * mailbox protocol definitions | ||
125 | */ | ||
126 | |||
127 | struct omap_dsp_mailbox_cmd { | ||
128 | unsigned short cmd; | ||
129 | unsigned short data; | ||
130 | }; | ||
131 | |||
132 | struct omap_dsp_reginfo { | ||
133 | unsigned short adr; | ||
134 | unsigned short val; | ||
135 | }; | ||
136 | |||
137 | struct omap_dsp_varinfo { | ||
138 | unsigned char varid; | ||
139 | unsigned short val[0]; | ||
140 | }; | ||
141 | |||
142 | #define OMAP_DSP_MBPROT_REVISION 0x0019 | ||
143 | |||
144 | #define OMAP_DSP_MBCMD_WDSND 0x10 | ||
145 | #define OMAP_DSP_MBCMD_WDREQ 0x11 | ||
146 | #define OMAP_DSP_MBCMD_BKSND 0x20 | ||
147 | #define OMAP_DSP_MBCMD_BKREQ 0x21 | ||
148 | #define OMAP_DSP_MBCMD_BKYLD 0x23 | ||
149 | #define OMAP_DSP_MBCMD_BKSNDP 0x24 | ||
150 | #define OMAP_DSP_MBCMD_BKREQP 0x25 | ||
151 | #define OMAP_DSP_MBCMD_TCTL 0x30 | ||
152 | #define OMAP_DSP_MBCMD_TCTLDATA 0x31 | ||
153 | #define OMAP_DSP_MBCMD_POLL 0x32 | ||
154 | #define OMAP_DSP_MBCMD_WDT 0x50 /* v3.3: obsolete */ | ||
155 | #define OMAP_DSP_MBCMD_RUNLEVEL 0x51 | ||
156 | #define OMAP_DSP_MBCMD_PM 0x52 | ||
157 | #define OMAP_DSP_MBCMD_SUSPEND 0x53 | ||
158 | #define OMAP_DSP_MBCMD_KFUNC 0x54 | ||
159 | #define OMAP_DSP_MBCMD_TCFG 0x60 | ||
160 | #define OMAP_DSP_MBCMD_TADD 0x62 | ||
161 | #define OMAP_DSP_MBCMD_TDEL 0x63 | ||
162 | #define OMAP_DSP_MBCMD_TSTOP 0x65 | ||
163 | #define OMAP_DSP_MBCMD_DSPCFG 0x70 | ||
164 | #define OMAP_DSP_MBCMD_REGRW 0x72 | ||
165 | #define OMAP_DSP_MBCMD_GETVAR 0x74 | ||
166 | #define OMAP_DSP_MBCMD_SETVAR 0x75 | ||
167 | #define OMAP_DSP_MBCMD_ERR 0x78 | ||
168 | #define OMAP_DSP_MBCMD_DBG 0x79 | ||
169 | |||
170 | #define OMAP_DSP_MBCMD_TCTL_TINIT 0x0000 | ||
171 | #define OMAP_DSP_MBCMD_TCTL_TEN 0x0001 | ||
172 | #define OMAP_DSP_MBCMD_TCTL_TDIS 0x0002 | ||
173 | #define OMAP_DSP_MBCMD_TCTL_TCLR 0x0003 | ||
174 | #define OMAP_DSP_MBCMD_TCTL_TCLR_FORCE 0x0004 | ||
175 | |||
176 | #define OMAP_DSP_MBCMD_RUNLEVEL_USER 0x01 | ||
177 | #define OMAP_DSP_MBCMD_RUNLEVEL_SUPER 0x0e | ||
178 | #define OMAP_DSP_MBCMD_RUNLEVEL_RECOVERY 0x10 | ||
179 | |||
180 | #define OMAP_DSP_MBCMD_PM_DISABLE 0x00 | ||
181 | #define OMAP_DSP_MBCMD_PM_ENABLE 0x01 | ||
182 | |||
183 | #define OMAP_DSP_MBCMD_KFUNC_FBCTL 0x00 | ||
184 | |||
185 | #define OMAP_DSP_MBCMD_FBCTL_ENABLE 0x0002 | ||
186 | #define OMAP_DSP_MBCMD_FBCTL_DISABLE 0x0003 | ||
187 | |||
188 | #define OMAP_DSP_MBCMD_TDEL_SAFE 0x0000 | ||
189 | #define OMAP_DSP_MBCMD_TDEL_KILL 0x0001 | ||
190 | |||
191 | #define OMAP_DSP_MBCMD_DSPCFG_REQ 0x00 | ||
192 | #define OMAP_DSP_MBCMD_DSPCFG_SYSADRH 0x28 | ||
193 | #define OMAP_DSP_MBCMD_DSPCFG_SYSADRL 0x29 | ||
194 | #define OMAP_DSP_MBCMD_DSPCFG_PROTREV 0x70 | ||
195 | #define OMAP_DSP_MBCMD_DSPCFG_ABORT 0x78 | ||
196 | #define OMAP_DSP_MBCMD_DSPCFG_LAST 0x80 | ||
197 | |||
198 | #define OMAP_DSP_MBCMD_REGRW_MEMR 0x00 | ||
199 | #define OMAP_DSP_MBCMD_REGRW_MEMW 0x01 | ||
200 | #define OMAP_DSP_MBCMD_REGRW_IOR 0x02 | ||
201 | #define OMAP_DSP_MBCMD_REGRW_IOW 0x03 | ||
202 | #define OMAP_DSP_MBCMD_REGRW_DATA 0x04 | ||
203 | |||
204 | #define OMAP_DSP_MBCMD_VARID_ICRMASK 0x00 | ||
205 | #define OMAP_DSP_MBCMD_VARID_LOADINFO 0x01 | ||
206 | |||
207 | #define OMAP_DSP_TTYP_ARCV 0x0001 | ||
208 | #define OMAP_DSP_TTYP_ASND 0x0002 | ||
209 | #define OMAP_DSP_TTYP_BKMD 0x0004 | ||
210 | #define OMAP_DSP_TTYP_BKDM 0x0008 | ||
211 | #define OMAP_DSP_TTYP_PVMD 0x0010 | ||
212 | #define OMAP_DSP_TTYP_PVDM 0x0020 | ||
213 | |||
214 | #define OMAP_DSP_EID_BADTID 0x10 | ||
215 | #define OMAP_DSP_EID_BADTCN 0x11 | ||
216 | #define OMAP_DSP_EID_BADBID 0x20 | ||
217 | #define OMAP_DSP_EID_BADCNT 0x21 | ||
218 | #define OMAP_DSP_EID_NOTLOCKED 0x22 | ||
219 | #define OMAP_DSP_EID_STVBUF 0x23 | ||
220 | #define OMAP_DSP_EID_BADADR 0x24 | ||
221 | #define OMAP_DSP_EID_BADTCTL 0x30 | ||
222 | #define OMAP_DSP_EID_BADPARAM 0x50 | ||
223 | #define OMAP_DSP_EID_FATAL 0x58 | ||
224 | #define OMAP_DSP_EID_NOMEM 0xc0 | ||
225 | #define OMAP_DSP_EID_NORES 0xc1 | ||
226 | #define OMAP_DSP_EID_IPBFULL 0xc2 | ||
227 | #define OMAP_DSP_EID_WDT 0xd0 | ||
228 | #define OMAP_DSP_EID_TASKNOTRDY 0xe0 | ||
229 | #define OMAP_DSP_EID_TASKBSY 0xe1 | ||
230 | #define OMAP_DSP_EID_TASKERR 0xef | ||
231 | #define OMAP_DSP_EID_BADCFGTYP 0xf0 | ||
232 | #define OMAP_DSP_EID_DEBUG 0xf8 | ||
233 | #define OMAP_DSP_EID_BADSEQ 0xfe | ||
234 | #define OMAP_DSP_EID_BADCMD 0xff | ||
235 | |||
236 | #define OMAP_DSP_TNM_LEN 16 | ||
237 | |||
238 | #define OMAP_DSP_TID_FREE 0xff | ||
239 | #define OMAP_DSP_TID_ANON 0xfe | ||
240 | |||
241 | #define OMAP_DSP_BID_NULL 0xffff | ||
242 | #define OMAP_DSP_BID_PVT 0xfffe | ||
243 | |||
244 | #endif /* ASM_ARCH_DSP_H */ | ||
diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h new file mode 100644 index 000000000000..4fcce6944056 --- /dev/null +++ b/include/asm-arm/arch-omap/dsp_common.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/dsp_common.h | ||
3 | * | ||
4 | * Header for OMAP DSP subsystem control | ||
5 | * | ||
6 | * Copyright (C) 2004,2005 Nokia Corporation | ||
7 | * | ||
8 | * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | * 2005/06/03: DSP Gateway version 3.3 | ||
25 | */ | ||
26 | |||
27 | #ifndef ASM_ARCH_DSP_COMMON_H | ||
28 | #define ASM_ARCH_DSP_COMMON_H | ||
29 | |||
30 | void omap_dsp_pm_suspend(void); | ||
31 | void omap_dsp_pm_resume(void); | ||
32 | void omap_dsp_request_mpui(void); | ||
33 | void omap_dsp_release_mpui(void); | ||
34 | int omap_dsp_request_mem(void); | ||
35 | int omap_dsp_release_mem(void); | ||
36 | |||
37 | #endif /* ASM_ARCH_DSP_COMMON_H */ | ||
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S index 57b126889b98..0d29b9c56a95 100644 --- a/include/asm-arm/arch-omap/entry-macro.S +++ b/include/asm-arm/arch-omap/entry-macro.S | |||
@@ -8,6 +8,8 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #if defined(CONFIG_ARCH_OMAP1) | ||
12 | |||
11 | .macro disable_fiq | 13 | .macro disable_fiq |
12 | .endm | 14 | .endm |
13 | 15 | ||
@@ -30,3 +32,29 @@ | |||
30 | 1510: | 32 | 1510: |
31 | .endm | 33 | .endm |
32 | 34 | ||
35 | #elif defined(CONFIG_ARCH_OMAP24XX) | ||
36 | |||
37 | #include <asm/arch/omap24xx.h> | ||
38 | |||
39 | .macro disable_fiq | ||
40 | .endm | ||
41 | |||
42 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
43 | ldr \base, =VA_IC_BASE | ||
44 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | ||
45 | cmp \irqnr, #0x0 | ||
46 | bne 2222f | ||
47 | ldr \irqnr, [\base, #0xb8] /* IRQ pending reg 2 */ | ||
48 | cmp \irqnr, #0x0 | ||
49 | bne 2222f | ||
50 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | ||
51 | cmp \irqnr, #0x0 | ||
52 | 2222: | ||
53 | ldrne \irqnr, [\base, #IRQ_SIR_IRQ] | ||
54 | |||
55 | .endm | ||
56 | |||
57 | .macro irq_prio_table | ||
58 | .endm | ||
59 | |||
60 | #endif | ||
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h index fad2fc93ee70..74cb2b93b700 100644 --- a/include/asm-arm/arch-omap/gpio.h +++ b/include/asm-arm/arch-omap/gpio.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * OMAP GPIO handling defines and functions | 4 | * OMAP GPIO handling defines and functions |
5 | * | 5 | * |
6 | * Copyright (C) 2003 Nokia Corporation | 6 | * Copyright (C) 2003-2005 Nokia Corporation |
7 | * | 7 | * |
8 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> | 8 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> |
9 | * | 9 | * |
@@ -30,7 +30,23 @@ | |||
30 | #include <asm/arch/irqs.h> | 30 | #include <asm/arch/irqs.h> |
31 | #include <asm/io.h> | 31 | #include <asm/io.h> |
32 | 32 | ||
33 | #define OMAP_MPUIO_BASE 0xfffb5000 | 33 | #define OMAP_MPUIO_BASE (void __iomem *)0xfffb5000 |
34 | |||
35 | #ifdef CONFIG_ARCH_OMAP730 | ||
36 | #define OMAP_MPUIO_INPUT_LATCH 0x00 | ||
37 | #define OMAP_MPUIO_OUTPUT 0x02 | ||
38 | #define OMAP_MPUIO_IO_CNTL 0x04 | ||
39 | #define OMAP_MPUIO_KBR_LATCH 0x08 | ||
40 | #define OMAP_MPUIO_KBC 0x0a | ||
41 | #define OMAP_MPUIO_GPIO_EVENT_MODE 0x0c | ||
42 | #define OMAP_MPUIO_GPIO_INT_EDGE 0x0e | ||
43 | #define OMAP_MPUIO_KBD_INT 0x10 | ||
44 | #define OMAP_MPUIO_GPIO_INT 0x12 | ||
45 | #define OMAP_MPUIO_KBD_MASKIT 0x14 | ||
46 | #define OMAP_MPUIO_GPIO_MASKIT 0x16 | ||
47 | #define OMAP_MPUIO_GPIO_DEBOUNCING 0x18 | ||
48 | #define OMAP_MPUIO_LATCH 0x1a | ||
49 | #else | ||
34 | #define OMAP_MPUIO_INPUT_LATCH 0x00 | 50 | #define OMAP_MPUIO_INPUT_LATCH 0x00 |
35 | #define OMAP_MPUIO_OUTPUT 0x04 | 51 | #define OMAP_MPUIO_OUTPUT 0x04 |
36 | #define OMAP_MPUIO_IO_CNTL 0x08 | 52 | #define OMAP_MPUIO_IO_CNTL 0x08 |
@@ -44,6 +60,7 @@ | |||
44 | #define OMAP_MPUIO_GPIO_MASKIT 0x2c | 60 | #define OMAP_MPUIO_GPIO_MASKIT 0x2c |
45 | #define OMAP_MPUIO_GPIO_DEBOUNCING 0x30 | 61 | #define OMAP_MPUIO_GPIO_DEBOUNCING 0x30 |
46 | #define OMAP_MPUIO_LATCH 0x34 | 62 | #define OMAP_MPUIO_LATCH 0x34 |
63 | #endif | ||
47 | 64 | ||
48 | #define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr)) | 65 | #define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr)) |
49 | #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES) | 66 | #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES) |
@@ -52,18 +69,11 @@ | |||
52 | IH_MPUIO_BASE + ((nr) & 0x0f) : \ | 69 | IH_MPUIO_BASE + ((nr) & 0x0f) : \ |
53 | IH_GPIO_BASE + ((nr) & 0x3f)) | 70 | IH_GPIO_BASE + ((nr) & 0x3f)) |
54 | 71 | ||
55 | /* For EDGECTRL */ | ||
56 | #define OMAP_GPIO_NO_EDGE 0x00 | ||
57 | #define OMAP_GPIO_FALLING_EDGE 0x01 | ||
58 | #define OMAP_GPIO_RISING_EDGE 0x02 | ||
59 | #define OMAP_GPIO_BOTH_EDGES 0x03 | ||
60 | |||
61 | extern int omap_gpio_init(void); /* Call from board init only */ | 72 | extern int omap_gpio_init(void); /* Call from board init only */ |
62 | extern int omap_request_gpio(int gpio); | 73 | extern int omap_request_gpio(int gpio); |
63 | extern void omap_free_gpio(int gpio); | 74 | extern void omap_free_gpio(int gpio); |
64 | extern void omap_set_gpio_direction(int gpio, int is_input); | 75 | extern void omap_set_gpio_direction(int gpio, int is_input); |
65 | extern void omap_set_gpio_dataout(int gpio, int enable); | 76 | extern void omap_set_gpio_dataout(int gpio, int enable); |
66 | extern int omap_get_gpio_datain(int gpio); | 77 | extern int omap_get_gpio_datain(int gpio); |
67 | extern void omap_set_gpio_edge_ctrl(int gpio, int edge); | ||
68 | 78 | ||
69 | #endif | 79 | #endif |
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index 48258c7f6541..60201e1dd6ad 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <asm/arch/cpu.h> | 43 | #include <asm/arch/cpu.h> |
44 | #endif | 44 | #endif |
45 | #include <asm/arch/io.h> | 45 | #include <asm/arch/io.h> |
46 | #include <asm/arch/serial.h> | ||
46 | 47 | ||
47 | /* | 48 | /* |
48 | * --------------------------------------------------------------------------- | 49 | * --------------------------------------------------------------------------- |
@@ -89,11 +90,12 @@ | |||
89 | /* DPLL control registers */ | 90 | /* DPLL control registers */ |
90 | #define DPLL_CTL (0xfffecf00) | 91 | #define DPLL_CTL (0xfffecf00) |
91 | 92 | ||
92 | /* DSP clock control */ | 93 | /* DSP clock control. Must use __raw_readw() and __raw_writew() with these */ |
93 | #define DSP_CONFIG_REG_BASE (0xe1008000) | 94 | #define DSP_CONFIG_REG_BASE (0xe1008000) |
94 | #define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0) | 95 | #define DSP_CKCTL (DSP_CONFIG_REG_BASE + 0x0) |
95 | #define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4) | 96 | #define DSP_IDLECT1 (DSP_CONFIG_REG_BASE + 0x4) |
96 | #define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8) | 97 | #define DSP_IDLECT2 (DSP_CONFIG_REG_BASE + 0x8) |
98 | #define DSP_RSTCT2 (DSP_CONFIG_REG_BASE + 0x14) | ||
97 | 99 | ||
98 | /* | 100 | /* |
99 | * --------------------------------------------------------------------------- | 101 | * --------------------------------------------------------------------------- |
@@ -142,6 +144,13 @@ | |||
142 | * Interrupts | 144 | * Interrupts |
143 | * --------------------------------------------------------------------------- | 145 | * --------------------------------------------------------------------------- |
144 | */ | 146 | */ |
147 | #ifdef CONFIG_ARCH_OMAP1 | ||
148 | |||
149 | /* | ||
150 | * XXX: These probably want to be moved to arch/arm/mach-omap/omap1/irq.c | ||
151 | * or something similar.. -- PFM. | ||
152 | */ | ||
153 | |||
145 | #define OMAP_IH1_BASE 0xfffecb00 | 154 | #define OMAP_IH1_BASE 0xfffecb00 |
146 | #define OMAP_IH2_BASE 0xfffe0000 | 155 | #define OMAP_IH2_BASE 0xfffe0000 |
147 | 156 | ||
@@ -170,6 +179,8 @@ | |||
170 | #define IRQ_ILR0_REG_OFFSET 0x1c | 179 | #define IRQ_ILR0_REG_OFFSET 0x1c |
171 | #define IRQ_GMR_REG_OFFSET 0xa0 | 180 | #define IRQ_GMR_REG_OFFSET 0xa0 |
172 | 181 | ||
182 | #endif | ||
183 | |||
173 | /* | 184 | /* |
174 | * ---------------------------------------------------------------------------- | 185 | * ---------------------------------------------------------------------------- |
175 | * System control registers | 186 | * System control registers |
@@ -260,32 +271,17 @@ | |||
260 | 271 | ||
261 | /* | 272 | /* |
262 | * --------------------------------------------------------------------------- | 273 | * --------------------------------------------------------------------------- |
263 | * Serial ports | ||
264 | * --------------------------------------------------------------------------- | ||
265 | */ | ||
266 | #define OMAP_UART1_BASE (unsigned char *)0xfffb0000 | ||
267 | #define OMAP_UART2_BASE (unsigned char *)0xfffb0800 | ||
268 | #define OMAP_UART3_BASE (unsigned char *)0xfffb9800 | ||
269 | #define OMAP_MAX_NR_PORTS 3 | ||
270 | #define OMAP1510_BASE_BAUD (12000000/16) | ||
271 | #define OMAP16XX_BASE_BAUD (48000000/16) | ||
272 | |||
273 | #define is_omap_port(p) ({int __ret = 0; \ | ||
274 | if (p == IO_ADDRESS(OMAP_UART1_BASE) || \ | ||
275 | p == IO_ADDRESS(OMAP_UART2_BASE) || \ | ||
276 | p == IO_ADDRESS(OMAP_UART3_BASE)) \ | ||
277 | __ret = 1; \ | ||
278 | __ret; \ | ||
279 | }) | ||
280 | |||
281 | /* | ||
282 | * --------------------------------------------------------------------------- | ||
283 | * Processor specific defines | 274 | * Processor specific defines |
284 | * --------------------------------------------------------------------------- | 275 | * --------------------------------------------------------------------------- |
285 | */ | 276 | */ |
286 | 277 | ||
287 | #include "omap730.h" | 278 | #include "omap730.h" |
288 | #include "omap1510.h" | 279 | #include "omap1510.h" |
280 | |||
281 | #ifdef CONFIG_ARCH_OMAP24XX | ||
282 | #include "omap24xx.h" | ||
283 | #endif | ||
284 | |||
289 | #include "omap16xx.h" | 285 | #include "omap16xx.h" |
290 | 286 | ||
291 | /* | 287 | /* |
@@ -312,7 +308,6 @@ | |||
312 | 308 | ||
313 | #ifdef CONFIG_MACH_OMAP_H4 | 309 | #ifdef CONFIG_MACH_OMAP_H4 |
314 | #include "board-h4.h" | 310 | #include "board-h4.h" |
315 | #error "Support for H4 board not yet implemented." | ||
316 | #endif | 311 | #endif |
317 | 312 | ||
318 | #ifdef CONFIG_MACH_OMAP_OSK | 313 | #ifdef CONFIG_MACH_OMAP_OSK |
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index 1c8c9fcc766e..11fbf629bf75 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
@@ -49,16 +49,24 @@ | |||
49 | * I/O mapping | 49 | * I/O mapping |
50 | * ---------------------------------------------------------------------------- | 50 | * ---------------------------------------------------------------------------- |
51 | */ | 51 | */ |
52 | #define IO_PHYS 0xFFFB0000 | ||
53 | #define IO_OFFSET 0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
54 | #define IO_VIRT (IO_PHYS - IO_OFFSET) | ||
55 | #define IO_SIZE 0x40000 | ||
56 | #define IO_ADDRESS(x) ((x) - IO_OFFSET) | ||
57 | 52 | ||
58 | #define PCIO_BASE 0 | 53 | #if defined(CONFIG_ARCH_OMAP1) |
54 | #define IO_PHYS 0xFFFB0000 | ||
55 | #define IO_OFFSET -0x01000000 /* Virtual IO = 0xfefb0000 */ | ||
56 | #define IO_SIZE 0x40000 | ||
59 | 57 | ||
60 | #define io_p2v(x) ((x) - IO_OFFSET) | 58 | #elif defined(CONFIG_ARCH_OMAP2) |
61 | #define io_v2p(x) ((x) + IO_OFFSET) | 59 | #define IO_PHYS 0x48000000 /* L4 peripherals; other stuff has to be mapped * |
60 | * manually. */ | ||
61 | #define IO_OFFSET 0x90000000 /* Virtual IO = 0xd8000000 */ | ||
62 | #define IO_SIZE 0x08000000 | ||
63 | #endif | ||
64 | |||
65 | #define IO_VIRT (IO_PHYS + IO_OFFSET) | ||
66 | #define IO_ADDRESS(x) ((x) + IO_OFFSET) | ||
67 | #define PCIO_BASE 0 | ||
68 | #define io_p2v(x) ((x) + IO_OFFSET) | ||
69 | #define io_v2p(x) ((x) - IO_OFFSET) | ||
62 | 70 | ||
63 | #ifndef __ASSEMBLER__ | 71 | #ifndef __ASSEMBLER__ |
64 | 72 | ||
@@ -96,6 +104,8 @@ typedef struct { volatile u32 offset[4096]; } __regbase32; | |||
96 | ->offset[((vaddr)&4095)>>2] | 104 | ->offset[((vaddr)&4095)>>2] |
97 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) | 105 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) |
98 | 106 | ||
107 | extern void omap_map_common_io(void); | ||
108 | |||
99 | #else | 109 | #else |
100 | 110 | ||
101 | #define __REG8(paddr) io_p2v(paddr) | 111 | #define __REG8(paddr) io_p2v(paddr) |
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h index 0d05a7c957d1..74e108ccac16 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h | |||
@@ -135,7 +135,6 @@ | |||
135 | /* | 135 | /* |
136 | * OMAP-1510 specific IRQ numbers for interrupt handler 2 | 136 | * OMAP-1510 specific IRQ numbers for interrupt handler 2 |
137 | */ | 137 | */ |
138 | #define INT_1510_OS_32kHz_TIMER (22 + IH2_BASE) | ||
139 | #define INT_1510_COM_SPI_RO (31 + IH2_BASE) | 138 | #define INT_1510_COM_SPI_RO (31 + IH2_BASE) |
140 | 139 | ||
141 | /* | 140 | /* |
@@ -232,6 +231,11 @@ | |||
232 | #define INT_730_DMA_CH15 (62 + IH2_BASE) | 231 | #define INT_730_DMA_CH15 (62 + IH2_BASE) |
233 | #define INT_730_NAND (63 + IH2_BASE) | 232 | #define INT_730_NAND (63 + IH2_BASE) |
234 | 233 | ||
234 | #define INT_24XX_GPIO_BANK1 29 | ||
235 | #define INT_24XX_GPIO_BANK2 30 | ||
236 | #define INT_24XX_GPIO_BANK3 31 | ||
237 | #define INT_24XX_GPIO_BANK4 32 | ||
238 | |||
235 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and | 239 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and |
236 | * 16 MPUIO lines */ | 240 | * 16 MPUIO lines */ |
237 | #define OMAP_MAX_GPIO_LINES 192 | 241 | #define OMAP_MAX_GPIO_LINES 192 |
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h index f6b57dd846a3..84f81e315a25 100644 --- a/include/asm-arm/arch-omap/memory.h +++ b/include/asm-arm/arch-omap/memory.h | |||
@@ -36,12 +36,11 @@ | |||
36 | /* | 36 | /* |
37 | * Physical DRAM offset. | 37 | * Physical DRAM offset. |
38 | */ | 38 | */ |
39 | #if defined(CONFIG_ARCH_OMAP1) | ||
39 | #define PHYS_OFFSET (0x10000000UL) | 40 | #define PHYS_OFFSET (0x10000000UL) |
40 | 41 | #elif defined(CONFIG_ARCH_OMAP2) | |
41 | /* | 42 | #define PHYS_OFFSET (0x80000000UL) |
42 | * OMAP-1510 Local Bus address offset | 43 | #endif |
43 | */ | ||
44 | #define OMAP1510_LB_OFFSET (0x30000000UL) | ||
45 | 44 | ||
46 | /* | 45 | /* |
47 | * Conversion between SDRAM and fake PCI bus, used by USB | 46 | * Conversion between SDRAM and fake PCI bus, used by USB |
@@ -64,6 +63,11 @@ | |||
64 | */ | 63 | */ |
65 | #ifdef CONFIG_ARCH_OMAP1510 | 64 | #ifdef CONFIG_ARCH_OMAP1510 |
66 | 65 | ||
66 | /* | ||
67 | * OMAP-1510 Local Bus address offset | ||
68 | */ | ||
69 | #define OMAP1510_LB_OFFSET (0x30000000UL) | ||
70 | |||
67 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) | 71 | #define virt_to_lbus(x) ((x) - PAGE_OFFSET + OMAP1510_LB_OFFSET) |
68 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) | 72 | #define lbus_to_virt(x) ((x) - OMAP1510_LB_OFFSET + PAGE_OFFSET) |
69 | #define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) | 73 | #define is_lbus_device(dev) (cpu_is_omap1510() && dev && (strncmp(dev->bus_id, "ohci", 4) == 0)) |
diff --git a/include/asm-arm/arch-omap/mtd-xip.h b/include/asm-arm/arch-omap/mtd-xip.h new file mode 100644 index 000000000000..a73a28571fee --- /dev/null +++ b/include/asm-arm/arch-omap/mtd-xip.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * MTD primitives for XIP support. Architecture specific functions. | ||
3 | * | ||
4 | * Do not include this file directly. It's included from linux/mtd/xip.h | ||
5 | * | ||
6 | * Author: Vladimir Barinov <vbarinov@ru.mvista.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 <asm/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*)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/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index 5bd3f0097fc6..1b1ad4105349 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h | |||
@@ -185,6 +185,7 @@ typedef enum { | |||
185 | 185 | ||
186 | /* MPUIO */ | 186 | /* MPUIO */ |
187 | MPUIO2, | 187 | MPUIO2, |
188 | N15_1610_MPUIO2, | ||
188 | MPUIO4, | 189 | MPUIO4, |
189 | MPUIO5, | 190 | MPUIO5, |
190 | T20_1610_MPUIO5, | 191 | T20_1610_MPUIO5, |
@@ -210,6 +211,7 @@ typedef enum { | |||
210 | 211 | ||
211 | /* Misc ballouts */ | 212 | /* Misc ballouts */ |
212 | BALLOUT_V8_ARMIO3, | 213 | BALLOUT_V8_ARMIO3, |
214 | N20_HDQ, | ||
213 | 215 | ||
214 | /* OMAP-1610 MMC2 */ | 216 | /* OMAP-1610 MMC2 */ |
215 | W8_1610_MMC2_DAT0, | 217 | W8_1610_MMC2_DAT0, |
@@ -235,6 +237,7 @@ typedef enum { | |||
235 | P20_1610_GPIO4, | 237 | P20_1610_GPIO4, |
236 | V9_1610_GPIO7, | 238 | V9_1610_GPIO7, |
237 | W8_1610_GPIO9, | 239 | W8_1610_GPIO9, |
240 | N20_1610_GPIO11, | ||
238 | N19_1610_GPIO13, | 241 | N19_1610_GPIO13, |
239 | P10_1610_GPIO22, | 242 | P10_1610_GPIO22, |
240 | V5_1610_GPIO24, | 243 | V5_1610_GPIO24, |
@@ -250,7 +253,7 @@ typedef enum { | |||
250 | U18_1610_UWIRE_SDI, | 253 | U18_1610_UWIRE_SDI, |
251 | W21_1610_UWIRE_SDO, | 254 | W21_1610_UWIRE_SDO, |
252 | N14_1610_UWIRE_CS0, | 255 | N14_1610_UWIRE_CS0, |
253 | P15_1610_UWIRE_CS0, | 256 | P15_1610_UWIRE_CS3, |
254 | N15_1610_UWIRE_CS1, | 257 | N15_1610_UWIRE_CS1, |
255 | 258 | ||
256 | /* OMAP-1610 Flash */ | 259 | /* OMAP-1610 Flash */ |
@@ -411,7 +414,8 @@ MUX_CFG("N21_1710_GPIO14", 6, 9, 0, 1, 1, 1, 1, 1, 1) | |||
411 | MUX_CFG("W15_1710_GPIO40", 9, 27, 7, 2, 5, 1, 2, 1, 1) | 414 | MUX_CFG("W15_1710_GPIO40", 9, 27, 7, 2, 5, 1, 2, 1, 1) |
412 | 415 | ||
413 | /* MPUIO */ | 416 | /* MPUIO */ |
414 | MUX_CFG("MPUIO2", 7, 18, 0, 1, 1, 1, NA, 0, 1) | 417 | MUX_CFG("MPUIO2", 7, 18, 0, 1, 14, 1, NA, 0, 1) |
418 | MUX_CFG("N15_1610_MPUIO2", 7, 18, 0, 1, 14, 1, 1, 0, 1) | ||
415 | MUX_CFG("MPUIO4", 7, 15, 0, 1, 13, 1, NA, 0, 1) | 419 | MUX_CFG("MPUIO4", 7, 15, 0, 1, 13, 1, NA, 0, 1) |
416 | MUX_CFG("MPUIO5", 7, 12, 0, 1, 12, 1, NA, 0, 1) | 420 | MUX_CFG("MPUIO5", 7, 12, 0, 1, 12, 1, NA, 0, 1) |
417 | 421 | ||
@@ -438,6 +442,7 @@ MUX_CFG("MCBSP3_CLKX", 9, 3, 1, 1, 29, 0, NA, 0, 1) | |||
438 | 442 | ||
439 | /* Misc ballouts */ | 443 | /* Misc ballouts */ |
440 | MUX_CFG("BALLOUT_V8_ARMIO3", B, 18, 0, 2, 25, 1, NA, 0, 1) | 444 | MUX_CFG("BALLOUT_V8_ARMIO3", B, 18, 0, 2, 25, 1, NA, 0, 1) |
445 | MUX_CFG("N20_HDQ", 6, 18, 1, 1, 4, 0, 1, 4, 0) | ||
441 | 446 | ||
442 | /* OMAP-1610 MMC2 */ | 447 | /* OMAP-1610 MMC2 */ |
443 | MUX_CFG("W8_1610_MMC2_DAT0", B, 21, 6, 2, 23, 1, 2, 1, 1) | 448 | MUX_CFG("W8_1610_MMC2_DAT0", B, 21, 6, 2, 23, 1, 2, 1, 1) |
@@ -463,6 +468,7 @@ MUX_CFG("J18_1610_ETM_D7", 5, 27, 1, 0, 19, 0, 0, 0, 1) | |||
463 | MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1) | 468 | MUX_CFG("P20_1610_GPIO4", 6, 27, 0, 1, 7, 0, 1, 1, 1) |
464 | MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1) | 469 | MUX_CFG("V9_1610_GPIO7", B, 12, 1, 2, 20, 0, 2, 1, 1) |
465 | MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1) | 470 | MUX_CFG("W8_1610_GPIO9", B, 21, 0, 2, 23, 0, 2, 1, 1) |
471 | MUX_CFG("N20_1610_GPIO11", 6, 18, 0, 1, 4, 0, 1, 1, 1) | ||
466 | MUX_CFG("N19_1610_GPIO13", 6, 12, 0, 1, 2, 0, 1, 1, 1) | 472 | MUX_CFG("N19_1610_GPIO13", 6, 12, 0, 1, 2, 0, 1, 1, 1) |
467 | MUX_CFG("P10_1610_GPIO22", C, 0, 7, 2, 26, 0, 2, 1, 1) | 473 | MUX_CFG("P10_1610_GPIO22", C, 0, 7, 2, 26, 0, 2, 1, 1) |
468 | MUX_CFG("V5_1610_GPIO24", B, 15, 7, 2, 21, 0, 2, 1, 1) | 474 | MUX_CFG("V5_1610_GPIO24", B, 15, 7, 2, 21, 0, 2, 1, 1) |
diff --git a/include/asm-arm/arch-omap/omap1510.h b/include/asm-arm/arch-omap/omap1510.h index f491a48ef2e1..f086a3933906 100644 --- a/include/asm-arm/arch-omap/omap1510.h +++ b/include/asm-arm/arch-omap/omap1510.h | |||
@@ -36,10 +36,6 @@ | |||
36 | 36 | ||
37 | /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ | 37 | /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ |
38 | 38 | ||
39 | #define OMAP1510_SRAM_BASE 0xD0000000 | ||
40 | #define OMAP1510_SRAM_SIZE (SZ_128K + SZ_64K) | ||
41 | #define OMAP1510_SRAM_START 0x20000000 | ||
42 | |||
43 | #define OMAP1510_DSP_BASE 0xE0000000 | 39 | #define OMAP1510_DSP_BASE 0xE0000000 |
44 | #define OMAP1510_DSP_SIZE 0x28000 | 40 | #define OMAP1510_DSP_SIZE 0x28000 |
45 | #define OMAP1510_DSP_START 0xE0000000 | 41 | #define OMAP1510_DSP_START 0xE0000000 |
@@ -48,14 +44,5 @@ | |||
48 | #define OMAP1510_DSPREG_SIZE SZ_128K | 44 | #define OMAP1510_DSPREG_SIZE SZ_128K |
49 | #define OMAP1510_DSPREG_START 0xE1000000 | 45 | #define OMAP1510_DSPREG_START 0xE1000000 |
50 | 46 | ||
51 | /* | ||
52 | * ---------------------------------------------------------------------------- | ||
53 | * Memory used by power management | ||
54 | * ---------------------------------------------------------------------------- | ||
55 | */ | ||
56 | |||
57 | #define OMAP1510_SRAM_IDLE_SUSPEND (OMAP1510_SRAM_BASE + OMAP1510_SRAM_SIZE - 0x200) | ||
58 | #define OMAP1510_SRAM_API_SUSPEND (OMAP1510_SRAM_IDLE_SUSPEND + 0x100) | ||
59 | |||
60 | #endif /* __ASM_ARCH_OMAP1510_H */ | 47 | #endif /* __ASM_ARCH_OMAP1510_H */ |
61 | 48 | ||
diff --git a/include/asm-arm/arch-omap/omap16xx.h b/include/asm-arm/arch-omap/omap16xx.h index 38a9b95e6a33..f0c7f0fb4dc0 100644 --- a/include/asm-arm/arch-omap/omap16xx.h +++ b/include/asm-arm/arch-omap/omap16xx.h | |||
@@ -36,11 +36,6 @@ | |||
36 | 36 | ||
37 | /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ | 37 | /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ |
38 | 38 | ||
39 | #define OMAP16XX_SRAM_BASE 0xD0000000 | ||
40 | #define OMAP1610_SRAM_SIZE (SZ_16K) | ||
41 | #define OMAP5912_SRAM_SIZE 0x3E800 | ||
42 | #define OMAP16XX_SRAM_START 0x20000000 | ||
43 | |||
44 | #define OMAP16XX_DSP_BASE 0xE0000000 | 39 | #define OMAP16XX_DSP_BASE 0xE0000000 |
45 | #define OMAP16XX_DSP_SIZE 0x28000 | 40 | #define OMAP16XX_DSP_SIZE 0x28000 |
46 | #define OMAP16XX_DSP_START 0xE0000000 | 41 | #define OMAP16XX_DSP_START 0xE0000000 |
@@ -50,17 +45,6 @@ | |||
50 | #define OMAP16XX_DSPREG_START 0xE1000000 | 45 | #define OMAP16XX_DSPREG_START 0xE1000000 |
51 | 46 | ||
52 | /* | 47 | /* |
53 | * ---------------------------------------------------------------------------- | ||
54 | * Memory used by power management | ||
55 | * ---------------------------------------------------------------------------- | ||
56 | */ | ||
57 | |||
58 | #define OMAP1610_SRAM_IDLE_SUSPEND (OMAP16XX_SRAM_BASE + OMAP1610_SRAM_SIZE - 0x200) | ||
59 | #define OMAP1610_SRAM_API_SUSPEND (OMAP1610_SRAM_IDLE_SUSPEND + 0x100) | ||
60 | #define OMAP5912_SRAM_IDLE_SUSPEND (OMAP16XX_SRAM_BASE + OMAP5912_SRAM_SIZE - 0x200) | ||
61 | #define OMAP5912_SRAM_API_SUSPEND (OMAP5912_SRAM_IDLE_SUSPEND + 0x100) | ||
62 | |||
63 | /* | ||
64 | * --------------------------------------------------------------------------- | 48 | * --------------------------------------------------------------------------- |
65 | * Interrupts | 49 | * Interrupts |
66 | * --------------------------------------------------------------------------- | 50 | * --------------------------------------------------------------------------- |
diff --git a/include/asm-arm/arch-omap/omap24xx.h b/include/asm-arm/arch-omap/omap24xx.h new file mode 100644 index 000000000000..a9105466a417 --- /dev/null +++ b/include/asm-arm/arch-omap/omap24xx.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef __ASM_ARCH_OMAP24XX_H | ||
2 | #define __ASM_ARCH_OMAP24XX_H | ||
3 | |||
4 | #define OMAP24XX_L4_IO_BASE 0x48000000 | ||
5 | |||
6 | /* interrupt controller */ | ||
7 | #define OMAP24XX_IC_BASE (OMAP24XX_L4_IO_BASE + 0xfe000) | ||
8 | #define VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE) | ||
9 | |||
10 | #define OMAP24XX_IVA_INTC_BASE 0x40000000 | ||
11 | |||
12 | #define IRQ_SIR_IRQ 0x0040 | ||
13 | |||
14 | #endif /* __ASM_ARCH_OMAP24XX_H */ | ||
15 | |||
diff --git a/include/asm-arm/arch-omap/omap730.h b/include/asm-arm/arch-omap/omap730.h index 599ab00f5488..755b64c5e9f0 100644 --- a/include/asm-arm/arch-omap/omap730.h +++ b/include/asm-arm/arch-omap/omap730.h | |||
@@ -36,10 +36,6 @@ | |||
36 | 36 | ||
37 | /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ | 37 | /* Syntax: XX_BASE = Virtual base address, XX_START = Physical base address */ |
38 | 38 | ||
39 | #define OMAP730_SRAM_BASE 0xD0000000 | ||
40 | #define OMAP730_SRAM_SIZE (SZ_128K + SZ_64K + SZ_8K) | ||
41 | #define OMAP730_SRAM_START 0x20000000 | ||
42 | |||
43 | #define OMAP730_DSP_BASE 0xE0000000 | 39 | #define OMAP730_DSP_BASE 0xE0000000 |
44 | #define OMAP730_DSP_SIZE 0x50000 | 40 | #define OMAP730_DSP_SIZE 0x50000 |
45 | #define OMAP730_DSP_START 0xE0000000 | 41 | #define OMAP730_DSP_START 0xE0000000 |
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h index f209fc0953fb..fbd742d0c499 100644 --- a/include/asm-arm/arch-omap/pm.h +++ b/include/asm-arm/arch-omap/pm.h | |||
@@ -61,7 +61,10 @@ | |||
61 | #define PER_EN 0x1 | 61 | #define PER_EN 0x1 |
62 | 62 | ||
63 | #define CPU_SUSPEND_SIZE 200 | 63 | #define CPU_SUSPEND_SIZE 200 |
64 | #define ULPD_LOW_POWER_EN 0x0001 | 64 | #define ULPD_LOW_PWR_EN 0x0001 |
65 | #define ULPD_DEEP_SLEEP_TRANSITION_EN 0x0010 | ||
66 | #define ULPD_SETUP_ANALOG_CELL_3_VAL 0 | ||
67 | #define ULPD_POWER_CTRL_REG_VAL 0x0219 | ||
65 | 68 | ||
66 | #define DSP_IDLE_DELAY 10 | 69 | #define DSP_IDLE_DELAY 10 |
67 | #define DSP_IDLE 0x0040 | 70 | #define DSP_IDLE 0x0040 |
@@ -86,46 +89,35 @@ | |||
86 | #define OMAP1510_BIG_SLEEP_REQUEST 0x0cc5 | 89 | #define OMAP1510_BIG_SLEEP_REQUEST 0x0cc5 |
87 | #define OMAP1510_IDLE_LOOP_REQUEST 0x0c00 | 90 | #define OMAP1510_IDLE_LOOP_REQUEST 0x0c00 |
88 | #define OMAP1510_IDLE_CLOCK_DOMAINS 0x2 | 91 | #define OMAP1510_IDLE_CLOCK_DOMAINS 0x2 |
89 | #define OMAP1510_ULPD_LOW_POWER_REQ 0x0001 | ||
90 | 92 | ||
91 | #define OMAP1610_DEEP_SLEEP_REQUEST 0x17c7 | 93 | /* Both big sleep and deep sleep use same values. Difference is in ULPD. */ |
92 | #define OMAP1610_BIG_SLEEP_REQUEST TBD | 94 | #define OMAP1610_IDLECT1_SLEEP_VAL 0x13c7 |
95 | #define OMAP1610_IDLECT2_SLEEP_VAL 0x09c7 | ||
96 | #define OMAP1610_IDLECT3_VAL 0x3f | ||
97 | #define OMAP1610_IDLECT3_SLEEP_ORMASK 0x2c | ||
98 | #define OMAP1610_IDLECT3 0xfffece24 | ||
93 | #define OMAP1610_IDLE_LOOP_REQUEST 0x0400 | 99 | #define OMAP1610_IDLE_LOOP_REQUEST 0x0400 |
94 | #define OMAP1610_IDLE_CLOCK_DOMAINS 0x09c7 | ||
95 | #define OMAP1610_ULPD_LOW_POWER_REQ 0x3 | ||
96 | |||
97 | #ifndef OMAP1510_SRAM_IDLE_SUSPEND | ||
98 | #define OMAP1510_SRAM_IDLE_SUSPEND 0 | ||
99 | #endif | ||
100 | #ifndef OMAP1610_SRAM_IDLE_SUSPEND | ||
101 | #define OMAP1610_SRAM_IDLE_SUSPEND 0 | ||
102 | #endif | ||
103 | #ifndef OMAP5912_SRAM_IDLE_SUSPEND | ||
104 | #define OMAP5912_SRAM_IDLE_SUSPEND 0 | ||
105 | #endif | ||
106 | |||
107 | #ifndef OMAP1510_SRAM_API_SUSPEND | ||
108 | #define OMAP1510_SRAM_API_SUSPEND 0 | ||
109 | #endif | ||
110 | #ifndef OMAP1610_SRAM_API_SUSPEND | ||
111 | #define OMAP1610_SRAM_API_SUSPEND 0 | ||
112 | #endif | ||
113 | #ifndef OMAP5912_SRAM_API_SUSPEND | ||
114 | #define OMAP5912_SRAM_API_SUSPEND 0 | ||
115 | #endif | ||
116 | 100 | ||
117 | #if !defined(CONFIG_ARCH_OMAP1510) && \ | 101 | #if !defined(CONFIG_ARCH_OMAP1510) && \ |
118 | !defined(CONFIG_ARCH_OMAP16XX) | 102 | !defined(CONFIG_ARCH_OMAP16XX) && \ |
103 | !defined(CONFIG_ARCH_OMAP24XX) | ||
119 | #error "Power management for this processor not implemented yet" | 104 | #error "Power management for this processor not implemented yet" |
120 | #endif | 105 | #endif |
121 | 106 | ||
122 | #ifndef __ASSEMBLER__ | 107 | #ifndef __ASSEMBLER__ |
123 | extern void omap_pm_idle(void); | 108 | extern void omap_pm_idle(void); |
124 | extern void omap_pm_suspend(void); | 109 | extern void omap_pm_suspend(void); |
125 | extern int omap1510_cpu_suspend(unsigned short, unsigned short); | 110 | extern void omap1510_cpu_suspend(unsigned short, unsigned short); |
126 | extern int omap1610_cpu_suspend(unsigned short, unsigned short); | 111 | extern void omap1610_cpu_suspend(unsigned short, unsigned short); |
127 | extern int omap1510_idle_loop_suspend(void); | 112 | extern void omap1510_idle_loop_suspend(void); |
128 | extern int omap1610_idle_loop_suspend(void); | 113 | extern void omap1610_idle_loop_suspend(void); |
114 | |||
115 | #ifdef CONFIG_OMAP_SERIAL_WAKE | ||
116 | extern void omap_serial_wake_trigger(int enable); | ||
117 | #else | ||
118 | #define omap_serial_wake_trigger(x) {} | ||
119 | #endif /* CONFIG_OMAP_SERIAL_WAKE */ | ||
120 | |||
129 | extern unsigned int omap1510_cpu_suspend_sz; | 121 | extern unsigned int omap1510_cpu_suspend_sz; |
130 | extern unsigned int omap1510_idle_loop_suspend_sz; | 122 | extern unsigned int omap1510_idle_loop_suspend_sz; |
131 | extern unsigned int omap1610_cpu_suspend_sz; | 123 | extern unsigned int omap1610_cpu_suspend_sz; |
@@ -161,6 +153,7 @@ enum arm_save_state { | |||
161 | ARM_SLEEP_SAVE_ARM_CKCTL, | 153 | ARM_SLEEP_SAVE_ARM_CKCTL, |
162 | ARM_SLEEP_SAVE_ARM_IDLECT1, | 154 | ARM_SLEEP_SAVE_ARM_IDLECT1, |
163 | ARM_SLEEP_SAVE_ARM_IDLECT2, | 155 | ARM_SLEEP_SAVE_ARM_IDLECT2, |
156 | ARM_SLEEP_SAVE_ARM_IDLECT3, | ||
164 | ARM_SLEEP_SAVE_ARM_EWUPCT, | 157 | ARM_SLEEP_SAVE_ARM_EWUPCT, |
165 | ARM_SLEEP_SAVE_ARM_RSTCT1, | 158 | ARM_SLEEP_SAVE_ARM_RSTCT1, |
166 | ARM_SLEEP_SAVE_ARM_RSTCT2, | 159 | ARM_SLEEP_SAVE_ARM_RSTCT2, |
diff --git a/include/asm-arm/arch-omap/serial.h b/include/asm-arm/arch-omap/serial.h new file mode 100644 index 000000000000..79a5297af9fc --- /dev/null +++ b/include/asm-arm/arch-omap/serial.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/serial.h | ||
3 | * | ||
4 | * This program is distributed in the hope that it will be useful, | ||
5 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
6 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
7 | * GNU General Public License for more details. | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASM_ARCH_SERIAL_H | ||
11 | #define __ASM_ARCH_SERIAL_H | ||
12 | |||
13 | #if defined(CONFIG_ARCH_OMAP1) | ||
14 | /* OMAP1 serial ports */ | ||
15 | #define OMAP_UART1_BASE 0xfffb0000 | ||
16 | #define OMAP_UART2_BASE 0xfffb0800 | ||
17 | #define OMAP_UART3_BASE 0xfffb9800 | ||
18 | #elif defined(CONFIG_ARCH_OMAP2) | ||
19 | /* OMAP2 serial ports */ | ||
20 | #define OMAP_UART1_BASE 0x4806a000 | ||
21 | #define OMAP_UART2_BASE 0x4806c000 | ||
22 | #define OMAP_UART3_BASE 0x4806e000 | ||
23 | #endif | ||
24 | |||
25 | #define OMAP_MAX_NR_PORTS 3 | ||
26 | #define OMAP1510_BASE_BAUD (12000000/16) | ||
27 | #define OMAP16XX_BASE_BAUD (48000000/16) | ||
28 | |||
29 | #define is_omap_port(p) ({int __ret = 0; \ | ||
30 | if (p == IO_ADDRESS(OMAP_UART1_BASE) || \ | ||
31 | p == IO_ADDRESS(OMAP_UART2_BASE) || \ | ||
32 | p == IO_ADDRESS(OMAP_UART3_BASE)) \ | ||
33 | __ret = 1; \ | ||
34 | __ret; \ | ||
35 | }) | ||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h index 3e640aba8c20..3545c86859cc 100644 --- a/include/asm-arm/arch-omap/uncompress.h +++ b/include/asm-arm/arch-omap/uncompress.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/types.h> | 21 | #include <linux/types.h> |
22 | #include <linux/serial_reg.h> | 22 | #include <linux/serial_reg.h> |
23 | #include <asm/arch/hardware.h> | 23 | #include <asm/arch/serial.h> |
24 | 24 | ||
25 | unsigned int system_rev; | 25 | unsigned int system_rev; |
26 | 26 | ||
@@ -34,8 +34,9 @@ static void | |||
34 | putstr(const char *s) | 34 | putstr(const char *s) |
35 | { | 35 | { |
36 | volatile u8 * uart = 0; | 36 | volatile u8 * uart = 0; |
37 | int shift; | 37 | int shift = 2; |
38 | 38 | ||
39 | #ifdef CONFIG_ARCH_OMAP | ||
39 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 | 40 | #ifdef CONFIG_OMAP_LL_DEBUG_UART3 |
40 | uart = (volatile u8 *)(OMAP_UART3_BASE); | 41 | uart = (volatile u8 *)(OMAP_UART3_BASE); |
41 | #elif CONFIG_OMAP_LL_DEBUG_UART2 | 42 | #elif CONFIG_OMAP_LL_DEBUG_UART2 |
@@ -44,6 +45,7 @@ putstr(const char *s) | |||
44 | uart = (volatile u8 *)(OMAP_UART1_BASE); | 45 | uart = (volatile u8 *)(OMAP_UART1_BASE); |
45 | #endif | 46 | #endif |
46 | 47 | ||
48 | #ifdef CONFIG_ARCH_OMAP1 | ||
47 | /* Determine which serial port to use */ | 49 | /* Determine which serial port to use */ |
48 | do { | 50 | do { |
49 | /* MMU is not on, so cpu_is_omapXXXX() won't work here */ | 51 | /* MMU is not on, so cpu_is_omapXXXX() won't work here */ |
@@ -51,14 +53,14 @@ putstr(const char *s) | |||
51 | 53 | ||
52 | if (omap_id == OMAP_ID_730) | 54 | if (omap_id == OMAP_ID_730) |
53 | shift = 0; | 55 | shift = 0; |
54 | else | ||
55 | shift = 2; | ||
56 | 56 | ||
57 | if (check_port(uart, shift)) | 57 | if (check_port(uart, shift)) |
58 | break; | 58 | break; |
59 | /* Silent boot if no serial ports are enabled. */ | 59 | /* Silent boot if no serial ports are enabled. */ |
60 | return; | 60 | return; |
61 | } while (0); | 61 | } while (0); |
62 | #endif /* CONFIG_ARCH_OMAP1 */ | ||
63 | #endif | ||
62 | 64 | ||
63 | /* | 65 | /* |
64 | * Now, xmit each character | 66 | * Now, xmit each character |