From c1264c6cc86992ed13d6dfc31f2b1abe40934e3e Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Wed, 4 Oct 2017 20:31:06 +0530 Subject: [PATCH] ARM: qca: Added fdt-fixup for machid Change-Id: Ie4a26dfcd2063a5fba5a256e6a373c21180900ce Signed-off-by: Gokul Sriram Palanisamy --- board/qca/arm/common/fdt_fixup.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/board/qca/arm/common/fdt_fixup.c b/board/qca/arm/common/fdt_fixup.c index 83a489e9de..4e4fb386ef 100644 --- a/board/qca/arm/common/fdt_fixup.c +++ b/board/qca/arm/common/fdt_fixup.c @@ -96,6 +96,7 @@ void ipq_fdt_fixup_version(void *blob) { int nodeoff, ret; char ver[OEM_VERSION_STRING_LENGTH + VERSION_STRING_LENGTH + 1]; + uint32_t machid; nodeoff = fdt_path_offset(blob, "/"); @@ -104,6 +105,16 @@ void ipq_fdt_fixup_version(void *blob) return; } + machid = smem_get_board_platform_type(); + + if (machid) { + ret = fdt_setprop(blob, nodeoff, "machid", + &machid, sizeof(uint32_t)); + + if (ret) + debug("fdt-fixup: unable to set machid(%d)\n", ret); + } + if (!smem_get_build_version(ver, sizeof(ver), BOOT_VERSION)) { debug("BOOT Build Version: %s\n", ver); ret = fdt_setprop(blob, nodeoff, "boot_version",