4 * Misc LinkStation specific functions
6 * Copyright (C) 2006 Mihai Georgian <u-boot@linuxnotincluded.org.uk>
8 * SPDX-License-Identifier: GPL-2.0+
22 DECLARE_GLOBAL_DATA_PTR;
24 extern void init_AVR_DUART(void);
33 if ((p = getenv ("console_nr")) != NULL) {
34 unsigned long con_nr = simple_strtoul (p, NULL, 10) & 3;
36 bd->bi_baudrate &= ~3;
37 bd->bi_baudrate |= con_nr & 3;
42 phys_size_t initdram (int board_type)
44 return (get_ram_size(CONFIG_SYS_SDRAM_BASE, CONFIG_SYS_MAX_RAM_SIZE));
48 * Initialize PCI Devices
52 #ifndef CONFIG_PCI_PNP
54 static struct pci_config_table pci_linkstation_config_table[] = {
55 /* vendor, device, class */
57 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
58 PCI_ANY_ID, 0x0b, 0, /* AN983B or RTL8110S */
59 /* ethernet controller */
60 pci_cfgfunc_config_device, { PCI_ETH_IOADDR,
64 PCI_COMMAND_MASTER }},
65 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
66 PCI_ANY_ID, 0x0c, 0, /* SII680 or IT8211AF */
68 pci_cfgfunc_config_device, { PCI_IDE_IOADDR,
72 PCI_COMMAND_MASTER }},
73 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
74 PCI_ANY_ID, 0x0e, 0, /* D720101 USB controller, 1st USB 1.1 */
75 pci_cfgfunc_config_device, { PCI_USB0_IOADDR,
78 PCI_COMMAND_MASTER }},
79 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
80 PCI_ANY_ID, 0x0e, 1, /* D720101 USB controller, 2nd USB 1.1 */
81 pci_cfgfunc_config_device, { PCI_USB1_IOADDR,
84 PCI_COMMAND_MASTER }},
85 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
86 PCI_ANY_ID, 0x0e, 2, /* D720101 USB controller, USB 2.0 */
87 pci_cfgfunc_config_device, { PCI_USB2_IOADDR,
90 PCI_COMMAND_MASTER }},
95 struct pci_controller hose = {
96 #ifndef CONFIG_PCI_PNP
97 config_table:pci_linkstation_config_table,
101 void pci_init_board (void)
103 pci_mpc824x_init (&hose);
106 /* Haven't seen any change without these on a HG, maybe it is
107 * needed on other models */
108 out_le32((volatile unsigned*)(PCI_USB0_MEMADDR + 8), 1);
109 out_le32((volatile unsigned*)(PCI_USB1_MEMADDR + 8), 1);
111 #endif /* CONFIG_PCI */
113 #define UART_DCR 0x80004511
114 int board_early_init_f (void)
117 out_8((volatile u8*)UART_DCR, 1);
121 int board_eth_init(bd_t *bis)
123 return pci_eth_init(bis);