3 * Rob Taylor, Flying Pig Systems. robt@flyingpig.com.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 #include <asm/processor.h>
29 int sysControlDisplay(int digit, uchar ascii_code);
30 extern void Plx9030Init(void);
32 /* We have to clear the initial data area here. Couldn't have done it
33 * earlier because DRAM had not been initialized.
35 int board_pre_init(void)
38 /* enable DUAL UART Mode on CPC45 */
39 *(uchar*)DUART_DCR |= 0x1; /* set DCM bit */
47 char revision = BOARD_REV;
49 ulong busfreq = get_bus_freq(0);
54 printf("Revision %d ", revision);
56 printf("Local Bus at %s MHz\n", strmhz(buf, busfreq));
61 long int initdram(int board_type)
68 size = get_ram_size(CFG_SDRAM_BASE, CFG_MAX_RAM_SIZE);
70 new_bank0_end = size - 1;
71 mear1 = mpc824x_mpc107_getreg(MEAR1);
72 emear1 = mpc824x_mpc107_getreg(EMEAR1);
73 mear1 = (mear1 & 0xFFFFFF00) |
74 ((new_bank0_end & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT);
75 emear1 = (emear1 & 0xFFFFFF00) |
76 ((new_bank0_end & MICR_ADDR_MASK) >> MICR_EADDR_SHIFT);
77 mpc824x_mpc107_setreg(MEAR1, mear1);
78 mpc824x_mpc107_setreg(EMEAR1, emear1);
84 * Initialize PCI Devices, report devices found.
86 #ifndef CONFIG_PCI_PNP
88 static struct pci_config_table pci_sandpoint_config_table[] = {
89 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x0f, PCI_ANY_ID,
90 pci_cfgfunc_config_device, { PCI_ENET0_IOADDR,
92 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
98 struct pci_controller hose = {
99 #ifndef CONFIG_PCI_PNP
100 config_table: pci_sandpoint_config_table,
104 void pci_init_board(void)
106 pci_mpc824x_init(&hose);
108 /* init PCI_to_LOCAL Bus BRIDGE */
111 sysControlDisplay(0,' ');
112 sysControlDisplay(1,'C');
113 sysControlDisplay(2,'P');
114 sysControlDisplay(3,'C');
115 sysControlDisplay(4,' ');
116 sysControlDisplay(5,'4');
117 sysControlDisplay(6,'5');
118 sysControlDisplay(7,' ');
122 /**************************************************************************
124 * sysControlDisplay - controls one of the Alphanum. Display digits.
126 * This routine will write an ASCII character to the display digit requested.
133 int sysControlDisplay
135 int digit, /* number of digit 0..7 */
136 uchar ascii_code /* ASCII code */
139 if ((digit < 0) || (digit > 7))
142 *((volatile uchar*)(DISP_CHR_RAM + digit)) = ascii_code;