2018-02-09 13:58:37 -08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 10:25:46 +02:00
|
|
|
#include <zephyr/drivers/dma.h>
|
2023-09-26 22:46:01 +00:00
|
|
|
#include <zephyr/internal/syscall_handler.h>
|
2018-02-09 13:58:37 -08:00
|
|
|
|
|
|
|
/* Both of these APIs are assuming that the drive implementations are checking
|
|
|
|
* the validity of the channel ID and returning -errno if it's bogus
|
|
|
|
*/
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static inline int z_vrfy_dma_start(const struct device *dev, uint32_t channel)
|
2018-02-09 13:58:37 -08:00
|
|
|
{
|
2023-09-27 11:20:28 +00:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_DMA(dev, start));
|
2020-04-30 20:33:38 +02:00
|
|
|
return z_impl_dma_start((const struct device *)dev, channel);
|
2018-02-09 13:58:37 -08:00
|
|
|
}
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/dma_start_mrsh.c>
|
2018-02-09 13:58:37 -08:00
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static inline int z_vrfy_dma_stop(const struct device *dev, uint32_t channel)
|
2018-02-09 13:58:37 -08:00
|
|
|
{
|
2023-09-27 11:20:28 +00:00
|
|
|
K_OOPS(K_SYSCALL_DRIVER_DMA(dev, stop));
|
2020-04-30 20:33:38 +02:00
|
|
|
return z_impl_dma_stop((const struct device *)dev, channel);
|
2018-02-09 13:58:37 -08:00
|
|
|
}
|
2024-01-24 17:35:04 +08:00
|
|
|
#include <zephyr/syscalls/dma_stop_mrsh.c>
|