ARM: SAMSUNG: Move pm-check.c to plat-samsung
Move the pm-check.c file to plat-samsung for all Samsung SoC users, and update Kconfig names to make them SAMSUNG_ instead of S3C2410_ Sed expresions used to make the change: s/S3C2410_PM_DEBUG/SAMSUNG_PM_DEBUG/g s/S3C2410_PM_CHECK/SAMSUNG_PM_CHECK/g Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
parent
106cc6aa73
commit
8005745d6e
9 changed files with 59 additions and 58 deletions
|
@ -199,8 +199,8 @@ CONFIG_S3C_BOOT_UART_FORCE_FIFO=y
|
|||
#
|
||||
# Power management
|
||||
#
|
||||
# CONFIG_S3C2410_PM_DEBUG is not set
|
||||
# CONFIG_S3C2410_PM_CHECK is not set
|
||||
# CONFIG_SAMSUNG_PM_DEBUG is not set
|
||||
# CONFIG_SAMSUNG_PM_CHECK is not set
|
||||
CONFIG_S3C_LOWLEVEL_UART_PORT=0
|
||||
CONFIG_S3C_GPIO_SPACE=0
|
||||
|
||||
|
|
|
@ -203,8 +203,8 @@ CONFIG_S3C_BOOT_UART_FORCE_FIFO=y
|
|||
#
|
||||
# Power management
|
||||
#
|
||||
# CONFIG_S3C2410_PM_DEBUG is not set
|
||||
# CONFIG_S3C2410_PM_CHECK is not set
|
||||
# CONFIG_SAMSUNG_PM_DEBUG is not set
|
||||
# CONFIG_SAMSUNG_PM_CHECK is not set
|
||||
CONFIG_S3C_LOWLEVEL_UART_PORT=0
|
||||
CONFIG_S3C_GPIO_SPACE=0
|
||||
CONFIG_S3C_DEV_HSMMC=y
|
||||
|
|
|
@ -59,50 +59,6 @@ config S3C_BOOT_UART_FORCE_FIFO
|
|||
Say Y here to force the UART FIFOs on during the kernel
|
||||
uncompressor
|
||||
|
||||
comment "Power management"
|
||||
|
||||
config S3C2410_PM_DEBUG
|
||||
bool "S3C2410 PM Suspend debug"
|
||||
depends on PM
|
||||
help
|
||||
Say Y here if you want verbose debugging from the PM Suspend and
|
||||
Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
for more information.
|
||||
|
||||
config S3C_PM_DEBUG_LED_SMDK
|
||||
bool "SMDK LED suspend/resume debugging"
|
||||
depends on PM && (MACH_SMDK6410)
|
||||
help
|
||||
Say Y here to enable the use of the SMDK LEDs on the baseboard
|
||||
for debugging of the state of the suspend and resume process.
|
||||
|
||||
Note, this currently only works for S3C64XX based SMDK boards.
|
||||
|
||||
config S3C2410_PM_CHECK
|
||||
bool "S3C2410 PM Suspend Memory CRC"
|
||||
depends on PM && CRC32
|
||||
help
|
||||
Enable the PM code's memory area checksum over sleep. This option
|
||||
will generate CRCs of all blocks of memory, and store them before
|
||||
going to sleep. The blocks are then checked on resume for any
|
||||
errors.
|
||||
|
||||
Note, this can take several seconds depending on memory size
|
||||
and CPU speed.
|
||||
|
||||
See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
|
||||
config S3C2410_PM_CHECK_CHUNKSIZE
|
||||
int "S3C2410 PM Suspend CRC Chunksize (KiB)"
|
||||
depends on PM && S3C2410_PM_CHECK
|
||||
default 64
|
||||
help
|
||||
Set the chunksize in Kilobytes of the CRC for checking memory
|
||||
corruption over suspend and resume. A smaller value will mean that
|
||||
the CRC data block will take more memory, but wil identify any
|
||||
faults with better precision.
|
||||
|
||||
See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
|
||||
config S3C_LOWLEVEL_UART_PORT
|
||||
int "S3C UART to use for low-level messages"
|
||||
|
|
|
@ -21,4 +21,3 @@ obj-$(CONFIG_S3C_DMA) += dma.o
|
|||
# PM support
|
||||
|
||||
obj-$(CONFIG_PM) += pm.o
|
||||
obj-$(CONFIG_S3C2410_PM_CHECK) += pm-check.o
|
||||
|
|
|
@ -111,7 +111,7 @@ extern int s3c24xx_irq_resume(struct sys_device *dev);
|
|||
|
||||
/* PM debug functions */
|
||||
|
||||
#ifdef CONFIG_S3C2410_PM_DEBUG
|
||||
#ifdef CONFIG_SAMSUNG_PM_DEBUG
|
||||
/**
|
||||
* s3c_pm_dbg() - low level debug function for use in suspend/resume.
|
||||
* @msg: The message to print.
|
||||
|
@ -141,7 +141,7 @@ static inline void s3c_pm_debug_smdkled(u32 set, u32 clear) { }
|
|||
|
||||
/* suspend memory checking */
|
||||
|
||||
#ifdef CONFIG_S3C2410_PM_CHECK
|
||||
#ifdef CONFIG_SAMSUNG_PM_CHECK
|
||||
extern void s3c_pm_check_prepare(void);
|
||||
extern void s3c_pm_check_restore(void);
|
||||
extern void s3c_pm_check_cleanup(void);
|
||||
|
|
|
@ -41,7 +41,7 @@ unsigned long s3c_pm_flags;
|
|||
* resume before the console layer is available.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_S3C2410_PM_DEBUG
|
||||
#ifdef CONFIG_SAMSUNG_PM_DEBUG
|
||||
extern void printascii(const char *);
|
||||
|
||||
void s3c_pm_dbg(const char *fmt, ...)
|
||||
|
@ -65,13 +65,13 @@ static inline void s3c_pm_debug_init(void)
|
|||
#else
|
||||
#define s3c_pm_debug_init() do { } while(0)
|
||||
|
||||
#endif /* CONFIG_S3C2410_PM_DEBUG */
|
||||
#endif /* CONFIG_SAMSUNG_PM_DEBUG */
|
||||
|
||||
/* Save the UART configurations if we are configured for debug. */
|
||||
|
||||
unsigned char pm_uart_udivslot;
|
||||
|
||||
#ifdef CONFIG_S3C2410_PM_DEBUG
|
||||
#ifdef CONFIG_SAMSUNG_PM_DEBUG
|
||||
|
||||
struct pm_uart_save uart_save[CONFIG_SERIAL_SAMSUNG_UARTS];
|
||||
|
||||
|
|
|
@ -132,4 +132,49 @@ config S3C_DEV_NAND
|
|||
help
|
||||
Compile in platform device definition for NAND controller
|
||||
|
||||
comment "Power management"
|
||||
|
||||
config SAMSUNG_PM_DEBUG
|
||||
bool "S3C2410 PM Suspend debug"
|
||||
depends on PM
|
||||
help
|
||||
Say Y here if you want verbose debugging from the PM Suspend and
|
||||
Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
for more information.
|
||||
|
||||
config S3C_PM_DEBUG_LED_SMDK
|
||||
bool "SMDK LED suspend/resume debugging"
|
||||
depends on PM && (MACH_SMDK6410)
|
||||
help
|
||||
Say Y here to enable the use of the SMDK LEDs on the baseboard
|
||||
for debugging of the state of the suspend and resume process.
|
||||
|
||||
Note, this currently only works for S3C64XX based SMDK boards.
|
||||
|
||||
config SAMSUNG_PM_CHECK
|
||||
bool "S3C2410 PM Suspend Memory CRC"
|
||||
depends on PM && CRC32
|
||||
help
|
||||
Enable the PM code's memory area checksum over sleep. This option
|
||||
will generate CRCs of all blocks of memory, and store them before
|
||||
going to sleep. The blocks are then checked on resume for any
|
||||
errors.
|
||||
|
||||
Note, this can take several seconds depending on memory size
|
||||
and CPU speed.
|
||||
|
||||
See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
|
||||
config SAMSUNG_PM_CHECK_CHUNKSIZE
|
||||
int "S3C2410 PM Suspend CRC Chunksize (KiB)"
|
||||
depends on PM && SAMSUNG_PM_CHECK
|
||||
default 64
|
||||
help
|
||||
Set the chunksize in Kilobytes of the CRC for checking memory
|
||||
corruption over suspend and resume. A smaller value will mean that
|
||||
the CRC data block will take more memory, but wil identify any
|
||||
faults with better precision.
|
||||
|
||||
See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
|
||||
endif
|
||||
|
|
|
@ -42,6 +42,7 @@ obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o
|
|||
# PM support
|
||||
|
||||
obj-$(CONFIG_PM) += pm-gpio.o
|
||||
obj-$(CONFIG_SAMSUNG_PM_CHECK) += pm-check.o
|
||||
|
||||
# PWM support
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
#include <plat/pm.h>
|
||||
|
||||
#if CONFIG_S3C2410_PM_CHECK_CHUNKSIZE < 1
|
||||
#error CONFIG_S3C2410_PM_CHECK_CHUNKSIZE must be a positive non-zero value
|
||||
#if CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE < 1
|
||||
#error CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE must be a positive non-zero value
|
||||
#endif
|
||||
|
||||
/* suspend checking code...
|
||||
|
@ -29,12 +29,12 @@
|
|||
* this next area does a set of crc checks over all the installed
|
||||
* memory, so the system can verify if the resume was ok.
|
||||
*
|
||||
* CONFIG_S3C2410_PM_CHECK_CHUNKSIZE defines the block-size for the CRC,
|
||||
* CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE defines the block-size for the CRC,
|
||||
* increasing it will mean that the area corrupted will be less easy to spot,
|
||||
* and reducing the size will cause the CRC save area to grow
|
||||
*/
|
||||
|
||||
#define CHECK_CHUNKSIZE (CONFIG_S3C2410_PM_CHECK_CHUNKSIZE * 1024)
|
||||
#define CHECK_CHUNKSIZE (CONFIG_SAMSUNG_PM_CHECK_CHUNKSIZE * 1024)
|
||||
|
||||
static u32 crc_size; /* size needed for the crc block */
|
||||
static u32 *crcs; /* allocated over suspend/resume */
|
Loading…
Reference in a new issue