[PATCH 2/2] ARM: bcm: Support BCM6846 debug UART
William Zhang
william.zhang at broadcom.com
Fri Sep 20 18:46:01 PDT 2024
On Fri, Sep 20, 2024 at 6:33 AM Linus Walleij <linus.walleij at linaro.org> wrote:
>
> 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.
>
Yeah I think this is a better approach and only ties this machine specific
setup for low level debug only. The goal is to use generic arch code
and not to create machine specific code per SoC as much as possible.
> Yours,
> Linus Walleij
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4212 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240920/5b650849/attachment.p7s>
More information about the linux-arm-kernel
mailing list