Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b00d64c authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

atomisp: remove dead code



HAS_SEC_ISP is never defined so we can scrub all the code that is within the
defines for it.

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 08d6ccf3
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -185,11 +185,6 @@ ia_css_spctrl_sp_sw_state ia_css_spctrl_get_state(sp_ID_t sp_id)
	(void)HIVE_ADDR_sp_sw_state; /* Suppres warnings in CRUN */
	if (sp_id == SP0_ID)
		state = sp_dmem_load_uint32(sp_id, (unsigned)sp_address_of(sp_sw_state));
#if defined(HAS_SEC_SP)
	else
		state = sp_dmem_load_uint32(sp_id, (unsigned)sp1_address_of(sp_sw_state));
#endif /* HAS_SEC_SP */

	return state;
}

+1 −109
Original line number Diff line number Diff line
@@ -103,9 +103,6 @@ static int thread_alive;

/* Name of the sp program: should not be built-in */
#define SP_PROG_NAME "sp"
#if defined(HAS_SEC_SP)
#define SP1_PROG_NAME "sp1"
#endif /* HAS_SEC_SP */
#if defined(HAS_BL)
#define BL_PROG_NAME "bootloader"
#endif
@@ -415,14 +412,6 @@ static void get_pipe_extra_pixel(struct ia_css_pipe *pipe,
		unsigned int *extra_row, unsigned int *extra_column);
#endif

#if defined(HAS_SEC_SP)
static enum ia_css_err
sh_css_start_sp1(void);

static enum ia_css_err
sh_css_stop_sp1(void);
#endif

#ifdef ISP2401
#ifdef USE_INPUT_SYSTEM_VERSION_2401
static enum ia_css_err
@@ -1725,9 +1714,6 @@ ia_css_init(const struct ia_css_env *env,
#if defined(HAS_BL)
	ia_css_blctrl_cfg blctrl_cfg;
#endif
#if defined(HAS_SEC_SP)
	ia_css_spctrl_cfg sp1ctrl_cfg;
#endif /* HAS_SEC_SP */

	void *(*malloc_func)(size_t size, bool zero_mem);
	void (*free_func)(void *ptr);
@@ -1890,15 +1876,6 @@ ia_css_init(const struct ia_css_env *env,
		IA_CSS_LEAVE_ERR(err);
		return err;
	}
#if defined(HAS_SEC_SP)
	if(!sh_css_setup_spctrl_config(&sh_css_sp1_fw,SP1_PROG_NAME,&sp1ctrl_cfg))
		return IA_CSS_ERR_INTERNAL_ERROR;
	err = ia_css_spctrl_load_fw(SP1_ID, &sp1ctrl_cfg);
	if (err != IA_CSS_SUCCESS) {
		IA_CSS_LEAVE_ERR(err);
		return err;
	}
#endif /* HAS_SEC_SP */

#if defined(HAS_BL)
	if (!sh_css_setup_blctrl_config(&sh_css_bl_fw, BL_PROG_NAME, &blctrl_cfg))
@@ -1908,14 +1885,7 @@ ia_css_init(const struct ia_css_env *env,
		IA_CSS_LEAVE_ERR(err);
		return err;
	}
#if defined(HAS_SEC_SP)
	err = ia_css_blctrl_add_target_fw_info(&sh_css_sp1_fw, IA_CSS_SP1,
					 get_sp_code_addr(SP1_ID));
	if (err != IA_CSS_SUCCESS) {
		IA_CSS_LEAVE_ERR(err);
		return err;
	}
#endif

#ifdef ISP2401
	err = ia_css_blctrl_add_target_fw_info(&sh_css_sp_fw, IA_CSS_SP0,
					 get_sp_code_addr(SP0_ID));
@@ -2709,11 +2679,6 @@ ia_css_uninit(void)
	}
	ia_css_spctrl_unload_fw(SP0_ID);
	sh_css_sp_set_sp_running(false);
#if defined(HAS_SEC_SP)
	ia_css_spctrl_unload_fw(SP1_ID);
	sh_css_sp1_set_sp1_running(false);
#endif /* HAS_SEC_SP */

#if defined(HAS_BL)
	ia_css_blctrl_unload_fw();
#endif
@@ -10668,33 +10633,6 @@ ia_css_start_bl(void)

#define SP_START_TIMEOUT_US 30000000

#if defined(HAS_SEC_SP)

static enum ia_css_err
sh_css_start_sp1(void)
{

	unsigned long timeout;

	IA_CSS_ENTER_PRIVATE("void");
	sh_css_sp1_start();
	/* waiting for the SP is completely started */
	timeout = SP_START_TIMEOUT_US;
	while((ia_css_spctrl_get_state(SP1_ID) != IA_CSS_SP_SW_INITIALIZED) && timeout) {
		timeout--;
		hrt_sleep();
	}
	if (timeout == 0) {
		IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_ERR_INTERNAL_ERROR);
		return IA_CSS_ERR_INTERNAL_ERROR;
	}
	sh_css_write_host2sp1_command(host2sp_cmd_ready);

	IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
	return IA_CSS_SUCCESS;
}
#endif

enum ia_css_err
ia_css_start_sp(void)
{
@@ -10735,11 +10673,6 @@ ia_css_start_sp(void)
	sh_css_setup_queues();
	ia_css_bufq_dump_queue_info();

#if defined(HAS_SEC_SP)
	/* Start the SP1 Core */
	err = sh_css_start_sp1();
#endif /* HAS_SEC_SP */

#ifdef ISP2401
	if (ia_css_is_system_mode_suspend_or_resume() == false) { /* skip in suspend/resume flow */
		ia_css_set_system_mode(IA_CSS_SYS_MODE_WORKING);
@@ -10756,42 +10689,6 @@ ia_css_start_sp(void)
 */
#define SP_SHUTDOWN_TIMEOUT_US 200000

#if defined(HAS_SEC_SP)

static enum ia_css_err
sh_css_stop_sp1(void)
{
	unsigned long timeout;

	IA_CSS_ENTER_PRIVATE("void");

	/* For now, stop whole SP1 */
	sh_css_write_host2sp1_command(host2sp_cmd_terminate);
	sh_css_sp1_set_sp1_running(false);

	timeout = SP_SHUTDOWN_TIMEOUT_US;
	while ((ia_css_spctrl_get_state(SP1_ID)!= IA_CSS_SP_SW_TERMINATED) && timeout) {
		timeout--;
		hrt_sleep();
	}
	if (timeout == 0) {
		IA_CSS_WARNING("SP1 is not terminated");
	} else {
		timeout = SP_SHUTDOWN_TIMEOUT_US;
		while (!ia_css_spctrl_is_idle(SP1_ID) && 0 != timeout) {
			timeout--;
			hrt_sleep();
		}
		if (0 == timeout) {
			IA_CSS_WARNING("SP1 is not idle");
		}
	}

	IA_CSS_LEAVE_ERR_PRIVATE(IA_CSS_SUCCESS);
	return IA_CSS_SUCCESS;
}
#endif

enum ia_css_err
ia_css_stop_sp(void)
{
@@ -10855,11 +10752,6 @@ ia_css_stop_sp(void)
	}
#endif

#if defined(HAS_SEC_SP)
	/* Stop SP1 Core */
	sh_css_stop_sp1();
#endif /* HAS_SEC_SP */

	IA_CSS_LEAVE_ERR(err);
	return err;
}
+0 −17
Original line number Diff line number Diff line
@@ -60,9 +60,6 @@ static const char *release_version = STR(irci_ecr-master_20150911_0724);
static char FW_rel_ver_name[MAX_FW_REL_VER_NAME] = "---";

struct ia_css_fw_info	  sh_css_sp_fw;
#if defined(HAS_SEC_SP)
struct ia_css_fw_info	  sh_css_sp1_fw;
#endif /* HAS_SEC_SP */
#if defined(HAS_BL)
struct ia_css_fw_info     sh_css_bl_fw;
#endif /* HAS_BL */
@@ -138,9 +135,6 @@ sh_css_load_blob_info(const char *fw, const struct ia_css_fw_info *bi, struct ia
	bd->header = *bi;

	if ((bi->type == ia_css_isp_firmware) || (bi->type == ia_css_sp_firmware)
#if defined(HAS_SEC_SP)
	|| (bi->type == ia_css_sp1_firmware)
#endif /* HAS_SEC_SP */
#if defined(HAS_BL)
	|| (bi->type == ia_css_bootloader_firmware)
#endif /* HAS_BL */
@@ -282,14 +276,6 @@ sh_css_load_firmware(const char *fw_data,
			err = setup_binary(bi, fw_data, &sh_css_sp_fw, i);
			if (err != IA_CSS_SUCCESS)
				return err;
#if defined(HAS_SEC_SP)
		} else if (bi->type == ia_css_sp1_firmware) {
			if (i != SP1_FIRMWARE)
				return IA_CSS_ERR_INTERNAL_ERROR;
			err = setup_binary(bi, fw_data, &sh_css_sp1_fw, i);
			if (err != IA_CSS_SUCCESS)
				return err;
#endif /* HAS_SEC_SP */
#if defined(HAS_BL)
		} else if (bi->type == ia_css_bootloader_firmware) {
			if (i != BOOTLOADER_FIRMWARE)
@@ -332,9 +318,6 @@ void sh_css_unload_firmware(void)
	}

	memset(&sh_css_sp_fw, 0, sizeof(sh_css_sp_fw));
#if defined(HAS_SEC_SP)
	memset(&sh_css_sp1_fw, 0, sizeof(sh_css_sp1_fw));
#endif /* HAS_SEC_SP */
	if (sh_css_blob_info) {
		sh_css_free(sh_css_blob_info);
		sh_css_blob_info = NULL;
+0 −3
Original line number Diff line number Diff line
@@ -28,9 +28,6 @@ struct sh_css_fw_bi_file_h {
};

extern struct ia_css_fw_info     sh_css_sp_fw;
#if defined(HAS_SEC_SP)
extern struct ia_css_fw_info     sh_css_sp1_fw;
#endif /* HAS_SEC_SP */
#if defined(HAS_BL)
extern struct ia_css_fw_info     sh_css_bl_fw;
#endif /* HAS_BL */
+0 −7
Original line number Diff line number Diff line
@@ -152,11 +152,7 @@
#define SIZE_OF_IA_CSS_PTR		sizeof(uint32_t)

/* Number of SP's */
#if defined(HAS_SEC_SP)
#define NUM_OF_SPS 2
#else
#define NUM_OF_SPS 1
#endif /* HAS_SEC_SP */

#if defined(HAS_BL)
#define NUM_OF_BLS 1
@@ -167,9 +163,6 @@
/* Enum for order of Binaries */
enum sh_css_order_binaries {
	SP_FIRMWARE = 0,
#if defined(HAS_SEC_SP)
	SP1_FIRMWARE,
#endif /* HAS_SEC_SP */
#if defined(HAS_BL)
	BOOTLOADER_FIRMWARE,
#endif
Loading