summaryrefslogtreecommitdiff
path: root/arch/mips/loongson2ef/common/pm.c
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2019-10-20 22:43:15 +0800
committerPaul Burton <paulburton@kernel.org>2019-11-01 14:31:28 -0700
commit5831fdb099ddeec9849658cd534fdcbb03aa6ff9 (patch)
treedaf08595f995f465ef9a5e131ea8d0fc18760cec /arch/mips/loongson2ef/common/pm.c
parent71e2f4dd5a65bd8dbca0b77661e75eea471168f8 (diff)
MIPS: Loongson2ef: clean up loongson64 related code
Remove unrelevent macros, defines and codes from loongson2ef mach. Also rename some defines to match new naming. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Signed-off-by: Paul Burton <paulburton@kernel.org> Cc: linux-mips@vger.kernel.org Cc: paul.burton@mips.com
Diffstat (limited to 'arch/mips/loongson2ef/common/pm.c')
-rw-r--r--arch/mips/loongson2ef/common/pm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/loongson2ef/common/pm.c b/arch/mips/loongson2ef/common/pm.c
index b8aed878d912..11f4cfd581fb 100644
--- a/arch/mips/loongson2ef/common/pm.c
+++ b/arch/mips/loongson2ef/common/pm.c
@@ -75,7 +75,7 @@ int __weak wakeup_loongson(void)
static void wait_for_wakeup_events(void)
{
while (!wakeup_loongson())
- LOONGSON_CHIPCFG(0) &= ~0x7;
+ writel(readl(LOONGSON_CHIPCFG) & ~0x7, LOONGSON_CHIPCFG);
}
/*
@@ -98,15 +98,16 @@ static void loongson_suspend_enter(void)
stop_perf_counters();
- cached_cpu_freq = LOONGSON_CHIPCFG(0);
+ cached_cpu_freq = readl(LOONGSON_CHIPCFG);
/* Put CPU into wait mode */
- LOONGSON_CHIPCFG(0) &= ~0x7;
+ writel(readl(LOONGSON_CHIPCFG) & ~0x7, LOONGSON_CHIPCFG);
/* wait for the given events to wakeup cpu from wait mode */
wait_for_wakeup_events();
- LOONGSON_CHIPCFG(0) = cached_cpu_freq;
+ writel(cached_cpu_freq, LOONGSON_CHIPCFG);
+
mmiowb();
}