summaryrefslogtreecommitdiff
path: root/board/CZ.NIC
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2021-11-26 14:57:15 +0100
committerStefan Roese <sr@denx.de>2021-12-19 09:50:47 +0100
commit574506c327318e82095122470d258da0be21b294 (patch)
tree31a670c9ae985d180e019af4ce97c59f81028935 /board/CZ.NIC
parent08370038df6c92a1bfe1aede55545a505e268305 (diff)
fdt_support: Add fdt_delete_disabled_nodes() and use in Turris MOX
Move Turris MOX specific remove_disabled_nodes() to fdt_support with name fdt_delete_disabled_nodes(), so that others can potentially use it. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/CZ.NIC')
-rw-r--r--board/CZ.NIC/turris_mox/turris_mox.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index 809ce82d20..b61c5b1cb6 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -749,24 +749,6 @@ static int setup_switch(void *blob, int id)
return 0;
}
-static int remove_disabled_nodes(void *blob)
-{
- while (1) {
- int res, offset;
-
- offset = fdt_node_offset_by_prop_value(blob, -1, "status",
- "disabled", 9);
- if (offset < 0)
- break;
-
- res = fdt_del_node(blob, offset);
- if (res < 0)
- return res;
- }
-
- return 0;
-}
-
int ft_board_setup(void *blob, struct bd_info *bd)
{
int res;
@@ -872,7 +854,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
fdt_fixup_ethernet(blob);
/* Finally remove disabled nodes, as per Rob Herring's request. */
- remove_disabled_nodes(blob);
+ fdt_delete_disabled_nodes(blob);
return 0;
}