1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2, as published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 * more details. 14 */ 15 16 #ifndef _HRT_HIVE_TYPES_H 17 #define _HRT_HIVE_TYPES_H 18 19 #include "version.h" 20 21 /* boolean data type */ 22 typedef unsigned int hive_bool; 23 #define hive_false 0 24 #define hive_true 1 25 26 typedef signed char hive_int8; 27 typedef short hive_int16; 28 typedef int hive_int32; 29 typedef long long hive_int64; 30 31 typedef unsigned char hive_uint8; 32 typedef unsigned short hive_uint16; 33 typedef unsigned int hive_uint32; 34 typedef unsigned long long hive_uint64; 35 36 #define HRT_DATA_WIDTH 32 37 #define HRT_ADDRESS_WIDTH 64 38 #define HRT_DATA_BYTES (HRT_DATA_WIDTH / 8) 39 #define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH / 8) 40 #define SIZEOF_HRT_REG (HRT_DATA_WIDTH >> 3) 41 42 typedef hive_uint32 hrt_data; 43 typedef hive_uint64 hrt_address; 44 45 /* use 64 bit addresses in simulation, where possible */ 46 typedef hive_uint64 hive_sim_address; 47 48 /* below is for csim, not for hrt, rename and move this elsewhere */ 49 50 typedef unsigned int hive_uint; 51 typedef hive_uint32 hive_address; 52 typedef hive_address hive_slave_address; 53 typedef hive_address hive_mem_address; 54 55 /* MMIO devices */ 56 typedef hive_uint hive_mmio_id; 57 typedef hive_mmio_id hive_slave_id; 58 typedef hive_mmio_id hive_port_id; 59 typedef hive_mmio_id hive_master_id; 60 typedef hive_mmio_id hive_mem_id; 61 typedef hive_mmio_id hive_dev_id; 62 typedef hive_mmio_id hive_fifo_id; 63 64 typedef hive_uint hive_hier_id; 65 typedef hive_hier_id hive_device_id; 66 typedef hive_device_id hive_proc_id; 67 typedef hive_device_id hive_cell_id; 68 typedef hive_device_id hive_host_id; 69 typedef hive_device_id hive_bus_id; 70 typedef hive_device_id hive_bridge_id; 71 typedef hive_device_id hive_fifo_adapter_id; 72 typedef hive_device_id hive_custom_device_id; 73 74 typedef hive_uint hive_slot_id; 75 typedef hive_uint hive_fu_id; 76 typedef hive_uint hive_reg_file_id; 77 typedef hive_uint hive_reg_id; 78 79 /* Streaming devices */ 80 typedef hive_uint hive_outport_id; 81 typedef hive_uint hive_inport_id; 82 83 typedef hive_uint hive_msink_id; 84 85 /* HRT specific */ 86 typedef char *hive_program; 87 typedef char *hive_function; 88 89 #endif /* _HRT_HIVE_TYPES_H */ 90