mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
net: dwc_et_qos: update weak function board_interface_eth_init
Align the board and driver prototype for board_interface_eth_init to avoid execution issue (the interface_type parameter is defined as int or phy_interface_t). To have a generic weak function (it should be reused by other driver) I change the prototype to use directly udevice. This prototype is added in netdev.h to allow compilation check and avoid warning when compiling with W=1 on file board/st/stm32mp1/stm32mp1.c warning: no previous prototype for 'board_interface_eth_init'\ [-Wmissing-prototypes] int board_interface_eth_init(int interface_type, .... ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
parent
50d86e55a4
commit
53e3d52c6c
3 changed files with 19 additions and 16 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
#ifndef _NETDEV_H_
|
||||
#define _NETDEV_H_
|
||||
#include <phy_interface.h>
|
||||
|
||||
/*
|
||||
* Board and CPU-specific initialization functions
|
||||
|
@ -21,6 +22,8 @@
|
|||
*/
|
||||
|
||||
int board_eth_init(bd_t *bis);
|
||||
int board_interface_eth_init(struct udevice *dev,
|
||||
phy_interface_t interface_type);
|
||||
int cpu_eth_init(bd_t *bis);
|
||||
|
||||
/* Driver initialization prototypes */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue