1 /*
2  * Copyright (c) 2018 Intel Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/drivers/dma.h>
8 #include <zephyr/internal/syscall_handler.h>
9 
10 /* Both of these APIs are assuming that the drive implementations are checking
11  * the validity of the channel ID and returning -errno if it's bogus
12  */
13 
z_vrfy_dma_start(const struct device * dev,uint32_t channel)14 static inline int z_vrfy_dma_start(const struct device *dev, uint32_t channel)
15 {
16 	K_OOPS(K_SYSCALL_DRIVER_DMA(dev, start));
17 	return z_impl_dma_start((const struct device *)dev, channel);
18 }
19 #include <syscalls/dma_start_mrsh.c>
20 
z_vrfy_dma_stop(const struct device * dev,uint32_t channel)21 static inline int z_vrfy_dma_stop(const struct device *dev, uint32_t channel)
22 {
23 	K_OOPS(K_SYSCALL_DRIVER_DMA(dev, stop));
24 	return z_impl_dma_stop((const struct device *)dev, channel);
25 }
26 #include <syscalls/dma_stop_mrsh.c>
27