Commit ab152afa authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: SOF: intel: Simplify with dma_set_mask_and_coherent()

ASoC Intel SOF driver still has explicit calls of dma_set_mask() and
dma_set_coherent_mask().

Let's simplify with dma_set_mask_and_coherent().

Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20210114133337.1039-3-tiwai@suse.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d3afb002
...@@ -809,13 +809,9 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) ...@@ -809,13 +809,9 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)
sdev->mailbox_bar = HDA_DSP_BAR; sdev->mailbox_bar = HDA_DSP_BAR;
/* allow 64bit DMA address if supported by H/W */ /* allow 64bit DMA address if supported by H/W */
if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(64))) { if (dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(64))) {
dev_dbg(sdev->dev, "DMA mask is 64 bit\n");
dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(64));
} else {
dev_dbg(sdev->dev, "DMA mask is 32 bit\n"); dev_dbg(sdev->dev, "DMA mask is 32 bit\n");
dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(32));
dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32));
} }
/* init streams */ /* init streams */
......
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