2018-02-10 05:58:37 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <dma.h>
|
|
|
|
#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
|
|
|
|
*/
|
|
|
|
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_SYSCALL_HANDLER(dma_start, dev, 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
|
|
|
}
|
|
|
|
|
2018-05-05 06:57:57 +08:00
|
|
|
Z_SYSCALL_HANDLER(dma_stop, dev, 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
|
|
|
}
|
|
|
|
|