Merge branch 'for-linus' of git://neil.brown.name/md
[pandora-kernel.git] / arch / powerpc / platforms / 82xx / mpc8272_ads.c
index fd83440..8054c68 100644 (file)
@@ -96,6 +96,10 @@ static struct cpm_pin mpc8272_ads_pins[] = {
        {1, 31, CPM_PIN_OUTPUT | CPM_PIN_PRIMARY},
        {2, 16, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
        {2, 17, CPM_PIN_INPUT | CPM_PIN_PRIMARY},
+
+       /* I2C */
+       {3, 14, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
+       {3, 15, CPM_PIN_INPUT | CPM_PIN_SECONDARY | CPM_PIN_OPENDRAIN},
 };
 
 static void __init init_ioports(void)
@@ -134,13 +138,12 @@ static void __init mpc8272_ads_setup_arch(void)
        }
 
        bcsr = of_iomap(np, 0);
+       of_node_put(np);
        if (!bcsr) {
                printk(KERN_ERR "Cannot map BCSR registers\n");
                return;
        }
 
-       of_node_put(np);
-
        clrbits32(&bcsr[1], BCSR1_RS232_EN1 | BCSR1_RS232_EN2 | BCSR1_FETHIEN);
        setbits32(&bcsr[1], BCSR1_FETH_RST);
 
@@ -165,14 +168,11 @@ static struct of_device_id __initdata of_bus_ids[] = {
 
 static int __init declare_of_platform_devices(void)
 {
-       if (!machine_is(mpc8272_ads))
-               return 0;
-
        /* Publish the QE devices */
        of_platform_bus_probe(NULL, of_bus_ids, NULL);
        return 0;
 }
-device_initcall(declare_of_platform_devices);
+machine_device_initcall(mpc8272_ads, declare_of_platform_devices);
 
 /*
  * Called very early, device-tree isn't unflattened