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

Commit f24998b9 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: move IPA driver code to ipa_v2 folder"

parents e078c823 28340d20
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
obj-$(CONFIG_IPA) += ipat.o
ipat-y := ipa.o ipa_debugfs.o ipa_hdr.o ipa_flt.o ipa_rt.o ipa_dp.o ipa_client.o \
	ipa_utils.o ipa_nat.o ipa_intf.o teth_bridge.o ipa_interrupts.o odu_bridge.o \
	ipa_rm.o ipa_rm_dependency_graph.o ipa_rm_peers_list.o ipa_rm_resource.o ipa_rm_inactivity_timer.o \
	ipa_uc.o ipa_uc_wdi.o ipa_dma.o ipa_uc_mhi.o ipa_mhi.o

obj-$(CONFIG_RMNET_IPA) += rmnet_ipa.o ipa_qmi_service_v01.o ipa_qmi_service.o rmnet_ipa_fd_ioctl.o
obj-$(CONFIG_IPA) += ipa_v2/
obj-$(CONFIG_IPA3) += ipa_v3/
+7 −0
Original line number Diff line number Diff line
obj-$(CONFIG_IPA) += ipat.o
ipat-y := ipa.o ipa_debugfs.o ipa_hdr.o ipa_flt.o ipa_rt.o ipa_dp.o ipa_client.o \
	ipa_utils.o ipa_nat.o ipa_intf.o teth_bridge.o ipa_interrupts.o odu_bridge.o \
	ipa_rm.o ipa_rm_dependency_graph.o ipa_rm_peers_list.o ipa_rm_resource.o ipa_rm_inactivity_timer.o \
	ipa_uc.o ipa_uc_wdi.o ipa_dma.o ipa_uc_mhi.o ipa_mhi.o

obj-$(CONFIG_RMNET_IPA) += rmnet_ipa.o ipa_qmi_service_v01.o ipa_qmi_service.o rmnet_ipa_fd_ioctl.o
+25 −28
Original line number Diff line number Diff line
@@ -231,13 +231,13 @@ void arm_iommu_detach_device(struct device *dev) { }

struct iommu_domain *ipa_get_smmu_domain(void)
{
	if (smmu_cb[IPA_SMMU_CB_AP].valid) {
	if (smmu_cb[IPA_SMMU_CB_AP].valid)
		return smmu_cb[IPA_SMMU_CB_AP].mapping->domain;
	} else {

	IPAERR("CB not valid\n");

	return NULL;
}
}
EXPORT_SYMBOL(ipa_get_smmu_domain);

struct iommu_domain *ipa_get_uc_smmu_domain(void)
@@ -899,6 +899,7 @@ static long ipa_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
	case IPA_IOC_GENERATE_FLT_EQ:
		{
			struct ipa_ioc_generate_flt_eq flt_eq;

			if (copy_from_user(&flt_eq, (u8 *)arg,
				sizeof(struct ipa_ioc_generate_flt_eq))) {
				retval = -EFAULT;
@@ -1388,14 +1389,14 @@ static int ipa_q6_clean_q6_tables(void)
	entry = mem.base;
	*entry = ipa_ctx->empty_rt_tbl_mem.phys_base;

	desc = kzalloc(sizeof(struct ipa_desc) * max_cmds, GFP_KERNEL);
	desc = kcalloc(max_cmds, sizeof(struct ipa_desc), GFP_KERNEL);
	if (!desc) {
		IPAERR("failed to allocate memory\n");
		retval = -ENOMEM;
		goto bail_dma;
	}

	cmd = kzalloc(sizeof(struct ipa_hw_imm_cmd_dma_shared_mem) * max_cmds,
	cmd = kcalloc(max_cmds, sizeof(struct ipa_hw_imm_cmd_dma_shared_mem),
		GFP_KERNEL);
	if (!cmd) {
		IPAERR("failed to allocate memory\n");
@@ -1519,7 +1520,7 @@ static int ipa_q6_set_ex_path_dis_agg(void)
	struct ipa_register_write *reg_write;
	int retval;

	desc = kzalloc(sizeof(struct ipa_desc) * ipa_ctx->ipa_num_pipes,
	desc = kcalloc(ipa_ctx->ipa_num_pipes, sizeof(struct ipa_desc),
			GFP_KERNEL);
	if (!desc) {
		IPAERR("failed to allocate memory\n");
@@ -2413,6 +2414,7 @@ static int ipa_get_clks(struct device *dev)

		if (clk_get_rate(smmu_clk) == 0) {
			long rate = clk_round_rate(smmu_clk, 1000);

			clk_set_rate(smmu_clk, rate);
		}
	}
@@ -2638,7 +2640,6 @@ static void ipa_start_tag_process(struct work_struct *work)
	ipa_dec_client_disable_clks();

	IPADBG("TAG process done\n");
	return;
}

/**
@@ -3732,13 +3733,12 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
	if (!resource) {
		IPAERR(":get resource failed for ipa-base!\n");
		return -ENODEV;
	} else {
	}
	ipa_drv_res->ipa_mem_base = resource->start;
	ipa_drv_res->ipa_mem_size = resource_size(resource);
	IPADBG(": ipa-base = 0x%x, size = 0x%x\n",
			ipa_drv_res->ipa_mem_base,
			ipa_drv_res->ipa_mem_size);
	}

	/* Get IPA BAM address */
	resource = platform_get_resource_byname(pdev, IORESOURCE_MEM,
@@ -3746,13 +3746,12 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
	if (!resource) {
		IPAERR(":get resource failed for bam-base!\n");
		return -ENODEV;
	} else {
	}
	ipa_drv_res->bam_mem_base = resource->start;
	ipa_drv_res->bam_mem_size = resource_size(resource);
	IPADBG(": bam-base = 0x%x, size = 0x%x\n",
			ipa_drv_res->bam_mem_base,
			ipa_drv_res->bam_mem_size);
	}

	/* Get IPA pipe mem start ofst */
	resource = platform_get_resource_byname(pdev, IORESOURCE_MEM,
@@ -3773,10 +3772,9 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
	if (!resource) {
		IPAERR(":get resource failed for ipa-irq!\n");
		return -ENODEV;
	} else {
	}
	ipa_drv_res->ipa_irq = resource->start;
	IPADBG(":ipa-irq = %d\n", ipa_drv_res->ipa_irq);
	}

	/* Get IPA BAM IRQ number */
	resource = platform_get_resource_byname(pdev, IORESOURCE_IRQ,
@@ -3784,10 +3782,9 @@ static int get_ipa_dts_configuration(struct platform_device *pdev,
	if (!resource) {
		IPAERR(":get resource failed for bam-irq!\n");
		return -ENODEV;
	} else {
	}
	ipa_drv_res->bam_irq = resource->start;
	IPADBG(":ibam-irq = %d\n", ipa_drv_res->bam_irq);
	}

	result = of_property_read_u32(pdev->dev.of_node, "qcom,ee",
			&ipa_drv_res->ee);
+1 −1
Original line number Diff line number Diff line
@@ -626,7 +626,7 @@ EXPORT_SYMBOL(ipa_reset_endpoint);
 *
 * This function connects a BAM pipe using SPS driver sps_connect() API
 * and by requesting uC interface to reset the pipe, avoids an IPA HW
 * limitation that does not allow reseting a BAM pipe during traffic in
 * limitation that does not allow resetting a BAM pipe during traffic in
 * IPA TX command queue.
 *
 * Returns:	0 on success, negative on failure
+2 −0
Original line number Diff line number Diff line
@@ -1453,6 +1453,7 @@ static ssize_t ipa_rm_read_stats(struct file *file, char __user *ubuf,
		size_t count, loff_t *ppos)
{
	int result, nbytes, cnt = 0;

	result = ipa_rm_stat(dbg_buff, IPA_MAX_MSG_LEN);
	if (result < 0) {
		nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN,
@@ -1460,6 +1461,7 @@ static ssize_t ipa_rm_read_stats(struct file *file, char __user *ubuf,
		cnt += nbytes;
	} else
		cnt += result;

	return simple_read_from_buffer(ubuf, count, ppos, dbg_buff, cnt);
}

Loading