PageRenderTime 16ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/mips/jz4740/pm.c

http://github.com/mirrors/linux
C | 34 lines | 21 code | 8 blank | 5 comment | 0 complexity | 61303841d5681578bdd1ac8337ce79e4 MD5 | raw file
 1// SPDX-License-Identifier: GPL-2.0-or-later
 2/*
 3 *  Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
 4 *	JZ4740 SoC power management support
 5 */
 6
 7#include <linux/init.h>
 8#include <linux/pm.h>
 9#include <linux/delay.h>
10#include <linux/suspend.h>
11
12static int jz4740_pm_enter(suspend_state_t state)
13{
14	__asm__(".set\tmips3\n\t"
15		"wait\n\t"
16		".set\tmips0");
17
18
19
20	return 0;
21}
22
23static const struct platform_suspend_ops jz4740_pm_ops = {
24	.valid		= suspend_valid_only_mem,
25	.enter		= jz4740_pm_enter,
26};
27
28static int __init jz4740_pm_init(void)
29{
30	suspend_set_ops(&jz4740_pm_ops);
31	return 0;
32
33}
34late_initcall(jz4740_pm_init);