Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367228
b: refs/heads/master
c: 4d8edbf
h: refs/heads/master
v: v3
  • Loading branch information
James Hogan committed Mar 15, 2013
1 parent 0727cda commit 5c27ec0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 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: 9e7129630329d50b8e8c3403bb71c85a7c3cbe35
refs/heads/master: 4d8edbfefb630559220939ad5a3bdd8a75190cc3
14 changes: 10 additions & 4 deletions trunk/arch/metag/kernel/cachepart.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@
unsigned int get_dcache_size(void)
{
unsigned int config2 = metag_in32(METAC_CORE_CONFIG2);
return 0x1000 << ((config2 & METAC_CORECFG2_DCSZ_BITS)
>> METAC_CORECFG2_DCSZ_S);
unsigned int sz = 0x1000 << ((config2 & METAC_CORECFG2_DCSZ_BITS)
>> METAC_CORECFG2_DCSZ_S);
if (config2 & METAC_CORECFG2_DCSMALL_BIT)
sz >>= 6;
return sz;
}

unsigned int get_icache_size(void)
{
unsigned int config2 = metag_in32(METAC_CORE_CONFIG2);
return 0x1000 << ((config2 & METAC_CORE_C2ICSZ_BITS)
>> METAC_CORE_C2ICSZ_S);
unsigned int sz = 0x1000 << ((config2 & METAC_CORE_C2ICSZ_BITS)
>> METAC_CORE_C2ICSZ_S);
if (config2 & METAC_CORECFG2_ICSMALL_BIT)
sz >>= 6;
return sz;
}

unsigned int get_global_dcache_size(void)
Expand Down

0 comments on commit 5c27ec0

Please sign in to comment.