mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
pinctrl: Avoid binding all pinconfig nodes before relocation
This can create a large number of pinctrl devices. It chews up early malloc() memory and takes time. Only bind those which are marked as needed before relocation. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4fbd258e69
commit
5589a81829
1 changed files with 4 additions and 0 deletions
|
@ -111,12 +111,16 @@ static int pinconfig_post_bind(struct udevice *dev)
|
|||
{
|
||||
const void *fdt = gd->fdt_blob;
|
||||
int offset = dev->of_offset;
|
||||
bool pre_reloc_only = !(gd->flags & GD_FLG_RELOC);
|
||||
const char *name;
|
||||
int ret;
|
||||
|
||||
for (offset = fdt_first_subnode(fdt, offset);
|
||||
offset > 0;
|
||||
offset = fdt_next_subnode(fdt, offset)) {
|
||||
if (pre_reloc_only &&
|
||||
!fdt_getprop(fdt, offset, "u-boot,dm-pre-reloc", NULL))
|
||||
continue;
|
||||
/*
|
||||
* If this node has "compatible" property, this is not
|
||||
* a pin configuration node, but a normal device. skip.
|
||||
|
|
Loading…
Add table
Reference in a new issue