From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Wed, 29 Nov 2017 14:21:15 +0100 Subject: [U-Boot] [PATCH 12/23] imx: mx8m: add soc related settings and files In-Reply-To: <20171129125953.rr2hmxjypcn4s3n7@linux-u7w5.ap.freescale.net> References: <20171128123205.12610-1-peng.fan@nxp.com> <20171128123205.12610-13-peng.fan@nxp.com> <20171129125953.rr2hmxjypcn4s3n7@linux-u7w5.ap.freescale.net> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 >>> --- >>> 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 ? >>> + } >>> + >>> + 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 ... >>> + >>> + 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