Skip to contentSkip to conversation

clock_imx8mm: Add a stub for imx8mp_fec_interface_init()

PATCH In review Fabio Estevam 2 participants 3 messages Oct 20, 2023 – Dec 13, 2023

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 clock_imx8mm: Add a stub for imx8mp_fec_interface_init()

From: Fabio Estevam <[email protected]>

When CONFIG_DWC_ETH_QOS_IMX=y and CONFIG_FEC_MXC is not selected, the following warning is seen:

arch/arm/mach-imx/imx8m/clock_imx8mm.c: In function 'board_interface_eth_init':
arch/arm/mach-imx/imx8m/clock_imx8mm.c:914:24: warning: implicit declaration of function 'imx8mp_fec_interface_init; did you mean 'imx8mp_eqos_interface_init'? [-Wimplicit-function-declaration]

Fix it by adding a stub for imx8mp_fec_interface_init() to handle this case.

This follows the same approach done on imx8mp_eqos_interface_init().

---
 arch/arm/mach-imx/imx8m/clock_imx8mm.c | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/mach-imx/imx8m/clock_imx8mm.c +7 -0
index 986870799d36..5cf97a5ea952 100644
@@ -904,6 +904,13 @@ static int imx8mp_fec_interface_init(struct udevice *dev,
 
 	return 0;
 }
+#else
+static int imx8mp_fec_interface_init(struct udevice *dev,
+				     phy_interface_t interface_type,
+				     bool mx8mp)
+{
+	return 0;
+}
 #endif
 
 int board_interface_eth_init(struct udevice *dev, phy_interface_t interface_type)
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

When CONFIG_DWC_ETH_QOS_IMX=y and CONFIG_FEC_MXC is not selected, the following warning is seen:

arch/arm/mach-imx/imx8m/clock_imx8mm.c: In function 'board_interface_eth_init':
arch/arm/mach-imx/imx8m/clock_imx8mm.c:914:24: warning: implicit declaration of function 'imx8mp_fec_interface_init; did you mean 'imx8mp_eqos_interface_init'? [-Wimplicit-function-declaration]

Quoted 6 lines

Fix it by adding a stub for imx8mp_fec_interface_init() to handle this case.

This follows the same approach done on imx8mp_eqos_interface_init().

author reviewer
#2 lore raw
In reply to Fabio Estevam
Quoted 9 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

When CONFIG_DWC_ETH_QOS_IMX=y and CONFIG_FEC_MXC is not selected, the following warning is seen:

arch/arm/mach-imx/imx8m/clock_imx8mm.c: In function 'board_interface_eth_init':
arch/arm/mach-imx/imx8m/clock_imx8mm.c:914:24: warning: implicit declaration of function 'imx8mp_fec_interface_init; did you mean 'imx8mp_eqos_interface_init'? [-Wimplicit-function-declaration]

Quoted 6 lines

Fix it by adding a stub for imx8mp_fec_interface_init() to handle this case.

This follows the same approach done on imx8mp_eqos_interface_init().

Applied to u-boot-imx next, thanks.