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

Commit f456678f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: request Modem to load uC after SSR if required"

parents 385b1905 ebaeec85
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -1727,14 +1727,10 @@ int ipa_q6_pipe_reset(void)
{
	int client_idx;
	int res;
	/*
	 * Q6 relies on the AP to reset all Q6 IPA pipes.
	 * In case the uC is not loaded, or upon any failure in the
	 * pipe reset sequence, we have to assert.
	 */

	if (!ipa_ctx->uc_ctx.uc_loaded) {
		IPAERR("uC is not loaded, can't reset Q6 pipes\n");
		BUG();
		IPAERR("uC is not loaded, won't reset Q6 pipes\n");
		return 0;
	}

	for (client_idx = 0; client_idx < IPA_CLIENT_MAX; client_idx++)
+1 −0
Original line number Diff line number Diff line
@@ -1943,6 +1943,7 @@ int ipa_uc_interface_init(void);
int ipa_uc_reset_pipe(enum ipa_client_type ipa_client);
int ipa_uc_monitor_holb(enum ipa_client_type ipa_client, bool enable);
int ipa_uc_state_check(void);
int ipa_uc_loaded_check(void);
int ipa_uc_send_cmd(u32 cmd, u32 opcode, u32 expected_status,
		    bool polling_mode, unsigned long timeout_jiffies);
void ipa_register_panic_hdlr(void);
+7 −6
Original line number Diff line number Diff line
@@ -47,10 +47,10 @@ static struct workqueue_struct *ipa_clnt_resp_workqueue;
static void *curr_conn;
static bool qmi_modem_init_fin, qmi_indication_fin;
static struct work_struct ipa_qmi_service_init_work;
static bool is_load_uc;
static uint32_t ipa_wan_platform;
struct ipa_qmi_context *ipa_qmi_ctx;
static bool workqueues_stopped;
static bool first_time_handshake;

/* QMI A5 service */

@@ -448,7 +448,7 @@ static int qmi_init_modem_send_sync_msg(void)
		IPA_MEM_PART(modem_comp_decomp_ofst) +
		IPA_MEM_PART(modem_comp_decomp_size) + smem_restr_bytes - 1;

	if (is_load_uc) {  /* First time boot */
	if (!ipa_uc_loaded_check()) {  /* First time boot */
		req.is_ssr_bootup_valid = false;
		req.is_ssr_bootup = 0;
	} else {  /* After SSR boot */
@@ -795,8 +795,10 @@ static void ipa_q6_clnt_svc_arrive(struct work_struct *work)
	}
	qmi_modem_init_fin = true;

	/* is_load_uc=FALSE indicates that SSR has occurred */
	ipa_q6_handshake_complete(!is_load_uc);
	/* In cold-bootup, first_time_handshake = false */
	ipa_q6_handshake_complete(first_time_handshake);
	first_time_handshake = true;

	IPAWANDBG("complete, qmi_modem_init_fin : %d\n",
		qmi_modem_init_fin);

@@ -942,10 +944,9 @@ destroy_ipa_A7_svc_wq:
	ipa_qmi_ctx = NULL;
}

int ipa_qmi_service_init(bool load_uc, uint32_t wan_platform_type)
int ipa_qmi_service_init(uint32_t wan_platform_type)
{
	ipa_wan_platform = wan_platform_type;
	is_load_uc = load_uc;
	qmi_modem_init_fin = false;
	qmi_indication_fin = false;
	workqueues_stopped = false;
+2 −2
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ extern struct ipa_rmnet_context ipa_rmnet_ctx;

#ifdef CONFIG_RMNET_IPA

int ipa_qmi_service_init(bool load_uc, uint32_t wan_platform_type);
int ipa_qmi_service_init(uint32_t wan_platform_type);

void ipa_qmi_service_exit(void);

@@ -159,7 +159,7 @@ void ipa_q6_handshake_complete(bool ssr_bootup);

#else /* CONFIG_RMNET_IPA */

static inline int ipa_qmi_service_init(bool load_uc, uint32_t wan_platform_type)
static inline int ipa_qmi_service_init(uint32_t wan_platform_type)
{
	return -EPERM;
}
+11 −0
Original line number Diff line number Diff line
@@ -306,6 +306,17 @@ int ipa_uc_state_check(void)
}
EXPORT_SYMBOL(ipa_uc_state_check);

/**
 * ipa_uc_loaded_check() - Check the uC has been loaded
 *
 * Return value: 1 if the uC is loaded, 0 otherwise
 */
int ipa_uc_loaded_check(void)
{
	return ipa_ctx->uc_ctx.uc_loaded;
}
EXPORT_SYMBOL(ipa_uc_loaded_check);

static void ipa_uc_event_handler(enum ipa_irq_type interrupt,
				 void *private_data,
				 void *interrupt_data)
Loading