[PATCH 02/31] arm: mediatek: add support for MediaTek MT7981 SoC
Simon Glass
sjg at chromium.org
Mon Aug 8 21:26:24 CEST 2022
Hi Weijie,
On Sun, 7 Aug 2022 at 20:17, Weijie Gao <weijie.gao at mediatek.com> wrote:
>
> On Thu, 2022-08-04 at 07:57 -0600, Simon Glass wrote:
> > Hi Weijie,
> >
> > On Wed, 3 Aug 2022 at 21:35, Weijie Gao <weijie.gao at mediatek.com>
> > wrote:
> > >
> > > This patch adds basic support for MediaTek MT7981 SoC.
> > > This include the file that will initialize the SoC after boot and
> > > its
> > > device tree.
> > >
> > > Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
> > > ---
> > > arch/arm/dts/mt7981.dtsi | 288
> > > ++++++++++++++++++
> > > arch/arm/mach-mediatek/Kconfig | 12 +-
> > > arch/arm/mach-mediatek/Makefile | 1 +
> > > arch/arm/mach-mediatek/mt7981/Makefile | 4 +
> > > arch/arm/mach-mediatek/mt7981/init.c | 52 ++++
> > > arch/arm/mach-mediatek/mt7981/lowlevel_init.S | 30 ++
> > > 6 files changed, 386 insertions(+), 1 deletion(-)
> > > create mode 100644 arch/arm/dts/mt7981.dtsi
> > > create mode 100644 arch/arm/mach-mediatek/mt7981/Makefile
> > > create mode 100644 arch/arm/mach-mediatek/mt7981/init.c
> > > create mode 100644 arch/arm/mach-mediatek/mt7981/lowlevel_init.S
> > >
> >
> >
> > [..]
> >
> > > diff --git a/arch/arm/mach-mediatek/mt7981/init.c
> > > b/arch/arm/mach-mediatek/mt7981/init.c
> > > new file mode 100644
> > > index 0000000000..f503bb804b
> > > --- /dev/null
> > > +++ b/arch/arm/mach-mediatek/mt7981/init.c
> > > @@ -0,0 +1,52 @@
> > > +// SPDX-License-Identifier: GPL-2.0
> > > +/*
> > > + * Copyright (C) 2022 MediaTek Inc.
> > > + * Author: Sam Shih <sam.shih at mediatek.com>
> > > + */
> > > +
> > > +#include <fdtdec.h>
> >
> > Do you need that?
>
> This was used during testing, and should be remove now.
>
> >
> > > +#include <asm/armv8/mmu.h>
> > > +#include <init.h>
> >
> > Move up one
>
> ok.
>
> >
> > > +#include <asm/system.h>
> > > +#include <asm/global_data.h>
> > > +
> > > +DECLARE_GLOBAL_DATA_PTR;
> > > +
> > > +int print_cpuinfo(void)
> >
> > Can you use the CPU uclass and DISPLAY_CPUINFO instead/
>
> Basically there's nothing to do for print_cpuinfo other than printing a
> fixed CPU model string. Not sure if it's worth using a CPU uclass.
>
> Besides, Using a cpu uclass involves modifying other chips, and some
> of them cann't be tested by me.
Something to consider for the future as it is nice to list the CPUs
and their status. You can enable CONFIG_CPU for one Soc and not
another.
Regards,
Simon
More information about the U-Boot
mailing list