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

Commit f0db2905 authored by Pavan Anamula's avatar Pavan Anamula Committed by Gerrit - the friendly Code Review server
Browse files

mtd: msm_qpic_nand: Setting coherent_dma_mask



Set coherent_dma_mask to allocate DMA buffer for
qpic nand device.

Change-Id: Ia35b7844b21e506d229e66d8c31ceb15553968ae
Signed-off-by: default avatarPavan Anamula <pavana@codeaurora.org>
parent fa31274e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -3320,7 +3320,7 @@ static int msm_nand_probe(struct platform_device *pdev)
	struct msm_nand_info *info;
	struct resource *res;
	int i, err, nr_parts;

	struct device *dev;
	/*
	 * The partition information can also be passed from kernel command
	 * line. Also, the MTD core layer supports adding the whole device as
@@ -3371,6 +3371,12 @@ static int msm_nand_probe(struct platform_device *pdev)
	init_waitqueue_head(&info->nand_chip.dma_wait_queue);
	mutex_init(&info->lock);

	dev = &pdev->dev;
	if (dma_supported(dev, DMA_BIT_MASK(32))) {
		info->dma_mask = DMA_BIT_MASK(32);
		dev->coherent_dma_mask = info->dma_mask;
	}

	info->nand_chip.dma_virt_addr =
		dmam_alloc_coherent(&pdev->dev, MSM_NAND_DMA_BUFFER_SIZE,
			&info->nand_chip.dma_phys_addr, GFP_KERNEL);
+1 −0
Original line number Diff line number Diff line
@@ -318,6 +318,7 @@ struct msm_nand_info {
	struct mutex lock;
	struct flash_identification flash_dev;
	struct msm_nand_clk_data clk_data;
	u64 dma_mask;
};

/* Structure that defines an ONFI parameter page (512B) */