-
Notifications
You must be signed in to change notification settings - Fork 349
lib: dma: add support for user-space usage #10341
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
Changes from all commits
55dc2e8
df76365
553b0f2
0a79248
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ DECLARE_TR_CTX(dma_tr, SOF_UUID(dma_uuid), LOG_LEVEL_INFO); | |
| #if CONFIG_ZEPHYR_NATIVE_DRIVERS | ||
| static int dma_init(struct sof_dma *dma); | ||
|
|
||
| struct sof_dma *sof_dma_get(uint32_t dir, uint32_t cap, uint32_t dev, uint32_t flags) | ||
| struct sof_dma *z_impl_sof_dma_get(uint32_t dir, uint32_t cap, uint32_t dev, uint32_t flags) | ||
| { | ||
| const struct dma_info *info = dma_info_get(); | ||
| int users, ret = 0; | ||
|
|
@@ -129,7 +129,7 @@ struct sof_dma *sof_dma_get(uint32_t dir, uint32_t cap, uint32_t dev, uint32_t f | |
| return !ret ? dmin : NULL; | ||
| } | ||
|
|
||
| void sof_dma_put(struct sof_dma *dma) | ||
| void z_impl_sof_dma_put(struct sof_dma *dma) | ||
| { | ||
| k_spinlock_key_t key; | ||
|
|
||
|
|
@@ -168,8 +168,8 @@ static int dma_init(struct sof_dma *dma) | |
|
|
||
| return 0; | ||
| } | ||
| EXPORT_SYMBOL(sof_dma_get); | ||
| EXPORT_SYMBOL(sof_dma_put); | ||
| EXPORT_SYMBOL(z_impl_sof_dma_get); | ||
| EXPORT_SYMBOL(z_impl_sof_dma_put); | ||
|
Comment on lines
+171
to
+172
|
||
| #else | ||
| struct dma *dma_get(uint32_t dir, uint32_t cap, uint32_t dev, uint32_t flags) | ||
| { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -490,6 +490,12 @@ if(NOT DEFINED PLATFORM) | |
| endif() | ||
| zephyr_include_directories(${SOF_PLATFORM_PATH}/${PLATFORM}/include) | ||
|
|
||
| zephyr_library_sources_ifdef(CONFIG_USERSPACE | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we now have several config options around userspace, i.e. one for DP only and one for DP + infra.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lgirdwood This is the canonical one defined in Zephyr and used all over Zephyr code when defining syscalls (in a way that still builds if user-space is not enabled in the build). I try to follow style and convetions of Zephyr even if these particular syscalls are on SOF side.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got you - so we cant drill down further for the syscalls today |
||
| syscall/sof_dma.c | ||
| ) | ||
|
|
||
| zephyr_syscall_header(include/sof/lib/sof_dma.h) | ||
|
|
||
| # Mandatory Files used on all platforms. | ||
| # Commented files will be added/removed as integration dictates. | ||
| zephyr_library_sources( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.