]> git.sur5r.net Git - u-boot/commit
armv8: sec_firmware: Remove JR3 from device tree node in all cases
authorRuchika Gupta <ruchika.gupta@nxp.com>
Thu, 12 Apr 2018 10:54:35 +0000 (16:24 +0530)
committerYork Sun <york.sun@nxp.com>
Wed, 9 May 2018 14:17:51 +0000 (09:17 -0500)
commitb6bb93de75033d6d52392fff1d3f512b2feeadb6
tree9d9bacc8dcd8d4ab45302ff928c7aa0333af73f3
parent1cb551cf6a18f2b123bcd0c4365d0fedcffdf61b
armv8: sec_firmware: Remove JR3 from device tree node in all cases

JR3 was getting removed from device tree only if random number
generation was successful. However, if SEC firmware is present,
JR3 should be removed from device tree node irrespective of the
random seed generation as SEC firmware reserves it for it's use.
Not removing it in case of random number generation failure causes
the kernel to crash.

Random number generation was being called twice. This is not
required. If SEC firmware is running, SIP call can be made to the SEC
firmware to get the random number. This call itself would return
failure if function is not supported. Duplicate calling of random
number generation function has been removed.

Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/fdt.c
arch/arm/cpu/armv8/sec_firmware.c