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