Channagoud Kadabi | 363e740 | 2015-06-16 11:44:20 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2013,2015 The Linux Foundation. All rights reserved. |
Amol Jadi | f3d5a89 | 2013-07-23 16:09:44 -0700 | [diff] [blame] | 2 | * |
| 3 | * Redistribution and use in source and binary forms, with or without |
| 4 | * modification, are permitted provided that the following conditions are |
| 5 | * met: |
| 6 | * * Redistributions of source code must retain the above copyright |
| 7 | * notice, this list of conditions and the following disclaimer. |
| 8 | * * Redistributions in binary form must reproduce the above |
| 9 | * copyright notice, this list of conditions and the following |
| 10 | * disclaimer in the documentation and/or other materials provided |
| 11 | * with the distribution. |
| 12 | * * Neither the name of The Linux Foundation nor the names of its |
| 13 | * contributors may be used to endorse or promote products derived |
| 14 | * from this software without specific prior written permission. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 18 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 23 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 24 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 25 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 26 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
| 28 | #ifndef _USB30_DWC_HW_ |
| 29 | #define _USB30_DWC_HW_ |
| 30 | |
| 31 | void dwc_ep_cmd_start_transfer(dwc_dev_t *dev, uint8_t ep_phy_num); |
| 32 | void dwc_ep_cmd_end_transfer(dwc_dev_t *dev, uint8_t ep_phy_num); |
| 33 | void dwc_ep_cmd_set_config(dwc_dev_t *dev, uint8_t index, uint8_t action); |
| 34 | void dwc_ep_cmd_set_transfer_resource(dwc_dev_t *dev, uint8_t index); |
| 35 | void dwc_ep_cmd_stall(dwc_dev_t *dev, uint8_t ep_phy_num); |
| 36 | void dwc_ep_cmd_start_new_config(dwc_dev_t *dev, |
| 37 | uint8_t ep_phy_num, |
| 38 | uint8_t resource_idx); |
| 39 | |
| 40 | void dwc_ep_enable(dwc_dev_t *dev, uint8_t ep_phy_num); |
| 41 | void dwc_ep_disable(dwc_dev_t *dev, uint8_t ep_phy_num); |
| 42 | void dwc_ep_disable_non_control(dwc_dev_t *dev); |
| 43 | |
| 44 | void dwc_event_init(dwc_dev_t *dev); |
| 45 | uint16_t dwc_event_get_next(dwc_dev_t *dev, uint32_t *event); |
| 46 | void dwc_event_processed(dwc_dev_t *dev, uint16_t count); |
| 47 | void dwc_event_device_enable(dwc_dev_t *dev, uint32_t events); |
| 48 | |
| 49 | uint32_t dwc_coreid(dwc_dev_t *dev); |
| 50 | uint8_t dwc_connectspeed(dwc_dev_t *dev); |
| 51 | uint8_t dwc_device_run_status(dwc_dev_t *dev); |
| 52 | void dwc_gctl_init(dwc_dev_t *dev); |
| 53 | void dwc_axi_master_config(dwc_dev_t *dev); |
Channagoud Kadabi | 363e740 | 2015-06-16 11:44:20 -0700 | [diff] [blame] | 54 | void dwc_device_enter_test_mode(dwc_dev_t *dev); |
| 55 | void dwc_device_enable_u1(dwc_dev_t *dev, uint8_t val); |
| 56 | void dwc_device_enable_u2(dwc_dev_t *dev, uint8_t val); |
| 57 | void dwc_device_accept_u1u2(dwc_dev_t *dev); |
| 58 | bool dwc_device_u1_enabled(dwc_dev_t *dev); |
| 59 | bool dwc_device_u2_enabled(dwc_dev_t *dev); |
Amol Jadi | f3d5a89 | 2013-07-23 16:09:44 -0700 | [diff] [blame] | 60 | #endif |