u-boot-brain/arch
Eugeniu Rosca 507cef3d15 test: dm: Fix wrong aliases property names
After importing v4.17-rc1 Linux commit 9130ba884640 ("scripts/dtc:
Update to upstream version v1.4.6-9-gaadd0b65c987"), sandbox build
reports below warnings:

arch/sandbox/dts/test.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/sandbox/dts/test.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/sandbox/dts/test.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'
arch/sandbox/dts/test.dtb: Warning (alias_paths): /aliases: aliases property name must include only lowercase and '-'

Silent them by applying the 's/_/-/' substitution in the names of the
'fdt_dummy0', 'fdt_dummy1', 'fdt_dummy2', 'fdt_dummy3' properties.

Similar DTC warnings have been recently fixed in Linux kernel, e.g. via
v4.17-rc1 commit d366c30d19f4 ("ARM: dts: STi: Fix aliases property name
for STi boards").

If done alone, the DTS update generates a failure of the
`ut dm fdt_translation` unit test in sandbox environment as seen below:

$ ./u-boot -d arch/sandbox/dts/test.dtb
---<-snip->---
=> ut dm fdt_translation
Test: dm_test_fdt_translation: test-fdt.c
test/dm/test-fdt.c:444, dm_test_fdt_translation(): 0 == uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, 1, &dev): Expected 0, got -19
Test: dm_test_fdt_translation: test-fdt.c (flat tree)
test/dm/test-fdt.c:444, dm_test_fdt_translation(): 0 == uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, 1, &dev): Expected 0, got -19
Failures: 2
---<-snip->---

Fix this issue in place, by updating the "name" string in the
UCLASS_DRIVER(fdt_dummy) definition, so that it matches the newly
updated aliases properties. After that, the test passes:

$ ./u-boot -d arch/sandbox/dts/test.dtb
---<-snip->---
=> ut dm fdt_translation
Test: dm_test_fdt_translation: test-fdt.c
Test: dm_test_fdt_translation: test-fdt.c (flat tree)
Failures: 0
---<-snip->---

Fixes: e8d5291824 ("core: ofnode: Fix translation for #size-cells == 0")
Reported-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2018-05-31 08:53:11 -04:00
..
arc ARC: init debug uart in early common arc code 2018-05-24 15:59:17 +03:00
arm Merge branch 'master' of git://git.denx.de/u-boot-spi 2018-05-30 14:51:37 -04:00
m68k SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
microblaze SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
mips SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
nds32 nds32: Define PLATFORM__CLEAR_BIT for generic_clear_bit() 2018-05-15 21:44:05 -04:00
nios2 nios2: Define PLATFORM__CLEAR_BIT for generic_clear_bit() 2018-05-15 21:44:05 -04:00
powerpc powerpc: mpc85xx: Improve Work-around for Erratum A005125 2018-05-09 09:17:51 -05:00
riscv riscv: dts: Support cfi flash 2018-05-29 14:45:04 +08:00
sandbox test: dm: Fix wrong aliases property names 2018-05-31 08:53:11 -04:00
sh SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
x86 x86: Define PLATFORM__SET_BIT for generic_set_bit() 2018-05-15 21:44:05 -04:00
xtensa SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig Convert CONFIG_SPI to Kconfig 2018-04-27 14:54:11 -04:00