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

Commit 84cc446c authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: crypto: configure device segment size and segment boundary"

parents 1758cfc7 458ce3e8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -5983,6 +5983,7 @@ static int qce_smmu_init(struct qce_device *pce_dev)
	struct dma_iommu_mapping *mapping;
	int attr = 1;
	int ret = 0;
	struct device *dev = pce_dev->pdev;

	mapping = arm_iommu_create_mapping(&platform_bus_type,
				CRYPTO_SMMU_IOVA_START, CRYPTO_SMMU_IOVA_SIZE);
@@ -6004,6 +6005,13 @@ static int qce_smmu_init(struct qce_device *pce_dev)
		pr_err("Attach device failed, err = %d\n", ret);
		goto ext_fail_set_attr;
	}

	if (!dev->dma_parms)
		dev->dma_parms = devm_kzalloc(dev,
				sizeof(*dev->dma_parms), GFP_KERNEL);
	dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
	dma_set_seg_boundary(dev, DMA_BIT_MASK(64));

	pce_dev->smmu_mapping = mapping;
	return ret;

+5 −0
Original line number Diff line number Diff line
@@ -57,6 +57,11 @@ static int qcedev_setup_context_bank(struct context_bank_info *cb,
			goto release_mapping;
		}
	}
	if (!dev->dma_parms)
		dev->dma_parms = devm_kzalloc(dev,
				sizeof(*dev->dma_parms), GFP_KERNEL);
	dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
	dma_set_seg_boundary(dev, DMA_BIT_MASK(64));

	rc = arm_iommu_attach_device(cb->dev, cb->mapping);
	if (rc) {