From 84c3ab37fbff5370200a5e15b928ff3c7d3a75d9 Mon Sep 17 00:00:00 2001 From: Pritesh Raithatha Date: Tue, 12 Jun 2018 11:30:19 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1746963 GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/arm-smmu-suspend.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 include/linux/arm-smmu-suspend.h (limited to 'include/linux') 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 @@ +/* + * Copyright (c) 2018 NVIDIA Corporation. All rights reserved. + * + * NVIDIA Corporation and its licensors retain all intellectual property + * and proprietary rights in and to this software and related documentation + * and any modifications thereto. Any use, reproduction, disclosure or + * distribution of this software and related documentation without an express + * license agreement from NVIDIA Corporation is strictly prohibited. + */ + +#ifndef _ARM_SMMU_SUSPEND_H +#define _ARM_SMMU_SUSPEND_H + +#ifdef CONFIG_PM_SLEEP +int arm_smmu_suspend_init(void __iomem **smmu_base, u32 *smmu_base_pa, + int num_smmus, unsigned long smmu_size, + unsigned long smmu_pgshift, u32 scratch_reg_pa); +void arm_smmu_suspend_exit(void); +#else +int arm_smmu_suspend_init(void __iomem **smmu_base, u32 *smmu_base_pa, + int num_smmus, unsigned long smmu_size, + unsigned long smmu_pgshift, u32 scratch_reg_pa) +{ + return 0; +} +void arm_smmu_suspend_exit(void) {} +#endif + +#endif -- cgit v1.2.2