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_CMD_QUEUES_CONFIG_H__
21 #define __ACAMERA_CMD_QUEUES_CONFIG_H__
22
23
24 #include "system_sw_io.h"
25
26 #include "system_hw_io.h"
27
28 // ------------------------------------------------------------------------------ //
29 // Instance 'cmd_queues' of module 'cmd_queues'
30 // ------------------------------------------------------------------------------ //
31
32 #define ACAMERA_CMD_QUEUES_BASE_ADDR (0x108L)
33 #define ACAMERA_CMD_QUEUES_SIZE (0x400)
34
35 #define ACAMERA_CMD_QUEUES_ARRAY_DATA_DEFAULT (0x0)
36 #define ACAMERA_CMD_QUEUES_ARRAY_DATA_DATASIZE (32)
37 #define ACAMERA_CMD_QUEUES_ARRAY_DATA_OFFSET (0x108L)
38
39 // args: index (0-255), data (32-bit)
acamera_cmd_queues_array_data_write(uintptr_t base,uint32_t index,uint32_t data)40 static __inline void acamera_cmd_queues_array_data_write( uintptr_t base, uint32_t index, uint32_t data) {
41 system_hw_write_32(0x108L + (index << 2), data);
42 }
acamera_cmd_queues_array_data_read(uintptr_t base,uint32_t index)43 static __inline uint32_t acamera_cmd_queues_array_data_read( uintptr_t base, uint32_t index) {
44 return system_hw_read_32(0x108L + (index << 2));
45 }
46 // ------------------------------------------------------------------------------ //
47 #endif //__ACAMERA_CMD_QUEUES_CONFIG_H__
48