Lines Matching +full:suspend +full:- +full:to +full:- +full:ram
1 // SPDX-License-Identifier: GPL-2.0
3 // originally in linux/arch/arm/plat-s3c24xx/pm.c
5 // Copyright (c) 2004-2008 Simtec Electronics
9 // S3C Power Mangament - suspend/resume memory corruption check.
12 #include <linux/suspend.h>
18 #include <linux/soc/samsung/s3c-pm.h>
21 #error CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE must be a positive non-zero value
24 /* suspend checking code...
29 * CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE defines the block-size for the CRC,
30 * increasing it will mean that the area corrupted will be less easy to spot,
31 * and reducing the size will cause the CRC save area to grow
37 static u32 *crcs; /* allocated over suspend/resume */
43 * go through the given resource list, and look for system ram
49 if (ptr->child != NULL) in s3c_pm_run_res()
50 s3c_pm_run_res(ptr->child, fn, arg); in s3c_pm_run_res()
52 if ((ptr->flags & IORESOURCE_SYSTEM_RAM) in s3c_pm_run_res()
54 S3C_PMDBG("Found system RAM at %08lx..%08lx\n", in s3c_pm_run_res()
55 (unsigned long)ptr->start, in s3c_pm_run_res()
56 (unsigned long)ptr->end); in s3c_pm_run_res()
60 ptr = ptr->sibling; in s3c_pm_run_res()
73 size += CHECK_CHUNKSIZE-1; in s3c_pm_countram()
77 (unsigned long)res->start, (unsigned long)res->end, size); in s3c_pm_countram()
108 for (addr = res->start; addr < res->end; in s3c_pm_makecheck()
110 left = res->end - addr; in s3c_pm_makecheck()
152 * s3c_pm_runcheck() - helper to check a resource on restore.
153 * @res: The resource to check
154 * @vak: Pointer to list of CRC32 values to check.
158 * CRC to ensure that memory is restored. The function tries to skip as
159 * many of the areas used during the suspend process.
171 for (addr = res->start; addr < res->end; in s3c_pm_runcheck()
173 left = res->end - addr; in s3c_pm_runcheck()
209 * s3c_pm_check_restore() - memory check called on resume
212 * to hold them
221 * s3c_pm_check_cleanup() - free memory resources
223 * Free the resources that where allocated by the suspend