[U-Boot] [PATCH 2/2] dm: core: remove the duplicated function dm_ofnode_pre_reloc

Patrick DELAUNAY patrick.delaunay at st.com
Wed Feb 6 09:26:44 UTC 2019


Hi Simon,

> From: Simon Glass <sjg at chromium.org>
> Sent: lundi 4 février 2019 15:41
> 
> Hi Patrick,
> 
> On Mon, 4 Feb 2019 at 03:15, Patrick Delaunay <patrick.delaunay at st.com>
> wrote:
> >
> > The content dm_ofnode_pre_reloc() is identical with ofnode_pre_reloc()
> > defined in drivers/core/ofnode.c and used only one time in
> > drivers/core/lists.c:lists_bind_fdt().
> >
> > So the function can be removed and directly call ofnode_pre_reloc.
> >
> > Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> > ---
> >
> >  drivers/core/lists.c |  2 +-
> >  drivers/core/util.c  | 26 --------------------------
> >  include/dm/util.h    | 27 ---------------------------
> >  3 files changed, 1 insertion(+), 54 deletions(-)
> 
> I think the docs for ofnode_pre_reloc() need updating.

You think about which docs ?

With previous patch in the serie, in ofnode.h, I have:

/**
 * ofnode_pre_reloc() - check if a node should be bound before relocation
 *
 * Device tree nodes can be marked as needing-to-be-bound in the loader stages
 * via special device tree properties.
 *
 * Before relocation this function can be used to check if nodes are required
 * in either SPL or TPL stages.
 *
 * After relocation and jumping into the real U-Boot binary it is possible to
 * determine if a node was bound in one of SPL/TPL stages.
 *
 * There are 4 settings currently in use
 * - u-boot,dm-pre-proper: U-Boot proper pre-relocation only
 * - u-boot,dm-pre-reloc: legacy and indicates any of TPL or SPL
 *   Existing platforms only use it to indicate nodes needed in
 *   SPL. Should probably be replaced by u-boot,dm-spl for
 *   new platforms.
 * - u-boot,dm-spl: SPL and U-Boot pre-relocation
 * - u-boot,dm-tpl: TPL and U-Boot pre-relocation
 *
 * @node: node to check
 * @return true if node is needed in SPL/TL, false otherwise
 */
bool ofnode_pre_reloc(ofnode node);

What do you expect ?

> Regards,
> Simon

Regards
Patrick


More information about the U-Boot mailing list