- /* if usb not connect before ,then start connect */
- if( _pcd->vbus_status == 0 ) {
- DWC_PRINT("********vbus detect*********************************************\n");
-// _pcd->conn_status =
- _pcd->vbus_status = 1;
- /* soft disconnect */
- dctl.d32 = dwc_read_reg32( &core_if->dev_if->dev_global_regs->dctl );
- dctl.b.sftdiscon = 1;
- dwc_write_reg32( &core_if->dev_if->dev_global_regs->dctl, dctl.d32 );
- /* Clear any pending interrupts */
- dwc_write_reg32( &core_if->core_global_regs->gintsts, 0xFFFFFFFF);
- if(_pcd->conn_en)
- {
- schedule_delayed_work( &_pcd->reconnect , 8 ); /* delay 1 jiffies */
- _pcd->check_vbus_timer.expires = jiffies + (HZ<<1); /* 1 s */
- }
-
- } else if((_pcd->conn_status>0)&&(_pcd->conn_status <3)) {
- dwc_otg_msc_unlock();
- DWC_PRINT("********soft reconnect******************************************\n");
- _pcd->vbus_status =0;
-
- /* soft disconnect */
- dctl.d32 = dwc_read_reg32( &core_if->dev_if->dev_global_regs->dctl );
- dctl.b.sftdiscon = 1;
- dwc_write_reg32( &core_if->dev_if->dev_global_regs->dctl, dctl.d32 );
- /* Clear any pending interrupts */
- dwc_write_reg32( &core_if->core_global_regs->gintsts, 0xFFFFFFFF);
- }
- else if((_pcd->conn_en)&&(_pcd->conn_status == 0))
+ /* if usb not connect before ,then start connect */
+ if( _pcd->vbus_status == 0 ) {
+ DWC_PRINT("********vbus detect*********************************************\n");
+ _pcd->vbus_status = 1;
+ /* soft disconnect */
+ dctl.d32 = dwc_read_reg32( &core_if->dev_if->dev_global_regs->dctl );
+ dctl.b.sftdiscon = 1;
+ dwc_write_reg32( &core_if->dev_if->dev_global_regs->dctl, dctl.d32 );
+ /* Clear any pending interrupts */
+ dwc_write_reg32( &core_if->core_global_regs->gintsts, 0xFFFFFFFF);
+ if(_pcd->conn_en)