diff options
author | Pritesh Raithatha <praithatha@nvidia.com> | 2018-06-12 02:00:19 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-25 05:26:52 -0400 |
commit | 84c3ab37fbff5370200a5e15b928ff3c7d3a75d9 (patch) | |
tree | 97ac3656bc06758db5287b284fc38fda1dce3eb1 /include | |
parent | cd185b13089a99bb4978819fcda02da58c195113 (diff) |
iommu: arm-smmu: Add SMMU suspend support
Allocate memory required to store multiple SMMU registers.
Fill memory with register address-value pair during suspend.
Write memory start address pfn to scratch register that will be
used by warmboot for restoring registers from memory.
Bug 200383912
Change-Id: I001788684571af9e92d4c269272daf54e6a34671
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1746963
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/arm-smmu-suspend.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/arm-smmu-suspend.h b/include/linux/arm-smmu-suspend.h new file mode 100644 index 000000000..607d2eecc --- /dev/null +++ b/include/linux/arm-smmu-suspend.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2018 NVIDIA Corporation. All rights reserved. | ||
3 | * | ||
4 | * NVIDIA Corporation and its licensors retain all intellectual property | ||
5 | * and proprietary rights in and to this software and related documentation | ||
6 | * and any modifications thereto. Any use, reproduction, disclosure or | ||
7 | * distribution of this software and related documentation without an express | ||
8 | * license agreement from NVIDIA Corporation is strictly prohibited. | ||
9 | */ | ||
10 | |||
11 | #ifndef _ARM_SMMU_SUSPEND_H | ||
12 | #define _ARM_SMMU_SUSPEND_H | ||
13 | |||
14 | #ifdef CONFIG_PM_SLEEP | ||
15 | int arm_smmu_suspend_init(void __iomem **smmu_base, u32 *smmu_base_pa, | ||
16 | int num_smmus, unsigned long smmu_size, | ||
17 | unsigned long smmu_pgshift, u32 scratch_reg_pa); | ||
18 | void arm_smmu_suspend_exit(void); | ||
19 | #else | ||
20 | int arm_smmu_suspend_init(void __iomem **smmu_base, u32 *smmu_base_pa, | ||
21 | int num_smmus, unsigned long smmu_size, | ||
22 | unsigned long smmu_pgshift, u32 scratch_reg_pa) | ||
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | void arm_smmu_suspend_exit(void) {} | ||
27 | #endif | ||
28 | |||
29 | #endif | ||