summaryrefslogtreecommitdiffstats
path: root/arch/unicore32/kernel/pm.c
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2020-06-10 09:45:20 +0300
committerMike Rapoport <rppt@linux.ibm.com>2020-07-01 12:09:13 +0300
commitfb37409a01b011a664347702f44dbf13fa7c7486 (patch)
treef9422acc3b91dd0df2721eaca9209e867fe10eb9 /arch/unicore32/kernel/pm.c
parent9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68 (diff)
downloadlinux-fb37409a01b011a664347702f44dbf13fa7c7486.tar.bz2
arch: remove unicore32 port
The unicore32 port do not seem maintained for a long time now, there is no upstream toolchain that can create unicore32 binaries and all the links to prebuilt toolchains for unicore32 are dead. Even compilers that were available are not supported by the kernel anymore. Guenter Roeck says: I have stopped building unicore32 images since v4.19 since there is no available compiler that is still supported by the kernel. I am surprised that support for it has not been removed from the kernel. Remove unicore32 port. Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'arch/unicore32/kernel/pm.c')
-rw-r--r--arch/unicore32/kernel/pm.c121
1 files changed, 0 insertions, 121 deletions
diff --git a/arch/unicore32/kernel/pm.c b/arch/unicore32/kernel/pm.c
deleted file mode 100644
index 94b7f9df6c1a..000000000000
--- a/arch/unicore32/kernel/pm.c
+++ /dev/null
@@ -1,121 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * linux/arch/unicore32/kernel/pm.c
- *
- * Code specific to PKUnity SoC and UniCore ISA
- *
- * Maintained by GUAN Xue-tao <gxt@mprc.pku.edu.cn>
- * Copyright (C) 2001-2010 Guan Xuetao
- */
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/suspend.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <linux/io.h>
-
-#include <mach/hardware.h>
-#include <mach/pm.h>
-
-#include "setup.h"
-
-struct puv3_cpu_pm_fns *puv3_cpu_pm_fns;
-static unsigned long *sleep_save;
-
-int puv3_pm_enter(suspend_state_t state)
-{
- unsigned long sleep_save_checksum = 0, checksum = 0;
- int i;
-
- /* skip registers saving for standby */
- if (state != PM_SUSPEND_STANDBY) {
- puv3_cpu_pm_fns->save(sleep_save);
- /* before sleeping, calculate and save a checksum */
- for (i = 0; i < puv3_cpu_pm_fns->save_count - 1; i++)
- sleep_save_checksum += sleep_save[i];
- }
-
- /* *** go zzz *** */
- puv3_cpu_pm_fns->enter(state);
- cpu_init();
-#ifdef CONFIG_INPUT_KEYBOARD
- puv3_ps2_init();
-#endif
-#ifdef CONFIG_PCI
- pci_puv3_preinit();
-#endif
- if (state != PM_SUSPEND_STANDBY) {
- /* after sleeping, validate the checksum */
- for (i = 0; i < puv3_cpu_pm_fns->save_count - 1; i++)
- checksum += sleep_save[i];
-
- /* if invalid, display message and wait for a hardware reset */
- if (checksum != sleep_save_checksum) {
- while (1)
- puv3_cpu_pm_fns->enter(state);
- }
- puv3_cpu_pm_fns->restore(sleep_save);
- }
-
- pr_debug("*** made it back from resume\n");
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(puv3_pm_enter);
-
-unsigned long sleep_phys_sp(void *sp)
-{
- return virt_to_phys(sp);
-}
-
-static int puv3_pm_valid(suspend_state_t state)
-{
- if (puv3_cpu_pm_fns)
- return puv3_cpu_pm_fns->valid(state);
-
- return -EINVAL;
-}
-
-static int puv3_pm_prepare(void)
-{
- int ret = 0;
-
- if (puv3_cpu_pm_fns && puv3_cpu_pm_fns->prepare)
- ret = puv3_cpu_pm_fns->prepare();
-
- return ret;
-}
-
-static void puv3_pm_finish(void)
-{
- if (puv3_cpu_pm_fns && puv3_cpu_pm_fns->finish)
- puv3_cpu_pm_fns->finish();
-}
-
-static struct platform_suspend_ops puv3_pm_ops = {
- .valid = puv3_pm_valid,
- .enter = puv3_pm_enter,
- .prepare = puv3_pm_prepare,
- .finish = puv3_pm_finish,
-};
-
-static int __init puv3_pm_init(void)
-{
- if (!puv3_cpu_pm_fns) {
- printk(KERN_ERR "no valid puv3_cpu_pm_fns defined\n");
- return -EINVAL;
- }
-
- sleep_save = kmalloc_array(puv3_cpu_pm_fns->save_count,
- sizeof(unsigned long),
- GFP_KERNEL);
- if (!sleep_save) {
- printk(KERN_ERR "failed to alloc memory for pm save\n");
- return -ENOMEM;
- }
-
- suspend_set_ops(&puv3_pm_ops);
- return 0;
-}
-
-device_initcall(puv3_pm_init);