[PATCH v2 1/3] nxp: Prepare macros for KVM changes

Tom Rini trini at konsulko.com
Wed Jun 18 16:07:29 CEST 2025


On Wed, Jun 18, 2025 at 09:58:12AM +0300, Ilias Apalodimas wrote:

> 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 at linaro.org>

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250618/80df4e2b/attachment.sig>


More information about the U-Boot mailing list