[U-Boot] [PATCH 12/23] imx: mx8m: add soc related settings and files

Heiko Schocher hs at denx.de
Wed Nov 29 13:21:15 UTC 2017


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 ?

>>> +	}
>>> +
>>> +	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


More information about the U-Boot mailing list