blob: 119bf20ed48c32e5ab740ebe69e9fc8b6437ef6a [file] [log] [blame]
Channagoud Kadabi363e7402015-06-16 11:44:20 -07001/* Copyright (c) 2013,2015 The Linux Foundation. All rights reserved.
Amol Jadif3d5a892013-07-23 16:09:44 -07002 *
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
31void dwc_ep_cmd_start_transfer(dwc_dev_t *dev, uint8_t ep_phy_num);
32void dwc_ep_cmd_end_transfer(dwc_dev_t *dev, uint8_t ep_phy_num);
33void dwc_ep_cmd_set_config(dwc_dev_t *dev, uint8_t index, uint8_t action);
34void dwc_ep_cmd_set_transfer_resource(dwc_dev_t *dev, uint8_t index);
35void dwc_ep_cmd_stall(dwc_dev_t *dev, uint8_t ep_phy_num);
36void dwc_ep_cmd_start_new_config(dwc_dev_t *dev,
37 uint8_t ep_phy_num,
38 uint8_t resource_idx);
39
40void dwc_ep_enable(dwc_dev_t *dev, uint8_t ep_phy_num);
41void dwc_ep_disable(dwc_dev_t *dev, uint8_t ep_phy_num);
42void dwc_ep_disable_non_control(dwc_dev_t *dev);
43
44void dwc_event_init(dwc_dev_t *dev);
45uint16_t dwc_event_get_next(dwc_dev_t *dev, uint32_t *event);
46void dwc_event_processed(dwc_dev_t *dev, uint16_t count);
47void dwc_event_device_enable(dwc_dev_t *dev, uint32_t events);
48
49uint32_t dwc_coreid(dwc_dev_t *dev);
50uint8_t dwc_connectspeed(dwc_dev_t *dev);
51uint8_t dwc_device_run_status(dwc_dev_t *dev);
52void dwc_gctl_init(dwc_dev_t *dev);
53void dwc_axi_master_config(dwc_dev_t *dev);
Channagoud Kadabi363e7402015-06-16 11:44:20 -070054void dwc_device_enter_test_mode(dwc_dev_t *dev);
55void dwc_device_enable_u1(dwc_dev_t *dev, uint8_t val);
56void dwc_device_enable_u2(dwc_dev_t *dev, uint8_t val);
57void dwc_device_accept_u1u2(dwc_dev_t *dev);
58bool dwc_device_u1_enabled(dwc_dev_t *dev);
59bool dwc_device_u2_enabled(dwc_dev_t *dev);
Amol Jadif3d5a892013-07-23 16:09:44 -070060#endif