u-boot/board/xilinx/zynqmp
Igor Lantsman 1b208d59ba arm64: zynqmp: Fix set_fdtfile() not to break u-boots DTB
Origin function was calling strsep which replaced delimiter ',' by a null
byte ('\0'). Operation was done directly on FDT which ends up with the
following behavior:

ZynqMP>  printenv fdtfile
fdtfile=xilinx/zynqmp.dtb
ZynqMP> fdt addr $fdtcontroladdr
ZynqMP> fdt print / compatible
compatible = "xlnx", "zynqmp"

As is visible fdtfile was correctly composed but a null byte caused that
xlnx was separated from zynqmp.
This hasn't been spotted because in all Xilinx DTs there are at least 3
compatible string and only the first one was affected by this issue.
But for systems which only had one compatible string "xlnx,zynqmp" it was
causing an issue when U-Boot's DT was used by Linux kernel.

The patch removes strsep calling and strchr is called instead which just
locate the first char after deliminator ',' (variable called "name").
And using this pointer in fdtfile composing.

Fixes: 91d7e0c47f ("arm64: zynqmp: Create fdtfile from compatible string")
Reported-by: Igor Lantsman <igor.lantsman@opsys-tech.com>
Signed-off-by: Igor Lantsman <igor.lantsman@opsys-tech.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20 09:49:20 +02:00
..
avnet-ultrazedev-cc-v1.0-ultrazedev-som-v1.0 arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-a2197-revA arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-topic-miamimp-xilinx-xdp-v1r1 topic: zynqmp: Add support for zynqmp-xilinx-xdp platform 2020-06-24 13:11:08 +02:00
zynqmp-zc1232-revA arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zc1254-revA arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zc1275-revB arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zc1751-xm015-dc1 arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zc1751-xm016-dc2 arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zc1751-xm017-dc3 arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zc1751-xm018-dc4 arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zc1751-xm019-dc5 arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zcu100-revC arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zcu102-rev1.0 arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zcu102-rev1.1 arm64: zynqmp Add support for zcu102 rev1.1 2020-04-06 12:52:45 +02:00
zynqmp-zcu102-revA arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zcu104-revA xilinx: zynqmp: Fix MIO 18 configuration on zcu104 revC 2020-04-27 13:57:17 +02:00
zynqmp-zcu106-revA arm64: zynqmp: Remove low level UART setting 2020-01-14 09:05:53 +01:00
zynqmp-zcu111-revA arm64: zynqmp Add support for zcu111 revA 2020-04-06 12:52:45 +02:00
avnet-ultra96-rev1 arm64: zynqmp: Add support for Avnet Ultra96 2018-08-06 08:44:35 +02:00
cmds.c xilinx: zynqmp: Enable pmufw config reloading 2020-06-25 10:08:04 +02:00
Kconfig arm64: zynqmp: Add support for verifying secure images 2018-03-23 09:36:15 +01:00
MAINTAINERS arm64: zynqmp: add MAINTAINERS entry for Avnet UltraZed-EV 2019-07-30 10:20:06 +02:00
Makefile arm: xilinx: Fill DEVICE_TREE directly in Makefiles 2020-02-28 12:15:11 +01:00
pm_cfg_obj.h arm64: zynqmp: spl: install a PMU firmware config object at runtime 2019-07-30 10:20:06 +02:00
pm_cfg_obj.S arm64: zynqmp: spl: install a PMU firmware config object at runtime 2019-07-30 10:20:06 +02:00
sleep.h arm64: zynqmp: Add empty sleep.h file for psu_init* compilation 2017-06-20 16:40:58 +02:00
tap_delays.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
xil_io.h common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
zynqmp-g-a2197-00-revA arm64: zynqmp: Fix symlinks to SC psu_init* files 2020-01-14 09:05:53 +01:00
zynqmp-m-a2197-01-revA arm64: zynqmp: Fix symlinks to SC psu_init* files 2020-01-14 09:05:53 +01:00
zynqmp-m-a2197-02-revA arm64: zynqmp: Fix symlinks to SC psu_init* files 2020-01-14 09:05:53 +01:00
zynqmp-m-a2197-03-revA arm64: zynqmp: Fix symlinks to SC psu_init* files 2020-01-14 09:05:53 +01:00
zynqmp-mini arm64: zynqmp: Add mini mtest configuration 2018-11-30 10:45:26 +01:00
zynqmp-mini-emmc0 arm64: zynqmp: Wire mini-emmc0 configuration with zcu100 2018-11-30 10:45:26 +01:00
zynqmp-mini-emmc1 arm64: zynqmp: Wire mini-emmc1 configuration with zcu102 2018-11-30 10:45:26 +01:00
zynqmp-mini-qspi arm64: zynqmp: Enable SPL for mini qspi configuration 2018-11-29 15:13:57 +01:00
zynqmp-p-a2197-00-revA arm64: zynqmp: Fix symlinks to SC psu_init* files 2020-01-14 09:05:53 +01:00
zynqmp-zc1275-revA arm64: zynqmp: Add support for zc12xx boards 2018-04-09 12:14:52 +02:00
zynqmp-zcu104-revC arm64: zynqmp: Add support for zcu104 customer board 2018-04-09 12:14:52 +02:00
zynqmp.c arm64: zynqmp: Fix set_fdtfile() not to break u-boots DTB 2020-08-20 09:49:20 +02:00