]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ARM: davinci: dm644x: don't force vpfe registeration on all boards
authorManjunath Hadli <manjunath.hadli@ti.com>
Wed, 21 Dec 2011 13:43:39 +0000 (19:13 +0530)
committerSekhar Nori <nsekhar@ti.com>
Fri, 24 Feb 2012 21:10:25 +0000 (02:40 +0530)
Move all vpfe platform device registrations to the board specific
file.

This removes registration of vpfe platform devices on boards which
do not use vpfe.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arch/arm/mach-davinci/board-dm644x-evm.c
arch/arm/mach-davinci/davinci.h
arch/arm/mach-davinci/dm644x.c

index 14dd390f6da82159f337fce49aac00862fe0c6b3..b89bebe01c0f4d36e2ceee4734761ec1660bc569 100644 (file)
@@ -625,8 +625,6 @@ static struct davinci_uart_config uart_config __initdata = {
 static void __init
 davinci_evm_map_io(void)
 {
-       /* setup input configuration for VPFE input devices */
-       dm644x_set_vpfe_config(&dm644xevm_capture_cfg);
        dm644x_init();
 }
 
@@ -698,6 +696,7 @@ static __init void davinci_evm_init(void)
        evm_init_i2c();
 
        davinci_setup_mmc(0, &dm6446evm_mmc_config);
+       dm644x_init_video(&dm644xevm_capture_cfg);
 
        davinci_serial_init(&uart_config);
        dm644x_init_asp(&dm644x_evm_snd_data);
index b1a52fb30cba87f7ace309604f6d040822bc6c5f..9d708034b57f72e883bff9a986eaa3ea27d97f78 100644 (file)
@@ -83,7 +83,7 @@ void dm365_set_vpfe_config(struct vpfe_config *cfg);
 /* DM644x function declarations */
 void __init dm644x_init(void);
 void __init dm644x_init_asp(struct snd_platform_data *pdata);
-void dm644x_set_vpfe_config(struct vpfe_config *cfg);
+int __init dm644x_init_video(struct vpfe_config *);
 
 /* DM646x function declarations */
 void __init dm646x_init(void);
index fc48faec57ec831efb6fdcddb8ae5705eedce70a..23e81cafba8dafa2c8eff2af2f7ee5fba07a6374 100644 (file)
@@ -659,11 +659,6 @@ static struct platform_device dm644x_vpfe_dev = {
        },
 };
 
-void dm644x_set_vpfe_config(struct vpfe_config *cfg)
-{
-       dm644x_vpfe_dev.dev.platform_data = cfg;
-}
-
 /*----------------------------------------------------------------------*/
 
 static struct map_desc dm644x_io_desc[] = {
@@ -791,14 +786,26 @@ void __init dm644x_init(void)
        davinci_map_sysmod();
 }
 
-static int __init dm644x_init_devices(void)
+int __init dm644x_init_video(struct vpfe_config *vpfe_cfg)
 {
-       if (!cpu_is_davinci_dm644x())
-               return 0;
+       dm644x_vpfe_dev.dev.platform_data = vpfe_cfg;
 
        /* Add ccdc clock aliases */
        clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL);
        clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL);
+
+       platform_device_register(&dm644x_vpss_device);
+       platform_device_register(&dm644x_ccdc_dev);
+       platform_device_register(&dm644x_vpfe_dev);
+
+       return 0;
+}
+
+static int __init dm644x_init_devices(void)
+{
+       if (!cpu_is_davinci_dm644x())
+               return 0;
+
        platform_device_register(&dm644x_edma_device);
 
        platform_device_register(&dm644x_mdio_device);
@@ -806,10 +813,6 @@ static int __init dm644x_init_devices(void)
        clk_add_alias(NULL, dev_name(&dm644x_mdio_device.dev),
                      NULL, &dm644x_emac_device.dev);
 
-       platform_device_register(&dm644x_vpss_device);
-       platform_device_register(&dm644x_ccdc_dev);
-       platform_device_register(&dm644x_vpfe_dev);
-
        return 0;
 }
 postcore_initcall(dm644x_init_devices);