GNU Linux-libre 4.14.303-gnu1
[releases.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / css_2401_csi2p_system / host / isys_dma.c
1 /*
2  * Support for Intel Camera Imaging ISP subsystem.
3  * Copyright (c) 2015, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU General Public License,
7  * version 2, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12  * more details.
13  */
14
15 #include "isys_dma.h"
16 #include "assert_support.h"
17
18 #ifndef __INLINE_ISYS2401_DMA__
19 /*
20  * Include definitions for isys dma register access functions. isys_dma.h
21  * includes declarations of these functions by including isys_dma_public.h.
22  */
23 #include "isys_dma_private.h"
24 #endif
25
26 const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID] = {
27         N_ISYS2401_DMA_CHANNEL
28 };
29
30 void isys2401_dma_set_max_burst_size(
31         const isys2401_dma_ID_t dma_id,
32         uint32_t                max_burst_size)
33 {
34         assert(dma_id < N_ISYS2401_DMA_ID);
35         assert((max_burst_size > 0x00) && (max_burst_size <= 0xFF));
36
37         isys2401_dma_reg_store(dma_id,
38                 DMA_DEV_INFO_REG_IDX(_DMA_V2_DEV_INTERF_MAX_BURST_IDX, HIVE_DMA_BUS_DDR_CONN),
39                 (max_burst_size - 1));
40 }