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,
34 extern void init_AVR_DUART(void);
38 DECLARE_GLOBAL_DATA_PTR;
44 if ((p = getenv ("console_nr")) != NULL) {
45 unsigned long con_nr = simple_strtoul (p, NULL, 10) & 3;
47 bd->bi_baudrate &= ~3;
48 bd->bi_baudrate |= con_nr & 3;
53 long int initdram (int board_type)
55 return (get_ram_size(CFG_SDRAM_BASE, CFG_MAX_RAM_SIZE));
59 * Initialize PCI Devices
63 #ifndef CONFIG_PCI_PNP
65 static struct pci_config_table pci_linkstation_config_table[] = {
66 /* vendor, device, class */
68 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
69 PCI_ANY_ID, 0x0b, 0, /* AN983B or RTL8110S */
70 /* ethernet controller */
71 pci_cfgfunc_config_device, { PCI_ETH_IOADDR,
75 PCI_COMMAND_MASTER }},
76 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
77 PCI_ANY_ID, 0x0c, 0, /* SII680 or IT8211AF */
79 pci_cfgfunc_config_device, { PCI_IDE_IOADDR,
83 PCI_COMMAND_MASTER }},
84 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
85 PCI_ANY_ID, 0x0e, 0, /* D720101 USB controller, 1st USB 1.1 */
86 pci_cfgfunc_config_device, { PCI_USB0_IOADDR,
89 PCI_COMMAND_MASTER }},
90 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
91 PCI_ANY_ID, 0x0e, 1, /* D720101 USB controller, 2nd USB 1.1 */
92 pci_cfgfunc_config_device, { PCI_USB1_IOADDR,
95 PCI_COMMAND_MASTER }},
96 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
97 PCI_ANY_ID, 0x0e, 2, /* D720101 USB controller, USB 2.0 */
98 pci_cfgfunc_config_device, { PCI_USB2_IOADDR,
101 PCI_COMMAND_MASTER }},
106 struct pci_controller hose = {
107 #ifndef CONFIG_PCI_PNP
108 config_table:pci_linkstation_config_table,
112 void pci_init_board (void)
114 pci_mpc824x_init (&hose);
117 /* Haven't seen any change without these on a HG, maybe it is
118 * needed on other models */
119 out_le32((volatile unsigned*)(PCI_USB0_MEMADDR + 8), 1);
120 out_le32((volatile unsigned*)(PCI_USB1_MEMADDR + 8), 1);
122 #endif /* CONFIG_PCI */
124 #define UART_DCR 0x80004511
125 int board_early_init_f (void)
128 out_8((volatile u8*)UART_DCR, 1);