acp: add native Zephyr drivers for AMD ACP 7.0 (includes Zephyr west.yml update)#10571
acp: add native Zephyr drivers for AMD ACP 7.0 (includes Zephyr west.yml update)#10571Sivasubramanian678 wants to merge 7 commits intothesofproject:mainfrom
Conversation
|
Can one of the admins verify this patch?
|
|
Dependency: This PR depends on zephyrproject-rtos/zephyr#104450 for native Zephyr ACP 7.0 driver enablement. |
|
test this please |
|
@Sivasubramanian678 can you check the CI, looks like we have some build errors... |
The error that is happening in CI test is because of the dependency of Zephyr PR - zephyrproject-rtos/zephyr#104450 .In that PR we have included the required macro. I think till that PR gets merged CI test won't pass. Is there anyway to avoid this CI test failure? |
No, probably best we get the Zephyr PR merged 1st and then we can rerun CI to make sure all is good. |
lyakh
left a comment
There was a problem hiding this comment.
some parts of this PR also affect non-AMD platforms, just need to be aware and check potential side-effects
|
|
||
| /* imx currently has no IRQ driver in Zephyr so we force to xtos IRQ */ | ||
| #if defined(CONFIG_AMD) | ||
| #ifndef CONFIG_ZEPHYR_NATIVE_DRIVERS |
There was a problem hiding this comment.
so this now will be enabled for all builds that don't set CONFIG_ZEPHYR_NATIVE_DRIVERS
There was a problem hiding this comment.
same alternative as above to limit to just AMD variants
| * to native drivers. | ||
| */ | ||
| #if defined(CONFIG_AMD) | ||
| #ifndef CONFIG_ZEPHYR_NATIVE_DRIVERS |
There was a problem hiding this comment.
this potentially affects other platforms too
There was a problem hiding this comment.
this potentially affects other platforms too
...although currently apparently only AMD has CONFIG_ZEPHYR_NATIVE_DRIVERS=n
There was a problem hiding this comment.
This change was done to maintain backward compatibility for previous generation AMD platform. We will check whether we can update the previous generation platform to native zephyr to avoid this change.
There was a problem hiding this comment.
This seems ok, can @thesofproject/nxp check?
One alternative is to have check: "#if defined(CONFIG_AMD) && !defined(CONFIG_ZEPHYR_NATIVE_DRIVERS)""
|
@Sivasubramanian678 will you rebase when the Zephyr PR is merged and include the west update as a patch in this PR, this should kickstart all the CI too. Thanks ! |
@Sivasubramanian678 any update from Zephyr side ? |
Ping ? |
We have received one approval from Zephyr and are currently waiting for one more. Once that approval is received, the code will be merged. After the Zephyr merge, I will rebase this PR and include the west update as a patch. |
3ef8614 to
6b02daa
Compare
6b02daa to
a531b73
Compare
kv2019i
left a comment
There was a problem hiding this comment.
Looks good, only minor comments below. Let's either have NXP folks ack the ifdef logic (or you change the logic to only apply to AMD configurations).
| * to native drivers. | ||
| */ | ||
| #if defined(CONFIG_AMD) | ||
| #ifndef CONFIG_ZEPHYR_NATIVE_DRIVERS |
There was a problem hiding this comment.
This seems ok, can @thesofproject/nxp check?
One alternative is to have check: "#if defined(CONFIG_AMD) && !defined(CONFIG_ZEPHYR_NATIVE_DRIVERS)""
|
|
||
| /* imx currently has no IRQ driver in Zephyr so we force to xtos IRQ */ | ||
| #if defined(CONFIG_AMD) | ||
| #ifndef CONFIG_ZEPHYR_NATIVE_DRIVERS |
There was a problem hiding this comment.
same alternative as above to limit to just AMD variants
This commit adds support for ACP 7.0 native zephyr and also adds acp_7_0
in zephyr build script.
Changes include:
- Add changes in platform-specific files for ACP 7.0 for
native zephyr support
- Add ACP 7.0 in cmakelist under zephyr
- Remove DMA based scheduling from kconfig for
ACP 7.0
- Add acp_7_0 support in zephyr build script
- Add xtensa files idma.h,xtensa-types.h and
xt_externalregisters.h
- Add UINT32_C macro fallback for stdint.h
compatibility in tie.h
- Replace addi.a with addi in tie-asm.h for Xtensa
assembler compatibility.
This enables native Zephyr-based SOF support for AMD ACP 7.0
hardware platform.
Co-developed-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com>
Signed-off-by: Sivasubramanian <sravisar@amd.com>
Remove legacy chip_offset_byte.h and chip_register.h header files as they are no longer needed with native Zephyr driver support for the 7_0 platform. Co-developed-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: Sivasubramanian <sravisar@amd.com>
Disable COMP_MUX and PROBE and remove AMD_BINARY_BUILD. Co-developed-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: Sivasubramanian <sravisar@amd.com>
This adds SoundWire DAI support for ACP 7.0 native zephyr. Co-developed-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: Sivasubramanian <sravisar@amd.com>
This adds changes for ACP 6.0 non native zephyr support. Co-developed-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: Sivasubramanian <sravisar@amd.com>
This updates the Zephyr revision to include native Zephyr ACP 7.0 drivers (zephyrproject-rtos/zephyr#104450) required for SOF ACP 7.0 platform support. Co-developed-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: DineshKumar Kalva <DineshKumar.Kalva@amd.com> Signed-off-by: Sivasubramanian <sravisar@amd.com>
a531b73 to
6453feb
Compare
|
@kv2019i The requested changes have been completed. Please let me know if any further updates are needed. |
kv2019i
left a comment
There was a problem hiding this comment.
Thanks @Sivasubramanian678 , looks good now!
| idma_hw_error_t err_type; /* ErrorCodes field of the Status reg */ | ||
| uint32_t currDesc; /* Descriptor causing error */ | ||
| uint32_t srcAddr; /* PIF source address causing error */ | ||
| uint32_t dstAddr; /* PIF dest. address causing error */ |
There was a problem hiding this comment.
indentation - also below in structures and functions
| * @retval None | ||
| */ | ||
| IDMA_API void | ||
| idma_hw_wait_all(int32_t ch); |
There was a problem hiding this comment.
can we put all of these on single lines? Makes grepping more informative
| * @retval !IDMA_OK Error type | ||
| */ | ||
| IDMA_API idma_status_t | ||
| idma_init( int32_t ch, |
There was a problem hiding this comment.
there was one more case of a space after an opening bracket above
| * NOTE: Pointer is valid only if idma task/buffer is in error. | ||
| */ | ||
| IDMA_API idma_error_details_t* idma_error_details(int32_t ch); | ||
| IDMA_API idma_error_details_t* idma_buffer_error_details(int32_t ch); |
There was a problem hiding this comment.
the usual format in SOF is type *function(arguments) i.e. * after a space and no space between it and function
| #endif | ||
| IDMA_ENABLE_INTS(); | ||
| return IDMA_OK; | ||
| } |
There was a problem hiding this comment.
oh... ok, it isn't the first time that I see an actual implementation fully in headers, but... SOF doesn't do this usually... @kv2019i @lgirdwood what do you think? Can we put these in a .c file?
| unsigned int RO_CLK1_DFS_STATE_IDLE : 1; | ||
| unsigned int CLK1_CURRENT_DFS_DID : 7; | ||
| unsigned int : 5; | ||
| } bitfields, bits; |
There was a problem hiding this comment.
those bitfields add up to 32 bits, so I'd use uint32_t here explicitly. Same in other similar bit-field cases
Signed-off-by: Sivasubramanian678 <sravisar@amd.com>
This PR adds native Zephyr support for AMD Audio Co-Processor (ACP) version 7.0 for handling Sound Wire IO.