From a4bd9a7cb3bbf33d77445888a01ec05144b731ed Mon Sep 17 00:00:00 2001 From: yangkai Date: Fri, 24 Jun 2011 14:57:35 +0800 Subject: [PATCH] adjust usb controller init sequence and remove some log --- drivers/usb/core/usb.c | 1 - drivers/usb/dwc_otg/dwc_otg_driver.c | 27 ++++++++++++--------------- drivers/usb/dwc_otg/dwc_otg_hcd.c | 7 ------- drivers/usb/dwc_otg/dwc_otg_pcd.c | 1 - drivers/usb/gadget/composite.c | 1 - 5 files changed, 12 insertions(+), 25 deletions(-) mode change 100644 => 100755 drivers/usb/core/usb.c diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c old mode 100644 new mode 100755 index 152781441b71..b2379383ba13 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -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; diff --git a/drivers/usb/dwc_otg/dwc_otg_driver.c b/drivers/usb/dwc_otg/dwc_otg_driver.c index 5ae307ac11ab..742855750262 100755 --- a/drivers/usb/dwc_otg/dwc_otg_driver.c +++ b/drivers/usb/dwc_otg/dwc_otg_driver.c @@ -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); diff --git a/drivers/usb/dwc_otg/dwc_otg_hcd.c b/drivers/usb/dwc_otg/dwc_otg_hcd.c index 22355510b8b4..ba742e4bbedf 100755 --- a/drivers/usb/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/dwc_otg/dwc_otg_hcd.c @@ -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; diff --git a/drivers/usb/dwc_otg/dwc_otg_pcd.c b/drivers/usb/dwc_otg/dwc_otg_pcd.c index 992ed5d14af7..bc301ec51ad1 100755 --- a/drivers/usb/dwc_otg/dwc_otg_pcd.c +++ b/drivers/usb/dwc_otg/dwc_otg_pcd.c @@ -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 */ diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 140fafed70a1..2b224c973e6a 100755 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -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); -- 2.34.1