3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
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.
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
17 Support for Intel Camera Imaging ISP subsystem.
18 Copyright (c) 2010 - 2015, Intel Corporation.
20 This program is free software; you can redistribute it and/or modify it
21 under the terms and conditions of the GNU General Public License,
22 version 2, as published by the Free Software Foundation.
24 This program is distributed in the hope it will be useful, but WITHOUT
25 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
31 #ifndef __IA_CSS_SPCTRL_H__
32 #define __IA_CSS_SPCTRL_H__
34 #include <system_global.h>
35 #include <ia_css_err.h>
36 #include "ia_css_spctrl_comm.h"
40 uint32_t ddr_data_offset; /**< posistion of data in DDR */
41 uint32_t dmem_data_addr; /**< data segment address in dmem */
42 uint32_t dmem_bss_addr; /**< bss segment address in dmem */
43 uint32_t data_size; /**< data segment size */
44 uint32_t bss_size; /**< bss segment size */
45 uint32_t spctrl_config_dmem_addr; /** <location of dmem_cfg in SP dmem */
46 uint32_t spctrl_state_dmem_addr; /** < location of state in SP dmem */
47 unsigned int sp_entry; /** < entry function ptr on SP */
48 const void *code; /**< location of firmware */
50 char *program_name; /**< not used on hardware, only for simulation */
53 /* Get the code addr in DDR of SP */
54 hrt_vaddress get_sp_code_addr(sp_ID_t sp_id);
56 /* ! Load firmware on to specfied SP
58 enum ia_css_err ia_css_spctrl_load_fw(sp_ID_t sp_id,
59 ia_css_spctrl_cfg *spctrl_cfg);
62 /*! Setup registers for reloading FW */
63 void sh_css_spctrl_reload_fw(sp_ID_t sp_id);
66 /*! Unload/release any memory allocated to hold the firmware
68 enum ia_css_err ia_css_spctrl_unload_fw(sp_ID_t sp_id);
71 /*! Intilaize dmem_cfg in SP dmem and start SP program
73 enum ia_css_err ia_css_spctrl_start(sp_ID_t sp_id);
77 enum ia_css_err ia_css_spctrl_stop(sp_ID_t sp_id);
79 /*! Query the state of SP
81 ia_css_spctrl_sp_sw_state ia_css_spctrl_get_state(sp_ID_t sp_id);
83 /*! Check if SP is idle/ready
85 int ia_css_spctrl_is_idle(sp_ID_t sp_id);
87 #endif /* __IA_CSS_SPCTRL_H__ */