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 extern void init_AVR_DUART(void);
39 DECLARE_GLOBAL_DATA_PTR
;
45 if ((p
= getenv ("console_nr")) != NULL
) {
46 unsigned long con_nr
= simple_strtoul (p
, NULL
, 10) & 3;
48 bd
->bi_baudrate
&= ~3;
49 bd
->bi_baudrate
|= con_nr
& 3;
54 phys_size_t
initdram (int board_type
)
56 return (get_ram_size(CONFIG_SYS_SDRAM_BASE
, CONFIG_SYS_MAX_RAM_SIZE
));
60 * Initialize PCI Devices
64 #ifndef CONFIG_PCI_PNP
66 static struct pci_config_table pci_linkstation_config_table
[] = {
67 /* vendor, device, class */
69 { PCI_ANY_ID
, PCI_ANY_ID
, PCI_ANY_ID
,
70 PCI_ANY_ID
, 0x0b, 0, /* AN983B or RTL8110S */
71 /* ethernet controller */
72 pci_cfgfunc_config_device
, { PCI_ETH_IOADDR
,
76 PCI_COMMAND_MASTER
}},
77 { PCI_ANY_ID
, PCI_ANY_ID
, PCI_ANY_ID
,
78 PCI_ANY_ID
, 0x0c, 0, /* SII680 or IT8211AF */
80 pci_cfgfunc_config_device
, { PCI_IDE_IOADDR
,
84 PCI_COMMAND_MASTER
}},
85 { PCI_ANY_ID
, PCI_ANY_ID
, PCI_ANY_ID
,
86 PCI_ANY_ID
, 0x0e, 0, /* D720101 USB controller, 1st USB 1.1 */
87 pci_cfgfunc_config_device
, { PCI_USB0_IOADDR
,
90 PCI_COMMAND_MASTER
}},
91 { PCI_ANY_ID
, PCI_ANY_ID
, PCI_ANY_ID
,
92 PCI_ANY_ID
, 0x0e, 1, /* D720101 USB controller, 2nd USB 1.1 */
93 pci_cfgfunc_config_device
, { PCI_USB1_IOADDR
,
96 PCI_COMMAND_MASTER
}},
97 { PCI_ANY_ID
, PCI_ANY_ID
, PCI_ANY_ID
,
98 PCI_ANY_ID
, 0x0e, 2, /* D720101 USB controller, USB 2.0 */
99 pci_cfgfunc_config_device
, { PCI_USB2_IOADDR
,
102 PCI_COMMAND_MASTER
}},
107 struct pci_controller hose
= {
108 #ifndef CONFIG_PCI_PNP
109 config_table
:pci_linkstation_config_table
,
113 void pci_init_board (void)
115 pci_mpc824x_init (&hose
);
118 /* Haven't seen any change without these on a HG, maybe it is
119 * needed on other models */
120 out_le32((volatile unsigned*)(PCI_USB0_MEMADDR
+ 8), 1);
121 out_le32((volatile unsigned*)(PCI_USB1_MEMADDR
+ 8), 1);
123 #endif /* CONFIG_PCI */
125 #define UART_DCR 0x80004511
126 int board_early_init_f (void)
129 out_8((volatile u8
*)UART_DCR
, 1);
133 int board_eth_init(bd_t
*bis
)
135 return pci_eth_init(bis
);