Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: patches from kent #99

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libethdrivers/plat_include/imx6/ethdrivers/plat/eth_plat.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

struct enet *get_enet_from_driver(struct eth_driver *driver);

enum {
enum nic_config_flags_t {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes nic_config_flags_t from a global with an enum type to a enum type declaration. Recent compiler versions (gcc-10) no longer place the global definitions in a COM section and this leads to linker errors. Alternatively this could be changed a different way to add a typedef at the start.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the typedef is what we need here, this was never supposed to be a global variable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue looks similar to seL4/camkes-vm#13

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);
Expand Down
3 changes: 2 additions & 1 deletion libethdrivers/src/plat/imx6/imx6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 4 additions & 0 deletions libethdrivers/src/plat/imx6/uboot/imx-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
axel-h marked this conversation as resolved.
Show resolved Hide resolved
#endif

#if defined(CONFIG_PLAT_IMX6DQ)

Expand Down