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