Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187405
b: refs/heads/master
c: 8005745
h: refs/heads/master
i:
  187403: f752601
v: v3
  • Loading branch information
Ben Dooks committed Jan 21, 2010
1 parent 2cd6eb8 commit aeb0387
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 59 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 106cc6aa73f594015fc8b99f7c70d1b7cf23f19a
refs/heads/master: 8005745d6eea79da8ee2e7fe978d14e412aa3353
4 changes: 2 additions & 2 deletions trunk/arch/arm/configs/mini2440_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/configs/s3c2410_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
44 changes: 0 additions & 44 deletions trunk/arch/arm/plat-s3c/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/arm/plat-s3c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions trunk/arch/arm/plat-s3c/include/plat/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/arm/plat-s3c/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...)
Expand All @@ -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];

Expand Down
45 changes: 45 additions & 0 deletions trunk/arch/arm/plat-samsung/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-samsung/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@

#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...
*
* 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 */
Expand Down

0 comments on commit aeb0387

Please sign in to comment.