]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/quad100hd/quad100hd.c
ARM: tegra: set initrd_high so boot scripts work
[people/ms/u-boot.git] / board / quad100hd / quad100hd.c
CommitLineData
73ccb341
GJ
1/*
2 * (C) Copyright 2008
3 * Gary Jennejohn, DENX Software Engineering GmbH, garyj@denx.de.
4 *
5 * Based in part on board/icecube/icecube.c from PPCBoot
6 * (C) Copyright 2003 Intrinsyc Software
7 *
1a459660 8 * SPDX-License-Identifier: GPL-2.0+
73ccb341
GJ
9 */
10
11#include <common.h>
12#include <command.h>
13#include <malloc.h>
14#include <environment.h>
15#include <logbuff.h>
16#include <post.h>
17
18#include <asm/processor.h>
19#include <asm/io.h>
09887762 20#include <asm/ppc4xx-gpio.h>
73ccb341
GJ
21
22DECLARE_GLOBAL_DATA_PTR;
23
24int board_early_init_f(void)
25{
26 /* taken from PPCBoot */
952e7760
SR
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 */
73ccb341
GJ
34
35 mtdcr(CPC0_SRR, 0x00040000); /* Hold PCI bridge in reset */
36
37 return 0;
38}
39
40/*
41 * Check Board Identity:
42 */
43int checkboard(void)
44{
f0c0b3a9
WD
45 char buf[64];
46 int i = getenv_f("serial#", buf, sizeof(buf));
73ccb341
GJ
47#ifdef DISPLAY_BOARD_INFO
48 sys_info_t sysinfo;
49#endif
50
51 puts("Board: Quad100hd");
52
f0c0b3a9 53 if (i > 0) {
73ccb341 54 puts(", serial# ");
f0c0b3a9 55 puts(buf);
73ccb341
GJ
56 }
57 putc('\n');
58
59#ifdef DISPLAY_BOARD_INFO
60 /* taken from ppcboot */
61 get_sys_info(&sysinfo);
62
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 *
68 1000000));
69 printf("\tPCI: %lu MHz\n", sysinfo.freqPCI / 1000000);
70#endif
71
72 return 0;
73}