#ifndef __ASM_ARCH_PM_CORE_H
#define __ASM_ARCH_PM_CORE_H __FILE__
+#include <linux/delay.h>
+#include <linux/gpio.h>
#include <mach/regs-pmu.h>
+#include <plat/gpio-cfg.h>
+#include <plat/gpio-core.h>
static inline void s3c_pm_debug_init_uart(void)
{
/* nothing here yet */
}
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+
+static inline void s3c_pm_arch_restore_uarts(void)
+{
+ if (soc_is_exynos5250()) {
+ WARN_ON_ONCE(!(__raw_readl(S5P_PAD_RET_UART_OPTION) &
+ EXYNOS5_PAD_RET_UART_AUTOMATIC_WAKEUP));
+
+ /* force gpio pins GPA1(4) and GPA1(5) to UART3 mode */
+ s3c_gpio_cfgpin(EXYNOS5_GPA1(4), S3C_GPIO_SPECIAL(2));
+ s3c_gpio_cfgpin(EXYNOS5_GPA1(5), S3C_GPIO_SPECIAL(2));
+
+ /* wait for things to settle */
+ mdelay(1);
+ }
+}
+
+#endif
+
static inline void s3c_pm_arch_prepare_irqs(void)
{
__raw_writel(s3c_irqwake_eintmask, S5P_EINT_WAKEUP_MASK);
#define S5P_PAD_RET_MAUDIO_OPTION S5P_PMUREG(0x3028)
#define S5P_PAD_RET_GPIO_OPTION S5P_PMUREG(0x3108)
+#define S5P_PAD_RET_UART_STATUS S5P_PMUREG(0x3124)
#define S5P_PAD_RET_UART_OPTION S5P_PMUREG(0x3128)
#define S5P_PAD_RET_MMCA_OPTION S5P_PMUREG(0x3148)
#define S5P_PAD_RET_MMCB_OPTION S5P_PMUREG(0x3168)
#define EXYNOS5_OPTION_USE_RETENTION (1 << 4)
+#define EXYNOS5_PAD_RET_UART_AUTOMATIC_WAKEUP (1 << 29)
+
#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x234)
#define EXYNOS5_SYS_DISP1BLK_CFG S5P_SYSREG(0x214)
#define ENABLE_FIMDBYPASS_DISP1 (1 << 15)
;
}
+static void exynos5_debug_enable_uart_wakeup(void)
+{
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+ unsigned int tmp;
+
+ /* Enable UART automatic wakeup for resume console output */
+ tmp = __raw_readl(S5P_PAD_RET_UART_OPTION);
+ tmp |= EXYNOS5_PAD_RET_UART_AUTOMATIC_WAKEUP;
+ __raw_writel(tmp, S5P_PAD_RET_UART_OPTION);
+#endif
+}
+
static void exynos5_init_pmu(void)
{
unsigned int i;
EXYNOS5_OPTION_USE_STANDBYWFI);
__raw_writel(tmp, exynos5_list_diable_wfi_wfe[i]);
}
+
+ exynos5_debug_enable_uart_wakeup();
}
void exynos4_sys_powerdown_conf(enum sys_powerdown mode)
udelay(10);
}
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+
+static inline void s3c_pm_arch_restore_uarts(void)
+{
+ /* nothing here yet */
+}
+
+#endif
+
static inline void s3c_pm_arch_prepare_irqs(void)
{
__raw_writel(s3c_irqwake_intmask, S3C2410_INTMSK);
udelay(10);
}
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+
+static inline void s3c_pm_arch_restore_uarts(void)
+{
+ /* nothing here yet */
+}
+
+#endif
+
static inline void s3c_pm_arch_prepare_irqs(void)
{
/* VIC should have already been taken care of */
udelay(10);
}
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+
+static inline void s3c_pm_arch_restore_uarts(void)
+{
+ /* nothing here yet */
+}
+
+#endif
+
static inline void s3c_pm_arch_prepare_irqs(void)
{
/* VIC should have already been taken care of */
/* nothing here yet */
}
+#ifdef CONFIG_SAMSUNG_PM_DEBUG
+
+static inline void s3c_pm_arch_restore_uarts(void)
+{
+ /* nothing here yet */
+}
+
+#endif
+
static inline void s3c_pm_arch_prepare_irqs(void)
{
__raw_writel(s3c_irqwake_intmask, S5P_WAKEUP_MASK);
for (uart = 0; uart < CONFIG_SERIAL_SAMSUNG_UARTS; uart++, save++)
s3c_pm_restore_uart(uart, save);
+
+ s3c_pm_arch_restore_uarts();
}
static void s3c_pm_drain_uart(int uart)