4 * Misc LinkStation specific functions
6 * Copyright (C) 2006 Mihai Georgian <u-boot@linuxnotincluded.org.uk>
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,
35 DECLARE_GLOBAL_DATA_PTR;
37 extern void init_AVR_DUART(void);
46 if ((p = getenv ("console_nr")) != NULL) {
47 unsigned long con_nr = simple_strtoul (p, NULL, 10) & 3;
49 bd->bi_baudrate &= ~3;
50 bd->bi_baudrate |= con_nr & 3;
55 phys_size_t initdram (int board_type)
57 return (get_ram_size(CONFIG_SYS_SDRAM_BASE, CONFIG_SYS_MAX_RAM_SIZE));
61 * Initialize PCI Devices
65 #ifndef CONFIG_PCI_PNP
67 static struct pci_config_table pci_linkstation_config_table[] = {
68 /* vendor, device, class */
70 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
71 PCI_ANY_ID, 0x0b, 0, /* AN983B or RTL8110S */
72 /* ethernet controller */
73 pci_cfgfunc_config_device, { PCI_ETH_IOADDR,
77 PCI_COMMAND_MASTER }},
78 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
79 PCI_ANY_ID, 0x0c, 0, /* SII680 or IT8211AF */
81 pci_cfgfunc_config_device, { PCI_IDE_IOADDR,
85 PCI_COMMAND_MASTER }},
86 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
87 PCI_ANY_ID, 0x0e, 0, /* D720101 USB controller, 1st USB 1.1 */
88 pci_cfgfunc_config_device, { PCI_USB0_IOADDR,
91 PCI_COMMAND_MASTER }},
92 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
93 PCI_ANY_ID, 0x0e, 1, /* D720101 USB controller, 2nd USB 1.1 */
94 pci_cfgfunc_config_device, { PCI_USB1_IOADDR,
97 PCI_COMMAND_MASTER }},
98 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
99 PCI_ANY_ID, 0x0e, 2, /* D720101 USB controller, USB 2.0 */
100 pci_cfgfunc_config_device, { PCI_USB2_IOADDR,
103 PCI_COMMAND_MASTER }},
108 struct pci_controller hose = {
109 #ifndef CONFIG_PCI_PNP
110 config_table:pci_linkstation_config_table,
114 void pci_init_board (void)
116 pci_mpc824x_init (&hose);
119 /* Haven't seen any change without these on a HG, maybe it is
120 * needed on other models */
121 out_le32((volatile unsigned*)(PCI_USB0_MEMADDR + 8), 1);
122 out_le32((volatile unsigned*)(PCI_USB1_MEMADDR + 8), 1);
124 #endif /* CONFIG_PCI */
126 #define UART_DCR 0x80004511
127 int board_early_init_f (void)
130 out_8((volatile u8*)UART_DCR, 1);
134 int board_eth_init(bd_t *bis)
136 return pci_eth_init(bis);