mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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:
committed by
popcornmix
parent
c54509f2fe
commit
66eb942f40
@@ -703,9 +703,6 @@ err_free_mem:
|
||||
/* 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);
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user