-
Notifications
You must be signed in to change notification settings - Fork 321
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
nxp: imx8/imx8x: switch to Zephyr native drivers #8863
nxp: imx8/imx8x: switch to Zephyr native drivers #8863
Conversation
23ff73c
to
316a7e7
Compare
316a7e7
to
2c0b416
Compare
Hi there, I thought of checking what's happening around here. I noticed that there may be an opportunity to break bisection (though I may misunderstand something) between the last two commits (a place where you no longer initialise a DMA domain, yet the topology still specifies one). Did you consider swapping the last two commits to avoid this? Other than that I like how this looks! (well except the build errors from the DT, but I guess you're already working on those) |
yep, you're right
that will also break git bisect since the timer domain doesn't work right without the native switch. I think the solution would be to just squash the last 2 commits. |
And use in commit message "switch to native drivers and timer domain", since a lot of changes are also related to timer domain. |
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.
LGTM, giving my +1 so NXP can schedule the merging after validation is complete.
2c0b416
to
2535a9a
Compare
V2 changes
|
2535a9a
to
491fa57
Compare
V3 changes
Opening this up for reviews. Will remove the [DNM] tag when testing is done. |
This PR introduces a small and surprising, https://github.com/thesofproject/sof/actions/runs/8552063499?pr=8863 --- win/build-sof-staging/sof-info/imx8x/zephyr.lst 2024-04-04 09:13:44
+++ lin/build-sof-staging/sof-info/imx8x/zephyr.lst 2024-04-04 09:12:34
@@ -81127,20 +81127,26 @@
92433b0e: 430c movi.n a3, 4
#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
uint32_t instance = LPUART_GetInstance(base);
/* Enable lpuart clock */
(void)CLOCK_EnableClock(s_lpuartClock[instance]);
92433b10: 833441 l32r a4, 924147e0 <_stext+0x1598> (92413034 <s_lpuartClock>)
92433b13: a03340 addx4 a3, a3, a4
92433b16: 03a8 l32i.n a10, a3, 0
+ * @param name Which clock to enable, see \ref clock_ip_name_t.
+ * @return true for success, false for failure.
+ */
+static inline bool CLOCK_EnableClock(clock_ip_name_t name)
+{
+ return CLOCK_EnableClockExt(name, 0);
92433b18: 31e9 s32i.n a14, a1, 12
92433b1a: 00a0b2 movi a11, 0
92433b1d: ffcfa5 call8 92433818 <CLOCK_EnableClockExt>
base->GLOBAL |= LPUART_GLOBAL_RST_MASK;
92433b20: 0020c0 memw
92433b23: 2238 l32i.n a3, a2, 8
92433b25: 240c movi.n a4, 2
92433b27: 203340 or a3, a3, a4
92433b2a: 0020c0 memw
92433b2d: 2239 s32i.n a3, a2, 8 It is triggered by this PR because daily builds are ok: In light of recent events I hope everything understands the importance of reproducible builds. The first thing is to submit the Then, if you don't have BOTH one Linux and one Windows build system, could you please submit draft/throw-away PRs with subsets of this (pretty big) PR to isolate the trigger? |
... unless there is a two-way dependency between this west.yml bump and some of the code changes in this PR. In that case they must be part of the same commit so every commit works. |
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.
Need to root-cause the reproducible builds issue
ACK, started with the |
f0eb12b
to
b2727ae
Compare
b2727ae
to
206ce15
Compare
Rebased |
@LaurentiuM1234 is building on Windows priority for you, it seems the compiler has different behavior here for this platform only. I would say here that this is a second order test vs the 1st order runtime functional test for this platform. I would suggest we comment this platform out from the OS reproducability test and comment in the test that the compiler is generating different code here on Windows vs Linux. You can reference the GH PR and BUG in the comment. We can then move on. @dbaluta this also good with you ? |
Comparing Windows and Linux is the only way the reproducibility test work. |
That fine when the tools are deterministsic and align when used on different OSes, in this case effort is being spent to workaround a compiler bug for a second order test. Today we need to comment out this platform in the test (or report and ignore result for this platform). The compiler will update over time and may align in a future version (when we can re-enable). |
The fix is tested and ready: |
Switch to using Zephyr logging on imx8 and imx8x to prepare for using native Zephyr drivers. Signed-off-by: Laurentiu Mihalcea <[email protected]>
Add nodes for the following IPs: SAI, EDMA and ESAI. Also, add node for HOST_DMA. These are all required for switching to Zephyr native drivers. Signed-off-by: Laurentiu Mihalcea <[email protected]>
Add entry for NXP's ESAI IP in dai_set_config(). Signed-off-by: Laurentiu Mihalcea <[email protected]>
Add entry for NXP's ESAI IP inside the "zephyr_dev" array. What the entry does is it fetches all "struct device"s for ESAI nodes marked as "okay". Signed-off-by: Laurentiu Mihalcea <[email protected]>
Add entries for EDMA0 and HOST_DMA nodes. Signed-off-by: Laurentiu Mihalcea <[email protected]>
This commit includes all necessary changes for switching to timer domain and Zephyr native drivers on imx8 and imx8x. This consists of: 1) Switching all imx8 topologies to timer domain. 2) Disabling Zephyr DMA domain 3) Various interrupt-related fixes via Kconfig-related ifdef logic. This commit includes all necessary changes for switching to native Zephyr drivers on imx8/imx8x. Signed-off-by: Laurentiu Mihalcea <[email protected]>
206ce15
to
23e964e
Compare
Rebased. Let's see the repro builds results after #9071. |
Repro builds are green. Dropping the |
XTOS is no longer supported on imx8. As a consequence, some calls from imx8's platform_init() have become redundant. Remove these calls/initializations as well as those who are redundant because of some configurations that are not enabled (e.g: `CONFIG_TRACE`, or `CONFIG_HAVE_AGENT`). This is a followup for thesofproject#8863. Signed-off-by: Laurentiu Mihalcea <[email protected]>
XTOS is no longer supported on imx8. As a consequence, some calls from imx8's platform_init() have become redundant. Remove these calls/initializations as well as those who are redundant because of some configurations that are not enabled (e.g: `CONFIG_TRACE`, or `CONFIG_HAVE_AGENT`). This is a followup for #8863. Signed-off-by: Laurentiu Mihalcea <[email protected]>
XTOS is no longer supported on imx8. As a consequence, some calls from imx8's platform_init() have become redundant. Remove these calls/initializations as well as those who are redundant because of some configurations that are not enabled (e.g: `CONFIG_TRACE`, or `CONFIG_HAVE_AGENT`). This is a followup for thesofproject#8863. Signed-off-by: Laurentiu Mihalcea <[email protected]>
Note: cleanup will be done in separate PRs after this is merged