diff options
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 23e637eb78da..7a82d10b4ebf 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -52,6 +52,7 @@ EXPORT_SYMBOL(mtd_size); | |||
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | char __initdata command_line[COMMAND_LINE_SIZE]; | 54 | char __initdata command_line[COMMAND_LINE_SIZE]; |
55 | unsigned int __initdata *__retx; | ||
55 | 56 | ||
56 | /* boot memmap, for parsing "memmap=" */ | 57 | /* boot memmap, for parsing "memmap=" */ |
57 | #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ | 58 | #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ |
@@ -131,14 +132,14 @@ void __init bf53x_relocate_l1_mem(void) | |||
131 | dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + | 132 | dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + |
132 | l1_data_a_length, l1_data_b_length); | 133 | l1_data_a_length, l1_data_b_length); |
133 | 134 | ||
134 | #ifdef L2_LENGTH | 135 | if (L2_LENGTH != 0) { |
135 | l2_length = _ebss_l2 - _stext_l2; | 136 | l2_length = _ebss_l2 - _stext_l2; |
136 | if (l2_length > L2_LENGTH) | 137 | if (l2_length > L2_LENGTH) |
137 | panic("L2 SRAM Overflow\n"); | 138 | panic("L2 SRAM Overflow\n"); |
138 | 139 | ||
139 | /* Copy _stext_l2 to _edata_l2 to L2 SRAM */ | 140 | /* Copy _stext_l2 to _edata_l2 to L2 SRAM */ |
140 | dma_memcpy(_stext_l2, _l2_lma_start, l2_length); | 141 | dma_memcpy(_stext_l2, _l2_lma_start, l2_length); |
141 | #endif | 142 | } |
142 | } | 143 | } |
143 | 144 | ||
144 | /* add_memory_region to memmap */ | 145 | /* add_memory_region to memmap */ |
@@ -738,6 +739,16 @@ void __init setup_arch(char **cmdline_p) | |||
738 | 739 | ||
739 | memory_setup(); | 740 | memory_setup(); |
740 | 741 | ||
742 | /* Initialize Async memory banks */ | ||
743 | bfin_write_EBIU_AMBCTL0(AMBCTL0VAL); | ||
744 | bfin_write_EBIU_AMBCTL1(AMBCTL1VAL); | ||
745 | bfin_write_EBIU_AMGCTL(AMGCTLVAL); | ||
746 | #ifdef CONFIG_EBIU_MBSCTLVAL | ||
747 | bfin_write_EBIU_MBSCTL(CONFIG_EBIU_MBSCTLVAL); | ||
748 | bfin_write_EBIU_MODE(CONFIG_EBIU_MODEVAL); | ||
749 | bfin_write_EBIU_FCTL(CONFIG_EBIU_FCTLVAL); | ||
750 | #endif | ||
751 | |||
741 | cclk = get_cclk(); | 752 | cclk = get_cclk(); |
742 | sclk = get_sclk(); | 753 | sclk = get_sclk(); |
743 | 754 | ||
@@ -775,7 +786,11 @@ void __init setup_arch(char **cmdline_p) | |||
775 | bfin_write_SWRST(DOUBLE_FAULT); | 786 | bfin_write_SWRST(DOUBLE_FAULT); |
776 | 787 | ||
777 | if (_bfin_swrst & RESET_DOUBLE) | 788 | if (_bfin_swrst & RESET_DOUBLE) |
778 | printk(KERN_INFO "Recovering from Double Fault event\n"); | 789 | /* |
790 | * don't decode the address, since you don't know if this | ||
791 | * kernel's symbol map is the same as the crashing kernel | ||
792 | */ | ||
793 | printk(KERN_INFO "Recovering from Double Fault event at %pF\n", __retx); | ||
779 | else if (_bfin_swrst & RESET_WDOG) | 794 | else if (_bfin_swrst & RESET_WDOG) |
780 | printk(KERN_INFO "Recovering from Watchdog event\n"); | 795 | printk(KERN_INFO "Recovering from Watchdog event\n"); |
781 | else if (_bfin_swrst & RESET_SOFTWARE) | 796 | else if (_bfin_swrst & RESET_SOFTWARE) |
@@ -1049,7 +1064,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1049 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, | 1064 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, |
1050 | BFIN_DLINES); | 1065 | BFIN_DLINES); |
1051 | #ifdef CONFIG_BFIN_ICACHE_LOCK | 1066 | #ifdef CONFIG_BFIN_ICACHE_LOCK |
1052 | switch (read_iloc()) { | 1067 | switch ((bfin_read_IMEM_CONTROL() >> 3) & WAYALL_L) { |
1053 | case WAY0_L: | 1068 | case WAY0_L: |
1054 | seq_printf(m, "Way0 Locked-Down\n"); | 1069 | seq_printf(m, "Way0 Locked-Down\n"); |
1055 | break; | 1070 | break; |