From fcc33075249d630b209cbff4c79bbe29f9d6ee85 Mon Sep 17 00:00:00 2001 From: ridale Date: Mon, 23 Aug 2021 16:55:16 +1000 Subject: [PATCH] doc: added comment for hack. Signed-off-by: ridale fix: patches from kent, imx8mq evk. Signed-off-by: ridale --- libethdrivers/plat_include/imx6/ethdrivers/plat/eth_plat.h | 4 ++-- libethdrivers/src/plat/imx6/imx6.c | 3 ++- libethdrivers/src/plat/imx6/uboot/imx-regs.h | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libethdrivers/plat_include/imx6/ethdrivers/plat/eth_plat.h b/libethdrivers/plat_include/imx6/ethdrivers/plat/eth_plat.h index eed10988a..4fbbcd709 100644 --- a/libethdrivers/plat_include/imx6/ethdrivers/plat/eth_plat.h +++ b/libethdrivers/plat_include/imx6/ethdrivers/plat/eth_plat.h @@ -14,11 +14,11 @@ struct enet *get_enet_from_driver(struct eth_driver *driver); -enum { +enum nic_config_flags_t { NIC_CONFIG_FORCE_MAC = 1u << 0, /**< Use MAC from config (if not 0) */ NIC_CONFIG_PROMISCUOUS_MODE = 1u << 1, /**< Enable promiscuous mode */ NIC_CONFIG_DROP_FRAME_CRC = 1u << 2, /**< Drop ethernet frame CRC */ -} nic_config_flags_t; +}; typedef int (*sync_func_t)(void); typedef int (*mdio_read_func_t)(uint16_t reg); diff --git a/libethdrivers/src/plat/imx6/imx6.c b/libethdrivers/src/plat/imx6/imx6.c index 7c77b329c..0087598af 100644 --- a/libethdrivers/src/plat/imx6/imx6.c +++ b/libethdrivers/src/plat/imx6/imx6.c @@ -736,7 +736,8 @@ static int init_device(imx6_eth_driver_t *dev, const nic_config_t *nic_config) /* Initialise the phy library */ miiphy_init(); /* Initialise the phy */ -#if defined(CONFIG_PLAT_SABRE) || defined(CONFIG_PLAT_WANDQ) +#if defined(CONFIG_PLAT_SABRE) || defined(CONFIG_PLAT_WANDQ) || \ +defined (CONFIG_PLAT_IMX8MQ_EVK) phy_micrel_init(); #elif defined(CONFIG_PLAT_NITROGEN6SX) phy_atheros_init(); diff --git a/libethdrivers/src/plat/imx6/uboot/imx-regs.h b/libethdrivers/src/plat/imx6/uboot/imx-regs.h index e395cdcef..2803a275c 100644 --- a/libethdrivers/src/plat/imx6/uboot/imx-regs.h +++ b/libethdrivers/src/plat/imx6/uboot/imx-regs.h @@ -33,6 +33,10 @@ #define ROMCP_ARB_BASE_ADDR 0x00000000 #define ROMCP_ARB_END_ADDR 0x000FFFFF +// HACK use imx6 register layout for imx8 +#if defined (CONFIG_PLAT_IMX8MQ_EVK) + #define CONFIG_PLAT_IMX6DQ +#endif #if defined(CONFIG_PLAT_IMX6DQ)