hw21/26: support backward compatible DT
This commit is contained in:
parent
a9e615e7ae
commit
e1069f6d23
|
|
@ -2094,12 +2094,23 @@ static void ft_enable_node(void* blob, const char* name)
|
|||
int node_ofs = -1;
|
||||
|
||||
node_ofs = fdt_path_offset(blob, name);
|
||||
printf("ft_enable_node %s -> %d\n", name, node_ofs);
|
||||
// printf("ft_enable_node %s -> %d\n", name, node_ofs);
|
||||
if (node_ofs >= 0) {
|
||||
fdt_setprop_string(blob, node_ofs, "status", "okay");
|
||||
}
|
||||
}
|
||||
|
||||
static void ft_disable_node(void* blob, const char* name)
|
||||
{
|
||||
int node_ofs = -1;
|
||||
|
||||
node_ofs = fdt_path_offset(blob, name);
|
||||
// printf("ft_disable_node %s -> %d\n", name, node_ofs);
|
||||
if (node_ofs >= 0) {
|
||||
fdt_setprop_string(blob, node_ofs, "status", "disabled");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Modify the name of a gpio in a gpio-line-names string list.
|
||||
*/
|
||||
|
|
@ -2345,13 +2356,11 @@ static void ft_led(void *blob)
|
|||
* Link from SysState-LED Driver also needs to be adapted
|
||||
*/
|
||||
if (is_v32_or_newer()) {
|
||||
ft_disable_node(blob, "status_led");
|
||||
ft_disable_node(blob, "/sysstate-led");
|
||||
ft_enable_node(blob, "status_led_v32");
|
||||
ft_enable_node(blob, "/sysstate-led-v32");
|
||||
}
|
||||
else {
|
||||
ft_enable_node(blob, "status_led");
|
||||
ft_enable_node(blob, "/sysstate-led");
|
||||
}
|
||||
}
|
||||
|
||||
int ft_board_setup(void *blob, bd_t *bd)
|
||||
|
|
|
|||
Loading…
Reference in New Issue