1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
From 325da1189ff8c8da69704ccec9f573c268300ef2 Mon Sep 17 00:00:00 2001
From: Tomasz Figa <t.figa@samsung.com>
Date: Wed, 5 Jun 2013 17:38:51 +0200
Subject: [PATCH 0341/1302] ARM: EXYNOS: firmware: Implement l2x0_resume
operation
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
arch/arm/mach-exynos/firmware.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/mach-exynos/firmware.c b/arch/arm/mach-exynos/firmware.c
index 3f98bf7..bce0b97 100644
--- a/arch/arm/mach-exynos/firmware.c
+++ b/arch/arm/mach-exynos/firmware.c
@@ -15,6 +15,7 @@
#include <linux/of_address.h>
#include <asm/firmware.h>
+#include <asm/hardware/cache-l2x0.h>
#include <mach/map.h>
@@ -49,6 +50,17 @@ static int exynos_l2x0_init(void)
return 0;
}
+static int exynos_l2x0_resume(void)
+{
+ exynos_smc(SMC_CMD_L2X0SETUP1, l2x0_saved_regs.tag_latency,
+ l2x0_saved_regs.data_latency, l2x0_saved_regs.prefetch_ctrl);
+ exynos_smc(SMC_CMD_L2X0SETUP2, 0x3, 0x7C470001, 0xC200FFFF);
+ exynos_smc(SMC_CMD_L2X0INVALL, 0, 0, 0);
+ exynos_smc(SMC_CMD_L2X0CTRL, 1, 0, 0);
+
+ return 0;
+}
+
static int exynos_suspend(unsigned long resume_addr)
{
writel(EXYNOS_SLEEP_MAGIC, S5P_VA_SYSRAM_NS + 0xC);
@@ -77,6 +89,7 @@ static const struct firmware_ops exynos_firmware_ops = {
.set_cpu_boot_addr = exynos_set_cpu_boot_addr,
.cpu_boot = exynos_cpu_boot,
.l2x0_init = exynos_l2x0_init,
+ .l2x0_resume = exynos_l2x0_resume,
.suspend = exynos_suspend,
.resume = exynos_resume,
.c15resume = exynos_c15resume,
--
1.8.3.2
|