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

Commit fda3a8eb authored by Skylar Chang's avatar Skylar Chang Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: remove IPA PM usage from IPAv2



IPA PM framework is not present on IPAv2 and
should not be used.

Change-Id: I7f3c9e0b11627823e63f801d7650ce876d0b1c0d
CRs-Fixed: 2179225
Acked-by: default avatarAdy Abraham <adya@qti.qualcomm.com>
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 4b19ee48
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -3230,6 +3230,18 @@ int ipa_tz_unlock_reg(struct ipa_tz_unlock_reg_info *reg_info, u16 num_regs)
	return ret;
}

/**
 * ipa_pm_is_used() - Returns if IPA PM framework is used
 */
bool ipa_pm_is_used(void)
{
	bool ret;

	IPA_API_DISPATCH_RETURN(ipa_pm_is_used);

	return ret;
}

static const struct dev_pm_ops ipa_pm_ops = {
	.suspend_noirq = ipa_ap_suspend,
	.resume_noirq = ipa_ap_resume,
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -421,6 +421,8 @@ struct ipa_api_controller {
	int (*ipa_get_smmu_params)(struct ipa_smmu_in_params *in,
		struct ipa_smmu_out_params *out);
	int (*ipa_is_vlan_mode)(enum ipa_vlan_ifaces iface, bool *res);

	bool (*ipa_pm_is_used)(void);
};

#ifdef CONFIG_IPA
+0 −9
Original line number Diff line number Diff line
@@ -3925,7 +3925,6 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p,
	ipa_ctx->skip_uc_pipe_reset = resource_p->skip_uc_pipe_reset;
	ipa_ctx->use_dma_zone = resource_p->use_dma_zone;
	ipa_ctx->tethered_flow_control = resource_p->tethered_flow_control;
	ipa_ctx->use_ipa_pm = resource_p->use_ipa_pm;

	/* Setting up IPA RX Polling Timeout Seconds */
	ipa_rx_timeout_min_max_calc(&ipa_ctx->ipa_rx_min_timeout_usec,
@@ -4451,20 +4450,12 @@ static int ipa_init(const struct ipa_plat_drv_res *resource_p,
	return result;
}

bool ipa_pm_is_used(void)
{
	return (ipa_ctx) ? ipa_ctx->use_ipa_pm : false;
}

static int get_ipa_dts_configuration(struct platform_device *pdev,
		struct ipa_plat_drv_res *ipa_drv_res)
{
	int result;
	struct resource *resource;

	ipa_drv_res->use_ipa_pm = of_property_read_bool(pdev->dev.of_node,
		"qcom,use-ipa-pm");
	IPADBG("use_ipa_pm=%d\n", ipa_drv_res->use_ipa_pm);
	/* initialize ipa_res */
	ipa_drv_res->ipa_pipe_mem_start_ofst = IPA_PIPE_MEM_START_OFST;
	ipa_drv_res->ipa_pipe_mem_size = IPA_PIPE_MEM_SIZE;
+1 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1206,7 +1206,6 @@ struct ipa_context {
	int num_ipa_cne_evt_req;
	struct mutex ipa_cne_evt_lock;
	bool ipa_uc_monitor_holb;
	bool use_ipa_pm;
};

/**
@@ -1263,7 +1262,6 @@ struct ipa_plat_drv_res {
	u32 ipa_rx_polling_sleep_msec;
	u32 ipa_polling_iteration;
	bool ipa_uc_monitor_holb;
	bool use_ipa_pm;
};

struct ipa_mem_partition {
+6 −0
Original line number Diff line number Diff line
@@ -4984,6 +4984,11 @@ static void ipa2_set_tag_process_before_gating(bool val)
	ipa_ctx->tag_process_before_gating = val;
}

static bool ipa2_pm_is_used(void)
{
	return false;
}

int ipa2_bind_api_controller(enum ipa_hw_type ipa_hw_type,
	struct ipa_api_controller *api_ctrl)
{
@@ -5159,6 +5164,7 @@ int ipa2_bind_api_controller(enum ipa_hw_type ipa_hw_type,
	api_ctrl->ipa_disconn_wdi3_pipes = ipa2_disconn_wdi3_pipes;
	api_ctrl->ipa_enable_wdi3_pipes = ipa2_enable_wdi3_pipes;
	api_ctrl->ipa_disable_wdi3_pipes = ipa2_disable_wdi3_pipes;
	api_ctrl->ipa_pm_is_used = ipa2_pm_is_used;

	return 0;
}
Loading