MIPS: MTX-1: cleanup and comments
[sfrench/cifs-2.6.git] / arch / mips / alchemy / mtx-1 / board_setup.c
index a9f0336e1f1fd626cca60c57748c1430be64c8f4..ff3697387b89c8aacc4ebea568a3402efcfc5127 100644 (file)
@@ -62,13 +62,14 @@ static void mtx1_power_off(void)
 {
        printk(KERN_ALERT "It's now safe to remove power\n");
        while (1)
-               asm volatile (".set mips3 ; wait ; .set mips1");
+               asm volatile (
+               "       .set    mips32                                  \n"
+               "       wait                                            \n"
+               "       .set    mips0                                   \n");
 }
 
 void __init board_setup(void)
 {
-       alchemy_gpio2_enable();
-
 #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
        /* Enable USB power switch */
        alchemy_gpio_direction_output(204, 0);
@@ -107,21 +108,17 @@ void __init board_setup(void)
 int
 mtx1_pci_idsel(unsigned int devsel, int assert)
 {
-#define MTX_IDSEL_ONLY_0_AND_3 0
-#if MTX_IDSEL_ONLY_0_AND_3
-       if (devsel != 0 && devsel != 3) {
-               printk(KERN_ERR "*** not 0 or 3\n");
-               return 0;
-       }
-#endif
-
+       /* This function is only necessary to support a proprietary Cardbus
+        * adapter on the mtx-1 "singleboard" variant. It triggers a custom
+        * logic chip connected to EXT_IO3 (GPIO1) to suppress IDSEL signals.
+        */
        if (assert && devsel != 0)
                /* Suppress signal to Cardbus */
-               gpio_set_value(1, 0);   /* set EXT_IO3 OFF */
+               alchemy_gpio_set_value(1, 0);   /* set EXT_IO3 OFF */
        else
-               gpio_set_value(1, 1);   /* set EXT_IO3 ON */
+               alchemy_gpio_set_value(1, 1);   /* set EXT_IO3 ON */
 
-       au_sync_udelay(1);
+       udelay(1);
        return 1;
 }