2018-02-09 22:58:37 +01: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-27 00:46:01 +02:00
|
|
|
#include <zephyr/internal/syscall_handler.h>
|
2018-02-09 22:58:37 +01: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 22:58:37 +01:00
|
|
|
{
|
2023-09-27 13:20:28 +02: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 22:58:37 +01:00
|
|
|
}
|
2019-08-13 20:34:34 +02:00
|
|
|
#include <syscalls/dma_start_mrsh.c>
|
2018-02-09 22:58:37 +01: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 22:58:37 +01:00
|
|
|
{
|
2023-09-27 13:20:28 +02: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 22:58:37 +01:00
|
|
|
}
|
2019-08-13 20:34:34 +02:00
|
|
|
#include <syscalls/dma_stop_mrsh.c>
|