of: fix reserved memory handling 26/252826/3 accepted/tizen/unified/20210204.134610 submit/tizen/20210204.012538
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 2 Feb 2021 10:24:36 +0000 (11:24 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 3 Feb 2021 04:03:13 +0000 (04:03 +0000)
commitf856681273ba71fa7e833f57cf23cb92e034cb0c
tree37acde3c8ef544035e600afdf4391370952b158a
parent4ec7cc3e85ec61360059af79ef5947c65ad5b889
of: fix reserved memory handling

Mainline u-boot marks some secure monitor relate memory with the
/memreserve/ device-tree method. On the other hand, the same memory is
already defined in /reserved-memory node with the all details needed to
use it by the respective secure monitor deamon. Check for such case and
properly initialize such reserved memory regions instead of returning a
failure.

This allows to use vendor kernel with mainline u-boot on Amlogic SoCs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0bd3b51899cc17f17d1bcbd0c2c5a0d88686b245
drivers/of/of_reserved_mem.c
include/linux/memblock.h
mm/memblock.c