Commit f340d067 authored by Ye Li's avatar Ye Li
Browse files

MLK-16831 imx8m: Remove cpu-idle-states property from kernel FDT for rev A0



Since i.MX8M A0 has HW issue in CPU idle, we must disable the function
when running on A0 chip. This patch checks the CPU rev and remove the
"cpu-idle-states" from cpu nodes to disable the CPU idle.
Signed-off-by: default avatarYe Li <ye.li@nxp.com>
Tested-by: default avatarBai Ping <ping.bai@nxp.com>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
parent c662e0a7
......@@ -473,6 +473,37 @@ add_status:
}
}
/* Disable the CPU idle for A0 chip since the HW does not support it */
if (is_soc_rev(CHIP_REV_1_0)) {
const char *nodes_path[] = {
"/cpus/cpu@0",
"/cpus/cpu@1",
"/cpus/cpu@2",
"/cpus/cpu@3",
};
int i = 0;
int rc;
int nodeoff;
for (i = 0; i < ARRAY_SIZE(nodes_path); i++) {
nodeoff = fdt_path_offset(blob, nodes_path[i]);
if (nodeoff < 0)
continue; /* Not found, skip it */
printf("Found %s node\n", nodes_path[i]);
rc = fdt_delprop(blob, nodeoff, "cpu-idle-states");
if (rc) {
printf("Unable to update property %s:%s, err=%s\n",
nodes_path[i], "status", fdt_strerror(rc));
} else {
printf("Remove %s:%s\n",
nodes_path[i], "cpu-idle-states");
}
}
}
return ft_add_optee_node(blob, bd);
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment