1/* 2 * Support for Intel Camera Imaging ISP subsystem. 3 * Copyright (c) 2010-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#ifndef __DMA_PRIVATE_H_INCLUDED__ 16#define __DMA_PRIVATE_H_INCLUDED__ 17 18#include "dma_public.h" 19 20#include "device_access.h" 21 22#include "assert_support.h" 23 24STORAGE_CLASS_DMA_C void dma_reg_store(const dma_ID_t ID, 25 const unsigned int reg, 26 const hrt_data value) 27{ 28 assert(ID < N_DMA_ID); 29 assert(DMA_BASE[ID] != (hrt_address)-1); 30 ia_css_device_store_uint32(DMA_BASE[ID] + reg*sizeof(hrt_data), value); 31} 32 33STORAGE_CLASS_DMA_C hrt_data dma_reg_load(const dma_ID_t ID, 34 const unsigned int reg) 35{ 36 assert(ID < N_DMA_ID); 37 assert(DMA_BASE[ID] != (hrt_address)-1); 38 return ia_css_device_load_uint32(DMA_BASE[ID] + reg*sizeof(hrt_data)); 39} 40 41#endif /* __DMA_PRIVATE_H_INCLUDED__ */ 42