]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: S3C24XX: Move irq syscore-ops to irq-pm
authorHeiko Stuebner <heiko@sntech.de>
Tue, 29 Jan 2013 18:25:22 +0000 (10:25 -0800)
committerKukjin Kim <kgene.kim@samsung.com>
Sun, 3 Feb 2013 23:52:39 +0000 (15:52 -0800)
With this the definition of s3c24xx_irq_syscore_ops can also move to
common.h from plat/pm.h and the definitions of s3c24xx_irq_suspend
and s3c24xx_irq_resume are also not necessary anymore in plat/pm.h

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s3c24xx/common.h
arch/arm/mach-s3c24xx/irq-pm.c
arch/arm/mach-s3c24xx/s3c2410.c
arch/arm/mach-s3c24xx/s3c2412.c
arch/arm/mach-s3c24xx/s3c2416.c
arch/arm/mach-s3c24xx/s3c2440.c
arch/arm/mach-s3c24xx/s3c2442.c
arch/arm/plat-s3c24xx/irq.c
arch/arm/plat-samsung/include/plat/pm.h

index c2f596e7bc2d94361590d61bd919b18184a4e9ff..ed6276fcaa3b10089969189f67340ce1351f1dc9 100644 (file)
@@ -15,4 +15,6 @@
 void s3c2410_restart(char mode, const char *cmd);
 void s3c244x_restart(char mode, const char *cmd);
 
+extern struct syscore_ops s3c24xx_irq_syscore_ops;
+
 #endif /* __ARCH_ARM_MACH_S3C24XX_COMMON_H */
index 0efb2e2848c8aaae2986bc118da2d587cee7b852..d48126d9fbaf20bc1bd9c59d6ba24128c54bba1e 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/syscore_ops.h>
 
 #include <plat/cpu.h>
 #include <plat/pm.h>
@@ -64,7 +65,7 @@ static unsigned long save_extint[3];
 static unsigned long save_eintflt[4];
 static unsigned long save_eintmask;
 
-int s3c24xx_irq_suspend(void)
+static int s3c24xx_irq_suspend(void)
 {
        unsigned int i;
 
@@ -80,7 +81,7 @@ int s3c24xx_irq_suspend(void)
        return 0;
 }
 
-void s3c24xx_irq_resume(void)
+static void s3c24xx_irq_resume(void)
 {
        unsigned int i;
 
@@ -93,3 +94,8 @@ void s3c24xx_irq_resume(void)
        s3c_pm_do_restore(irq_save, ARRAY_SIZE(irq_save));
        __raw_writel(save_eintmask, S3C24XX_EINTMASK);
 }
+
+struct syscore_ops s3c24xx_irq_syscore_ops = {
+       .suspend        = s3c24xx_irq_suspend,
+       .resume         = s3c24xx_irq_resume,
+};
index a3c5cb086ee23a736843f6e50ca5d075986885f2..9ebef95da721d4fcd81650a04127609d170fb2cd 100644 (file)
@@ -49,6 +49,8 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
+#include "common.h"
+
 /* Initial IO mappings */
 
 static struct map_desc s3c2410_iodesc[] __initdata = {
@@ -182,8 +184,8 @@ int __init s3c2410_init(void)
 
 #ifdef CONFIG_PM
        register_syscore_ops(&s3c2410_pm_syscore_ops);
-#endif
        register_syscore_ops(&s3c24xx_irq_syscore_ops);
+#endif
 
        return device_register(&s3c2410_dev);
 }
index c511a225f07ac6d50e660bc12811b0f2b8140196..ec0b31818c5124492175ed10dc19b7c28c537bc8 100644 (file)
@@ -47,6 +47,7 @@
 #include <plat/regs-spi.h>
 #include <plat/s3c2412.h>
 
+#include "common.h"
 #include "regs-dsc.h"
 
 #define S3C2412_SWRST                  (S3C24XX_VA_CLKPWR + 0x30)
@@ -245,8 +246,8 @@ int __init s3c2412_init(void)
 
 #ifdef CONFIG_PM
        register_syscore_ops(&s3c2412_pm_syscore_ops);
-#endif
        register_syscore_ops(&s3c24xx_irq_syscore_ops);
+#endif
 
        return device_register(&s3c2412_dev);
 }
index 77ee0b732237d93de59c80632279a00dbf5dc2bd..e30476db0295b848630ddd616c990ca084c13e9b 100644 (file)
@@ -63,6 +63,8 @@
 #include <plat/rtc-core.h>
 #include <plat/spi-core.h>
 
+#include "common.h"
+
 static struct map_desc s3c2416_iodesc[] __initdata = {
        IODESC_ENT(WATCHDOG),
        IODESC_ENT(CLKPWR),
@@ -105,9 +107,9 @@ int __init s3c2416_init(void)
 
 #ifdef CONFIG_PM
        register_syscore_ops(&s3c2416_pm_syscore_ops);
-#endif
        register_syscore_ops(&s3c24xx_irq_syscore_ops);
        register_syscore_ops(&s3c2416_irq_syscore_ops);
+#endif
 
        return device_register(&s3c2416_dev);
 }
index 2b3dddb49af75939d397d1f395cf2cc068ded504..559e394e89895a79f68809621c1458112f4abd9b 100644 (file)
@@ -40,6 +40,8 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
+#include "common.h"
+
 static struct device s3c2440_dev = {
        .bus            = &s3c2440_subsys,
 };
@@ -57,9 +59,9 @@ int __init s3c2440_init(void)
 
 #ifdef CONFIG_PM
        register_syscore_ops(&s3c2410_pm_syscore_ops);
+       register_syscore_ops(&s3c24xx_irq_syscore_ops);
 #endif
        register_syscore_ops(&s3c244x_pm_syscore_ops);
-       register_syscore_ops(&s3c24xx_irq_syscore_ops);
 
        /* register our system device for everything else */
 
index 22cb7c94a8c8880d81b987f132acca9b39352bef..f732826c23593ef80d0b4f4d5f68e9cee9a6715e 100644 (file)
@@ -51,6 +51,8 @@
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
 
+#include "common.h"
+
 /* S3C2442 extended clock support */
 
 static unsigned long s3c2442_camif_upll_round(struct clk *clk,
@@ -172,9 +174,9 @@ int __init s3c2442_init(void)
 
 #ifdef CONFIG_PM
        register_syscore_ops(&s3c2410_pm_syscore_ops);
+       register_syscore_ops(&s3c24xx_irq_syscore_ops);
 #endif
        register_syscore_ops(&s3c244x_pm_syscore_ops);
-       register_syscore_ops(&s3c24xx_irq_syscore_ops);
 
        return device_register(&s3c2442_dev);
 }
index cdf1e92646c1e46049836ddb270c71fe00a6d404..259d0e4a532f23b81628a7b38490161fba7d3227 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/device.h>
-#include <linux/syscore_ops.h>
 #include <linux/irqdomain.h>
 
 #include <asm/mach/irq.h>
@@ -627,8 +626,3 @@ void __init s3c24xx_init_irq(void)
        s3c24xx_init_intc(NULL, &init_subint[0], main_intc, 0x4a000018);
        s3c24xx_init_intc(NULL, &init_eint[0], main_intc, 0x560000a4);
 }
-
-struct syscore_ops s3c24xx_irq_syscore_ops = {
-       .suspend        = s3c24xx_irq_suspend,
-       .resume         = s3c24xx_irq_resume,
-};
index 887a0c954379d7759a4108df9506dcf87ad49abc..f6fcadeee969f323197e0a84d4b89f58ceef3d8c 100644 (file)
@@ -109,17 +109,11 @@ extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count);
 #ifdef CONFIG_PM
 extern int s3c_irq_wake(struct irq_data *data, unsigned int state);
 extern int s3c_irqext_wake(struct irq_data *data, unsigned int state);
-extern int s3c24xx_irq_suspend(void);
-extern void s3c24xx_irq_resume(void);
 #else
 #define s3c_irq_wake NULL
 #define s3c_irqext_wake NULL
-#define s3c24xx_irq_suspend NULL
-#define s3c24xx_irq_resume  NULL
 #endif
 
-extern struct syscore_ops s3c24xx_irq_syscore_ops;
-
 /* PM debug functions */
 
 #ifdef CONFIG_SAMSUNG_PM_DEBUG