dm: ofnode: use ofnode_read_bool() to check property existence
This will clarify the code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
766c28a548
commit
252510ac69
@ -582,22 +582,22 @@ int ofnode_read_simple_size_cells(ofnode node)
|
|||||||
|
|
||||||
bool ofnode_pre_reloc(ofnode node)
|
bool ofnode_pre_reloc(ofnode node)
|
||||||
{
|
{
|
||||||
if (ofnode_read_prop(node, "u-boot,dm-pre-reloc", NULL))
|
if (ofnode_read_bool(node, "u-boot,dm-pre-reloc"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
#ifdef CONFIG_TPL_BUILD
|
#ifdef CONFIG_TPL_BUILD
|
||||||
if (ofnode_read_prop(node, "u-boot,dm-tpl", NULL))
|
if (ofnode_read_bool(node, "u-boot,dm-tpl"))
|
||||||
return true;
|
return true;
|
||||||
#elif defined(CONFIG_SPL_BUILD)
|
#elif defined(CONFIG_SPL_BUILD)
|
||||||
if (ofnode_read_prop(node, "u-boot,dm-spl", NULL))
|
if (ofnode_read_bool(node, "u-boot,dm-spl"))
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
* In regular builds individual spl and tpl handling both
|
* In regular builds individual spl and tpl handling both
|
||||||
* count as handled pre-relocation for later second init.
|
* count as handled pre-relocation for later second init.
|
||||||
*/
|
*/
|
||||||
if (ofnode_read_prop(node, "u-boot,dm-spl", NULL) ||
|
if (ofnode_read_bool(node, "u-boot,dm-spl") ||
|
||||||
ofnode_read_prop(node, "u-boot,dm-tpl", NULL))
|
ofnode_read_bool(node, "u-boot,dm-tpl"))
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user