浏览代码

ARM: AM33xx: fix module_wait_ready without clkctrl register

If the module has no clkctrl register defined, module_wait_ready should
not try to access this. This can potentially cause an illegal register
access, and result in bad idle reporting also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Tero Kristo 9 年之前
父节点
当前提交
183e2077d0
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      arch/arm/mach-omap2/cm33xx.c

+ 3 - 0
arch/arm/mach-omap2/cm33xx.c

@@ -220,6 +220,9 @@ static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
 {
 {
 	int i = 0;
 	int i = 0;
 
 
+	if (!clkctrl_offs)
+		return 0;
+
 	omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
 	omap_test_timeout(_is_module_ready(inst, clkctrl_offs),
 			  MAX_MODULE_READY_TIME, i);
 			  MAX_MODULE_READY_TIME, i);