summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2013-09-13 06:28:20 +0800
committerJason Liu <r64343@freescale.com>2013-09-13 09:53:50 +0800
commit0f7948bd1eec54a4779eab4e58768018cb0635c9 (patch)
tree73688186796cb02bd2de8d2857462f5646929e55
parentb7d1aaa501b1f4f694c6f6b0816ec88ae01c398f (diff)
ENGR00279566: ARM: i.MX6: Enable L2 cache I/D prefetch function
This patch enable the L2 cache I/D prefetch function on the i.MX6 family. Based on Android test result, it has the performance improvement: Before the change: JB4.3 RC1: Browser Vellamo scores See The Sun Canvas: 51.16 Browser Vellamo scores Deep Sea Canvas: 65.41 Browser Vellamo scores Aquarium Canvas: 50.23 After the change: Browser Vellamo scores See The Sun Canvas: 70.28 Browser Vellamo scores Deep Sea Canvas: 78.57 Browser Vellamo scores Aquarium Canvas: 53.73 Signed-off-by: Jason Liu <r64343@freescale.com> (cherry picked from commit a51f75c318241c26bf7d41ad92c0e255b925863c)
-rw-r--r--arch/arm/mach-mx6/mm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/mach-mx6/mm.c b/arch/arm/mach-mx6/mm.c
index 8d2c715f336b..bdec4f879da9 100644
--- a/arch/arm/mach-mx6/mm.c
+++ b/arch/arm/mach-mx6/mm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -111,6 +111,11 @@ int mxc_init_l2x0(void)
writel(0x132, IO_ADDRESS(L2_BASE_ADDR + L2X0_TAG_LATENCY_CTRL));
writel(0x132, IO_ADDRESS(L2_BASE_ADDR + L2X0_DATA_LATENCY_CTRL));
+ val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
+
+ /* Turn on the L2 I/D prefetch */
+ val |= 0x30000000;
+
/*
* The L2 cache controller(PL310) version on the i.MX6D/Q is r3p1-50rel0
* The L2 cache controller(PL310) version on the i.MX6DL/SOLO/SL is r3p2
@@ -120,11 +125,9 @@ int mxc_init_l2x0(void)
* Workaround: The only workaround to this erratum is to disable the
* double linefill feature. This is the default behavior.
*/
- if (!cpu_is_mx6q()) {
- val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
+ if (!cpu_is_mx6q())
val |= 0x40800000;
- writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
- }
+ writel(val, IO_ADDRESS(L2_BASE_ADDR + L2X0_PREFETCH_CTRL));
val = readl(IO_ADDRESS(L2_BASE_ADDR + L2X0_POWER_CTRL));
val |= L2X0_DYNAMIC_CLK_GATING_EN;