1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2010-2016, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13 * more details.
14 */
15
16#include <linux/kernel.h>
17
18#include "dma.h"
19
20#include "assert_support.h"
21
22#ifndef __INLINE_DMA__
23#include "dma_private.h"
24#endif /* __INLINE_DMA__ */
25
26void
27dma_set_max_burst_size(const dma_ID_t ID, dma_connection conn,
28		       uint32_t max_burst_size)
29{
30	assert(ID < N_DMA_ID);
31	assert(max_burst_size > 0);
32	dma_reg_store(ID, DMA_DEV_INFO_REG_IDX(_DMA_DEV_INTERF_MAX_BURST_IDX, conn),
33		      max_burst_size - 1);
34}
35