aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
diff options
context:
space:
mode:
authorRobin Getz <robin.getz@analog.com>2007-10-09 05:31:46 -0400
committerBryan Wu <bryan.wu@analog.com>2007-10-09 05:31:46 -0400
commit337d390b3a9c1ce92a12bdb77b9ae6ded6273b12 (patch)
tree2c870e325162c3d1a66390fb6d6db3e92de9e2eb /arch/blackfin/mach-common
parentce3afa1c043ab3d4125671441a57353d80f5f6f7 (diff)
Blackfin arch: Print out debug info, as early as possible
Print out debug info, as early as possible - even before the kernel initializes the interrupt vectors. Now we can print out debug messages almost anytime during the boot process. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r--arch/blackfin/mach-common/entry.S43
1 files changed, 41 insertions, 2 deletions
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index e2239361cac3..a56b231d94ce 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -835,12 +835,13 @@ ENTRY(_ex_trace_buff_full)
835 P2 = [sp++]; 835 P2 = [sp++];
836 P3 = [sp++]; 836 P3 = [sp++];
837 jump _return_from_exception; 837 jump _return_from_exception;
838ENDPROC(_ex_trace_buff_full)
838 839
839#if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4 840#if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4
840.data 841.data
841#else 842#else
842.section .l1.data.B 843.section .l1.data.B
843#endif 844#endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN */
844ENTRY(_trace_buff_offset) 845ENTRY(_trace_buff_offset)
845 .long 0; 846 .long 0;
846ALIGN 847ALIGN
@@ -848,7 +849,45 @@ ENTRY(_software_trace_buff)
848 .rept ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*256); 849 .rept ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*256);
849 .long 0 850 .long 0
850 .endr 851 .endr
851#endif 852#endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */
853
854#if CONFIG_EARLY_PRINTK
855.section .init.text
856ENTRY(_early_trap)
857 SAVE_ALL_SYS
858 trace_buffer_stop(p0,r0);
859
860 /* Turn caches off, to ensure we don't get double exceptions */
861
862 P4.L = LO(IMEM_CONTROL);
863 P4.H = HI(IMEM_CONTROL);
864
865 R5 = [P4]; /* Control Register*/
866 BITCLR(R5,ENICPLB_P);
867 CLI R1;
868 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
869 .align 8;
870 [P4] = R5;
871 SSYNC;
872
873 P4.L = LO(DMEM_CONTROL);
874 P4.H = HI(DMEM_CONTROL);
875 R5 = [P4];
876 BITCLR(R5,ENDCPLB_P);
877 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
878 .align 8;
879 [P4] = R5;
880 SSYNC;
881 STI R1;
882
883 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
884 r1 = RETX;
885
886 SP += -12;
887 call _early_trap_c;
888 SP += 12;
889ENDPROC(_early_trap)
890#endif /* CONFIG_EARLY_PRINTK */
852 891
853/* 892/*
854 * Put these in the kernel data section - that should always be covered by 893 * Put these in the kernel data section - that should always be covered by