]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/amcc/bubinga/bubinga.c
arch, board: squash lines for immediate return
[people/ms/u-boot.git] / board / amcc / bubinga / bubinga.c
CommitLineData
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
12long int spd_sdram(void);
8a316c9b
SR
13
14int board_early_init_f(void)
15{
952e7760
SR
16 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
17 mtdcr(UIC0ER, 0x00000000); /* disable all ints */
18 mtdcr(UIC0CR, 0x00000010);
19 mtdcr(UIC0PR, 0xFFFF7FF0); /* set int polarities */
20 mtdcr(UIC0TR, 0x00000010); /* set int trigger levels */
21 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
8a316c9b 22
779e9751
SR
23 /*
24 * Configure CPC0_PCI to enable PerWE as output
25 * and enable the internal PCI arbiter if selected
26 */
27 if (in_8((void *)FPGA_REG1) & FPGA_REG1_PCI_INT_ARB)
d1c3b275 28 mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN | CPC0_PCI_ARBIT_EN);
779e9751 29 else
d1c3b275 30 mtdcr(CPC0_PCI, CPC0_PCI_HOST_CFG_EN);
779e9751 31
8a316c9b
SR
32 return 0;
33}
34
35/*
36 * Check Board Identity:
37 */
38int checkboard(void)
39{
f0c0b3a9
WD
40 char buf[64];
41 int i = getenv_f("serial#", buf, sizeof(buf));
8a316c9b
SR
42
43 puts("Board: Bubinga - AMCC PPC405EP Evaluation Board");
44
f0c0b3a9 45 if (i > 0) {
8a316c9b 46 puts(", serial# ");
f0c0b3a9 47 puts(buf);
8a316c9b
SR
48 }
49 putc('\n');
50
51 return (0);
52}
53
8a316c9b
SR
54/* -------------------------------------------------------------------------
55 initdram(int board_type) reads EEPROM via I2c. EEPROM contains all of
56 the necessary info for SDRAM controller configuration
57 ------------------------------------------------------------------------- */
9973e3c6 58phys_size_t initdram(int board_type)
8a316c9b 59{
63a7578e 60 return spd_sdram();
8a316c9b 61}