diff options
author | Umang Jain <umang.jain@ideasonboard.com> | 2023-09-23 17:31:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-10-05 11:04:44 +0300 |
commit | 311b94dc641dcb06b54e5e70555f19c6413eda96 (patch) | |
tree | 118dce17c91dd15c86ecbb5611197b829f0778f8 /drivers/staging/vc04_services | |
parent | bc65b13eddc35f0cf5b429ca143b9394a6826707 (diff) | |
download | linux-311b94dc641dcb06b54e5e70555f19c6413eda96.tar.xz |
staging: vc04_services: bcm2835-audio: 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-audio so as not
to introduce a regression when we move away from platform
device/driver model.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Link: https://lore.kernel.org/r/20230923143200.268063-3-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services')
-rw-r--r-- | drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c index 00bc898b0189..f3ad2543d1c0 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c @@ -3,6 +3,7 @@ #include <linux/platform_device.h> +#include <linux/dma-mapping.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/module.h> @@ -273,6 +274,12 @@ static int snd_bcm2835_alsa_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; int err; + err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); + if (err) { + dev_err(dev, "dma_set_mask_and_coherent failed: %d\n", err); + return err; + } + if (num_channels <= 0 || num_channels > MAX_SUBSTREAMS) { num_channels = MAX_SUBSTREAMS; dev_warn(dev, "Illegal num_channels value, will use %u\n", |