Skip to content

Commit

Permalink
staging: vc-sm-cma: Correct DMA configuration.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
6by9 authored and Phil Elwell committed May 28, 2019
1 parent 748bc7c commit 35ae78c
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
Expand Up @@ -703,9 +703,6 @@ static void vc_sm_connected_init(void)
/* Driver loading. */
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__);

sm_state = kzalloc(sizeof(*sm_state), GFP_KERNEL);
Expand All @@ -714,13 +711,11 @@ static int bcm2835_vc_sm_cma_probe(struct platform_device *pdev)
sm_state->pdev = pdev;
mutex_init(&sm_state->map_lock);

dev->coherent_dma_mask = DMA_BIT_MASK(32);
dev->dma_mask = &dev->coherent_dma_mask;
err = of_dma_configure(dev, NULL, true);
if (err) {
dev_err(dev, "Unable to setup DMA: %d\n", err);
return err;
}
pdev->dev.dma_parms = devm_kzalloc(&pdev->dev,
sizeof(*pdev->dev.dma_parms),
GFP_KERNEL);
/* dma_set_max_seg_size checks if dma_parms is NULL. */
dma_set_max_seg_size(&pdev->dev, 0x3FFFFFFF);

vchiq_add_connected_callback(vc_sm_connected_init);
return 0;
Expand Down

0 comments on commit 35ae78c

Please sign in to comment.