From 1bcabd79215ece91ee8f79e768c4886efae182ba Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 28 Mar 2018 20:54:12 +0800 Subject: net: fec_mxc: simplify fec_get_miibus No need to provide two prototype for this function. Use ulong for the first parameter, then this function could be shared for DM/non DM case. Signed-off-by: Peng Fan Acked-by: Joe Hershberger --- include/netdev.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include') diff --git a/include/netdev.h b/include/netdev.h index 86d28ade14b..68c6d49cbfc 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -117,11 +117,7 @@ static inline int pci_eth_init(bd_t *bis) return num; } -#ifdef CONFIG_DM_ETH -struct mii_dev *fec_get_miibus(struct udevice *dev, int dev_id); -#else -struct mii_dev *fec_get_miibus(uint32_t base_addr, int dev_id); -#endif +struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id); #ifdef CONFIG_PHYLIB struct phy_device; -- cgit v1.2.3 From fbada4855d97532514a2be55e355f4bb49f81766 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Wed, 28 Mar 2018 20:54:14 +0800 Subject: net: fec: sharing MDIO for two enet controllers On i.MX6SX, 6UL and 7D, there are two enet controllers each has a MDIO port. But Some boards share one MDIO port for the two enets. So introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate the MDIO port for sharing. In Kconfig, user needs enable CONFIG_FEC_MXC_SHARE_MDIO first to enter the CONFIG_FEC_MXC_MDIO_BASE. To i.MX28, adapt to use the new config Signed-off-by: Peng Fan Acked-by: Joe Hershberger Cc: Fabio Estevam --- include/configs/mx28evk.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index bc58ca5c62d..79d4c9b2ce3 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -65,6 +65,7 @@ /* FEC Ethernet on SoC */ #ifdef CONFIG_CMD_NET #define CONFIG_FEC_MXC +#define CONFIG_FEC_MXC_MDIO_BASE MXS_ENET0_BASE #define CONFIG_MX28_FEC_MAC_IN_OCOTP #endif -- cgit v1.2.3 From 86271b3f29903437a1f1de7625963b1878601c39 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Fri, 13 Apr 2018 15:26:40 -0500 Subject: xilinx: Only enable dist boot pxe when DHCP is enabled Otherwise, we see this: In file included from include/configs/zynq-common.h:183:0, from include/config.h:5, from include/common.h:21, from env/common.c:11: include/config_distro_bootcmd.h:319:2: error: expected ?}? before ?BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE? BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE ^ include/config_distro_bootcmd.h:319:2: note: in definition of macro ?BOOTENV_DEV_NAME_PXE? Signed-off-by: Joe Hershberger --- include/configs/socfpga_common.h | 2 +- include/configs/xilinx_zynqmp.h | 2 +- include/configs/zynq-common.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index 6580ffca254..cf1f2b18866 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -292,7 +292,7 @@ unsigned int cm_get_qspi_controller_clk_hz(void); #define BOOT_TARGET_DEVICES_DHCP(func) #endif -#ifdef CONFIG_CMD_PXE +#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP) #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) #else #define BOOT_TARGET_DEVICES_PXE(func) diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 56c8b0cb68a..5827911c4e7 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -172,7 +172,7 @@ # define BOOT_TARGET_DEVICES_USB(func) #endif -#if defined(CONFIG_CMD_PXE) +#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP) # define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) #else # define BOOT_TARGET_DEVICES_PXE(func) diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 6d9924903ce..ae82a7aa96a 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -162,7 +162,7 @@ #define BOOT_TARGET_DEVICES_USB(func) #endif -#if defined(CONFIG_CMD_PXE) +#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP) #define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) #else #define BOOT_TARGET_DEVICES_PXE(func) -- cgit v1.2.3