ARM: SAMSUNG: Moving ADC device definition to plat-samsung.
authorNaveen Krishna <ch.naveen@samsung.com>
Thu, 13 May 2010 13:06:36 +0000 (22:06 +0900)
committerBen Dooks <ben-linux@fluff.org>
Tue, 18 May 2010 04:38:44 +0000 (13:38 +0900)
This patch moves ADC device definition to plat-samsung.
Because that is generic to the S3C64XX and S5P Series SoCs.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c64xx/Kconfig
arch/arm/mach-s3c64xx/Makefile
arch/arm/mach-s3c64xx/dev-adc.c [deleted file]
arch/arm/mach-s3c64xx/include/mach/map.h
arch/arm/mach-s3c64xx/s3c6410.c
arch/arm/plat-samsung/Kconfig
arch/arm/plat-samsung/Makefile
arch/arm/plat-samsung/dev-adc.c [new file with mode: 0644]

index 959df3840de5a1be9ddd6c533c919281769b50cc..69e9fbfea9175a7e09b5e86c500a9e47ebd82d8c 100644 (file)
@@ -85,6 +85,7 @@ config MACH_ANW6410
 config MACH_SMDK6410
        bool "SMDK6410"
        select CPU_S3C6410
+       select SAMSUNG_DEV_ADC
        select S3C_DEV_HSMMC
        select S3C_DEV_HSMMC1
        select S3C_DEV_I2C1
index 3758e15086bedf11abbee9ef854f10b4ae4721bd..da662783493ab97f3e3512c5598d7d392d62cfb8 100644 (file)
@@ -58,5 +58,4 @@ obj-$(CONFIG_MACH_HMT)                += mach-hmt.o
 obj-y                          += dev-uart.o
 obj-y                          += dev-rtc.o
 obj-y                          += dev-audio.o
-obj-$(CONFIG_S3C_ADC)          += dev-adc.o
 obj-$(CONFIG_S3C64XX_DEV_SPI)  += dev-spi.o
diff --git a/arch/arm/mach-s3c64xx/dev-adc.c b/arch/arm/mach-s3c64xx/dev-adc.c
deleted file mode 100644 (file)
index fafef9b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* linux/arch/arm/plat-s3c64xx/dev-adc.c
- *
- * Copyright 2010 Maurus Cuelenaere
- *
- * S3C64xx series device definition for ADC device
- *
- * 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/string.h>
-#include <linux/platform_device.h>
-
-#include <mach/irqs.h>
-#include <mach/map.h>
-
-#include <plat/adc.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
-
-static struct resource s3c_adc_resource[] = {
-       [0] = {
-               .start = S3C64XX_PA_ADC,
-               .end   = S3C64XX_PA_ADC + SZ_256 - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = IRQ_TC,
-               .end   = IRQ_TC,
-               .flags = IORESOURCE_IRQ,
-       },
-       [2] = {
-               .start = IRQ_ADC,
-               .end   = IRQ_ADC,
-               .flags = IORESOURCE_IRQ,
-       },
-};
-
-struct platform_device s3c_device_adc = {
-       .name           = "s3c64xx-adc",
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(s3c_adc_resource),
-       .resource       = s3c_adc_resource,
-};
index 801c1c0f3a951d812af9166fc34e4aecb9d1e476..869c8e0251278092667f8c745c10ddd866f45afc 100644 (file)
 #define S3C_PA_USBHOST         S3C64XX_PA_USBHOST
 #define S3C_PA_USB_HSOTG       S3C64XX_PA_USB_HSOTG
 #define S3C_VA_USB_HSPHY       S3C64XX_VA_USB_HSPHY
+#define SAMSUNG_PA_ADC         S3C64XX_PA_ADC
 
 #endif /* __ASM_ARCH_6400_MAP_H */
index 59635d19466a5c31e1ae8715c4d9ae9c823fda44..3ab695c691eefe05018d91f934779e1fc01cd3f6 100644 (file)
@@ -38,6 +38,7 @@
 #include <plat/clock.h>
 #include <plat/sdhci.h>
 #include <plat/iic-core.h>
+#include <plat/adc.h>
 #include <mach/s3c6400.h>
 #include <mach/s3c6410.h>
 
@@ -52,6 +53,7 @@ void __init s3c6410_map_io(void)
        s3c_i2c0_setname("s3c2440-i2c");
        s3c_i2c1_setname("s3c2440-i2c");
 
+       s3c_device_adc.name     = "s3c64xx-adc";
        s3c_device_nand.name = "s3c6400-nand";
 }
 
index d552c65fa1b05477c8e65cd4eab222a3d06e4b5b..641649fde3880f19c3f6f358d98e1c494bfd1ec3 100644 (file)
@@ -185,6 +185,11 @@ config S3C_DEV_NAND
        help
          Compile in platform device definition for NAND controller
 
+config SAMSUNG_DEV_ADC
+       bool
+       help
+         Compile in platform device definition for ADC controller
+
 config S3C64XX_DEV_SPI
        bool
        help
index 22c89d08f6e52d2edfada32bfaa50c0e8a82735b..3cf30a4b08839199368dbebd84a86e2aa0919032 100644 (file)
@@ -40,6 +40,7 @@ obj-y                         += dev-uart.o
 obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
 obj-$(CONFIG_S3C_DEV_USB_HSOTG)        += dev-usb-hsotg.o
 obj-$(CONFIG_S3C_DEV_NAND)     += dev-nand.o
+obj-$(CONFIG_SAMSUNG_DEV_ADC)  += dev-adc.o
 
 # DMA support
 
diff --git a/arch/arm/plat-samsung/dev-adc.c b/arch/arm/plat-samsung/dev-adc.c
new file mode 100644 (file)
index 0000000..9d903d4
--- /dev/null
@@ -0,0 +1,46 @@
+/* linux/arch/arm/plat-samsung/dev-adc.c
+ *
+ * Copyright 2010 Maurus Cuelenaere
+ *
+ * S3C64xx series device definition for ADC device
+ *
+ * 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/string.h>
+#include <linux/platform_device.h>
+
+#include <mach/irqs.h>
+#include <mach/map.h>
+
+#include <plat/adc.h>
+#include <plat/devs.h>
+#include <plat/cpu.h>
+
+static struct resource s3c_adc_resource[] = {
+       [0] = {
+               .start = SAMSUNG_PA_ADC,
+               .end   = SAMSUNG_PA_ADC + SZ_256 - 1,
+               .flags = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start = IRQ_TC,
+               .end   = IRQ_TC,
+               .flags = IORESOURCE_IRQ,
+       },
+       [2] = {
+               .start = IRQ_ADC,
+               .end   = IRQ_ADC,
+               .flags = IORESOURCE_IRQ,
+       },
+};
+
+struct platform_device s3c_device_adc = {
+       .name           = "samsung-adc",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(s3c_adc_resource),
+       .resource       = s3c_adc_resource,
+};