nxp: Prepare macros for KVM changes
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Wed, 18 Jun 2025 06:58:12 +0000 (09:58 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 27 Jun 2025 17:48:20 +0000 (11:48 -0600)
commitb56c0632ad62415a40216d6f4de850e870163a6f
tree81599ccafe0a11b2f7549f48ed9064d29efacee1
parentb1d017afda2bf5b88736528ee54d32f6e51b7bf2
nxp: Prepare macros for KVM changes

A following patch is replacing our IO accessors with
do { ... } while(0) ones in order to make them usable with KVM.

That leads to an error eventually looking like this:
arch/arm/include/asm/io.h:62:9: error: expected expression before 'do'
   62 |         do {                                            \
      |         ^~
arch/arm/include/asm/io.h:211:41: note: in expansion of macro '__raw_writel'
  211 | #define out_arch(type,endian,a,v)       __raw_write##type(cpu_to_##endian(v),a)
      |                                         ^~~~~~~~~~~
arch/arm/include/asm/io.h:223:25: note: in expansion of macro 'out_arch'
  223 | #define out_be32(a,v)   out_arch(l,be32,a,v)
      |                         ^~~~~~~~
drivers/spi/fsl_dspi.c:127:17: note: in expansion of macro 'out_be32'
  127 |                 out_be32(addr, val) : out_le32(addr, val);
      |                 ^~~~~~~~

So adjust the current macros and code to be compatible with the upcoming
change.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/spi/fsl_dspi.c
include/fsl_ifc.h