Răsfoiți Sursa

mxc/tzic: add base address when accessing TZIC registers

When we call tzic_enable_wake function, the kernel will crash because
of access to an unmapped address. This is because two register
access operations forgot to add base address.

Signed-off-by: Jason Wang <jason77.wang@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Jason Wang 14 ani în urmă
părinte
comite
a38b372fc2
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      arch/arm/plat-mxc/tzic.c

+ 3 - 2
arch/arm/plat-mxc/tzic.c

@@ -164,8 +164,9 @@ int tzic_enable_wake(int is_idle)
 		return -EAGAIN;
 		return -EAGAIN;
 
 
 	for (i = 0; i < 4; i++) {
 	for (i = 0; i < 4; i++) {
-		v = is_idle ? __raw_readl(TZIC_ENSET0(i)) : wakeup_intr[i];
-		__raw_writel(v, TZIC_WAKEUP0(i));
+		v = is_idle ? __raw_readl(tzic_base + TZIC_ENSET0(i)) :
+			wakeup_intr[i];
+		__raw_writel(v, tzic_base + TZIC_WAKEUP0(i));
 	}
 	}
 
 
 	return 0;
 	return 0;