Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92336
b: refs/heads/master
c: 1e78042
h: refs/heads/master
v: v3
  • Loading branch information
Michael Hennerich authored and Bryan Wu committed Apr 24, 2008
1 parent 8c27bf0 commit 7aac034
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 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: 5d750b9e4f6ca7d366b4954517ff8be9ee07e1bf
refs/heads/master: 1e78042c77dcc255abd456398981549269c63238
19 changes: 13 additions & 6 deletions trunk/arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,20 @@ static inline int __init get_mem_size(void)
return EBSZ_TO_MEG(bfin_read_EBIU_SDBCTL());
# endif
# elif defined(EBIU_DDRCTL1)
switch (bfin_read_EBIU_DDRCTL1() & 0xc0000) {
case DEVSZ_64: return 64 / 8;
case DEVSZ_128: return 128 / 8;
case DEVSZ_256: return 256 / 8;
case DEVSZ_512: return 512 / 8;
default: return 0;
u32 ddrctl = bfin_read_EBIU_DDRCTL1();
int ret = 0;
switch (ddrctl & 0xc0000) {
case DEVSZ_64: ret = 64 / 8;
case DEVSZ_128: ret = 128 / 8;
case DEVSZ_256: ret = 256 / 8;
case DEVSZ_512: ret = 512 / 8;
}
switch (ddrctl & 0x30000) {
case DEVWD_4: ret *= 2;
case DEVWD_8: ret *= 2;
case DEVWD_16: break;
}
return ret;
# endif
#endif
BUG();
Expand Down

0 comments on commit 7aac034

Please sign in to comment.