[U-Boot] [PATCH 12/23] imx: mx8m: add soc related settings and files
Peng Fan
peng.fan at nxp.com
Wed Nov 29 13:24:17 UTC 2017
Hi Heiko,
> -----Original Message-----
> From: Heiko Schocher [mailto:hs at denx.de]
> Sent: Wednesday, November 29, 2017 9:21 PM
> To: Peng Fan <van.freenix at gmail.com>
> Cc: Peng Fan <peng.fan at nxp.com>; Fabio Estevam
> <fabio.estevam at nxp.com>; u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH 12/23] imx: mx8m: add soc related settings and
> files
>
> Hello Peng,
>
> Am 29.11.2017 um 13:59 schrieb Peng Fan:
> > Hi Heiko,
> > On Wed, Nov 29, 2017 at 01:06:33PM +0100, Heiko Schocher wrote:
> >> Hello Peng,
> >>
> >> Am 28.11.2017 um 13:31 schrieb Peng Fan:
> >>> Add SoC level initialization code
> >>> - arch_cpu_init
> >>> - mmu table
> >>> - detect cpu revision
> >>> - reset cpu and wdog settings
> >>> - M4 boot
> >>> - timer init
> >>> - wdog settings
> >>> - lowlevel init to save/restore registers
> >>> - a few dummy header file to avoid build failure
> >>> - ft_system_setup and ft_add_optee_node
> >>> - mmc env related
> >>>
> >>> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> >>> ---
> >>> arch/arm/include/asm/arch-mx8m/crm_regs.h | 10 +
> >>> arch/arm/include/asm/arch-mx8m/gpio.h | 12 +
> >>> arch/arm/include/asm/arch-mx8m/sys_proto.h | 17 +
> >>> arch/arm/mach-imx/mx8m/Makefile | 3 +-
> >>> arch/arm/mach-imx/mx8m/lowlevel_init.S | 63 ++++
> >>> arch/arm/mach-imx/mx8m/soc.c | 544
> +++++++++++++++++++++++++++++
> >>> 6 files changed, 648 insertions(+), 1 deletion(-)
> >>> create mode 100644 arch/arm/include/asm/arch-mx8m/crm_regs.h
> >>> create mode 100644 arch/arm/include/asm/arch-mx8m/gpio.h
> >>> create mode 100644 arch/arm/include/asm/arch-mx8m/sys_proto.h
> >>> create mode 100644 arch/arm/mach-imx/mx8m/lowlevel_init.S
> >>> create mode 100644 arch/arm/mach-imx/mx8m/soc.c
>
> [...]
>
> >>> + }
> >>> +
> >>> + subpath = "firmware";
> >>> + offs = fdt_add_subnode(fdt, offs, subpath);
> >>> + if (offs < 0)
> >>> + printf("Could not create %s node.\n", subpath);
> >>
> >> Should you not return an errorcode, if this step fail?
> >
> > No. If return failure, uboot will not boot kernel. We need kernel to
> > continue boot, alought no firmware.
>
> Ok, if firmware is not essential for linux later ?
This is for OP-TEE. Without OP-TEE, I expect Linux also boot well.
>
> >>> + }
> >>> +
> >>> + subpath = "optee";
> >>> + offs = fdt_add_subnode(fdt, offs, subpath);
> >>> + if (offs < 0)
> >>> + printf("Could not create %s node.\n", subpath);
> >>
> >> Here too, why not returning error with offs as errorcode?
> >
> > Ditto.
>
> Hmm...
>
> >>> +
> >>> + fdt_setprop_string(fdt, offs, "compatible", "linaro,optee-tz");
> >>> + fdt_setprop_string(fdt, offs, "method", "smc");
>
> but you use offs in this 2 lines ... this seems bugy to me ...
I'll refine this piece code.
Thanks,
Peng.
>
> >>> +
> >>> + return 0;
> >>> +}
>
> bye,
> Heiko
> --
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
More information about the U-Boot
mailing list