1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2010-2015, Intel Corporation.
5  */
6 
7 #ifndef __IRQ_PRIVATE_H_INCLUDED__
8 #define __IRQ_PRIVATE_H_INCLUDED__
9 
10 #include "irq_public.h"
11 
12 #include "device_access.h"
13 
14 #include "assert_support.h"
15 
irq_reg_store(const irq_ID_t ID,const unsigned int reg,const hrt_data value)16 STORAGE_CLASS_IRQ_C void irq_reg_store(
17     const irq_ID_t		ID,
18     const unsigned int	reg,
19     const hrt_data		value)
20 {
21 	assert(ID < N_IRQ_ID);
22 	assert(IRQ_BASE[ID] != (hrt_address) - 1);
23 	ia_css_device_store_uint32(IRQ_BASE[ID] + reg * sizeof(hrt_data), value);
24 	return;
25 }
26 
irq_reg_load(const irq_ID_t ID,const unsigned int reg)27 STORAGE_CLASS_IRQ_C hrt_data irq_reg_load(
28     const irq_ID_t		ID,
29     const unsigned int	reg)
30 {
31 	assert(ID < N_IRQ_ID);
32 	assert(IRQ_BASE[ID] != (hrt_address) - 1);
33 	return ia_css_device_load_uint32(IRQ_BASE[ID] + reg * sizeof(hrt_data));
34 }
35 
36 #endif /* __IRQ_PRIVATE_H_INCLUDED__ */
37