1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2010 - 2015, Intel Corporation. 5 */ 6 7 #ifndef __IA_CSS_SPCTRL_COMM_H__ 8 #define __IA_CSS_SPCTRL_COMM_H__ 9 10 #include <linux/build_bug.h> 11 12 #include <type_support.h> 13 14 /* state of SP */ 15 typedef enum { 16 IA_CSS_SP_SW_TERMINATED = 0, 17 IA_CSS_SP_SW_INITIALIZED, 18 IA_CSS_SP_SW_CONNECTED, 19 IA_CSS_SP_SW_RUNNING 20 } ia_css_spctrl_sp_sw_state; 21 22 /* Structure to encapsulate required arguments for 23 * initialization of SP DMEM using the SP itself 24 */ 25 struct ia_css_sp_init_dmem_cfg { 26 ia_css_ptr ddr_data_addr; /** data segment address in ddr */ 27 u32 dmem_data_addr; /** data segment address in dmem */ 28 u32 dmem_bss_addr; /** bss segment address in dmem */ 29 u32 data_size; /** data segment size */ 30 u32 bss_size; /** bss segment size */ 31 sp_ID_t sp_id; /* <sp Id */ 32 }; 33 34 #define SIZE_OF_IA_CSS_SP_INIT_DMEM_CFG_STRUCT \ 35 (1 * SIZE_OF_IA_CSS_PTR) + \ 36 (4 * sizeof(uint32_t)) + \ 37 (1 * sizeof(sp_ID_t)) 38 39 static_assert(sizeof(struct ia_css_sp_init_dmem_cfg) == SIZE_OF_IA_CSS_SP_INIT_DMEM_CFG_STRUCT); 40 41 #endif /* __IA_CSS_SPCTRL_COMM_H__ */ 42