OMAP3: PM: Initialize IVA only if available
authorSanjeev Premi <premi@ti.com>
Fri, 25 Feb 2011 13:27:20 +0000 (18:57 +0530)
committerKevin Hilman <khilman@ti.com>
Thu, 10 Mar 2011 00:38:35 +0000 (16:38 -0800)
IVA device is not present in many OMAP3 variants.

This patch ensures that initialization is tied to
the presence of IVA on the device.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/pm.c

index d5a102c71989ae766ee99d9e543e041276823b69..6e4eb7ff95a8e5e3ae6ec348d071a37955fb1cba 100644 (file)
@@ -83,7 +83,9 @@ static int _init_omap_device(char *name, struct device **new_dev)
 static void omap2_init_processor_devices(void)
 {
        _init_omap_device("mpu", &mpu_dev);
-       _init_omap_device("iva", &iva_dev);
+       if (omap3_has_iva())
+               _init_omap_device("iva", &iva_dev);
+
        if (cpu_is_omap44xx()) {
                _init_omap_device("l3_main_1", &l3_dev);
                _init_omap_device("dsp", &dsp_dev);