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
This commit is contained in:
Jiaxun Yang
2019-10-20 22:43:15 +08:00
committed by Paul Burton
parent 71e2f4dd5a
commit 5831fdb099
30 changed files with 56 additions and 1097 deletions

View File

@@ -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();
}