Commit bc65b13e authored by Umang Jain's avatar Umang Jain Committed by Greg Kroah-Hartman

staging: vc04_services: bcm2835-camera: Explicitly set DMA mask

In the following patches, vchiq_arm will be migrated to create and use
its own bus and all the vchiq drivers (bcm2835-camera, bcm2835-audio)
will be registered to it. Since the platform driver/device model
internally sets the DMA mask for its registered devices, we would have
to do it ourself when we remove the platform driver/device registration
for vchiq devices.

This patch explicitly sets the DMA mask to bcm2835-camera so as not
to introduce a regression when we move away from platform
device/driver model.
Signed-off-by: default avatarUmang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-2-umang.jain@ideasonboard.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 274fba8b
......@@ -1852,6 +1852,12 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
unsigned int resolutions[MAX_BCM2835_CAMERAS][2];
int i;
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (ret) {
dev_err(&pdev->dev, "dma_set_mask_and_coherent failed: %d\n", ret);
return ret;
}
ret = vchiq_mmal_init(&instance);
if (ret < 0)
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment