2018-02-10 05:58:37 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2019-06-26 03:53:48 +08:00
|
|
|
#include <drivers/dma.h>
|
2018-02-10 05:58:37 +08:00
|
|
|
#include <syscall_handler.h>
|
|
|
|
|
|
|
|
/* 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-05-28 00:26:57 +08:00
|
|
|
static inline int z_vrfy_dma_start(struct device *dev, uint32_t channel)
|
2018-02-10 05:58:37 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_DMA(dev, start));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_dma_start((struct device *)dev, channel);
|
2018-02-10 05:58:37 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/dma_start_mrsh.c>
|
2018-02-10 05:58:37 +08:00
|
|
|
|
2020-05-28 00:26:57 +08:00
|
|
|
static inline int z_vrfy_dma_stop(struct device *dev, uint32_t channel)
|
2018-02-10 05:58:37 +08:00
|
|
|
{
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_OOPS(Z_SYSCALL_DRIVER_DMA(dev, stop));
|
2019-03-09 05:19:05 +08:00
|
|
|
return z_impl_dma_stop((struct device *)dev, channel);
|
2018-02-10 05:58:37 +08:00
|
|
|
}
|
2019-08-14 02:34:34 +08:00
|
|
|
#include <syscalls/dma_stop_mrsh.c>
|