Skip to contentSkip to conversation

three small fixes for i.MX5

PATCH New Jason Wang 1 participant 4 messages Aug 21, 2010

Subsystems (3)
lore
Share & tools
lore

Jason Wang

author
#0 lore raw

cover three small fixes for i.MX5

These three fixes(for -rc) have been applied to imx-for-2.6.36 and passed a build and boot test on the i.MX51 3ds board.

author
#1 lore raw

PATCH 1/3 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.

---
 arch/arm/plat-mxc/tzic.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/plat-mxc/tzic.c +3 -2
index b3da9aa..3703ab2 100644
@@ -164,8 +164,9 @@ int tzic_enable_wake(int is_idle)
 		return -EAGAIN;
 
 	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;
Signature · 1 line
1.5.6.5
author
#2 lore raw

PATCH 2/3 mx5/clock: fix clear bit fields issue in _clk_ccgr_disable function

We can see MXC_CCM_CCGRx_MOD_OFF is defined as 0 while MXC_CCM_CCGRx_CG_MASK is defined as 0x3 in crm_regs.h, here in the _clk_ccgr_disable function, we want to clear the corresponding enable bit fields to disable this clock, so we should choose MASK instead of OFF otherwise clocks can't be disabled.

---
 arch/arm/mach-mx5/clock-mx51.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-mx5/clock-mx51.c +1 -1
index 6af69de..57c10a9 100644
@@ -56,7 +56,7 @@ static void _clk_ccgr_disable(struct clk *clk)
 {
 	u32 reg;
 	reg = __raw_readl(clk->enable_reg);
-	reg &= ~(MXC_CCM_CCGRx_MOD_OFF << clk->enable_shift);
+	reg &= ~(MXC_CCM_CCGRx_CG_MASK << clk->enable_shift);
 	__raw_writel(reg, clk->enable_reg);
 
 }
Signature · 1 line
1.5.6.5
author
#3 lore raw

PATCH 3/3 ARM: imx: set cache line size to 64 bytes for i.MX5

The core of i.MX5 series is cortex-A8, its cache line size is 64 bytes instead of 32 bytes. Refer to the OMAP3's selection, we choose 64 bytes for i.MX5, this can increase a little bit performance when perform cache operations.

---
 arch/arm/plat-mxc/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat-mxc/Kconfig +1 -0
index 0527e65..6785db4 100644
@@ -43,6 +43,7 @@ config ARCH_MXC91231
 config ARCH_MX5
 	bool "MX5-based"
 	select CPU_V7
+	select ARM_L1_CACHE_SHIFT_6
 	help
 	  This enables support for systems based on the Freescale i.MX51 family
 
Signature · 1 line
1.5.6.5