Skip to content

Commit 1b6708c

Browse files
kbinghampopcornmix
authored andcommitted
staging: vc04_services: vc-sm-cma: Explicitly set DMA mask
The platform model originally handled the DMA mask. Now that we are on the vchiq_bus we need to explicitly set this. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
1 parent f12e76c commit 1b6708c

File tree

1 file changed

+9
-0
lines changed
  • drivers/staging/vc04_services/vc-sm-cma

1 file changed

+9
-0
lines changed

drivers/staging/vc04_services/vc-sm-cma/vc_sm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,8 +1477,17 @@ static void vc_sm_connected_init(void)
14771477
/* Driver loading. */
14781478
static int bcm2835_vc_sm_cma_probe(struct vchiq_device *device)
14791479
{
1480+
int err;
1481+
14801482
pr_info("%s: Videocore shared memory driver\n", __func__);
14811483

1484+
err = dma_set_mask_and_coherent(&device->dev, DMA_BIT_MASK(32));
1485+
if (err) {
1486+
dev_err(&device->dev, "dma_set_mask_and_coherent failed: %d\n",
1487+
err);
1488+
return err;
1489+
}
1490+
14821491
sm_state = devm_kzalloc(&device->dev, sizeof(*sm_state), GFP_KERNEL);
14831492
if (!sm_state)
14841493
return -ENOMEM;

0 commit comments

Comments
 (0)