Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6934
b: refs/heads/master
c: f54bef9
h: refs/heads/master
v: v3
  • Loading branch information
Mark A. Greer authored and Linus Torvalds committed Sep 5, 2005
1 parent 0fde5db commit 35e32a3
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 212 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: f4c6cc8d1e2305796f7fdad52d83b88cea4d2276
refs/heads/master: f54bef9e9c84c8dc656c55dc96c1da7b6d1c53d8
42 changes: 41 additions & 1 deletion trunk/arch/ppc/boot/simple/misc-cpci690.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,56 @@
*/

#include <linux/types.h>
#include <asm/io.h>
#include <platforms/cpci690.h>

#define KB (1024UL)
#define MB (1024UL*KB)
#define GB (1024UL*MB)

extern u32 mv64x60_console_baud;
extern u32 mv64x60_mpsc_clk_src;
extern u32 mv64x60_mpsc_clk_freq;

u32 mag = 0xffff;

unsigned long
get_mem_size(void)
{
u32 size;

switch (in_8(((void __iomem *)CPCI690_BR_BASE + CPCI690_BR_MEM_CTLR))
& 0x07) {
case 0x01:
size = 256*MB;
break;
case 0x02:
size = 512*MB;
break;
case 0x03:
size = 768*MB;
break;
case 0x04:
size = 1*GB;
break;
case 0x05:
size = 1*GB + 512*MB;
break;
case 0x06:
size = 2*GB;
break;
default:
size = 0;
}

return size;
}

void
mv64x60_board_init(void __iomem *old_base, void __iomem *new_base)
{
mv64x60_console_baud = CPCI690_MPSC_BAUD;
mv64x60_mpsc_clk_src = CPCI690_MPSC_CLK_SRC;
mv64x60_mpsc_clk_freq = CPCI690_BUS_FREQ;
mv64x60_mpsc_clk_freq =
(get_mem_size() >= (1*GB)) ? 100000000 : 133333333;
}
Loading

0 comments on commit 35e32a3

Please sign in to comment.