3 * Gary Jennejohn, DENX Software Engineering GmbH, garyj@denx.de.
5 * Based in part on board/icecube/icecube.c from PPCBoot
6 * (C) Copyright 2003 Intrinsyc Software
8 * SPDX-License-Identifier: GPL-2.0+
14 #include <environment.h>
18 #include <asm/processor.h>
20 #include <asm/ppc4xx-gpio.h>
22 DECLARE_GLOBAL_DATA_PTR;
24 int board_early_init_f(void)
26 /* taken from PPCBoot */
27 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
28 mtdcr(UIC0ER, 0x00000000); /* disable all ints */
29 mtdcr(UIC0CR, 0x00000000);
30 mtdcr(UIC0PR, 0xFFFF7FFE); /* set int polarities */
31 mtdcr(UIC0TR, 0x00000000); /* set int trigger levels */
32 mtdcr(UIC0SR, 0xFFFFFFFF); /* clear all ints */
33 mtdcr(UIC0VCR, 0x00000001); /* set vect base=0,INT0 highest priority */
35 mtdcr(CPC0_SRR, 0x00040000); /* Hold PCI bridge in reset */
41 * Check Board Identity:
46 int i = getenv_f("serial#", buf, sizeof(buf));
47 #ifdef DISPLAY_BOARD_INFO
51 puts("Board: Quad100hd");
59 #ifdef DISPLAY_BOARD_INFO
60 /* taken from ppcboot */
61 get_sys_info(&sysinfo);
63 printf("\tVCO: %lu MHz\n", sysinfo.freqVCOMhz);
64 printf("\tCPU: %lu MHz\n", sysinfo.freqProcessor / 1000000);
65 printf("\tPLB: %lu MHz\n", sysinfo.freqPLB / 1000000);
66 printf("\tOPB: %lu MHz\n", sysinfo.freqOPB / 1000000);
67 printf("\tEPB: %lu MHz\n", sysinfo.freqPLB / (sysinfo.pllExtBusDiv *
69 printf("\tPCI: %lu MHz\n", sysinfo.freqPCI / 1000000);