1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Support for Intel Camera Imaging ISP subsystem.
4  * Copyright (c) 2015, Intel Corporation.
5  */
6 
7 #ifndef __HMEM_GLOBAL_H_INCLUDED__
8 #define __HMEM_GLOBAL_H_INCLUDED__
9 
10 #include <type_support.h>
11 
12 #define IS_HMEM_VERSION_1
13 
14 #include "isp.h"
15 
16 /*
17 #define ISP_HIST_ADDRESS_BITS                  12
18 #define ISP_HIST_ALIGNMENT                     4
19 #define ISP_HIST_COMP_IN_PREC                  12
20 #define ISP_HIST_DEPTH                         1024
21 #define ISP_HIST_WIDTH                         24
22 #define ISP_HIST_COMPONENTS                    4
23 */
24 #define ISP_HIST_ALIGNMENT_LOG2		2
25 
26 #define HMEM_SIZE_LOG2		(ISP_HIST_ADDRESS_BITS - ISP_HIST_ALIGNMENT_LOG2)
27 #define HMEM_SIZE			ISP_HIST_DEPTH
28 
29 #define HMEM_UNIT_SIZE		(HMEM_SIZE / ISP_HIST_COMPONENTS)
30 #define HMEM_UNIT_COUNT		ISP_HIST_COMPONENTS
31 
32 #define HMEM_RANGE_LOG2		ISP_HIST_WIDTH
33 #define HMEM_RANGE			BIT(HMEM_RANGE_LOG2)
34 
35 typedef u32			hmem_data_t;
36 
37 #endif /* __HMEM_GLOBAL_H_INCLUDED__ */
38