4 * Misc LinkStation specific functions
6 * Copyright (C) 2006 Mihai Georgin <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);
35 extern void hw_watchdog_reset(void);
39 DECLARE_GLOBAL_DATA_PTR;
40 ulong busfreq = get_bus_freq (0);
48 if ((p = getenv ("console_nr")) != NULL) {
49 unsigned long con_nr = simple_strtoul (p, NULL, 10) & 3;
51 bd->bi_baudrate &= ~3;
52 bd->bi_baudrate |= con_nr & 3;
57 long int initdram (int board_type)
59 return (get_ram_size(CFG_SDRAM_BASE, CFG_MAX_RAM_SIZE));
63 * Initialize PCI Devices
67 #ifndef CONFIG_PCI_PNP
69 static struct pci_config_table pci_linkstation_config_table[] = {
70 /* vendor, device, class */
72 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
73 PCI_ANY_ID, 0x0b, 0, /* AN983B or RTL8110S */
74 /* ethernet controller */
75 pci_cfgfunc_config_device, { PCI_ETH_IOADDR,
79 PCI_COMMAND_MASTER }},
80 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
81 PCI_ANY_ID, 0x0c, 0, /* SII680 or IT8211AF */
83 pci_cfgfunc_config_device, { PCI_IDE_IOADDR,
87 PCI_COMMAND_MASTER }},
88 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
89 PCI_ANY_ID, 0x0e, 0, /* D720101 USB controller, 1st USB 1.1 */
90 pci_cfgfunc_config_device, { PCI_USB0_IOADDR,
93 PCI_COMMAND_MASTER }},
94 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
95 PCI_ANY_ID, 0x0e, 1, /* D720101 USB controller, 2nd USB 1.1 */
96 pci_cfgfunc_config_device, { PCI_USB1_IOADDR,
99 PCI_COMMAND_MASTER }},
100 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
101 PCI_ANY_ID, 0x0e, 2, /* D720101 USB controller, USB 2.0 */
102 pci_cfgfunc_config_device, { PCI_USB2_IOADDR,
105 PCI_COMMAND_MASTER }},
110 struct pci_controller hose = {
111 #ifndef CONFIG_PCI_PNP
112 config_table:pci_linkstation_config_table,
116 void pci_init_board (void)
118 pci_mpc824x_init (&hose);
121 out_le32(PCI_USB0_MEMADDR+8, 1);
122 out_le32(PCI_USB1_MEMADDR+8, 1);
125 #endif /* CONFIG_PCI */