~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/mips/mti-malta/malta-reset.c

Version: ~ [ linux-5.9 ] ~ [ linux-5.8.14 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.70 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.150 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.200 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.238 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.238 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * This file is subject to the terms and conditions of the GNU General Public
  3  * License.  See the file "COPYING" in the main directory of this archive
  4  * for more details.
  5  *
  6  * Carsten Langgaard, carstenl@mips.com
  7  * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
  8  */
  9 #include <linux/io.h>
 10 #include <linux/pm.h>
 11 
 12 #include <asm/reboot.h>
 13 #include <asm/mach-malta/malta-pm.h>
 14 
 15 #define SOFTRES_REG     0x1f000500
 16 #define GORESET         0x42
 17 
 18 static void mips_machine_restart(char *command)
 19 {
 20         unsigned int __iomem *softres_reg =
 21                 ioremap(SOFTRES_REG, sizeof(unsigned int));
 22 
 23         __raw_writel(GORESET, softres_reg);
 24 }
 25 
 26 static void mips_machine_halt(void)
 27 {
 28         while (true);
 29 }
 30 
 31 static void mips_machine_power_off(void)
 32 {
 33         mips_pm_suspend(PIIX4_FUNC3IO_PMCNTRL_SUS_TYP_SOFF);
 34 
 35         pr_info("Failed to power down, resetting\n");
 36         mips_machine_restart(NULL);
 37 }
 38 
 39 static int __init mips_reboot_setup(void)
 40 {
 41         _machine_restart = mips_machine_restart;
 42         _machine_halt = mips_machine_halt;
 43         pm_power_off = mips_machine_power_off;
 44 
 45         return 0;
 46 }
 47 arch_initcall(mips_reboot_setup);
 48 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp