1
2
3
4
5
6
7
8#include <common.h>
9#include <asm/processor.h>
10#include <asm/io.h>
11
12DECLARE_GLOBAL_DATA_PTR;
13
14long int spd_sdram(void);
15
16int board_early_init_f(void)
17{
18 mtdcr(UIC0SR, 0xFFFFFFFF);
19 mtdcr(UIC0ER, 0x00000000);
20 mtdcr(UIC0CR, 0x00000010);
21 mtdcr(UIC0PR, 0xFFFF7FF0);
22 mtdcr(UIC0TR, 0x00000010);
23 mtdcr(UIC0SR, 0xFFFFFFFF);
24
25
26
27
28
29 if (in_8((void *)FPGA_REG1) & FPGA_REG1_PCI_INT_ARB)
30 mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN | CPC0_PCI_ARBIT_EN);
31 else
32 mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN);
33
34 return 0;
35}
36
37
38
39
40int checkboard(void)
41{
42 char buf[64];
43 int i = getenv_f("serial#", buf, sizeof(buf));
44
45 puts("Board: Bubinga - AMCC PPC405EP Evaluation Board");
46
47 if (i > 0) {
48 puts(", serial# ");
49 puts(buf);
50 }
51 putc('\n');
52
53 return (0);
54}
55
56
57
58
59
60int dram_init(void)
61{
62 gd->ram_size = spd_sdram();
63
64 return 0;
65}
66