@@ -63,6 +63,9 @@ ENDPROC(__vet_atags)
* r1 = machine ID
* r2 = atags pointer
* r9 = processor ID
+ *
+ * Note that if the machine uses BSS to store the debug UART configuration,
+ * debug_ll code will not work after clear BSS until inituart is called again.
*/
__INIT
__mmap_switched:
@@ -80,6 +83,10 @@ __mmap_switched:
strcc fp, [r6],#4
bcc 1b
+#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
+ inituart r1, r4, r5
+#endif
+
ARM( ldmia r3, {r4, r5, r6, r7, sp})
THUMB( ldmia r3, {r4, r5, r6, r7} )
THUMB( ldr sp, [r3, #16] )
@@ -75,6 +75,11 @@
ENTRY(stext)
setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode
@ and irqs disabled
+
+#if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_ICEDCC)
+ inituart r1, r3, r4
+#endif
+
mrc p15, 0, r9, c0, c0 @ get processor id
bl __lookup_processor_type @ r5=procinfo r9=cpuid
movs r10, r5 @ invalid processor (r5=0)?