-
Notifications
You must be signed in to change notification settings - Fork 88
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
libethdrivers,imx: Reintroduce ethif_imx6_init #112
base: master
Are you sure you want to change the base?
Conversation
6cd1706
to
4f68ed7
Compare
This init function is used by ethif_new_lwip_driver and was previously removed in an earlier refactor. This commit reintroduces it. Signed-off-by: Kent McLeod <[email protected]>
Add NIC_CONFIG_NO_CLOCK_SYS flag which prevents the ethernet driver from trying to initialize a clock_sys driver (which requires CCM hardware resources) during initialization. This flag should be used when the clocks are setup independently from the driver. Signed-off-by: Kent McLeod <[email protected]>
4f68ed7
to
b6a47d9
Compare
ret = -ENODEV; | ||
return -1; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a missing return 0 here.
As a follow-up, should we have a CI test that a system using LWIP still builds? Since i.MX6 i supported in QEMU, we could later even add a check that this actually works |
This would be the closest: seL4/camkes#13 |
@@ -10,14 +10,14 @@ | |||
#include <ethdrivers/imx6.h> | |||
#include <utils/attribute.h> | |||
#include <ethdrivers/raw.h> | |||
#include "../src/plat/imx6/enet.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly we had to include this here to address a nasty include problem and make these prototypes available to other C file in our driver:
int enet_mdio_read(struct enet *enet, uint16_t phy, uint16_t reg);
int enet_mdio_write(struct enet *enet, uint16_t phy, uint16_t reg, uint16_t data);
Could you leave this in for now. I'd make this a separate issue (#116) than that should be cleaned up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem possible to declare just those symbols at the bottom of this file:
int enet_mdio_read(struct enet* enet, uint16_t phy, uint16_t reg);
int enet_mdio_write(struct enet* enet, uint16_t phy, uint16_t reg, uint16_t data);
Adding a relative include into a private header file breaks if these public headers are installed somewhere else which breaks how I'm using the library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sounds feasible, I don't remember why we did not do this. Can you put removing this header here in a separate commit, so this is separate from adding the NIC_CONFIG_NO_CLOCK_SYS
flag or adding the interface again?
I'm fine with merging this when the style issue and the missing return are addressed. Leaving the include file for now is a nice-to-have thing. |
@kent-mcleod: do you want to merge this? |
This init function is used by ethif_new_lwip_driver and was previously
removed in an earlier refactor. This commit reintroduces it.
Signed-off-by: Kent McLeod [email protected]