1f5fbb83fSMauro Carvalho Chehab /* SPDX-License-Identifier: GPL-2.0 */ 29d4fa1a1SMauro Carvalho Chehab /* 39d4fa1a1SMauro Carvalho Chehab * Support for Intel Camera Imaging ISP subsystem. 49d4fa1a1SMauro Carvalho Chehab * Copyright (c) 2015, Intel Corporation. 59d4fa1a1SMauro Carvalho Chehab * 69d4fa1a1SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify it 79d4fa1a1SMauro Carvalho Chehab * under the terms and conditions of the GNU General Public License, 89d4fa1a1SMauro Carvalho Chehab * version 2, as published by the Free Software Foundation. 99d4fa1a1SMauro Carvalho Chehab * 109d4fa1a1SMauro Carvalho Chehab * This program is distributed in the hope it will be useful, but WITHOUT 119d4fa1a1SMauro Carvalho Chehab * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 129d4fa1a1SMauro Carvalho Chehab * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 139d4fa1a1SMauro Carvalho Chehab * more details. 149d4fa1a1SMauro Carvalho Chehab */ 159d4fa1a1SMauro Carvalho Chehab 169d4fa1a1SMauro Carvalho Chehab #ifndef _HRT_HIVE_TYPES_H 179d4fa1a1SMauro Carvalho Chehab #define _HRT_HIVE_TYPES_H 189d4fa1a1SMauro Carvalho Chehab 199d4fa1a1SMauro Carvalho Chehab #include "version.h" 209d4fa1a1SMauro Carvalho Chehab #include "defs.h" 219d4fa1a1SMauro Carvalho Chehab 229d4fa1a1SMauro Carvalho Chehab #ifndef HRTCAT3 239d4fa1a1SMauro Carvalho Chehab #define _HRTCAT3(m, n, o) m##n##o 249d4fa1a1SMauro Carvalho Chehab #define HRTCAT3(m, n, o) _HRTCAT3(m, n, o) 259d4fa1a1SMauro Carvalho Chehab #endif 269d4fa1a1SMauro Carvalho Chehab 279d4fa1a1SMauro Carvalho Chehab #ifndef HRTCAT4 289d4fa1a1SMauro Carvalho Chehab #define _HRTCAT4(m, n, o, p) m##n##o##p 299d4fa1a1SMauro Carvalho Chehab #define HRTCAT4(m, n, o, p) _HRTCAT4(m, n, o, p) 309d4fa1a1SMauro Carvalho Chehab #endif 319d4fa1a1SMauro Carvalho Chehab 329d4fa1a1SMauro Carvalho Chehab #ifndef HRTMIN 339d4fa1a1SMauro Carvalho Chehab #define HRTMIN(a, b) (((a) < (b)) ? (a) : (b)) 349d4fa1a1SMauro Carvalho Chehab #endif 359d4fa1a1SMauro Carvalho Chehab 369d4fa1a1SMauro Carvalho Chehab #ifndef HRTMAX 379d4fa1a1SMauro Carvalho Chehab #define HRTMAX(a, b) (((a) > (b)) ? (a) : (b)) 389d4fa1a1SMauro Carvalho Chehab #endif 399d4fa1a1SMauro Carvalho Chehab 409d4fa1a1SMauro Carvalho Chehab /* boolean data type */ 419d4fa1a1SMauro Carvalho Chehab typedef unsigned int hive_bool; 429d4fa1a1SMauro Carvalho Chehab #define hive_false 0 439d4fa1a1SMauro Carvalho Chehab #define hive_true 1 449d4fa1a1SMauro Carvalho Chehab 459d4fa1a1SMauro Carvalho Chehab typedef char hive_int8; 469d4fa1a1SMauro Carvalho Chehab typedef short hive_int16; 479d4fa1a1SMauro Carvalho Chehab typedef int hive_int32; 489d4fa1a1SMauro Carvalho Chehab typedef long long hive_int64; 499d4fa1a1SMauro Carvalho Chehab 509d4fa1a1SMauro Carvalho Chehab typedef unsigned char hive_uint8; 519d4fa1a1SMauro Carvalho Chehab typedef unsigned short hive_uint16; 529d4fa1a1SMauro Carvalho Chehab typedef unsigned int hive_uint32; 539d4fa1a1SMauro Carvalho Chehab typedef unsigned long long hive_uint64; 549d4fa1a1SMauro Carvalho Chehab 559d4fa1a1SMauro Carvalho Chehab #define HRT_DATA_WIDTH 32 56a6154805SMauro Carvalho Chehab #define HRT_ADDRESS_WIDTH 64 579d4fa1a1SMauro Carvalho Chehab #define HRT_DATA_BYTES (HRT_DATA_WIDTH / 8) 589d4fa1a1SMauro Carvalho Chehab #define HRT_ADDRESS_BYTES (HRT_ADDRESS_WIDTH / 8) 59a6154805SMauro Carvalho Chehab #define SIZEOF_HRT_REG (HRT_DATA_WIDTH >> 3) 609d4fa1a1SMauro Carvalho Chehab 619d4fa1a1SMauro Carvalho Chehab typedef hive_uint32 hrt_data; 629d4fa1a1SMauro Carvalho Chehab typedef hive_uint64 hrt_address; 639d4fa1a1SMauro Carvalho Chehab 649d4fa1a1SMauro Carvalho Chehab /* use 64 bit addresses in simulation, where possible */ 659d4fa1a1SMauro Carvalho Chehab typedef hive_uint64 hive_sim_address; 669d4fa1a1SMauro Carvalho Chehab 679d4fa1a1SMauro Carvalho Chehab /* below is for csim, not for hrt, rename and move this elsewhere */ 689d4fa1a1SMauro Carvalho Chehab 699d4fa1a1SMauro Carvalho Chehab typedef unsigned int hive_uint; 709d4fa1a1SMauro Carvalho Chehab typedef hive_uint32 hive_address; 719d4fa1a1SMauro Carvalho Chehab typedef hive_address hive_slave_address; 729d4fa1a1SMauro Carvalho Chehab typedef hive_address hive_mem_address; 739d4fa1a1SMauro Carvalho Chehab 749d4fa1a1SMauro Carvalho Chehab /* MMIO devices */ 759d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_mmio_id; 769d4fa1a1SMauro Carvalho Chehab typedef hive_mmio_id hive_slave_id; 779d4fa1a1SMauro Carvalho Chehab typedef hive_mmio_id hive_port_id; 789d4fa1a1SMauro Carvalho Chehab typedef hive_mmio_id hive_master_id; 799d4fa1a1SMauro Carvalho Chehab typedef hive_mmio_id hive_mem_id; 809d4fa1a1SMauro Carvalho Chehab typedef hive_mmio_id hive_dev_id; 819d4fa1a1SMauro Carvalho Chehab typedef hive_mmio_id hive_fifo_id; 829d4fa1a1SMauro Carvalho Chehab 839d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_hier_id; 849d4fa1a1SMauro Carvalho Chehab typedef hive_hier_id hive_device_id; 859d4fa1a1SMauro Carvalho Chehab typedef hive_device_id hive_proc_id; 869d4fa1a1SMauro Carvalho Chehab typedef hive_device_id hive_cell_id; 879d4fa1a1SMauro Carvalho Chehab typedef hive_device_id hive_host_id; 889d4fa1a1SMauro Carvalho Chehab typedef hive_device_id hive_bus_id; 899d4fa1a1SMauro Carvalho Chehab typedef hive_device_id hive_bridge_id; 909d4fa1a1SMauro Carvalho Chehab typedef hive_device_id hive_fifo_adapter_id; 919d4fa1a1SMauro Carvalho Chehab typedef hive_device_id hive_custom_device_id; 929d4fa1a1SMauro Carvalho Chehab 939d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_slot_id; 949d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_fu_id; 959d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_reg_file_id; 969d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_reg_id; 979d4fa1a1SMauro Carvalho Chehab 989d4fa1a1SMauro Carvalho Chehab /* Streaming devices */ 999d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_outport_id; 1009d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_inport_id; 1019d4fa1a1SMauro Carvalho Chehab 1029d4fa1a1SMauro Carvalho Chehab typedef hive_uint hive_msink_id; 1039d4fa1a1SMauro Carvalho Chehab 1049d4fa1a1SMauro Carvalho Chehab /* HRT specific */ 1059d4fa1a1SMauro Carvalho Chehab typedef char *hive_program; 1069d4fa1a1SMauro Carvalho Chehab typedef char *hive_function; 1079d4fa1a1SMauro Carvalho Chehab 1089d4fa1a1SMauro Carvalho Chehab #endif /* _HRT_HIVE_TYPES_H */ 109