3 * Yusdi Santoso, Adaptec Inc., yusdi_santoso@adaptec.com
6 * Rob Taylor, Flying Pig Systems. robt@flyingpig.com.
8 * SPDX-License-Identifier: GPL-2.0+
18 /*TODO: Check processor type */
20 puts ( "Board: Hidden Dragon "
27 " ##Test not implemented yet##\n");
28 /* TODO: Implement board test */
32 phys_size_t initdram (int board_type)
39 size = get_ram_size(CONFIG_SYS_SDRAM_BASE, CONFIG_SYS_MAX_RAM_SIZE);
41 new_bank0_end = size - 1;
42 mear1 = mpc824x_mpc107_getreg(MEAR1);
43 emear1 = mpc824x_mpc107_getreg(EMEAR1);
44 mear1 = (mear1 & 0xFFFFFF00) |
45 ((new_bank0_end & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT);
46 emear1 = (emear1 & 0xFFFFFF00) |
47 ((new_bank0_end & MICR_ADDR_MASK) >> MICR_EADDR_SHIFT);
48 mpc824x_mpc107_setreg(MEAR1, mear1);
49 mpc824x_mpc107_setreg(EMEAR1, emear1);
55 * Initialize PCI Devices, report devices found.
57 #ifndef CONFIG_PCI_PNP
58 static struct pci_config_table pci_hidden_dragon_config_table[] = {
59 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x0f, PCI_ANY_ID,
60 pci_cfgfunc_config_device, { PCI_ENET0_IOADDR,
62 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
63 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x10, PCI_ANY_ID,
64 pci_cfgfunc_config_device, { PCI_ENET1_IOADDR,
66 PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
71 struct pci_controller hose = {
72 #ifndef CONFIG_PCI_PNP
73 config_table: pci_hidden_dragon_config_table,
77 void pci_init_board(void)
79 pci_mpc824x_init(&hose);
82 int board_eth_init(bd_t *bis)
84 return pci_eth_init(bis);