-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: nrf: add support for forcing out-of-tree drivers #14509
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
drivers: nrf: add support for forcing out-of-tree drivers #14509
Conversation
9dda35e to
9b25a33
Compare
Codecov Report
@@ Coverage Diff @@
## master #14509 +/- ##
=======================================
Coverage 51.96% 51.96%
=======================================
Files 309 309
Lines 45576 45576
Branches 10554 10554
=======================================
Hits 23683 23683
Misses 17083 17083
Partials 4810 4810Continue to review full report at Codecov.
|
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.
This is a workaround so the following items need to be addressed:
- Open an issue describing the more general problem and link to it in the commit an dPR
- Change the names so that they are NRF-only
- Depend on SOC_COMPATIBLE_NRF
9b25a33 to
54d99bc
Compare
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.
@aescolar filled me in a bit re. the dev. meeting.
I think it's better to keep this as a local one-off hack until it's needed more broadly (hopefully it won't be). Just be careful so that the one-off doesn't get copied to a bunch of places. :)
54d99bc to
4b329b5
Compare
|
The shippable failed, but when skimming through the log it looked like xtensa things failed. I rebased with changes from master and pushed again. @carlescufi is there anything missing? |
|
I propose to drop the out-of-tree naming and call it alternate or something along those lines. This concept should also work with 2 compatible drivers in the same tree. |
|
@thomasstenersen @nashif I agree with the proposal, I never liked
or we could use the |
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.
Waiting for agreement on naming
|
If you are OK with |
4b329b5 to
c1d0fa6
Compare
|
@nashif @carlescufi I changed the name to |
drivers/clock_control/Kconfig.nrf
Outdated
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.
Can you update the descriptions so that they reflect "force alternative implementation"?
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.
i.e. not refer to out-of-tree but rather keep it focused on what it actually does
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.
Changed.
c1d0fa6 to
e9346ea
Compare
An external project extending the Zephyr RTOS and its drivers may have subsystems that must use its own specific driver(s) when active. One example is the nRF5x NVMC that must be scheduled in between radio operations. A subsystem may also be dependent on its own drivers for security, real-time and/or because of hardware constrains. In order to not introduce non-Zephyr specific code into the Zephyr tree, an option is added to disable the in-tree drivers in Zephyr. Because Kconfig does not support a good way of de-selecting other symbols, a variable on the form `<DRIVER>_FORCE_ALT` is added as a dependency for each `<DRIVER>`. For example, the out-of-tree subsystem will select `FLASH_NRF_FORCE_ALT` to disable the in-tree driver. A solution for issue zephyrproject-rtos#8181 would open up for a more general solution, however zephyrproject-rtos#8181 requires significant effort. Support for out-of-tree drivers is added to Nordic drivers for clock_control, entropy and flash. A generic solution for this is desired. Issue zephyrproject-rtos#14527 is tracking that progress. Signed-off-by: Thomas Stenersen <[email protected]>
e9346ea to
b127536
Compare
|
Shippable failed (timed out apparently?), rebased on top of master to try this again. |
An external project extending the Zephyr RTOS and its drivers may have
subsystems that must use its own specific driver(s) when active. One
example is the nRF5x NVMC that must be scheduled in between radio
operations. A subsystem may also be dependent on its own drivers for
security, real-time and/or because of hardware constrains.
In order to not introduce non-Zephyr specific code into the Zephyr tree,
an option is added to disable the in-tree drivers in Zephyr. Because
Kconfig does not support a good way of de-selecting other symbols, a
variable on the form
<DRIVER>_OUT_OF_TREE_DRIVERis added as adependency for each
<DRIVER>. For example, the out-of-tree subsystemwill select
FLASH_OUT_OF_TREE_DRIVERto disable the in-tree driver. Asolution for issue #8181 would open up for a more general solution,
however #8181 requires significant effort.
Support for out-of-tree drivers is added to Nordic drivers for
clock_control, entropy and flash.
See #13631 for earlier discussion.
Signed-off-by: Thomas Stenersen [email protected]