ARM: S3C24XX: move simtec-specific code to mach directory
authorHeiko Stuebner <heiko@sntech.de>
Wed, 7 Mar 2012 09:47:05 +0000 (01:47 -0800)
committerKukjin Kim <kgene.kim@samsung.com>
Wed, 7 Mar 2012 09:47:05 +0000 (01:47 -0800)
This includes a rename of the pm-simtec.c to keep the simtec
extensions together a bit and also better naming of the Kconfig
options.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/mach-s3c24xx/Kconfig
arch/arm/mach-s3c24xx/Makefile
arch/arm/mach-s3c24xx/simtec-audio.c [new file with mode: 0644]
arch/arm/mach-s3c24xx/simtec-pm.c [new file with mode: 0644]
arch/arm/plat-s3c24xx/Kconfig
arch/arm/plat-s3c24xx/Makefile
arch/arm/plat-s3c24xx/pm-simtec.c [deleted file]
arch/arm/plat-s3c24xx/simtec-audio.c [deleted file]

index 7dede0742daa713162e4aa86565e48a101acec80..115cc50daa8439d2a76bafb8175e48a53daf9d0c 100644 (file)
@@ -88,6 +88,19 @@ config S3C24XX_SMDK
        help
          Common machine code for SMDK2410 and SMDK2440
 
+config S3C24XX_SIMTEC_AUDIO
+       bool
+       depends on (ARCH_BAST || MACH_VR1000 || MACH_OSIRIS || MACH_ANUBIS)
+       default y
+       help
+         Add audio devices for common Simtec S3C24XX boards
+
+config S3C24XX_SIMTEC_PM
+       bool
+       help
+         Common power management code for systems that are
+         compatible with the Simtec style of power management
+
 # cpu-specific sections
 
 if CPU_S3C2410
@@ -125,7 +138,7 @@ comment "S3C2410 Boards"
 
 config MACH_AML_M5900
        bool "AML M5900 Series"
-       select PM_SIMTEC if PM
+       select S3C24XX_SIMTEC_PM if PM
        select S3C_DEV_USB_HOST
        help
          Say Y here if you are using the American Microsystems M5900 Series
@@ -134,7 +147,7 @@ config MACH_AML_M5900
 config ARCH_BAST
        bool "Simtec Electronics BAST (EB2410ITX)"
        select S3C2410_IOTIMING if S3C2410_CPUFREQ
-       select PM_SIMTEC if PM
+       select S3C24XX_SIMTEC_PM if PM
        select SIMTEC_NOR
        select MACH_BAST_IDE
        select S3C24XX_DCLK
@@ -215,7 +228,7 @@ config MACH_TCT_HAMMER
 
 config MACH_VR1000
        bool "Thorcom VR1000"
-       select PM_SIMTEC if PM
+       select S3C24XX_SIMTEC_PM if PM
        select S3C24XX_DCLK
        select SIMTEC_NOR
        select MACH_BAST_IDE
@@ -355,7 +368,7 @@ comment "S3C2440 Boards"
 config MACH_ANUBIS
        bool "Simtec Electronics ANUBIS"
        select S3C24XX_DCLK
-       select PM_SIMTEC if PM
+       select S3C24XX_SIMTEC_PM if PM
        select HAVE_PATA_PLATFORM
        select S3C24XX_GPIO_EXTRA64
        select S3C2440_XTAL_12000000
@@ -395,7 +408,7 @@ config MACH_NEXCODER_2440
 config MACH_OSIRIS
        bool "Simtec IM2440D20 (OSIRIS) module"
        select S3C24XX_DCLK
-       select PM_SIMTEC if PM
+       select S3C24XX_SIMTEC_PM if PM
        select S3C24XX_GPIO_EXTRA128
        select S3C2440_XTAL_12000000
        select S3C2410_IOTIMING if S3C2440_CPUFREQ
index b1c3c6f7c2eb67c13e42384ef516bc4f3f18a022..fedbdb8f473ea856d30d24587223681705db37b9 100644 (file)
@@ -79,6 +79,8 @@ obj-$(CONFIG_MACH_SMDK2443)           += mach-smdk2443.o
 
 obj-$(CONFIG_S3C24XX_SMDK)             += common-smdk.o
 obj-$(CONFIG_SIMTEC_NOR)               += nor-simtec.o
+obj-$(CONFIG_S3C24XX_SIMTEC_AUDIO)     += simtec-audio.o
+obj-$(CONFIG_S3C24XX_SIMTEC_PM)                += simtec-pm.o
 
 # machine additions
 
diff --git a/arch/arm/mach-s3c24xx/simtec-audio.c b/arch/arm/mach-s3c24xx/simtec-audio.c
new file mode 100644 (file)
index 0000000..6bc832e
--- /dev/null
@@ -0,0 +1,77 @@
+/* linux/arch/arm/plat-s3c24xx/simtec-audio.c
+ *
+ * Copyright (c) 2009 Simtec Electronics
+ *     http://armlinux.simtec.co.uk/
+ *     Ben Dooks <ben@simtec.co.uk>
+ *
+ * Audio setup for various Simtec S3C24XX implementations
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/io.h>
+
+#include <mach/bast-map.h>
+#include <mach/bast-irq.h>
+#include <mach/bast-cpld.h>
+
+#include <mach/hardware.h>
+#include <mach/regs-gpio.h>
+
+#include <plat/audio-simtec.h>
+#include <plat/devs.h>
+
+/* platform ops for audio */
+
+static void simtec_audio_startup_lrroute(void)
+{
+       unsigned int tmp;
+       unsigned long flags;
+
+       local_irq_save(flags);
+
+       tmp = __raw_readb(BAST_VA_CTRL1);
+       tmp &= ~BAST_CPLD_CTRL1_LRMASK;
+       tmp |= BAST_CPLD_CTRL1_LRCDAC;
+       __raw_writeb(tmp, BAST_VA_CTRL1);
+
+       local_irq_restore(flags);
+}
+
+static struct s3c24xx_audio_simtec_pdata simtec_audio_platdata;
+static char our_name[32];
+
+static struct platform_device simtec_audio_dev = {
+       .name   = our_name,
+       .id     = -1,
+       .dev    = {
+               .parent         = &s3c_device_iis.dev,
+               .platform_data  = &simtec_audio_platdata,
+       },
+};
+
+int __init simtec_audio_add(const char *name, bool has_lr_routing,
+                           struct s3c24xx_audio_simtec_pdata *spd)
+{
+       if (!name)
+               name = "tlv320aic23";
+
+       snprintf(our_name, sizeof(our_name)-1, "s3c24xx-simtec-%s", name);
+
+       /* copy platform data so the source can be __initdata */
+       if (spd)
+               simtec_audio_platdata = *spd;
+
+       if (has_lr_routing)
+               simtec_audio_platdata.startup = simtec_audio_startup_lrroute;
+
+       platform_device_register(&s3c_device_iis);
+       platform_device_register(&simtec_audio_dev);
+       return 0;
+}
diff --git a/arch/arm/mach-s3c24xx/simtec-pm.c b/arch/arm/mach-s3c24xx/simtec-pm.c
new file mode 100644 (file)
index 0000000..68296b1
--- /dev/null
@@ -0,0 +1,66 @@
+/* linux/arch/arm/plat-s3c24xx/pm-simtec.c
+ *
+ * Copyright 2004 Simtec Electronics
+ *     Ben Dooks <ben@simtec.co.uk>
+ *
+ * http://armlinux.simtec.co.uk/
+ *
+ * Power Management helpers for Simtec S3C24XX implementations
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
+#include <linux/timer.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/io.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <mach/hardware.h>
+
+#include <mach/map.h>
+#include <mach/regs-gpio.h>
+#include <mach/regs-mem.h>
+
+#include <asm/mach-types.h>
+
+#include <plat/pm.h>
+
+#define COPYRIGHT ", Copyright 2005 Simtec Electronics"
+
+/* pm_simtec_init
+ *
+ * enable the power management functions
+*/
+
+static __init int pm_simtec_init(void)
+{
+       unsigned long gstatus4;
+
+       /* check which machine we are running on */
+
+       if (!machine_is_bast() && !machine_is_vr1000() &&
+           !machine_is_anubis() && !machine_is_osiris() &&
+           !machine_is_aml_m5900())
+               return 0;
+
+       printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n");
+
+       gstatus4  = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30;
+       gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28;
+       gstatus4 |= (__raw_readl(S3C2410_BANKSIZE) & S3C2410_BANKSIZE_MASK);
+
+       __raw_writel(gstatus4, S3C2410_GSTATUS4);
+
+       return s3c_pm_init();
+}
+
+arch_initcall(pm_simtec_init);
index 73ebc40e0eb906943abeeac21569a5313c1bfaf1..0338d207475d977992cf4d0f204d01efdfdd45fc 100644 (file)
@@ -70,12 +70,6 @@ config S3C24XX_GPIO_EXTRA128
          Add an extra 128 gpio numbers to the available GPIO pool. This is
          available for boards that need extra gpios for external devices.
 
-config PM_SIMTEC
-       bool
-       help
-         Common power management code for systems that are
-         compatible with the Simtec style of power management
-
 config S3C24XX_DMA
        bool "S3C2410 DMA support"
        depends on ARCH_S3C24XX
@@ -119,13 +113,6 @@ config S3C2412_IOTIMING
          Intel node to select io timing code that is common to the s3c2412
          and the s3c2443.
 
-config S3C24XX_SIMTEC_AUDIO
-       bool
-       depends on (ARCH_BAST || MACH_VR1000 || MACH_OSIRIS || MACH_ANUBIS)
-       default y
-       help
-         Add audio devices for common Simtec S3C24XX boards
-
 config S3C2410_SETUP_TS
        bool
        help
index 8dca10a919dd224071a200101fb68ca653b4af63..27dd9c5fc147e4e2856c13ca52bc7fe07071ed9a 100644 (file)
@@ -23,7 +23,6 @@ obj-$(CONFIG_CPU_FREQ_S3C24XX_DEBUGFS) += cpu-freq-debugfs.o
 
 # Architecture dependent builds
 
-obj-$(CONFIG_PM_SIMTEC)                += pm-simtec.o
 obj-$(CONFIG_PM)               += pm.o
 obj-$(CONFIG_PM)               += irq-pm.o
 obj-$(CONFIG_PM)               += sleep.o
@@ -36,7 +35,3 @@ obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += s3c2410-cpufreq-utils.o
 # device specific setup and/or initialisation
 obj-$(CONFIG_ARCH_S3C24XX)     += setup-i2c.o
 obj-$(CONFIG_S3C2410_SETUP_TS) += setup-ts.o
-
-# machine common support
-
-obj-$(CONFIG_S3C24XX_SIMTEC_AUDIO)     += simtec-audio.o
diff --git a/arch/arm/plat-s3c24xx/pm-simtec.c b/arch/arm/plat-s3c24xx/pm-simtec.c
deleted file mode 100644 (file)
index 68296b1..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/* linux/arch/arm/plat-s3c24xx/pm-simtec.c
- *
- * Copyright 2004 Simtec Electronics
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * http://armlinux.simtec.co.uk/
- *
- * Power Management helpers for Simtec S3C24XX implementations
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/interrupt.h>
-#include <linux/list.h>
-#include <linux/timer.h>
-#include <linux/init.h>
-#include <linux/device.h>
-#include <linux/io.h>
-
-#include <asm/mach/arch.h>
-#include <asm/mach/map.h>
-
-#include <mach/hardware.h>
-
-#include <mach/map.h>
-#include <mach/regs-gpio.h>
-#include <mach/regs-mem.h>
-
-#include <asm/mach-types.h>
-
-#include <plat/pm.h>
-
-#define COPYRIGHT ", Copyright 2005 Simtec Electronics"
-
-/* pm_simtec_init
- *
- * enable the power management functions
-*/
-
-static __init int pm_simtec_init(void)
-{
-       unsigned long gstatus4;
-
-       /* check which machine we are running on */
-
-       if (!machine_is_bast() && !machine_is_vr1000() &&
-           !machine_is_anubis() && !machine_is_osiris() &&
-           !machine_is_aml_m5900())
-               return 0;
-
-       printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n");
-
-       gstatus4  = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30;
-       gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28;
-       gstatus4 |= (__raw_readl(S3C2410_BANKSIZE) & S3C2410_BANKSIZE_MASK);
-
-       __raw_writel(gstatus4, S3C2410_GSTATUS4);
-
-       return s3c_pm_init();
-}
-
-arch_initcall(pm_simtec_init);
diff --git a/arch/arm/plat-s3c24xx/simtec-audio.c b/arch/arm/plat-s3c24xx/simtec-audio.c
deleted file mode 100644 (file)
index 6bc832e..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/* linux/arch/arm/plat-s3c24xx/simtec-audio.c
- *
- * Copyright (c) 2009 Simtec Electronics
- *     http://armlinux.simtec.co.uk/
- *     Ben Dooks <ben@simtec.co.uk>
- *
- * Audio setup for various Simtec S3C24XX implementations
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include <linux/kernel.h>
-#include <linux/interrupt.h>
-#include <linux/init.h>
-#include <linux/device.h>
-#include <linux/io.h>
-
-#include <mach/bast-map.h>
-#include <mach/bast-irq.h>
-#include <mach/bast-cpld.h>
-
-#include <mach/hardware.h>
-#include <mach/regs-gpio.h>
-
-#include <plat/audio-simtec.h>
-#include <plat/devs.h>
-
-/* platform ops for audio */
-
-static void simtec_audio_startup_lrroute(void)
-{
-       unsigned int tmp;
-       unsigned long flags;
-
-       local_irq_save(flags);
-
-       tmp = __raw_readb(BAST_VA_CTRL1);
-       tmp &= ~BAST_CPLD_CTRL1_LRMASK;
-       tmp |= BAST_CPLD_CTRL1_LRCDAC;
-       __raw_writeb(tmp, BAST_VA_CTRL1);
-
-       local_irq_restore(flags);
-}
-
-static struct s3c24xx_audio_simtec_pdata simtec_audio_platdata;
-static char our_name[32];
-
-static struct platform_device simtec_audio_dev = {
-       .name   = our_name,
-       .id     = -1,
-       .dev    = {
-               .parent         = &s3c_device_iis.dev,
-               .platform_data  = &simtec_audio_platdata,
-       },
-};
-
-int __init simtec_audio_add(const char *name, bool has_lr_routing,
-                           struct s3c24xx_audio_simtec_pdata *spd)
-{
-       if (!name)
-               name = "tlv320aic23";
-
-       snprintf(our_name, sizeof(our_name)-1, "s3c24xx-simtec-%s", name);
-
-       /* copy platform data so the source can be __initdata */
-       if (spd)
-               simtec_audio_platdata = *spd;
-
-       if (has_lr_routing)
-               simtec_audio_platdata.startup = simtec_audio_startup_lrroute;
-
-       platform_device_register(&s3c_device_iis);
-       platform_device_register(&simtec_audio_dev);
-       return 0;
-}