[PATCH 2/2] ARM: bcm: Support BCM6846 debug UART
Linus Walleij
linus.walleij at linaro.org
Fri Sep 20 06:33:18 PDT 2024
On Thu, Sep 19, 2024 at 3:26 AM William Zhang
<william.zhang at broadcom.com> wrote:
> > ifeq ($(CONFIG_ARCH_BCMBCA),y)
> > +obj-y += board_bcm6846.o
> > obj-$(CONFIG_SMP) += bcm63xx_smp.o bcm63xx_pmb.o
> > endif
> > diff --git a/arch/arm/mach-bcm/board_bcm6846.c b/arch/arm/mach-bcm/board_bcm6846.c
> > new file mode 100644
> > index 000000000000..7a086c7a1e71
> > --- /dev/null
> > +++ b/arch/arm/mach-bcm/board_bcm6846.c
> This code will be the same for all the bcmbca A7 chips.
Do you mean I should rename the config options to DEBUG_BCMBCA
and match on compatible brcm,bcmbca simply? (I guess yes.)
> And more
> importantly, Broadcom's goal is to use
> multi_v7 common config for all A7 chips without introducing any
> machine or board specific implementation.
> Is it possible this can be done through common code? It looks like the
> only difference is the UART address.
DEBUG_LL can never coexist with multi_v7 or any other multi-config.
To get low-level debugging one always have to make an SoC-specific
build.
We have discussed the issue many times over the years and never
found any good generic solution. (Solutions suggested included even a
binary driver encoded in the device tree...)
The consensus is, that if you're debugging, that should be fine: it would
never be used for a product configuration anyway. That is also why I
have #ifdefs for the specific UART in the code.
I guess if we want to be really picky I can define a new symbol like:
config ARCH_BCMBCA_DEBUG
depends on ARCH_BCMBCA
depends on DEBUG_LL
$(CONFIG_ARCH_BCMBCA_DEBUG) = board_bcmbca_debug.o
then this only even get compiled if and only if doing LL-debug.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list