mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 01:51:33 +00:00
Moved initialization of RTL8169 Ethernet controller to board_eth_init()
Affected boards: linkstation r7780mp Removed initialization of the driver from net/eth.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
3ae071e442
commit
02d69891d9
5 changed files with 17 additions and 5 deletions
|
@ -26,6 +26,7 @@
|
||||||
#include <mpc824x.h>
|
#include <mpc824x.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <ns16550.h>
|
#include <ns16550.h>
|
||||||
|
#include <netdev.h>
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
|
@ -128,3 +129,8 @@ int board_early_init_f (void)
|
||||||
out_8((volatile u8*)UART_DCR, 1);
|
out_8((volatile u8*)UART_DCR, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int board_eth_init(bd_t *bis)
|
||||||
|
{
|
||||||
|
return pci_eth_init(bis);
|
||||||
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/pci.h>
|
#include <asm/pci.h>
|
||||||
|
#include <netdev.h>
|
||||||
#include "r7780mp.h"
|
#include "r7780mp.h"
|
||||||
|
|
||||||
int checkboard(void)
|
int checkboard(void)
|
||||||
|
@ -77,3 +78,8 @@ void pci_init_board(void)
|
||||||
{
|
{
|
||||||
pci_sh7780_init(&hose);
|
pci_sh7780_init(&hose);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int board_eth_init(bd_t *bis)
|
||||||
|
{
|
||||||
|
return pci_eth_init(bis);
|
||||||
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
|
#include <netdev.h>
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <pci.h>
|
#include <pci.h>
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ int greth_initialize(bd_t *bis);
|
||||||
int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
|
int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
|
||||||
int mcdmafec_initialize(bd_t *bis);
|
int mcdmafec_initialize(bd_t *bis);
|
||||||
int mcffec_initialize(bd_t *bis);
|
int mcffec_initialize(bd_t *bis);
|
||||||
|
int rtl8169_initialize(bd_t *bis);
|
||||||
int skge_initialize(bd_t *bis);
|
int skge_initialize(bd_t *bis);
|
||||||
int uli526x_initialize(bd_t *bis);
|
int uli526x_initialize(bd_t *bis);
|
||||||
|
|
||||||
|
@ -56,6 +57,9 @@ int uli526x_initialize(bd_t *bis);
|
||||||
static inline int pci_eth_init(bd_t *bis)
|
static inline int pci_eth_init(bd_t *bis)
|
||||||
{
|
{
|
||||||
int num = 0;
|
int num = 0;
|
||||||
|
#if defined(CONFIG_RTL8169)
|
||||||
|
num += rtl8169_initialize(bis);
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_ULI526)
|
#if defined(CONFIG_ULI526)
|
||||||
num += uli526x_initialize(bis);
|
num += uli526x_initialize(bis);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -61,7 +61,6 @@ extern int pcnet_initialize(bd_t*);
|
||||||
extern int plb2800_eth_initialize(bd_t*);
|
extern int plb2800_eth_initialize(bd_t*);
|
||||||
extern int ppc_4xx_eth_initialize(bd_t *);
|
extern int ppc_4xx_eth_initialize(bd_t *);
|
||||||
extern int rtl8139_initialize(bd_t*);
|
extern int rtl8139_initialize(bd_t*);
|
||||||
extern int rtl8169_initialize(bd_t*);
|
|
||||||
extern int scc_initialize(bd_t*);
|
extern int scc_initialize(bd_t*);
|
||||||
extern int tsi108_eth_initialize(bd_t*);
|
extern int tsi108_eth_initialize(bd_t*);
|
||||||
extern int npe_initialize(bd_t *);
|
extern int npe_initialize(bd_t *);
|
||||||
|
@ -250,10 +249,6 @@ int eth_initialize(bd_t *bis)
|
||||||
#if defined(CONFIG_RTL8139)
|
#if defined(CONFIG_RTL8139)
|
||||||
rtl8139_initialize(bis);
|
rtl8139_initialize(bis);
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_RTL8169)
|
|
||||||
rtl8169_initialize(bis);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!eth_devices) {
|
if (!eth_devices) {
|
||||||
puts ("No ethernet found.\n");
|
puts ("No ethernet found.\n");
|
||||||
show_boot_progress (-64);
|
show_boot_progress (-64);
|
||||||
|
|
Loading…
Add table
Reference in a new issue