]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: spi-fsl-dspi: Stub out DMA functions
authorJames Clark <james.clark@linaro.org>
Tue, 2 Sep 2025 12:44:55 +0000 (13:44 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 3 Sep 2025 13:30:30 +0000 (14:30 +0100)
commit4850f158c06eeaf4997fc65c47544f2c82ad5a45
treef9eeef120dd38fb37f659f22116ce222ca40ab57
parent5484440aa0a98b76e7829cd06dda33cf62830d73
spi: spi-fsl-dspi: Stub out DMA functions

In a later commit we'll use dma_alloc_noncoherent() which isn't
stubbed out for builds without CONFIG_DMA_ENGINE and results in the
following build error:

  spi-fsl-dspi.c:(.text+0x644): undefined reference to `dma_free_pages'
  m68k-linux-ld: spi-fsl-dspi.c:(.text+0x67a): undefined reference to `dma_free_pages'

To continue to support devices that only need XSPI mode and so that
randconfig builds work, stub out DMA functionality in the DSPI driver.

Although older parts of the DMA API have their own stubs, it's
intentional that newer parts don't follow the same pattern. Therefore
individual drivers should not compile in calls unless CONFIG_DMA_ENGINE
is set.

Link: https://lore.kernel.org/oe-kbuild-all/202506160036.t9VDxF6p-lkp@intel.com/
Signed-off-by: James Clark <james.clark@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Message-ID: <20250902-james-nxp-spi-dma-v6-3-f7aa2c5e56e2@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-dspi.c