/* * drivers/char/dma_test/sunxi_dma_test.h * * Copyright(c) 2013-2015 Allwinnertech Co., Ltd. * http://www.allwinnertech.com * * Author: liugang * * sunxi dma test driver * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #ifndef __SUNXI_DMA_TEST_H #define __SUNXI_DMA_TEST_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include enum dma_test_case_e { DTC_MEMCPY_SINGLE_CHAN, DTC_MEMCPY_MULTI_CHAN, DTC_MAX }; extern wait_queue_head_t g_dtc_queue[]; extern atomic_t g_adma_done; #define BUF_MAX_CNT 8 #define DMA_MAX_CHAN 6 typedef struct { unsigned int src_va; unsigned int src_pa; unsigned int dst_va; unsigned int dst_pa; unsigned int size; }buf_item; typedef struct { unsigned int cnt; buf_item item[BUF_MAX_CNT]; }buf_group; typedef struct { struct dma_chan *chan; /* dma channel handle */ wait_queue_head_t dma_wq; /* wait dma transfer done */ atomic_t dma_done; /* dma done flag, used with dma_wq */ }chan_info; #endif /* __SUNXI_DMA_TEST_H */