linux/arch/arm/mach-bcm/board_bcmbca.c
Linus Walleij 60d76ce9fa ARM: bcm: Support BCMBCA debug UART
The debug UART on the BCMBCA SoCs are in a different place
than on the other BCM platforms. Support this with a static
map when debugging is explicitly configured.

Right now I can only test this on BCM6846 so this is the
only compatible I list for the debug boardfile, but other
compatibles from the BCMBCA family can be added to get
LL_DEBUG support.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: William Zhang <william.zhang@broadcom.com>
Link: https://lore.kernel.org/r/20240923-bcm-arm-bcm6846-v2-1-f4a7191b501a@linaro.org
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2024-10-08 15:02:31 -07:00

31 lines
792 B
C

// SPDX-License-Identifier: GPL-2.0-only
// Copyright (C) 2024 Linus Walleij <linus.walleij@linaro.org>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
/* This is needed for LL-debug/earlyprintk/debug-macro.S */
static struct map_desc bcmbca_io_desc[] __initdata = {
{
.virtual = CONFIG_DEBUG_UART_VIRT,
.pfn = __phys_to_pfn(CONFIG_DEBUG_UART_PHYS),
.length = SZ_4K,
.type = MT_DEVICE,
},
};
static void __init bcmbca_map_io(void)
{
iotable_init(bcmbca_io_desc, ARRAY_SIZE(bcmbca_io_desc));
}
static const char * const bcmbca_dt_compat[] = {
/* TODO: Add other BCMBCA SoCs here to get debug UART support */
"brcm,bcm6846",
NULL,
};
DT_MACHINE_START(BCMBCA_DT, "BCMBCA Broadband Access Processors")
.map_io = bcmbca_map_io,
.dt_compat = bcmbca_dt_compat,
MACHINE_END