Sandbox is special in that we use the bitness of the host. This should extend to PHYS_64BIT as well, so enable this option when building on a 64-bit host.
Update the conditions in io.h so that 64-bit access is available. Signed-off-by: Simon Glass <s...@chromium.org> --- Kconfig | 1 + arch/sandbox/include/asm/io.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Kconfig b/Kconfig index 2e63896c477..c80d6128260 100644 --- a/Kconfig +++ b/Kconfig @@ -448,6 +448,7 @@ endif # EXPERT config PHYS_64BIT bool "64bit physical address support" select FDT_64BIT + default y if HOST_64BIT help Say Y here to support 64bit physical memory address. This can be used not only for 64bit SoCs, but also for diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h index 3d09170063f..3c3545a2747 100644 --- a/arch/sandbox/include/asm/io.h +++ b/arch/sandbox/include/asm/io.h @@ -39,13 +39,13 @@ void sandbox_write(void *addr, unsigned int val, enum sandboxio_size_t size); #define readb(addr) sandbox_read((const void *)addr, SB_SIZE_8) #define readw(addr) sandbox_read((const void *)addr, SB_SIZE_16) #define readl(addr) sandbox_read((const void *)addr, SB_SIZE_32) -#ifdef CONFIG_SANDBOX64 +#ifdef CONFIG_HOST_64BIT #define readq(addr) sandbox_read((const void *)addr, SB_SIZE_64) #endif #define writeb(v, addr) sandbox_write((void *)addr, v, SB_SIZE_8) #define writew(v, addr) sandbox_write((void *)addr, v, SB_SIZE_16) #define writel(v, addr) sandbox_write((void *)addr, v, SB_SIZE_32) -#ifdef CONFIG_SANDBOX64 +#ifdef CONFIG_HOST_64BIT #define writeq(v, addr) sandbox_write((void *)addr, v, SB_SIZE_64) #endif -- 2.43.0