drivers: console: support building for SoCs with no MMU

The device_map() is not defined for SoCs with no MMU, add the
device_map() macro when !DEVICE_MMIO_IS_IN_RAM to support building for
SoCs with no MMU.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
This commit is contained in:
Jisheng Zhang
2025-10-17 17:29:10 +08:00
committed by Anas Nashif
parent b3dff9bbbc
commit 1292d6e11a

View File

@@ -29,6 +29,11 @@
#define RAM_CONSOLE_BUF_ATTR
#endif
/* workaround the fact that device_map() is not defined for SoCs with no MMU */
#ifndef DEVICE_MMIO_IS_IN_RAM
#define device_map(virt, phys, size, flags) *(virt) = (phys)
#endif /* DEVICE_MMIO_IS_IN_RAM */
char ram_console_buf[CONFIG_RAM_CONSOLE_BUFFER_SIZE] RAM_CONSOLE_BUF_ATTR;
char *ram_console;
static int pos;