blob: 569151b3edc0aa38cbb89d3b669fe0703ec32c06 [file] [log] [blame]
Thomas Gleixner9952f692019-05-28 10:10:04 -07001/* SPDX-License-Identifier: GPL-2.0-only */
Joseph Lod457ef352012-10-31 17:41:17 +08002/*
3 * Copyright (C) 2010 Google, Inc.
4 * Copyright (c) 2010-2012 NVIDIA Corporation. All rights reserved.
5 *
6 * Author:
7 * Colin Cross <ccross@google.com>
Joseph Lod457ef352012-10-31 17:41:17 +08008 */
9
10#ifndef _MACH_TEGRA_PM_H_
11#define _MACH_TEGRA_PM_H_
12
Joseph Lo95872f42013-08-12 17:40:03 +080013struct tegra_lp1_iram {
14 void *start_addr;
15 void *end_addr;
16};
Thierry Reding72323982014-07-11 13:19:06 +020017
Joseph Lo95872f42013-08-12 17:40:03 +080018extern struct tegra_lp1_iram tegra_lp1_iram;
19extern void (*tegra_sleep_core_finish)(unsigned long v2p);
20
Joseph Lo731a9272013-08-12 17:40:05 +080021void tegra20_lp1_iram_hook(void);
22void tegra20_sleep_core_init(void);
Joseph Loe7a932b2013-08-12 17:40:04 +080023void tegra30_lp1_iram_hook(void);
24void tegra30_sleep_core_init(void);
25
Joseph Lo8f6a0b62013-06-04 18:47:35 +080026void tegra_clear_cpu_in_lp2(void);
27bool tegra_set_cpu_in_lp2(void);
Thierry Redingfa45caf2016-04-28 14:55:15 +020028int tegra_cpu_do_idle(void);
Joseph Lo4d82d052013-04-02 01:20:50 +000029void tegra_idle_lp2_last(void);
Joseph Lod5529202012-10-31 17:41:21 +080030extern void (*tegra_tear_down_cpu)(void);
31
Joseph Loc8c2e602013-04-03 19:31:47 +080032#ifdef CONFIG_PM_SLEEP
Joseph Loc8c2e602013-04-03 19:31:47 +080033void tegra_init_suspend(void);
34#else
Joseph Loc8c2e602013-04-03 19:31:47 +080035static inline void tegra_init_suspend(void) {}
36#endif
37
Joseph Lod457ef352012-10-31 17:41:17 +080038#endif /* _MACH_TEGRA_PM_H_ */