ARM: samsung: move mfc device definition to s5p-dev-mfc.c
authorArnd Bergmann <arnd@arndb.de>
Wed, 10 Apr 2013 12:49:03 +0000 (14:49 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 19 Apr 2013 11:51:22 +0000 (13:51 +0200)
For a DT-only build we don't want to compile devs.c, but we do need
the mfc device, which is also referenced by the DT based platforms,
so move it all into one place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/plat-samsung/devs.c
arch/arm/plat-samsung/s5p-dev-mfc.c

index 51afedda9ab61fd761114d79422fb2e34d6e138b..de9ad27495e704491aa34cd607cad9e7cce86ca3 100644 (file)
@@ -878,51 +878,6 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
 }
 #endif /* CONFIG_PLAT_S3C24XX */
 
-/* MFC */
-
-#ifdef CONFIG_S5P_DEV_MFC
-static struct resource s5p_mfc_resource[] = {
-       [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
-       [1] = DEFINE_RES_IRQ(IRQ_MFC),
-};
-
-struct platform_device s5p_device_mfc = {
-       .name           = "s5p-mfc",
-       .id             = -1,
-       .num_resources  = ARRAY_SIZE(s5p_mfc_resource),
-       .resource       = s5p_mfc_resource,
-};
-
-/*
- * MFC hardware has 2 memory interfaces which are modelled as two separate
- * platform devices to let dma-mapping distinguish between them.
- *
- * MFC parent device (s5p_device_mfc) must be registered before memory
- * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
- */
-
-struct platform_device s5p_device_mfc_l = {
-       .name           = "s5p-mfc-l",
-       .id             = -1,
-       .dev            = {
-               .parent                 = &s5p_device_mfc.dev,
-               .dma_mask               = &samsung_device_dma_mask,
-               .coherent_dma_mask      = DMA_BIT_MASK(32),
-       },
-};
-
-struct platform_device s5p_device_mfc_r = {
-       .name           = "s5p-mfc-r",
-       .id             = -1,
-       .dev            = {
-               .parent                 = &s5p_device_mfc.dev,
-               .dma_mask               = &samsung_device_dma_mask,
-               .coherent_dma_mask      = DMA_BIT_MASK(32),
-       },
-};
-
-#endif /* CONFIG_S5P_DEV_MFC */
-
 /* MIPI CSIS */
 
 #ifdef CONFIG_S5P_DEV_CSIS0
index 5ec104b5408b37d58e25efa202439110150a21c2..a93fb6fb66062db6580ff327acadf3982a44de65 100644 (file)
 #include <linux/of.h>
 
 #include <mach/map.h>
+#include <mach/irqs.h>
 #include <plat/devs.h>
-#include <plat/irqs.h>
 #include <plat/mfc.h>
 
+static struct resource s5p_mfc_resource[] = {
+       [0] = DEFINE_RES_MEM(S5P_PA_MFC, SZ_64K),
+       [1] = DEFINE_RES_IRQ(IRQ_MFC),
+};
+
+struct platform_device s5p_device_mfc = {
+       .name           = "s5p-mfc",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(s5p_mfc_resource),
+       .resource       = s5p_mfc_resource,
+};
+
+/*
+ * MFC hardware has 2 memory interfaces which are modelled as two separate
+ * platform devices to let dma-mapping distinguish between them.
+ *
+ * MFC parent device (s5p_device_mfc) must be registered before memory
+ * interface specific devices (s5p_device_mfc_l and s5p_device_mfc_r).
+ */
+
+struct platform_device s5p_device_mfc_l = {
+       .name           = "s5p-mfc-l",
+       .id             = -1,
+       .dev            = {
+               .parent                 = &s5p_device_mfc.dev,
+               .dma_mask               = &s5p_device_mfc_l.dev.coherent_dma_mask,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       },
+};
+
+struct platform_device s5p_device_mfc_r = {
+       .name           = "s5p-mfc-r",
+       .id             = -1,
+       .dev            = {
+               .parent                 = &s5p_device_mfc.dev,
+               .dma_mask               = &s5p_device_mfc_r.dev.coherent_dma_mask,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       },
+};
+
 struct s5p_mfc_reserved_mem {
        phys_addr_t     base;
        unsigned long   size;