Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106302
b: refs/heads/master
c: 9de3a0b
h: refs/heads/master
v: v3
  • Loading branch information
Robin Getz authored and Bryan Wu committed Jul 26, 2008
1 parent 1091986 commit db8c887
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d1cdd7ab6e0e7ccaf9f3b1d2afa0ddeead23ccc
refs/heads/master: 9de3a0b6979a4839d67ca840e386ea06acaabe39
17 changes: 12 additions & 5 deletions trunk/arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
uint32_t revid;

u_long cclk = 0, sclk = 0;
u_int dcache_size = 0, dsup_banks = 0;
u_int icache_size = BFIN_ICACHESIZE / 1024, dcache_size = 0, dsup_banks = 0;

cpu = CPU;
mmu = "none";
Expand Down Expand Up @@ -1017,12 +1017,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
}

/* Is it turned on? */
if (!((bfin_read_DMEM_CONTROL()) & (ENDCPLB | DMC_ENABLE)))
if (bfin_read_DMEM_CONTROL() & (ENDCPLB | DMC_ENABLE) != (ENDCPLB | DMC_ENABLE))
dcache_size = 0;

if (bfin_read_IMEM_CONTROL() & (IMC | ENICPLB) == (IMC | ENICPLB))
icache_size = 0;

seq_printf(m, "cache size\t: %d KB(L1 icache) "
"%d KB(L1 dcache-%s) %d KB(L2 cache)\n",
BFIN_ICACHESIZE / 1024, dcache_size,
icache_size, dcache_size,
#if defined CONFIG_BFIN_WB
"wb"
#elif defined CONFIG_BFIN_WT
Expand All @@ -1032,8 +1035,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)

seq_printf(m, "%s\n", cache);

seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n",
BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES);
if (icache_size)
seq_printf(m, "icache setup\t: %d Sub-banks/%d Ways, %d Lines/Way\n",
BFIN_ISUBBANKS, BFIN_IWAYS, BFIN_ILINES);
else
seq_printf(m, "icache setup\t: off\n");

seq_printf(m,
"dcache setup\t: %d Super-banks/%d Sub-banks/%d Ways, %d Lines/Way\n",
dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS,
Expand Down

0 comments on commit db8c887

Please sign in to comment.