diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-09-08 20:55:21 -0400 |
commit | bbb20089a3275a19e475dbc21320c3742e3ca423 (patch) | |
tree | 216fdc1cbef450ca688135c5b8969169482d9a48 /arch/blackfin/kernel/setup.c | |
parent | 3e48e656903e9fd8bc805c6a2c4264d7808d315b (diff) | |
parent | 657a77fa7284d8ae28dfa48f1dc5d919bf5b2843 (diff) |
Merge branch 'dmaengine' into async-tx-next
Conflicts:
crypto/async_tx/async_xor.c
drivers/dma/ioat/dma_v2.h
drivers/dma/ioat/pci.c
drivers/md/raid5.c
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 217 |
1 files changed, 150 insertions, 67 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index a58687bdee6a..298f023bcc09 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -18,9 +18,12 @@ | |||
18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
19 | #include <linux/pfn.h> | 19 | #include <linux/pfn.h> |
20 | 20 | ||
21 | #ifdef CONFIG_MTD_UCLINUX | ||
22 | #include <linux/mtd/map.h> | ||
21 | #include <linux/ext2_fs.h> | 23 | #include <linux/ext2_fs.h> |
22 | #include <linux/cramfs_fs.h> | 24 | #include <linux/cramfs_fs.h> |
23 | #include <linux/romfs_fs.h> | 25 | #include <linux/romfs_fs.h> |
26 | #endif | ||
24 | 27 | ||
25 | #include <asm/cplb.h> | 28 | #include <asm/cplb.h> |
26 | #include <asm/cacheflush.h> | 29 | #include <asm/cacheflush.h> |
@@ -45,6 +48,7 @@ EXPORT_SYMBOL(_ramend); | |||
45 | EXPORT_SYMBOL(reserved_mem_dcache_on); | 48 | EXPORT_SYMBOL(reserved_mem_dcache_on); |
46 | 49 | ||
47 | #ifdef CONFIG_MTD_UCLINUX | 50 | #ifdef CONFIG_MTD_UCLINUX |
51 | extern struct map_info uclinux_ram_map; | ||
48 | unsigned long memory_mtd_end, memory_mtd_start, mtd_size; | 52 | unsigned long memory_mtd_end, memory_mtd_start, mtd_size; |
49 | unsigned long _ebss; | 53 | unsigned long _ebss; |
50 | EXPORT_SYMBOL(memory_mtd_end); | 54 | EXPORT_SYMBOL(memory_mtd_end); |
@@ -113,15 +117,49 @@ void __cpuinit bfin_setup_caches(unsigned int cpu) | |||
113 | */ | 117 | */ |
114 | #ifdef CONFIG_BFIN_ICACHE | 118 | #ifdef CONFIG_BFIN_ICACHE |
115 | printk(KERN_INFO "Instruction Cache Enabled for CPU%u\n", cpu); | 119 | printk(KERN_INFO "Instruction Cache Enabled for CPU%u\n", cpu); |
120 | printk(KERN_INFO " External memory:" | ||
121 | # ifdef CONFIG_BFIN_EXTMEM_ICACHEABLE | ||
122 | " cacheable" | ||
123 | # else | ||
124 | " uncacheable" | ||
125 | # endif | ||
126 | " in instruction cache\n"); | ||
127 | if (L2_LENGTH) | ||
128 | printk(KERN_INFO " L2 SRAM :" | ||
129 | # ifdef CONFIG_BFIN_L2_ICACHEABLE | ||
130 | " cacheable" | ||
131 | # else | ||
132 | " uncacheable" | ||
133 | # endif | ||
134 | " in instruction cache\n"); | ||
135 | |||
136 | #else | ||
137 | printk(KERN_INFO "Instruction Cache Disabled for CPU%u\n", cpu); | ||
116 | #endif | 138 | #endif |
139 | |||
117 | #ifdef CONFIG_BFIN_DCACHE | 140 | #ifdef CONFIG_BFIN_DCACHE |
118 | printk(KERN_INFO "Data Cache Enabled for CPU%u" | 141 | printk(KERN_INFO "Data Cache Enabled for CPU%u\n", cpu); |
119 | # if defined CONFIG_BFIN_WB | 142 | printk(KERN_INFO " External memory:" |
120 | " (write-back)" | 143 | # if defined CONFIG_BFIN_EXTMEM_WRITEBACK |
121 | # elif defined CONFIG_BFIN_WT | 144 | " cacheable (write-back)" |
122 | " (write-through)" | 145 | # elif defined CONFIG_BFIN_EXTMEM_WRITETHROUGH |
146 | " cacheable (write-through)" | ||
147 | # else | ||
148 | " uncacheable" | ||
149 | # endif | ||
150 | " in data cache\n"); | ||
151 | if (L2_LENGTH) | ||
152 | printk(KERN_INFO " L2 SRAM :" | ||
153 | # if defined CONFIG_BFIN_L2_WRITEBACK | ||
154 | " cacheable (write-back)" | ||
155 | # elif defined CONFIG_BFIN_L2_WRITETHROUGH | ||
156 | " cacheable (write-through)" | ||
157 | # else | ||
158 | " uncacheable" | ||
123 | # endif | 159 | # endif |
124 | "\n", cpu); | 160 | " in data cache\n"); |
161 | #else | ||
162 | printk(KERN_INFO "Data Cache Disabled for CPU%u\n", cpu); | ||
125 | #endif | 163 | #endif |
126 | } | 164 | } |
127 | 165 | ||
@@ -150,40 +188,45 @@ void __init bfin_relocate_l1_mem(void) | |||
150 | unsigned long l1_data_b_length; | 188 | unsigned long l1_data_b_length; |
151 | unsigned long l2_length; | 189 | unsigned long l2_length; |
152 | 190 | ||
191 | /* | ||
192 | * due to the ALIGN(4) in the arch/blackfin/kernel/vmlinux.lds.S | ||
193 | * we know that everything about l1 text/data is nice and aligned, | ||
194 | * so copy by 4 byte chunks, and don't worry about overlapping | ||
195 | * src/dest. | ||
196 | * | ||
197 | * We can't use the dma_memcpy functions, since they can call | ||
198 | * scheduler functions which might be in L1 :( and core writes | ||
199 | * into L1 instruction cause bad access errors, so we are stuck, | ||
200 | * we are required to use DMA, but can't use the common dma | ||
201 | * functions. We can't use memcpy either - since that might be | ||
202 | * going to be in the relocated L1 | ||
203 | */ | ||
204 | |||
153 | blackfin_dma_early_init(); | 205 | blackfin_dma_early_init(); |
154 | 206 | ||
207 | /* if necessary, copy _stext_l1 to _etext_l1 to L1 instruction SRAM */ | ||
155 | l1_code_length = _etext_l1 - _stext_l1; | 208 | l1_code_length = _etext_l1 - _stext_l1; |
156 | if (l1_code_length > L1_CODE_LENGTH) | 209 | if (l1_code_length) |
157 | panic("L1 Instruction SRAM Overflow\n"); | 210 | early_dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length); |
158 | /* cannot complain as printk is not available as yet. | ||
159 | * But we can continue booting and complain later! | ||
160 | */ | ||
161 | |||
162 | /* Copy _stext_l1 to _etext_l1 to L1 instruction SRAM */ | ||
163 | dma_memcpy(_stext_l1, _l1_lma_start, l1_code_length); | ||
164 | 211 | ||
212 | /* if necessary, copy _sdata_l1 to _sbss_l1 to L1 data bank A SRAM */ | ||
165 | l1_data_a_length = _sbss_l1 - _sdata_l1; | 213 | l1_data_a_length = _sbss_l1 - _sdata_l1; |
166 | if (l1_data_a_length > L1_DATA_A_LENGTH) | 214 | if (l1_data_a_length) |
167 | panic("L1 Data SRAM Bank A Overflow\n"); | 215 | early_dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length); |
168 | |||
169 | /* Copy _sdata_l1 to _sbss_l1 to L1 data bank A SRAM */ | ||
170 | dma_memcpy(_sdata_l1, _l1_lma_start + l1_code_length, l1_data_a_length); | ||
171 | 216 | ||
217 | /* if necessary, copy _sdata_b_l1 to _sbss_b_l1 to L1 data bank B SRAM */ | ||
172 | l1_data_b_length = _sbss_b_l1 - _sdata_b_l1; | 218 | l1_data_b_length = _sbss_b_l1 - _sdata_b_l1; |
173 | if (l1_data_b_length > L1_DATA_B_LENGTH) | 219 | if (l1_data_b_length) |
174 | panic("L1 Data SRAM Bank B Overflow\n"); | 220 | early_dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + |
175 | |||
176 | /* Copy _sdata_b_l1 to _sbss_b_l1 to L1 data bank B SRAM */ | ||
177 | dma_memcpy(_sdata_b_l1, _l1_lma_start + l1_code_length + | ||
178 | l1_data_a_length, l1_data_b_length); | 221 | l1_data_a_length, l1_data_b_length); |
179 | 222 | ||
223 | early_dma_memcpy_done(); | ||
224 | |||
225 | /* if necessary, copy _stext_l2 to _edata_l2 to L2 SRAM */ | ||
180 | if (L2_LENGTH != 0) { | 226 | if (L2_LENGTH != 0) { |
181 | l2_length = _sbss_l2 - _stext_l2; | 227 | l2_length = _sbss_l2 - _stext_l2; |
182 | if (l2_length > L2_LENGTH) | 228 | if (l2_length) |
183 | panic("L2 SRAM Overflow\n"); | 229 | memcpy(_stext_l2, _l2_lma_start, l2_length); |
184 | |||
185 | /* Copy _stext_l2 to _edata_l2 to L2 SRAM */ | ||
186 | dma_memcpy(_stext_l2, _l2_lma_start, l2_length); | ||
187 | } | 230 | } |
188 | } | 231 | } |
189 | 232 | ||
@@ -434,9 +477,11 @@ static __init void parse_cmdline_early(char *cmdline_p) | |||
434 | } else if (!memcmp(to, "clkin_hz=", 9)) { | 477 | } else if (!memcmp(to, "clkin_hz=", 9)) { |
435 | to += 9; | 478 | to += 9; |
436 | early_init_clkin_hz(to); | 479 | early_init_clkin_hz(to); |
480 | #ifdef CONFIG_EARLY_PRINTK | ||
437 | } else if (!memcmp(to, "earlyprintk=", 12)) { | 481 | } else if (!memcmp(to, "earlyprintk=", 12)) { |
438 | to += 12; | 482 | to += 12; |
439 | setup_early_printk(to); | 483 | setup_early_printk(to); |
484 | #endif | ||
440 | } else if (!memcmp(to, "memmap=", 7)) { | 485 | } else if (!memcmp(to, "memmap=", 7)) { |
441 | to += 7; | 486 | to += 7; |
442 | parse_memmap(to); | 487 | parse_memmap(to); |
@@ -472,7 +517,7 @@ static __init void memory_setup(void) | |||
472 | 517 | ||
473 | if (DMA_UNCACHED_REGION > (_ramend - _ramstart)) { | 518 | if (DMA_UNCACHED_REGION > (_ramend - _ramstart)) { |
474 | console_init(); | 519 | console_init(); |
475 | panic("DMA region exceeds memory limit: %lu.\n", | 520 | panic("DMA region exceeds memory limit: %lu.", |
476 | _ramend - _ramstart); | 521 | _ramend - _ramstart); |
477 | } | 522 | } |
478 | memory_end = _ramend - DMA_UNCACHED_REGION; | 523 | memory_end = _ramend - DMA_UNCACHED_REGION; |
@@ -507,7 +552,7 @@ static __init void memory_setup(void) | |||
507 | && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1) | 552 | && ((unsigned long *)mtd_phys)[1] == ROMSB_WORD1) |
508 | mtd_size = | 553 | mtd_size = |
509 | PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2])); | 554 | PAGE_ALIGN(be32_to_cpu(((unsigned long *)mtd_phys)[2])); |
510 | # if (defined(CONFIG_BFIN_ICACHE) && ANOMALY_05000263) | 555 | # if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) |
511 | /* Due to a Hardware Anomaly we need to limit the size of usable | 556 | /* Due to a Hardware Anomaly we need to limit the size of usable |
512 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on | 557 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on |
513 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception | 558 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception |
@@ -526,17 +571,16 @@ static __init void memory_setup(void) | |||
526 | 571 | ||
527 | if (mtd_size == 0) { | 572 | if (mtd_size == 0) { |
528 | console_init(); | 573 | console_init(); |
529 | panic("Don't boot kernel without rootfs attached.\n"); | 574 | panic("Don't boot kernel without rootfs attached."); |
530 | } | 575 | } |
531 | 576 | ||
532 | /* Relocate MTD image to the top of memory after the uncached memory area */ | 577 | /* Relocate MTD image to the top of memory after the uncached memory area */ |
533 | dma_memcpy((char *)memory_end, _end, mtd_size); | 578 | uclinux_ram_map.phys = memory_mtd_start = memory_end; |
534 | 579 | uclinux_ram_map.size = mtd_size; | |
535 | memory_mtd_start = memory_end; | 580 | dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size); |
536 | _ebss = memory_mtd_start; /* define _ebss for compatible */ | ||
537 | #endif /* CONFIG_MTD_UCLINUX */ | 581 | #endif /* CONFIG_MTD_UCLINUX */ |
538 | 582 | ||
539 | #if (defined(CONFIG_BFIN_ICACHE) && ANOMALY_05000263) | 583 | #if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) |
540 | /* Due to a Hardware Anomaly we need to limit the size of usable | 584 | /* Due to a Hardware Anomaly we need to limit the size of usable |
541 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on | 585 | * instruction memory to max 60MB, 56 if HUNT_FOR_ZERO is on |
542 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception | 586 | * 05000263 - Hardware loop corrupted when taking an ICPLB exception |
@@ -756,6 +800,11 @@ void __init setup_arch(char **cmdline_p) | |||
756 | { | 800 | { |
757 | unsigned long sclk, cclk; | 801 | unsigned long sclk, cclk; |
758 | 802 | ||
803 | /* Check to make sure we are running on the right processor */ | ||
804 | if (unlikely(CPUID != bfin_cpuid())) | ||
805 | printk(KERN_ERR "ERROR: Not running on ADSP-%s: unknown CPUID 0x%04x Rev 0.%d\n", | ||
806 | CPU, bfin_cpuid(), bfin_revid()); | ||
807 | |||
759 | #ifdef CONFIG_DUMMY_CONSOLE | 808 | #ifdef CONFIG_DUMMY_CONSOLE |
760 | conswitchp = &dummy_con; | 809 | conswitchp = &dummy_con; |
761 | #endif | 810 | #endif |
@@ -770,14 +819,17 @@ void __init setup_arch(char **cmdline_p) | |||
770 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); | 819 | memcpy(boot_command_line, command_line, COMMAND_LINE_SIZE); |
771 | boot_command_line[COMMAND_LINE_SIZE - 1] = '\0'; | 820 | boot_command_line[COMMAND_LINE_SIZE - 1] = '\0'; |
772 | 821 | ||
773 | /* setup memory defaults from the user config */ | ||
774 | physical_mem_end = 0; | ||
775 | _ramend = get_mem_size() * 1024 * 1024; | ||
776 | |||
777 | memset(&bfin_memmap, 0, sizeof(bfin_memmap)); | 822 | memset(&bfin_memmap, 0, sizeof(bfin_memmap)); |
778 | 823 | ||
824 | /* If the user does not specify things on the command line, use | ||
825 | * what the bootloader set things up as | ||
826 | */ | ||
827 | physical_mem_end = 0; | ||
779 | parse_cmdline_early(&command_line[0]); | 828 | parse_cmdline_early(&command_line[0]); |
780 | 829 | ||
830 | if (_ramend == 0) | ||
831 | _ramend = get_mem_size() * 1024 * 1024; | ||
832 | |||
781 | if (physical_mem_end == 0) | 833 | if (physical_mem_end == 0) |
782 | physical_mem_end = _ramend; | 834 | physical_mem_end = _ramend; |
783 | 835 | ||
@@ -796,10 +848,8 @@ void __init setup_arch(char **cmdline_p) | |||
796 | cclk = get_cclk(); | 848 | cclk = get_cclk(); |
797 | sclk = get_sclk(); | 849 | sclk = get_sclk(); |
798 | 850 | ||
799 | #if !defined(CONFIG_BFIN_KERNEL_CLOCK) | 851 | if ((ANOMALY_05000273 || ANOMALY_05000274) && (cclk >> 1) < sclk) |
800 | if (ANOMALY_05000273 && cclk == sclk) | 852 | panic("ANOMALY 05000273 or 05000274: CCLK must be >= 2*SCLK"); |
801 | panic("ANOMALY 05000273, SCLK can not be same as CCLK"); | ||
802 | #endif | ||
803 | 853 | ||
804 | #ifdef BF561_FAMILY | 854 | #ifdef BF561_FAMILY |
805 | if (ANOMALY_05000266) { | 855 | if (ANOMALY_05000266) { |
@@ -831,7 +881,8 @@ void __init setup_arch(char **cmdline_p) | |||
831 | defined(CONFIG_BF538) || defined(CONFIG_BF539) | 881 | defined(CONFIG_BF538) || defined(CONFIG_BF539) |
832 | _bfin_swrst = bfin_read_SWRST(); | 882 | _bfin_swrst = bfin_read_SWRST(); |
833 | #else | 883 | #else |
834 | _bfin_swrst = bfin_read_SYSCR(); | 884 | /* Clear boot mode field */ |
885 | _bfin_swrst = bfin_read_SYSCR() & ~0xf; | ||
835 | #endif | 886 | #endif |
836 | 887 | ||
837 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT | 888 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT |
@@ -869,10 +920,7 @@ void __init setup_arch(char **cmdline_p) | |||
869 | else | 920 | else |
870 | printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); | 921 | printk(KERN_INFO "Compiled for ADSP-%s Rev 0.%d\n", CPU, bfin_compiled_revid()); |
871 | 922 | ||
872 | if (unlikely(CPUID != bfin_cpuid())) | 923 | if (likely(CPUID == bfin_cpuid())) { |
873 | printk(KERN_ERR "ERROR: Not running on ADSP-%s: unknown CPUID 0x%04x Rev 0.%d\n", | ||
874 | CPU, bfin_cpuid(), bfin_revid()); | ||
875 | else { | ||
876 | if (bfin_revid() != bfin_compiled_revid()) { | 924 | if (bfin_revid() != bfin_compiled_revid()) { |
877 | if (bfin_compiled_revid() == -1) | 925 | if (bfin_compiled_revid() == -1) |
878 | printk(KERN_ERR "Warning: Compiled for Rev none, but running on Rev %d\n", | 926 | printk(KERN_ERR "Warning: Compiled for Rev none, but running on Rev %d\n", |
@@ -881,7 +929,7 @@ void __init setup_arch(char **cmdline_p) | |||
881 | printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", | 929 | printk(KERN_ERR "Warning: Compiled for Rev %d, but running on Rev %d\n", |
882 | bfin_compiled_revid(), bfin_revid()); | 930 | bfin_compiled_revid(), bfin_revid()); |
883 | if (bfin_compiled_revid() > bfin_revid()) | 931 | if (bfin_compiled_revid() > bfin_revid()) |
884 | panic("Error: you are missing anomaly workarounds for this rev\n"); | 932 | panic("Error: you are missing anomaly workarounds for this rev"); |
885 | } | 933 | } |
886 | } | 934 | } |
887 | if (bfin_revid() < CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX) | 935 | if (bfin_revid() < CONFIG_BF_REV_MIN || bfin_revid() > CONFIG_BF_REV_MAX) |
@@ -891,16 +939,13 @@ void __init setup_arch(char **cmdline_p) | |||
891 | 939 | ||
892 | /* We can't run on BF548-0.1 due to ANOMALY 05000448 */ | 940 | /* We can't run on BF548-0.1 due to ANOMALY 05000448 */ |
893 | if (bfin_cpuid() == 0x27de && bfin_revid() == 1) | 941 | if (bfin_cpuid() == 0x27de && bfin_revid() == 1) |
894 | panic("You can't run on this processor due to 05000448\n"); | 942 | panic("You can't run on this processor due to 05000448"); |
895 | 943 | ||
896 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); | 944 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); |
897 | 945 | ||
898 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", | 946 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", |
899 | cclk / 1000000, sclk / 1000000); | 947 | cclk / 1000000, sclk / 1000000); |
900 | 948 | ||
901 | if (ANOMALY_05000273 && (cclk >> 1) <= sclk) | ||
902 | printk("\n\n\nANOMALY_05000273: CCLK must be >= 2*SCLK !!!\n\n\n"); | ||
903 | |||
904 | setup_bootmem_allocator(); | 949 | setup_bootmem_allocator(); |
905 | 950 | ||
906 | paging_init(); | 951 | paging_init(); |
@@ -1095,7 +1140,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1095 | CPUID, bfin_cpuid()); | 1140 | CPUID, bfin_cpuid()); |
1096 | 1141 | ||
1097 | seq_printf(m, "model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n" | 1142 | seq_printf(m, "model name\t: ADSP-%s %lu(MHz CCLK) %lu(MHz SCLK) (%s)\n" |
1098 | "stepping\t: %d\n", | 1143 | "stepping\t: %d ", |
1099 | cpu, cclk/1000000, sclk/1000000, | 1144 | cpu, cclk/1000000, sclk/1000000, |
1100 | #ifdef CONFIG_MPU | 1145 | #ifdef CONFIG_MPU |
1101 | "mpu on", | 1146 | "mpu on", |
@@ -1104,7 +1149,16 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1104 | #endif | 1149 | #endif |
1105 | revid); | 1150 | revid); |
1106 | 1151 | ||
1107 | seq_printf(m, "cpu MHz\t\t: %lu.%03lu/%lu.%03lu\n", | 1152 | if (bfin_revid() != bfin_compiled_revid()) { |
1153 | if (bfin_compiled_revid() == -1) | ||
1154 | seq_printf(m, "(Compiled for Rev none)"); | ||
1155 | else if (bfin_compiled_revid() == 0xffff) | ||
1156 | seq_printf(m, "(Compiled for Rev any)"); | ||
1157 | else | ||
1158 | seq_printf(m, "(Compiled for Rev %d)", bfin_compiled_revid()); | ||
1159 | } | ||
1160 | |||
1161 | seq_printf(m, "\ncpu MHz\t\t: %lu.%03lu/%lu.%03lu\n", | ||
1108 | cclk/1000000, cclk%1000000, | 1162 | cclk/1000000, cclk%1000000, |
1109 | sclk/1000000, sclk%1000000); | 1163 | sclk/1000000, sclk%1000000); |
1110 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | 1164 | seq_printf(m, "bogomips\t: %lu.%02lu\n" |
@@ -1145,16 +1199,25 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1145 | icache_size = 0; | 1199 | icache_size = 0; |
1146 | 1200 | ||
1147 | seq_printf(m, "cache size\t: %d KB(L1 icache) " | 1201 | seq_printf(m, "cache size\t: %d KB(L1 icache) " |
1148 | "%d KB(L1 dcache%s) %d KB(L2 cache)\n", | 1202 | "%d KB(L1 dcache) %d KB(L2 cache)\n", |
1149 | icache_size, dcache_size, | 1203 | icache_size, dcache_size, 0); |
1150 | #if defined CONFIG_BFIN_WB | ||
1151 | "-wb" | ||
1152 | #elif defined CONFIG_BFIN_WT | ||
1153 | "-wt" | ||
1154 | #endif | ||
1155 | "", 0); | ||
1156 | |||
1157 | seq_printf(m, "%s\n", cache); | 1204 | seq_printf(m, "%s\n", cache); |
1205 | seq_printf(m, "external memory\t: " | ||
1206 | #if defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) | ||
1207 | "cacheable" | ||
1208 | #else | ||
1209 | "uncacheable" | ||
1210 | #endif | ||
1211 | " in instruction cache\n"); | ||
1212 | seq_printf(m, "external memory\t: " | ||
1213 | #if defined(CONFIG_BFIN_EXTMEM_WRITEBACK) | ||
1214 | "cacheable (write-back)" | ||
1215 | #elif defined(CONFIG_BFIN_EXTMEM_WRITETHROUGH) | ||
1216 | "cacheable (write-through)" | ||
1217 | #else | ||
1218 | "uncacheable" | ||
1219 | #endif | ||
1220 | " in data cache\n"); | ||
1158 | 1221 | ||
1159 | if (icache_size) | 1222 | if (icache_size) |
1160 | seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n", | 1223 | seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n", |
@@ -1169,6 +1232,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1169 | #ifdef __ARCH_SYNC_CORE_DCACHE | 1232 | #ifdef __ARCH_SYNC_CORE_DCACHE |
1170 | seq_printf(m, "SMP Dcache Flushes\t: %lu\n\n", cpudata->dcache_invld_count); | 1233 | seq_printf(m, "SMP Dcache Flushes\t: %lu\n\n", cpudata->dcache_invld_count); |
1171 | #endif | 1234 | #endif |
1235 | #ifdef __ARCH_SYNC_CORE_ICACHE | ||
1236 | seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", cpudata->icache_invld_count); | ||
1237 | #endif | ||
1172 | #ifdef CONFIG_BFIN_ICACHE_LOCK | 1238 | #ifdef CONFIG_BFIN_ICACHE_LOCK |
1173 | switch ((cpudata->imemctl >> 3) & WAYALL_L) { | 1239 | switch ((cpudata->imemctl >> 3) & WAYALL_L) { |
1174 | case WAY0_L: | 1240 | case WAY0_L: |
@@ -1224,8 +1290,25 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1224 | if (cpu_num != num_possible_cpus() - 1) | 1290 | if (cpu_num != num_possible_cpus() - 1) |
1225 | return 0; | 1291 | return 0; |
1226 | 1292 | ||
1227 | if (L2_LENGTH) | 1293 | if (L2_LENGTH) { |
1228 | seq_printf(m, "L2 SRAM\t\t: %dKB\n", L2_LENGTH/0x400); | 1294 | seq_printf(m, "L2 SRAM\t\t: %dKB\n", L2_LENGTH/0x400); |
1295 | seq_printf(m, "L2 SRAM\t\t: " | ||
1296 | #if defined(CONFIG_BFIN_L2_ICACHEABLE) | ||
1297 | "cacheable" | ||
1298 | #else | ||
1299 | "uncacheable" | ||
1300 | #endif | ||
1301 | " in instruction cache\n"); | ||
1302 | seq_printf(m, "L2 SRAM\t\t: " | ||
1303 | #if defined(CONFIG_BFIN_L2_WRITEBACK) | ||
1304 | "cacheable (write-back)" | ||
1305 | #elif defined(CONFIG_BFIN_L2_WRITETHROUGH) | ||
1306 | "cacheable (write-through)" | ||
1307 | #else | ||
1308 | "uncacheable" | ||
1309 | #endif | ||
1310 | " in data cache\n"); | ||
1311 | } | ||
1229 | seq_printf(m, "board name\t: %s\n", bfin_board_name); | 1312 | seq_printf(m, "board name\t: %s\n", bfin_board_name); |
1230 | seq_printf(m, "board memory\t: %ld kB (0x%p -> 0x%p)\n", | 1313 | seq_printf(m, "board memory\t: %ld kB (0x%p -> 0x%p)\n", |
1231 | physical_mem_end >> 10, (void *)0, (void *)physical_mem_end); | 1314 | physical_mem_end >> 10, (void *)0, (void *)physical_mem_end); |