00001 /* ========================================================================== 00002 * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_adp.h $ 00003 * $Revision: #7 $ 00004 * $Date: 2011/10/24 $ 00005 * $Change: 1871159 $ 00006 * 00007 * Synopsys HS OTG Linux Software Driver and documentation (hereinafter, 00008 * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless 00009 * otherwise expressly agreed to in writing between Synopsys and you. 00010 * 00011 * The Software IS NOT an item of Licensed Software or Licensed Product under 00012 * any End User Software License Agreement or Agreement for Licensed Product 00013 * with Synopsys or any supplement thereto. You are permitted to use and 00014 * redistribute this Software in source and binary forms, with or without 00015 * modification, provided that redistributions of source code must retain this 00016 * notice. You may not view, use, disclose, copy or distribute this file or 00017 * any information contained herein except pursuant to this license grant from 00018 * Synopsys. If you do not agree with this notice, including the disclaimer 00019 * below, then you are not authorized to use the Software. 00020 * 00021 * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS 00022 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00023 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00024 * ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS BE LIABLE FOR ANY DIRECT, 00025 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00026 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00027 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00028 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00029 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00030 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 00031 * DAMAGE. 00032 * ========================================================================== */ 00033 00034 #ifndef __DWC_OTG_ADP_H__ 00035 #define __DWC_OTG_ADP_H__ 00036 00045 #define DWC_OTG_ADP_UNATTACHED 0 00046 #define DWC_OTG_ADP_ATTACHED 1 00047 #define DWC_OTG_ADP_UNKOWN 2 00048 00049 typedef struct dwc_otg_adp { 00050 uint32_t adp_started; 00051 uint32_t initial_probe; 00052 int32_t probe_timer_values[2]; 00053 uint32_t probe_enabled; 00054 uint32_t sense_enabled; 00055 dwc_timer_t *sense_timer; 00056 uint32_t sense_timer_started; 00057 dwc_timer_t *vbuson_timer; 00058 uint32_t vbuson_timer_started; 00059 uint32_t attached; 00060 uint32_t probe_counter; 00061 uint32_t gpwrdn; 00062 } dwc_otg_adp_t; 00063 00068 extern void dwc_otg_adp_write_reg(dwc_otg_core_if_t * core_if, uint32_t value); 00069 extern uint32_t dwc_otg_adp_read_reg(dwc_otg_core_if_t * core_if); 00070 extern uint32_t dwc_otg_adp_probe_start(dwc_otg_core_if_t * core_if); 00071 extern uint32_t dwc_otg_adp_sense_start(dwc_otg_core_if_t * core_if); 00072 extern uint32_t dwc_otg_adp_probe_stop(dwc_otg_core_if_t * core_if); 00073 extern uint32_t dwc_otg_adp_sense_stop(dwc_otg_core_if_t * core_if); 00074 extern void dwc_otg_adp_start(dwc_otg_core_if_t * core_if, uint8_t is_host); 00075 extern void dwc_otg_adp_init(dwc_otg_core_if_t * core_if); 00076 extern void dwc_otg_adp_remove(dwc_otg_core_if_t * core_if); 00077 extern int32_t dwc_otg_adp_handle_intr(dwc_otg_core_if_t * core_if); 00078 extern int32_t dwc_otg_adp_handle_srp_intr(dwc_otg_core_if_t * core_if); 00079 00080 #endif //__DWC_OTG_ADP_H__
1.3.9.1