adjust usb controller init sequence and remove some log
authoryangkai <yangkai@ubuntu-fs>
Fri, 24 Jun 2011 06:57:35 +0000 (14:57 +0800)
committeryangkai <yangkai@ubuntu-fs>
Fri, 24 Jun 2011 06:57:35 +0000 (14:57 +0800)
drivers/usb/core/usb.c [changed mode: 0644->0755]
drivers/usb/dwc_otg/dwc_otg_driver.c
drivers/usb/dwc_otg/dwc_otg_hcd.c
drivers/usb/dwc_otg/dwc_otg_pcd.c
drivers/usb/gadget/composite.c

old mode 100644 (file)
new mode 100755 (executable)
index 1527814..b237938
@@ -1072,7 +1072,6 @@ static int __init usb_init(void)
                pr_info("%s: USB support disabled\n", usbcore_name);
                return 0;
        }
-       printk("usb_init, usbcore,everest\n");
        retval = usb_debugfs_init();
        if (retval)
                goto out;
index 5ae307ac11ab85b76b22d4fffe7b1133556e4d5a..74285575026243afa14338ac8a455cadf365c2c1 100755 (executable)
@@ -1258,7 +1258,6 @@ static __devinit int dwc_otg_driver_probe(struct platform_device *pdev)
     dwc_modify_reg32((uint32_t *)(otgreg+0xc),0x20000000,0x20000000);
        dwc_write_reg32((uint32_t *)(otgreg+0x440), 0x1000);
     #endif
-       DWC_PRINT("dwc_otg_driver_probe,everest\n");
 
        dwc_otg_device = kmalloc(sizeof(dwc_otg_device_t), GFP_KERNEL);
        
@@ -1487,7 +1486,6 @@ static __devinit int dwc_otg_driver_probe(struct platform_device *pdev)
         *otg_phy_con1 &= ~(0x01<<3);    // enter suspend.
     }
 #endif
-       DWC_PRINT("dwc_otg_driver_probe end, everest\n");
        return 0;
  fail:
        devm_kfree(&pdev->dev, dwc_otg_device);
@@ -1864,7 +1862,6 @@ static __devinit int host11_driver_probe(struct platform_device *pdev)
     clk_disable(phyclk);
     clk_disable(ahbclk);
 #endif
-       DWC_PRINT("host11_driver_probe end, everest\n");
        return 0;
     
 fail2:
@@ -2151,7 +2148,6 @@ static __devinit int host20_driver_probe(struct platform_device *pdev)
     otgreg |= (0x01<<13);     // software control
     *otg_phy_con1 = otgreg;
 #endif
-       DWC_PRINT("host20_driver_probe end, everest\n");
        return 0;
 
  fail:
@@ -2207,6 +2203,18 @@ static int __init dwc_otg_driver_init(void)
     if(driver_create_file(&dwc_otg_driver.driver, &driver_attr_force_usb_mode))
                pr_warning("DWC_OTG: Failed to create driver force usb mode file\n");
 #endif
+    
+    /*
+     *  USB2.0 host controller
+     */
+#ifdef CONFIG_USB20_HOST
+    retval = platform_driver_register(&host20_driver);
+    if (retval < 0) 
+    {
+        DWC_ERROR("%s retval=%d\n", __func__, retval);
+        return retval;
+    }
+#endif
 
     /*
      *  USB1.1 host controller
@@ -2222,17 +2230,6 @@ static int __init dwc_otg_driver_init(void)
 //     retval = driver_create_file(&host11_driver.driver, &driver_attr_enable_usb11);
 #endif
 
-    /*
-     *  USB1.1 host controller
-     */
-#ifdef CONFIG_USB20_HOST
-       retval = platform_driver_register(&host20_driver);
-       if (retval < 0) 
-       {
-               DWC_ERROR("%s retval=%d\n", __func__, retval);
-               return retval;
-       }
-#endif
        return retval;
 }
 module_init(dwc_otg_driver_init);
index 22355510b8b4348053cb7267e3878d4501096460..ba742e4bbedfdb8457f4e17a094ace68064e66c4 100755 (executable)
@@ -674,7 +674,6 @@ int __devinit dwc_otg_hcd_init(struct device *dev)
                dev->coherent_dma_mask = 0;
        }
 #endif
-       DWC_PRINT("dwc_otg_hcd_init everest\n");
 //     g_dbg_lvl = 0xff;
        
        /*
@@ -779,7 +778,6 @@ int __devinit dwc_otg_hcd_init(struct device *dev)
                goto error3;
        }
     
-       DWC_PRINT("%s end,everest\n",__func__);
 //     DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD Initialized HCD, bus=%s, usbbus=%d\n", 
 //                 dev->bus_id, hcd->self.busnum);
         
@@ -859,7 +857,6 @@ int __devinit host11_hcd_init(struct device *dev)
                dev->coherent_dma_mask = 0;
        }
 #endif
-       DWC_PRINT("%s everest\n",__func__);
 //     g_dbg_lvl = 0xff;
        
        DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD INIT\n");
@@ -966,7 +963,6 @@ int __devinit host11_hcd_init(struct device *dev)
                goto error3;
        }
 
-       DWC_PRINT("%s end,everest\n",__func__);
 //     DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD Initialized HCD, bus=%s, usbbus=%d\n", 
 //                 dev->bus_id, hcd->self.busnum);
         
@@ -1055,7 +1051,6 @@ int __devinit host20_hcd_init(struct device *dev)
                dev->coherent_dma_mask = 0;
        }
 #endif
-       DWC_PRINT("%s everest\n",__func__);
 //     g_dbg_lvl = 0xff;
        
        DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD INIT\n");
@@ -1162,7 +1157,6 @@ int __devinit host20_hcd_init(struct device *dev)
                goto error3;
        }
     
-       DWC_PRINT("%s end,everest\n",__func__);
         
        return 0;
 
@@ -1258,7 +1252,6 @@ int dwc_otg_hcd_start(struct usb_hcd *_hcd)
        DWC_DEBUGPL(DBG_HCD, "DWC OTG HCD START\n");
        spin_lock_irqsave(&dwc_otg_hcd->global_lock, flags);
 
-       DWC_PRINT("dwc_otg_hcd_start! everest\n");
        bus = hcd_to_bus(_hcd);
        _hcd->state = HC_STATE_RUNNING;
 
index 992ed5d14af715494d2ed82931142910f22802d2..bc301ec51ad11a7fddac1df58e4e54aad8a5677f 100755 (executable)
@@ -1804,7 +1804,6 @@ int dwc_otg_pcd_init(struct device *dev)
     dwc_otg_core_if_t *core_if = otg_dev->core_if;
        int retval = 0;
        int irq;
-       DWC_PRINT("dwc_otg_pcd_init,everest\n");
         /*
         * Allocate PCD structure
         */
index 140fafed70a108df79c59187300d765be8d0d40e..2b224c973e6adf84f2547eca4ea163310911c88d 100755 (executable)
@@ -564,7 +564,6 @@ int __init usb_add_config(struct usb_composite_dev *cdev,
                        goto done;
                }
        }
-       printk("usb_add_config, add and bind,everest\n");
        config->cdev = cdev;
        list_add_tail(&config->list, &cdev->configs);