linux/sound/soc
Arnd Bergmann 012fa2622e
ASoC: loongson: fix address space confusion
The i2s driver uses the mapped __iomem address of the FIFO as the DMA
address for the device. This apparently works on loongarch because of
the way it handles __iomem pointers as aliases of physical addresses,
but this is not portable to other architectures and causes a compiler
warning when dma addresses are not the same size as pointers:

sound/soc/loongson/loongson_i2s_pci.c: In function 'loongson_i2s_pci_probe':
sound/soc/loongson/loongson_i2s_pci.c:110:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  110 |         tx_data->dev_addr = (dma_addr_t)i2s->reg_base + LS_I2S_TX_DATA;
      |                             ^
sound/soc/loongson/loongson_i2s_pci.c:113:29: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  113 |         rx_data->dev_addr = (dma_addr_t)i2s->reg_base + LS_I2S_RX_DATA;
      |                             ^

Change the driver to instead use the physical address as stored in the
PCI BAR resource directly. Since 'dev_addr' is a 32-bit address, I think
this results in the same truncated address on loongarch but is otherwise
closer to portable code and avoids the warning.

Fixes: d84881e068 ("ASoC: Add support for Loongson I2S controller")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/Message-Id: <20230622101235.3230941-1-arnd@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-22 18:02:06 +01:00
..
adi
amd ASoC: amd: ps: add acp_reset flag check in acp pci driver pm ops. 2023-06-20 23:30:32 +01:00
apple ASoC: apple: mca: Convert to platform remove callback returning void 2023-03-20 13:07:18 +00:00
atmel ASoC: atmel: use use new trigger ordering method 2023-06-13 12:11:21 +01:00
au1x ASoC: au1x: psc-i2s: Convert to platform remove callback returning void 2023-03-20 13:07:31 +00:00
bcm ASoC: bcm: cygnus-ssp: Convert to platform remove callback returning void 2023-03-20 13:07:33 +00:00
cirrus ASoC: ep93xx: Add OF support 2023-04-12 12:54:23 +01:00
codecs ASoC: codecs: wsa884x: Add WSA884x family of speakers 2023-06-21 13:42:50 +01:00
dwc ASoC: dwc: don't assign addr_width for dt configs 2023-06-19 23:29:25 +01:00
fsl ASoC: fsl-asoc-card: Allow passing the number of slots in use 2023-06-21 13:42:51 +01:00
generic ASoC: simple-card.c: use snd_soc_{of_}get_dlc() 2023-06-20 12:49:29 +01:00
google ASoC: Add Google Chameleon v3 i2s driver 2023-05-17 10:37:07 +09:00
hisilicon
img ASoC: img: pistachio-internal-dac: Convert to platform remove callback returning void 2023-03-20 13:08:22 +00:00
intel ASoC: Intel: sof_rt5682: Add mtl support RT1019P speaker 2023-06-21 13:42:48 +01:00
jz4740 ASoC: Merge up fixes for CI 2023-05-15 19:55:52 +09:00
kirkwood ASoC: kirkwood: kirkwood-i2s: Convert to platform remove callback returning void 2023-03-20 13:08:35 +00:00
loongson ASoC: loongson: fix address space confusion 2023-06-22 18:02:06 +01:00
mediatek ASoC: soc-core.c: add index on snd_soc_of_get_dai_name() 2023-06-20 12:49:22 +01:00
meson ASoC: meson: use snd_soc_{of_}get_dlc() 2023-06-20 12:49:25 +01:00
mxs ASoC: mxs: mxs-sgtl5000: Convert to platform remove callback returning void 2023-03-20 13:08:44 +00:00
pxa ASoC: pxa: pxa2xx-ac97: Convert to platform remove callback returning void 2023-03-20 13:08:46 +00:00
qcom add snd_soc_{of_}get_dlc() 2023-06-21 00:56:00 +01:00
rockchip ALSA/ASoC: Convert to platform remove callback 2023-03-21 16:29:48 +00:00
samsung ASoC: samsung: use snd_soc_{of_}get_dlc() 2023-06-20 12:49:26 +01:00
sh ASoC: siu: Add MODULE_FIRMWARE macro 2023-06-13 12:15:12 +01:00
sof ASoC: SOF: Intel: mtl: setup primary core info on MeteorLake platform 2023-06-16 12:53:54 +01:00
spear
sprd ASoC: sprd: sprd-mcdt: Convert to platform remove callback returning void 2023-03-20 13:09:02 +00:00
starfive ASoC: starfive: use use new trigger ordering method 2023-06-13 12:11:22 +01:00
sti
stm ASoC: stm32: sai: Use the devm_clk_get_optional() helper 2023-05-22 11:18:55 +01:00
sunxi ASoC: sunxi: sun8i-codec: Convert to platform remove callback returning void 2023-03-20 13:09:10 +00:00
tegra ASoC: tegra: Remove stale comments in AHUB 2023-06-22 18:02:05 +01:00
ti ASoC: ti: davinci-mcasp: Use pcm_for_each_format() macro 2023-05-30 13:43:38 +01:00
uniphier ASoC: uniphier: evea: Convert to platform remove callback returning void 2023-03-20 13:09:31 +00:00
ux500 ASoC: ux500: ux500_msp_dai: Convert to platform remove callback returning void 2023-03-20 13:09:32 +00:00
xilinx ASoC: xilinx: xlnx_spdif: Convert to platform remove callback returning void 2023-03-20 13:09:34 +00:00
xtensa ASoC: xtensa: xtfpga-i2s: Convert to platform remove callback returning void 2023-03-20 13:09:35 +00:00
Kconfig ASoC: Add support for Loongson I2S controller 2023-06-15 13:53:24 +01:00
Makefile ASoC: Add support for Loongson I2S controller 2023-06-15 13:53:24 +01:00
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c ASoC: soc-component: Add notify control helper function 2023-05-15 20:11:17 +09:00
soc-compress.c ASoC: do not include pm_runtime.h if not used 2023-05-23 13:55:55 +01:00
soc-core.c ASoC: soc-core.c: use snd_soc_{of_}get_dlc() 2023-06-20 12:49:28 +01:00
soc-dai.c
soc-dapm.c ASoC: add N cpus to M codecs dai link support 2023-06-13 12:11:15 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-jack.c
soc-link.c
soc-ops.c
soc-pcm.c ASoC: Merge fixes due to dependencies 2023-06-16 14:55:20 +01:00
soc-topology-test.c
soc-topology.c ASoC: topology: Allow partial matching when finding DAI link 2023-05-30 14:11:02 +01:00
soc-utils-test.c
soc-utils.c ASoC: soc-utils.c: add asoc_dummy_dlc 2023-05-08 08:47:05 +09:00