|
22 | 22 | #include <asm/thread_info.h>
|
23 | 23 | #include <asm/system.h>
|
24 | 24 |
|
| 25 | +#ifdef CONFIG_DEBUG_LL |
| 26 | +#include <mach/debug-macro.S> |
| 27 | +#endif |
| 28 | + |
25 | 29 | #if (PHYS_OFFSET & 0x001fffff)
|
26 | 30 | #error "PHYS_OFFSET must be at an even 2MiB boundary!"
|
27 | 31 | #endif
|
@@ -204,24 +208,35 @@ __create_page_tables:
|
204 | 208 | str r6, [r0]
|
205 | 209 |
|
206 | 210 | #ifdef CONFIG_DEBUG_LL
|
207 |
| - ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
| 211 | +#ifndef CONFIG_DEBUG_ICEDCC |
208 | 212 | /*
|
209 | 213 | * Map in IO space for serial debugging.
|
210 | 214 | * This allows debug messages to be output
|
211 | 215 | * via a serial console before paging_init.
|
212 | 216 | */
|
213 |
| - ldr r3, [r8, #MACHINFO_PGOFFIO] |
| 217 | + addruart r7, r3 |
| 218 | + |
| 219 | + mov r3, r3, lsr #20 |
| 220 | + mov r3, r3, lsl #2 |
| 221 | + |
214 | 222 | add r0, r4, r3
|
215 | 223 | rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long)
|
216 | 224 | cmp r3, #0x0800 @ limit to 512MB
|
217 | 225 | movhi r3, #0x0800
|
218 | 226 | add r6, r0, r3
|
219 |
| - ldr r3, [r8, #MACHINFO_PHYSIO] |
220 |
| - orr r3, r3, r7 |
| 227 | + mov r3, r7, lsr #20 |
| 228 | + ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
| 229 | + orr r3, r7, r3, lsl #20 |
221 | 230 | 1: str r3, [r0], #4
|
222 | 231 | add r3, r3, #1 << 20
|
223 | 232 | teq r0, r6
|
224 | 233 | bne 1b
|
| 234 | + |
| 235 | +#else /* CONFIG_DEBUG_ICEDCC */ |
| 236 | + /* we don't need any serial debugging mappings for ICEDCC */ |
| 237 | + ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
| 238 | +#endif /* !CONFIG_DEBUG_ICEDCC */ |
| 239 | + |
225 | 240 | #if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS)
|
226 | 241 | /*
|
227 | 242 | * If we're using the NetWinder or CATS, we also need to map
|
|
0 commit comments