Skip to content

Commit 1c8f196

Browse files
committed
Merge tag 'arm-soc/for-6.13/soc' of https://github.com/Broadcom/stblinux into soc/arm
This pull request contains Broadcom ARM-based SoC changes for 6.13, please pull the following: - Linus adds support for the debug UART on BCM6846 (BCMBCA) platform - Florian dros the custom init_irq() callback which does the same thing as the standard irqchip_init() * tag 'arm-soc/for-6.13/soc' of https://github.com/Broadcom/stblinux: ARM: bcm: brcmstb: Drop custom init_irq callback ARM: bcm: Support BCMBCA debug UART Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 42f7652 + 4ee0bd8 commit 1c8f196

File tree

4 files changed

+41
-9
lines changed

4 files changed

+41
-9
lines changed

arch/arm/Kconfig.debug

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ choice
242242
depends on ARCH_BCM_5301X || ARCH_BCM_NSP
243243
select DEBUG_UART_8250
244244

245+
config DEBUG_BCMBCA
246+
bool "Kernel low-level debugging on BCMBCA UART0"
247+
depends on ARCH_BCMBCA
248+
245249
config DEBUG_BCM_HR2
246250
bool "Kernel low-level debugging on Hurricane 2 UART2"
247251
depends on ARCH_BCM_HR2
@@ -1526,7 +1530,7 @@ config DEBUG_LL_INCLUDE
15261530
default "debug/vf.S" if DEBUG_VF_UART
15271531
default "debug/vt8500.S" if DEBUG_VT8500_UART0
15281532
default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
1529-
default "debug/bcm63xx.S" if DEBUG_BCM63XX_UART
1533+
default "debug/bcm63xx.S" if DEBUG_BCM63XX_UART || DEBUG_BCMBCA
15301534
default "debug/digicolor.S" if DEBUG_DIGICOLOR_UA0
15311535
default "debug/brcmstb.S" if DEBUG_BRCMSTB_UART
15321536
default "mach/debug-macro.S"
@@ -1640,6 +1644,7 @@ config DEBUG_UART_PHYS
16401644
default 0xfe531000 if DEBUG_STIH41X_SBC_ASC1
16411645
default 0xfed32000 if DEBUG_STIH41X_ASC2
16421646
default 0xff690000 if DEBUG_RK32_UART2
1647+
default 0xff800640 if DEBUG_BCMBCA
16431648
default 0xffc02000 if DEBUG_SOCFPGA_UART0
16441649
default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
16451650
default 0xffc03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
@@ -1664,7 +1669,7 @@ config DEBUG_UART_PHYS
16641669
DEBUG_RMOBILE_SCIFA0 || DEBUG_RMOBILE_SCIFA1 || \
16651670
DEBUG_RMOBILE_SCIFA4 || \
16661671
DEBUG_S3C64XX_UART || \
1667-
DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
1672+
DEBUG_BCM63XX_UART || DEBUG_BCMBCA || DEBUG_ASM9260_UART || \
16681673
DEBUG_DIGICOLOR_UA0 || \
16691674
DEBUG_AT91_UART || DEBUG_STM32_UART || \
16701675
DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1 || \
@@ -1734,6 +1739,7 @@ config DEBUG_UART_VIRT
17341739
default 0xfe018000 if DEBUG_MMP_UART3
17351740
default 0xfe100000 if DEBUG_IMX23_UART || DEBUG_IMX28_UART
17361741
default 0xfe300000 if DEBUG_BCM_KONA_UART
1742+
default 0xfe300640 if DEBUG_BCMBCA
17371743
default 0xfeb00000 if DEBUG_HI3620_UART || DEBUG_HIX5HD2_UART
17381744
default 0xfeb24000 if DEBUG_RK3X_UART0
17391745
default 0xfeb26000 if DEBUG_RK3X_UART1
@@ -1765,7 +1771,7 @@ config DEBUG_UART_VIRT
17651771
DEBUG_UART_8250 || DEBUG_UART_PL01X || DEBUG_MESON_UARTAO || \
17661772
DEBUG_QCOM_UARTDM || \
17671773
DEBUG_S3C64XX_UART || \
1768-
DEBUG_BCM63XX_UART || DEBUG_ASM9260_UART || \
1774+
DEBUG_BCM63XX_UART || DEBUG_BCMBCA || DEBUG_ASM9260_UART || \
17691775
DEBUG_DIGICOLOR_UA0 || \
17701776
DEBUG_AT91_UART || DEBUG_STM32_UART || \
17711777
DEBUG_STIH41X_ASC2 || DEBUG_STIH41X_SBC_ASC1 || \

arch/arm/mach-bcm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,6 @@ endif
5858

5959
# BCMBCA
6060
ifeq ($(CONFIG_ARCH_BCMBCA),y)
61+
obj-$(CONFIG_DEBUG_BCMBCA) += board_bcmbca.o
6162
obj-$(CONFIG_SMP) += bcm63xx_smp.o bcm63xx_pmb.o
6263
endif

arch/arm/mach-bcm/board_bcmbca.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
// Copyright (C) 2024 Linus Walleij <[email protected]>
3+
4+
#include <asm/mach/arch.h>
5+
#include <asm/mach/map.h>
6+
7+
/* This is needed for LL-debug/earlyprintk/debug-macro.S */
8+
static struct map_desc bcmbca_io_desc[] __initdata = {
9+
{
10+
.virtual = CONFIG_DEBUG_UART_VIRT,
11+
.pfn = __phys_to_pfn(CONFIG_DEBUG_UART_PHYS),
12+
.length = SZ_4K,
13+
.type = MT_DEVICE,
14+
},
15+
};
16+
17+
static void __init bcmbca_map_io(void)
18+
{
19+
iotable_init(bcmbca_io_desc, ARRAY_SIZE(bcmbca_io_desc));
20+
}
21+
22+
static const char * const bcmbca_dt_compat[] = {
23+
/* TODO: Add other BCMBCA SoCs here to get debug UART support */
24+
"brcm,bcm6846",
25+
NULL,
26+
};
27+
28+
DT_MACHINE_START(BCMBCA_DT, "BCMBCA Broadband Access Processors")
29+
.map_io = bcmbca_map_io,
30+
.dt_compat = bcmbca_dt_compat,
31+
MACHINE_END

arch/arm/mach-bcm/brcmstb.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ u32 brcmstb_uart_config[3] = {
2323
0,
2424
};
2525

26-
static void __init brcmstb_init_irq(void)
27-
{
28-
irqchip_init();
29-
}
30-
3126
static const char *const brcmstb_match[] __initconst = {
3227
"brcm,bcm7445",
3328
"brcm,brcmstb",
@@ -36,5 +31,4 @@ static const char *const brcmstb_match[] __initconst = {
3631

3732
DT_MACHINE_START(BRCMSTB, "Broadcom STB (Flattened Device Tree)")
3833
.dt_compat = brcmstb_match,
39-
.init_irq = brcmstb_init_irq,
4034
MACHINE_END

0 commit comments

Comments
 (0)