• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 *
3 * SPDX-License-Identifier: GPL-2.0
4 *
5 * Copyright (C) 2011-2018 ARM or its affiliates
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 2.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 *
18 */
19 
20 #ifndef __ACAMERA_METERING_STATS_MEM_CONFIG_H__
21 #define __ACAMERA_METERING_STATS_MEM_CONFIG_H__
22 
23 
24 #include "system_sw_io.h"
25 
26 #include "system_hw_io.h"
27 
28 // ------------------------------------------------------------------------------ //
29 // Instance 'metering_stats_ping_mem' of module 'metering_stats_ping_mem'
30 // ------------------------------------------------------------------------------ //
31 
32 #define ACAMERA_METERING_STATS_MEM_BASE_ADDR (0x44b0L)
33 #define ACAMERA_METERING_STATS_MEM_SIZE (0x8000)
34 
35 #define ACAMERA_METERING_STATS_MEM_ARRAY_DATA_DEFAULT (0x0)
36 #define ACAMERA_METERING_STATS_MEM_ARRAY_DATA_DATASIZE (32)
37 #define ACAMERA_METERING_STATS_MEM_ARRAY_DATA_OFFSET (0x44b0L)
38 
39 // args: index (0-6574), data (32-bit)
acamera_metering_stats_mem_array_data_write(uintptr_t base,uint32_t index,uint32_t data)40 static __inline void acamera_metering_stats_mem_array_data_write( uintptr_t base, uint32_t index, uint32_t data) {
41     system_sw_write_32(base + 0x44b0L + (index << 2), data);
42 }
acamera_metering_stats_mem_array_data_read(uintptr_t base,uint32_t index)43 static __inline uint32_t acamera_metering_stats_mem_array_data_read( uintptr_t base, uint32_t index) {
44     return system_sw_read_32(base + 0x44b0L + (index << 2));
45 }
46 // ------------------------------------------------------------------------------ //
47 #endif //__ACAMERA_METERING_STATS_MEM_CONFIG_H__
48