Exemplo n.º 1
0
#define S5P_UINTP   0x30
#define S5P_UINTSP  0x34
#define S5P_UINTM   0x38

#define SAVE_UART(va) \
	SAVE_ITEM((va) + S3C2410_ULCON), \
	SAVE_ITEM((va) + S3C2410_UCON), \
	SAVE_ITEM((va) + S3C2410_UFCON), \
	SAVE_ITEM((va) + S3C2410_UMCON), \
	SAVE_ITEM((va) + S3C2410_UBRDIV), \
	SAVE_ITEM((va) + S3C2410_UDIVSLOT), \
	SAVE_ITEM((va) + S3C2410_UINTMSK)


static struct sleep_save uart_save[] = {
    SAVE_UART(S3C24XX_VA_UART2),
};


#define DBG(fmt...)
//#define DBG(fmt...) printk(fmt)

#define s5pc11x_pm_debug_init() do { } while(0)
#define s5pc11x_pm_check_prepare() do { } while(0)
#define s5pc11x_pm_check_restore() do { } while(0)
#define s5pc11x_pm_check_store()   do { } while(0)


#ifdef CONFIG_PM_PWR_GATING

unsigned int g_power_domain_lock_token = 0;
};


#define SAVE_UART(va) \
	SAVE_ITEM((va) + S3C_ULCON), \
	SAVE_ITEM((va) + S3C_UCON), \
	SAVE_ITEM((va) + S3C_UFCON), \
	SAVE_ITEM((va) + S3C_UMCON), \
	SAVE_ITEM((va) + S3C_UBRDIV), \
	SAVE_ITEM((va) + S3C_UDIVSLOT), \
	SAVE_ITEM((va) + S3C_UINTMSK)


static struct sleep_save uart_save[] = {
	SAVE_UART(S3C24XX_VA_UART0),
	SAVE_UART(S3C24XX_VA_UART1),
	SAVE_UART(S3C24XX_VA_UART2),
	SAVE_UART(S3C24XX_VA_UART3),
};

#if 1


/* debug
 *
 * we send the debug to printascii() to allow it to be seen if the
 * system never wakes up from the sleep
*/

extern void printascii(const char *);
Exemplo n.º 3
0
	SAVE_ITEM(S3C2410_GPHUP),

	SAVE_ITEM(S3C2410_DCLKCON),
};

#ifdef CONFIG_S3C2410_PM_DEBUG

#define SAVE_UART(va) \
	SAVE_ITEM((va) + S3C2410_ULCON), \
	SAVE_ITEM((va) + S3C2410_UCON), \
	SAVE_ITEM((va) + S3C2410_UFCON), \
	SAVE_ITEM((va) + S3C2410_UMCON), \
	SAVE_ITEM((va) + S3C2410_UBRDIV)

static struct sleep_save uart_save[] = {
	SAVE_UART(S3C2410_VA_UART0),
	SAVE_UART(S3C2410_VA_UART1),
	SAVE_UART(S3C2410_VA_UART2),
};

/* debug
 *
 * we send the debug to printascii() to allow it to be seen if the
 * system never wakes up from the sleep
*/

extern void printascii(const char *);

static void pm_dbg(const char *fmt, ...)
{
	va_list va;
Exemplo n.º 4
0
/* UART power management code */

#ifdef CONFIG_PM
#include <plat/pm.h>

#define SAVE_UART(va) \
	SAVE_ITEM((va) + S3C_ULCON), \
	SAVE_ITEM((va) + S3C_UCON), \
	SAVE_ITEM((va) + S3C_UFCON), \
	SAVE_ITEM((va) + S3C_UMCON), \
	SAVE_ITEM((va) + S3C_UBRDIV), \
	SAVE_ITEM((va) + S3C_UDIVSLOT), \
	SAVE_ITEM((va) + S3C_UINTMSK)

static struct sleep_save uart_save[] = {
	SAVE_UART(S3C_VA_UART0),
	SAVE_UART(S3C_VA_UART1),
	SAVE_UART(S3C_VA_UART2),
	SAVE_UART(S3C_VA_UART3),
};

#define SAVE_UART_PORT (ARRAY_SIZE(uart_save)  / 4 )

static int s3c_serial_suspend(struct platform_device *dev, pm_message_t state)
{
	struct uart_port *port = s3c_dev_to_port(&dev->dev);

	unsigned int gpadata = 0;
	unsigned int gpaconslp = 0;

	if(port->line == 0) {
Exemplo n.º 5
0
#ifdef CONFIG_PM

#include <plat/pm.h>

#define SAVE_UART(va) \
	 SAVE_ITEM((va) + S3C2410_ULCON), \
	 SAVE_ITEM((va) + S3C2410_UCON), \
	 SAVE_ITEM((va) + S3C2410_UFCON), \
	 SAVE_ITEM((va) + S3C2410_UMCON), \
	 SAVE_ITEM((va) + S3C2410_UBRDIV), \
	 SAVE_ITEM((va) + S3C2410_UDIVSLOT), \
	 SAVE_ITEM((va) + S3C2410_UINTMSK)

static struct sleep_save uart_save[] = {
	SAVE_UART(S3C_VA_UARTx(0)),
	SAVE_UART(S3C_VA_UARTx(1)),
	SAVE_UART(S3C_VA_UARTx(2)),
	SAVE_UART(S3C_VA_UARTx(3)),
};

#define SAVE_UART_PORT (ARRAY_SIZE(uart_save) / 4)

static int
s3c24xx_serial_suspend(struct platform_device *dev, pm_message_t state)
{
	struct uart_port *port = s3c24xx_dev_to_port(&dev->dev);

	if (port) {
		uart_suspend_port(&s3c24xx_uart_drv, port);
		s3c_pm_do_save(uart_save + port->line * SAVE_UART_PORT,
Exemplo n.º 6
0
        SAVE_ITEM(PM_NFCONF),
        SAVE_ITEM(PM_NFCONT),
};

#define SAVE_UART(va) \
	SAVE_ITEM((va) + S3C2410_ULCON), \
	SAVE_ITEM((va) + S3C2410_UCON), \
	SAVE_ITEM((va) + S3C2410_UFCON), \
	SAVE_ITEM((va) + S3C2410_UMCON), \
	SAVE_ITEM((va) + S3C2410_UBRDIV), \
	SAVE_ITEM((va) + S3C2410_UDIVSLOT), \
	SAVE_ITEM((va) + S3C2410_UINTMSK)


static struct sleep_save uart_save[] = {
	SAVE_UART(S3C24XX_VA_UART0),
};

#define DBG(fmt...)

#define s5pc1xx_pm_debug_init() do { } while(0)
#define s5pc1xx_pm_check_prepare() do { } while(0)
#define s5pc1xx_pm_check_restore() do { } while(0)
#define s5pc1xx_pm_check_store()   do { } while(0)

/* helper functions to save and restore register state */

void s5pc1xx_pm_do_save(struct sleep_save *ptr, int count)
{
	for (; count > 0; count--, ptr++) {
		ptr->val = __raw_readl(ptr->reg);