#include <linux/moduleparam.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/iopoll.h>
#include <linux/delay.h>
#include <linux/log2.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/irq.h>
#include <linux/dmi.h>
#include "core.h"
#include "gadget-export.h"
#include "drd.h"
#include "cdnsp-gadget.h"
#include "cdnsp-trace.h"
unsigned int cdnsp_port_speed(unsigned int port_status)
{ … }
u32 cdnsp_port_state_to_neutral(u32 state)
{ … }
int cdnsp_find_next_ext_cap(void __iomem *base, u32 start, int id)
{ … }
void cdnsp_set_link_state(struct cdnsp_device *pdev,
__le32 __iomem *port_regs,
u32 link_state)
{ … }
static void cdnsp_disable_port(struct cdnsp_device *pdev,
__le32 __iomem *port_regs)
{ … }
static void cdnsp_clear_port_change_bit(struct cdnsp_device *pdev,
__le32 __iomem *port_regs)
{ … }
static void cdnsp_set_chicken_bits_2(struct cdnsp_device *pdev, u32 bit)
{ … }
static void cdnsp_clear_chicken_bits_2(struct cdnsp_device *pdev, u32 bit)
{ … }
static void cdnsp_quiesce(struct cdnsp_device *pdev)
{ … }
int cdnsp_halt(struct cdnsp_device *pdev)
{ … }
void cdnsp_died(struct cdnsp_device *pdev)
{ … }
static int cdnsp_start(struct cdnsp_device *pdev)
{ … }
int cdnsp_reset(struct cdnsp_device *pdev)
{ … }
static unsigned int
cdnsp_get_endpoint_index(const struct usb_endpoint_descriptor *desc)
{ … }
static unsigned int
cdnsp_get_endpoint_flag(const struct usb_endpoint_descriptor *desc)
{ … }
int cdnsp_ep_enqueue(struct cdnsp_ep *pep, struct cdnsp_request *preq)
{ … }
int cdnsp_ep_dequeue(struct cdnsp_ep *pep, struct cdnsp_request *preq)
{ … }
static void cdnsp_zero_in_ctx(struct cdnsp_device *pdev)
{ … }
static int cdnsp_configure_endpoint(struct cdnsp_device *pdev)
{ … }
static void cdnsp_invalidate_ep_events(struct cdnsp_device *pdev,
struct cdnsp_ep *pep)
{ … }
int cdnsp_wait_for_cmd_compl(struct cdnsp_device *pdev)
{ … }
int cdnsp_halt_endpoint(struct cdnsp_device *pdev,
struct cdnsp_ep *pep,
int value)
{ … }
static int cdnsp_update_eps_configuration(struct cdnsp_device *pdev,
struct cdnsp_ep *pep)
{ … }
int cdnsp_reset_device(struct cdnsp_device *pdev)
{ … }
static void cdnsp_setup_streams_ep_input_ctx(struct cdnsp_device *pdev,
struct cdnsp_ep_ctx *ep_ctx,
struct cdnsp_stream_info *stream_info)
{ … }
int cdnsp_alloc_streams(struct cdnsp_device *pdev, struct cdnsp_ep *pep)
{ … }
int cdnsp_disable_slot(struct cdnsp_device *pdev)
{ … }
int cdnsp_enable_slot(struct cdnsp_device *pdev)
{ … }
int cdnsp_setup_device(struct cdnsp_device *pdev, enum cdnsp_setup_dev setup)
{ … }
void cdnsp_set_usb2_hardware_lpm(struct cdnsp_device *pdev,
struct usb_request *req,
int enable)
{ … }
static int cdnsp_get_frame(struct cdnsp_device *pdev)
{ … }
static int cdnsp_gadget_ep_enable(struct usb_ep *ep,
const struct usb_endpoint_descriptor *desc)
{ … }
static int cdnsp_gadget_ep_disable(struct usb_ep *ep)
{ … }
static struct usb_request *cdnsp_gadget_ep_alloc_request(struct usb_ep *ep,
gfp_t gfp_flags)
{ … }
static void cdnsp_gadget_ep_free_request(struct usb_ep *ep,
struct usb_request *request)
{ … }
static int cdnsp_gadget_ep_queue(struct usb_ep *ep,
struct usb_request *request,
gfp_t gfp_flags)
{ … }
static int cdnsp_gadget_ep_dequeue(struct usb_ep *ep,
struct usb_request *request)
{ … }
static int cdnsp_gadget_ep_set_halt(struct usb_ep *ep, int value)
{ … }
static int cdnsp_gadget_ep_set_wedge(struct usb_ep *ep)
{ … }
static const struct usb_ep_ops cdnsp_gadget_ep0_ops = …;
static const struct usb_ep_ops cdnsp_gadget_ep_ops = …;
void cdnsp_gadget_giveback(struct cdnsp_ep *pep,
struct cdnsp_request *preq,
int status)
{ … }
static struct usb_endpoint_descriptor cdnsp_gadget_ep0_desc = …;
static int cdnsp_run(struct cdnsp_device *pdev,
enum usb_device_speed speed)
{ … }
static int cdnsp_gadget_udc_start(struct usb_gadget *g,
struct usb_gadget_driver *driver)
{ … }
void cdnsp_update_erst_dequeue(struct cdnsp_device *pdev,
union cdnsp_trb *event_ring_deq,
u8 clear_ehb)
{ … }
static void cdnsp_clear_cmd_ring(struct cdnsp_device *pdev)
{ … }
static void cdnsp_consume_all_events(struct cdnsp_device *pdev)
{ … }
static void cdnsp_stop(struct cdnsp_device *pdev)
{ … }
static int cdnsp_gadget_udc_stop(struct usb_gadget *g)
{ … }
static int cdnsp_gadget_get_frame(struct usb_gadget *g)
{ … }
static void __cdnsp_gadget_wakeup(struct cdnsp_device *pdev)
{ … }
static int cdnsp_gadget_wakeup(struct usb_gadget *g)
{ … }
static int cdnsp_gadget_set_selfpowered(struct usb_gadget *g,
int is_selfpowered)
{ … }
static int cdnsp_gadget_pullup(struct usb_gadget *gadget, int is_on)
{ … }
static const struct usb_gadget_ops cdnsp_gadget_ops = …;
static void cdnsp_get_ep_buffering(struct cdnsp_device *pdev,
struct cdnsp_ep *pep)
{ … }
static int cdnsp_gadget_init_endpoints(struct cdnsp_device *pdev)
{ … }
static void cdnsp_gadget_free_endpoints(struct cdnsp_device *pdev)
{ … }
void cdnsp_disconnect_gadget(struct cdnsp_device *pdev)
{ … }
void cdnsp_suspend_gadget(struct cdnsp_device *pdev)
{ … }
void cdnsp_resume_gadget(struct cdnsp_device *pdev)
{ … }
void cdnsp_irq_reset(struct cdnsp_device *pdev)
{ … }
static void cdnsp_get_rev_cap(struct cdnsp_device *pdev)
{ … }
static int cdnsp_gen_setup(struct cdnsp_device *pdev)
{ … }
static int __cdnsp_gadget_init(struct cdns *cdns)
{ … }
static void cdnsp_gadget_exit(struct cdns *cdns)
{ … }
static int cdnsp_gadget_suspend(struct cdns *cdns, bool do_wakeup)
{ … }
static int cdnsp_gadget_resume(struct cdns *cdns, bool hibernated)
{ … }
int cdnsp_gadget_init(struct cdns *cdns)
{ … }