staging: vc-sm-cma: Correct DMA configuration.

Now that VCHIQ is setting up the DMA configuration as our
parent device, don't try to configure it during probe.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
This commit is contained in:
Dave Stevenson
2019-01-29 16:24:41 +00:00
committed by popcornmix
parent c54509f2fe
commit 66eb942f40

View File

@@ -703,9 +703,6 @@ err_free_mem:
/* Driver loading. */ /* Driver loading. */
static int bcm2835_vc_sm_cma_probe(struct platform_device *pdev) static int bcm2835_vc_sm_cma_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev;
int err;
pr_info("%s: Videocore shared memory driver\n", __func__); pr_info("%s: Videocore shared memory driver\n", __func__);
sm_state = kzalloc(sizeof(*sm_state), GFP_KERNEL); sm_state = kzalloc(sizeof(*sm_state), GFP_KERNEL);
@@ -714,13 +711,11 @@ static int bcm2835_vc_sm_cma_probe(struct platform_device *pdev)
sm_state->pdev = pdev; sm_state->pdev = pdev;
mutex_init(&sm_state->map_lock); mutex_init(&sm_state->map_lock);
dev->coherent_dma_mask = DMA_BIT_MASK(32); pdev->dev.dma_parms = devm_kzalloc(&pdev->dev,
dev->dma_mask = &dev->coherent_dma_mask; sizeof(*pdev->dev.dma_parms),
err = of_dma_configure(dev, NULL, true); GFP_KERNEL);
if (err) { /* dma_set_max_seg_size checks if dma_parms is NULL. */
dev_err(dev, "Unable to setup DMA: %d\n", err); dma_set_max_seg_size(&pdev->dev, 0x3FFFFFFF);
return err;
}
vchiq_add_connected_callback(vc_sm_connected_init); vchiq_add_connected_callback(vc_sm_connected_init);
return 0; return 0;