]>
Commit | Line | Data |
---|---|---|
8a316c9b SR |
1 | /* |
2 | * (C) Copyright 2000-2005 | |
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
8a316c9b | 6 | */ |
8a316c9b SR |
7 | |
8 | #include <common.h> | |
9 | #include <asm/processor.h> | |
779e9751 SR |
10 | #include <asm/io.h> |
11 | ||
088454cd SG |
12 | DECLARE_GLOBAL_DATA_PTR; |
13 | ||
779e9751 | 14 | long int spd_sdram(void); |
8a316c9b SR |
15 | |
16 | int board_early_init_f(void) | |
17 | { | |
952e7760 SR |
18 | mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ |
19 | mtdcr(UIC0ER, 0x00000000); /* disable all ints */ | |
20 | mtdcr(UIC0CR, 0x00000010); | |
21 | mtdcr(UIC0PR, 0xFFFF7FF0); /* set int polarities */ | |
22 | mtdcr(UIC0TR, 0x00000010); /* set int trigger levels */ | |
23 | mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */ | |
8a316c9b | 24 | |
779e9751 SR |
25 | /* |
26 | * Configure CPC0_PCI to enable PerWE as output | |
27 | * and enable the internal PCI arbiter if selected | |
28 | */ | |
29 | if (in_8((void *)FPGA_REG1) & FPGA_REG1_PCI_INT_ARB) | |
d1c3b275 | 30 | mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN | CPC0_PCI_ARBIT_EN); |
779e9751 | 31 | else |
d1c3b275 | 32 | mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN); |
779e9751 | 33 | |
8a316c9b SR |
34 | return 0; |
35 | } | |
36 | ||
37 | /* | |
38 | * Check Board Identity: | |
39 | */ | |
40 | int checkboard(void) | |
41 | { | |
f0c0b3a9 WD |
42 | char buf[64]; |
43 | int i = getenv_f("serial#", buf, sizeof(buf)); | |
8a316c9b SR |
44 | |
45 | puts("Board: Bubinga - AMCC PPC405EP Evaluation Board"); | |
46 | ||
f0c0b3a9 | 47 | if (i > 0) { |
8a316c9b | 48 | puts(", serial# "); |
f0c0b3a9 | 49 | puts(buf); |
8a316c9b SR |
50 | } |
51 | putc('\n'); | |
52 | ||
53 | return (0); | |
54 | } | |
55 | ||
8a316c9b | 56 | /* ------------------------------------------------------------------------- |
52c41180 | 57 | initdram() reads EEPROM via I2c. EEPROM contains all of |
8a316c9b SR |
58 | the necessary info for SDRAM controller configuration |
59 | ------------------------------------------------------------------------- */ | |
088454cd | 60 | int initdram(void) |
8a316c9b | 61 | { |
088454cd SG |
62 | gd->ram_size = spd_sdram(); |
63 | ||
64 | return 0; | |
8a316c9b | 65 | } |