Commit 1e574a66 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Krzysztof Kozlowski
Browse files

ARM: samsung: remove s3c_pm_debug_init()



On s3c24xx and s3c64xx, this is just a wrapper around
s3c_pm_debug_init_uart(), but this function does not exist on s5pv210,
which always uses an empty stub as CONFIG_SAMSUNG_ATAGS is normally
not set.

In a configuration that supports both s5pv210 and s3c64xx, we would
always call the s3c64xx function, which is probably incorrect when
running on s5pv210.

Remove the function call completely on s5pv210 and skip the wrapper on
s3c as a cleanup.

As a side-effect, the s3c64xx behavior is now always the same, regardless
of whether it is a DT-only configuration or both DT and ATAGS are
supported for booting.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200806182059.2431-11-krzk@kernel.org


Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
parent 9089d7b8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@

static inline void s3c_pm_debug_init_uart(void)
{
#ifdef CONFIG_SAMSUNG_PM_DEBUG
	unsigned long tmp = __raw_readl(S3C2410_CLKCON);

	/* re-start uart clocks */
@@ -24,6 +25,7 @@ static inline void s3c_pm_debug_init_uart(void)

	__raw_writel(tmp, S3C2410_CLKCON);
	udelay(10);
#endif
}

static inline void s3c_pm_arch_prepare_irqs(void)
+2 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

static inline void s3c_pm_debug_init_uart(void)
{
#ifdef CONFIG_SAMSUNG_PM_DEBUG
	u32 tmp = __raw_readl(S3C_PCLK_GATE);

	/* As a note, since the S3C64XX UARTs generally have multiple
@@ -35,6 +36,7 @@ static inline void s3c_pm_debug_init_uart(void)

	__raw_writel(tmp, S3C_PCLK_GATE);
	udelay(10);
#endif
}

static inline void s3c_pm_arch_prepare_irqs(void)
+0 −2
Original line number Diff line number Diff line
@@ -99,8 +99,6 @@ static int s5pv210_suspend_enter(suspend_state_t state)
	u32 eint_wakeup_mask = s5pv210_read_eint_wakeup_mask();
	int ret;

	s3c_pm_debug_init();

	S3C_PMDBG("%s: suspending the system...\n", __func__);

	S3C_PMDBG("%s: wakeup masks: %08x,%08x\n", __func__,
+0 −10
Original line number Diff line number Diff line
@@ -69,22 +69,12 @@ struct pm_uart_save {
 */
extern void s3c_pm_dbg(const char *msg, ...);

/**
 * s3c_pm_debug_init() - suspend/resume low level debug initialization.
 * @base: Virtual base of UART to use for suspend/resume debugging.
 *
 * This function needs to be called before S3C_PMDBG() can be used, to set up
 * UART port base address and configuration.
 */
extern void s3c_pm_debug_init(void);

#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)

extern void s3c_pm_save_uarts(void);
extern void s3c_pm_restore_uarts(void);
#else
#define S3C_PMDBG(fmt...) pr_debug(fmt)
#define s3c_pm_debug_init() do { } while (0)

static inline void s3c_pm_save_uarts(void) { }
static inline void s3c_pm_restore_uarts(void) { }
+0 −7
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <plat/pm.h>
#include <mach/pm-core.h>
#else
static inline void s3c_pm_debug_init_uart(void) {}
static inline void s3c_pm_arch_update_uart(void __iomem *regs,
					   struct pm_uart_save *save) {}
#endif
@@ -43,12 +42,6 @@ void s3c_pm_dbg(const char *fmt, ...)
	printascii(buff);
}

void s3c_pm_debug_init(void)
{
	/* restart uart clocks so we can use them to output */
	s3c_pm_debug_init_uart();
}

static inline void __iomem *s3c_pm_uart_base(void)
{
	unsigned long paddr;
Loading