1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Benjamin Warren, biggerbadderben@gmail.com
8 * netdev.h - definitions an prototypes for network devices
13 #include <phy_interface.h>
18 * Board and CPU-specific initialization functions
19 * board_eth_init() has highest priority. cpu_eth_init() only
20 * gets called if board_eth_init() isn't instantiated or fails.
26 int board_eth_init(struct bd_info *bis);
27 int board_interface_eth_init(struct udevice *dev,
28 phy_interface_t interface_type);
29 int cpu_eth_init(struct bd_info *bis);
31 /* Driver initialization prototypes */
32 int at91emac_register(struct bd_info *bis, unsigned long iobase);
33 int ax88180_initialize(struct bd_info *bis);
34 int bcm_sf2_eth_register(struct bd_info *bis, u8 dev_num);
35 int bfin_EMAC_initialize(struct bd_info *bis);
36 int cs8900_initialize(u8 dev_num, int base_addr);
37 int dc21x4x_initialize(struct bd_info *bis);
38 int designware_initialize(ulong base_addr, u32 interface);
39 int dm9000_initialize(struct bd_info *bis);
40 int dnet_eth_initialize(int id, void *regs, unsigned int phy_addr);
41 int e1000_initialize(struct bd_info *bis);
42 int eepro100_initialize(struct bd_info *bis);
43 int ep93xx_eth_initialize(u8 dev_num, int base_addr);
44 int eth_3com_initialize (struct bd_info * bis);
45 int ethoc_initialize(u8 dev_num, int base_addr);
46 int fec_initialize (struct bd_info *bis);
47 int fecmxc_initialize(struct bd_info *bis);
48 int fecmxc_initialize_multi(struct bd_info *bis, int dev_id, int phy_id,
50 int ftmac100_initialize(struct bd_info *bits);
51 int ftmac110_initialize(struct bd_info *bits);
52 void gt6426x_eth_initialize(struct bd_info *bis);
53 int ks8851_mll_initialize(u8 dev_num, int base_addr);
54 int lan91c96_initialize(u8 dev_num, int base_addr);
55 int lpc32xx_eth_initialize(struct bd_info *bis);
56 int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
57 int mcdmafec_initialize(struct bd_info *bis);
58 int mcffec_initialize(struct bd_info *bis);
59 int mvgbe_initialize(struct bd_info *bis);
60 int mvneta_initialize(struct bd_info *bis, int base_addr, int devnum,
62 int natsemi_initialize(struct bd_info *bis);
63 int ne2k_register(void);
64 int npe_initialize(struct bd_info *bis);
65 int ns8382x_initialize(struct bd_info *bis);
66 int pcnet_initialize(struct bd_info *bis);
67 int ppc_4xx_eth_initialize (struct bd_info *bis);
68 int rtl8139_initialize(struct bd_info *bis);
69 int rtl8169_initialize(struct bd_info *bis);
70 int scc_initialize(struct bd_info *bis);
71 int sh_eth_initialize(struct bd_info *bis);
72 int skge_initialize(struct bd_info *bis);
73 int smc91111_initialize(u8 dev_num, int base_addr);
74 int smc911x_initialize(u8 dev_num, int base_addr);
75 int uec_standard_init(struct bd_info *bis);
76 int uli526x_initialize(struct bd_info *bis);
77 int armada100_fec_register(unsigned long base_addr);
79 /* Boards with PCI network controllers can call this from their board_eth_init()
80 * function to initialize whatever's on board.
81 * Return value is total # of devices found */
83 static inline int pci_eth_init(struct bd_info *bis)
89 #ifdef CONFIG_EEPRO100
90 num += eepro100_initialize(bis);
93 num += dc21x4x_initialize(bis);
96 num += e1000_initialize(bis);
99 num += pcnet_initialize(bis);
101 #ifdef CONFIG_NATSEMI
102 num += natsemi_initialize(bis);
104 #ifdef CONFIG_NS8382X
105 num += ns8382x_initialize(bis);
107 #if defined(CONFIG_RTL8139)
108 num += rtl8139_initialize(bis);
110 #if defined(CONFIG_RTL8169)
111 num += rtl8169_initialize(bis);
113 #if defined(CONFIG_ULI526X)
114 num += uli526x_initialize(bis);
117 #endif /* CONFIG_PCI */
121 struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id);
125 int fec_probe(struct bd_info *bd, int dev_id, uint32_t base_addr,
126 struct mii_dev *bus, struct phy_device *phydev);
129 * Allow FEC to fine-tune MII configuration on boards which require this.
132 int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int));
135 #endif /* _NETDEV_H_ */