hw21,26: set hw type in device-tree
- hardware type is stored as string under /proc/device-tree/nm,carrierboard,type
This commit is contained in:
parent
08e8a21515
commit
f89b5527b7
|
|
@ -1861,14 +1861,17 @@ static void ft_bootloader_version(void *blob)
|
|||
static void ft_hw_info(void *blob)
|
||||
{
|
||||
int node_offset;
|
||||
char hw_version[16];
|
||||
char hw_version_str[16];
|
||||
char hw_type_str[8];
|
||||
|
||||
snprintf(hw_version, sizeof(hw_version), "%d.%d.%d", hw_ver, hw_rev, hw_patch);
|
||||
snprintf(hw_version_str, sizeof(hw_version_str), "%d.%d.%d", hw_ver, hw_rev, hw_patch);
|
||||
snprintf(hw_type_str, sizeof(hw_type_str), "%d", hw_type);
|
||||
|
||||
node_offset = fdt_path_offset(blob, "/");
|
||||
if (node_offset != -1) {
|
||||
fdt_setprop_string(blob, node_offset, "model", hw_variant_name);
|
||||
fdt_setprop_string(blob, node_offset, "nm,carrierboard,version", hw_version);
|
||||
fdt_setprop_string(blob, node_offset, "nm,carrierboard,version", hw_version_str);
|
||||
fdt_setprop_string(blob, node_offset, "nm,carrierboard,type", hw_type_str);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue