diff options
author | Robin Getz <rgetz@blackfin.uclinux.org> | 2008-07-26 07:39:19 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-07-26 07:39:19 -0400 |
commit | 9de3a0b6979a4839d67ca840e386ea06acaabe39 (patch) | |
tree | 9184c0ed0f74e5d0ebf585670567ccdd0bb10d3e /arch/blackfin | |
parent | 0d1cdd7ab6e0e7ccaf9f3b1d2afa0ddeead23ccc (diff) |
Blackfin arch: When icache is off, make sure people know it
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 5a455b6bb542..c2248fe80588 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -948,7 +948,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
948 | uint32_t revid; | 948 | uint32_t revid; |
949 | 949 | ||
950 | u_long cclk = 0, sclk = 0; | 950 | u_long cclk = 0, sclk = 0; |
951 | u_int dcache_size = 0, dsup_banks = 0; | 951 | u_int icache_size = BFIN_ICACHESIZE / 1024, dcache_size = 0, dsup_banks = 0; |
952 | 952 | ||
953 | cpu = CPU; | 953 | cpu = CPU; |
954 | mmu = "none"; | 954 | mmu = "none"; |
@@ -1017,12 +1017,15 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | /* Is it turned on? */ | 1019 | /* Is it turned on? */ |
1020 | if (!((bfin_read_DMEM_CONTROL()) & (ENDCPLB | DMC_ENABLE))) | 1020 | if (bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE) != (ENDCPLB | DMC_ENABLE)) |
1021 | dcache_size = 0; | 1021 | dcache_size = 0; |
1022 | 1022 | ||
1023 | if (bfin_read_IMEM_CONTROL() & (IMC | ENICPLB) == (IMC | ENICPLB)) | ||
1024 | icache_size = 0; | ||
1025 | |||
1023 | seq_printf(m, "cache size\t: %d KB(L1 icache) " | 1026 | seq_printf(m, "cache size\t: %d KB(L1 icache) " |
1024 | "%d KB(L1 dcache-%s) %d KB(L2 cache)\n", | 1027 | "%d KB(L1 dcache-%s) %d KB(L2 cache)\n", |
1025 | BFIN_ICACHESIZE / 1024, dcache_size, | 1028 | icache_size, dcache_size, |
1026 | #if defined CONFIG_BFIN_WB | 1029 | #if defined CONFIG_BFIN_WB |
1027 | "wb" | 1030 | "wb" |
1028 | #elif defined CONFIG_BFIN_WT | 1031 | #elif defined CONFIG_BFIN_WT |
@@ -1032,8 +1035,12 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
1032 | 1035 | ||
1033 | seq_printf(m, "%s\n", cache); | 1036 | seq_printf(m, "%s\n", cache); |
1034 | 1037 | ||
1035 | seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n", | 1038 | if (icache_size) |
1036 | BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES); | 1039 | seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n", |
1040 | BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES); | ||
1041 | else | ||
1042 | seq_printf(m, "icache setup\t: off\n"); | ||
1043 | |||
1037 | seq_printf(m, | 1044 | seq_printf(m, |
1038 | "dcache setup\t: %d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n", | 1045 | "dcache setup\t: %d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n", |
1039 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, | 1046 | dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, |