usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 23:10:58 +08:00
|
|
|
/**
|
|
|
|
* debug.h - DesignWare USB3 DRD Controller Debug Header
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
|
|
|
|
*
|
|
|
|
* Authors: Felipe Balbi <balbi@ti.com>,
|
|
|
|
* Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
*
|
2013-06-30 19:15:11 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 of
|
|
|
|
* the License as published by the Free Software Foundation.
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 23:10:58 +08:00
|
|
|
*
|
2013-06-30 19:15:11 +08:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 23:10:58 +08:00
|
|
|
*/
|
|
|
|
|
2014-08-20 05:37:22 +08:00
|
|
|
#ifndef __DWC3_DEBUG_H
|
|
|
|
#define __DWC3_DEBUG_H
|
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 23:10:58 +08:00
|
|
|
#include "core.h"
|
|
|
|
|
2014-08-20 05:37:22 +08:00
|
|
|
/**
|
|
|
|
* dwc3_gadget_ep_cmd_string - returns endpoint command string
|
|
|
|
* @cmd: command code
|
|
|
|
*/
|
|
|
|
static inline const char *
|
|
|
|
dwc3_gadget_ep_cmd_string(u8 cmd)
|
|
|
|
{
|
|
|
|
switch (cmd) {
|
|
|
|
case DWC3_DEPCMD_DEPSTARTCFG:
|
|
|
|
return "Start New Configuration";
|
|
|
|
case DWC3_DEPCMD_ENDTRANSFER:
|
|
|
|
return "End Transfer";
|
|
|
|
case DWC3_DEPCMD_UPDATETRANSFER:
|
|
|
|
return "Update Transfer";
|
|
|
|
case DWC3_DEPCMD_STARTTRANSFER:
|
|
|
|
return "Start Transfer";
|
|
|
|
case DWC3_DEPCMD_CLEARSTALL:
|
|
|
|
return "Clear Stall";
|
|
|
|
case DWC3_DEPCMD_SETSTALL:
|
|
|
|
return "Set Stall";
|
|
|
|
case DWC3_DEPCMD_GETEPSTATE:
|
|
|
|
return "Get Endpoint State";
|
|
|
|
case DWC3_DEPCMD_SETTRANSFRESOURCE:
|
|
|
|
return "Set Endpoint Transfer Resource";
|
|
|
|
case DWC3_DEPCMD_SETEPCONFIG:
|
|
|
|
return "Set Endpoint Configuration";
|
|
|
|
default:
|
|
|
|
return "UNKNOWN command";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* dwc3_gadget_generic_cmd_string - returns generic command string
|
|
|
|
* @cmd: command code
|
|
|
|
*/
|
|
|
|
static inline const char *
|
|
|
|
dwc3_gadget_generic_cmd_string(u8 cmd)
|
|
|
|
{
|
|
|
|
switch (cmd) {
|
|
|
|
case DWC3_DGCMD_SET_LMP:
|
|
|
|
return "Set LMP";
|
|
|
|
case DWC3_DGCMD_SET_PERIODIC_PAR:
|
|
|
|
return "Set Periodic Parameters";
|
|
|
|
case DWC3_DGCMD_XMIT_FUNCTION:
|
|
|
|
return "Transmit Function Wake Device Notification";
|
|
|
|
case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_LO:
|
|
|
|
return "Set Scratchpad Buffer Array Address Lo";
|
|
|
|
case DWC3_DGCMD_SET_SCRATCHPAD_ADDR_HI:
|
|
|
|
return "Set Scratchpad Buffer Array Address Hi";
|
|
|
|
case DWC3_DGCMD_SELECTED_FIFO_FLUSH:
|
|
|
|
return "Selected FIFO Flush";
|
|
|
|
case DWC3_DGCMD_ALL_FIFO_FLUSH:
|
|
|
|
return "All FIFO Flush";
|
|
|
|
case DWC3_DGCMD_SET_ENDPOINT_NRDY:
|
|
|
|
return "Set Endpoint NRDY";
|
|
|
|
case DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK:
|
|
|
|
return "Run SoC Bus Loopback Test";
|
|
|
|
default:
|
|
|
|
return "UNKNOWN";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* dwc3_gadget_link_string - returns link name
|
|
|
|
* @link_state: link state code
|
|
|
|
*/
|
|
|
|
static inline const char *
|
|
|
|
dwc3_gadget_link_string(enum dwc3_link_state link_state)
|
|
|
|
{
|
|
|
|
switch (link_state) {
|
|
|
|
case DWC3_LINK_STATE_U0:
|
|
|
|
return "U0";
|
|
|
|
case DWC3_LINK_STATE_U1:
|
|
|
|
return "U1";
|
|
|
|
case DWC3_LINK_STATE_U2:
|
|
|
|
return "U2";
|
|
|
|
case DWC3_LINK_STATE_U3:
|
|
|
|
return "U3";
|
|
|
|
case DWC3_LINK_STATE_SS_DIS:
|
|
|
|
return "SS.Disabled";
|
|
|
|
case DWC3_LINK_STATE_RX_DET:
|
|
|
|
return "RX.Detect";
|
|
|
|
case DWC3_LINK_STATE_SS_INACT:
|
|
|
|
return "SS.Inactive";
|
|
|
|
case DWC3_LINK_STATE_POLL:
|
|
|
|
return "Polling";
|
|
|
|
case DWC3_LINK_STATE_RECOV:
|
|
|
|
return "Recovery";
|
|
|
|
case DWC3_LINK_STATE_HRESET:
|
|
|
|
return "Hot Reset";
|
|
|
|
case DWC3_LINK_STATE_CMPLY:
|
|
|
|
return "Compliance";
|
|
|
|
case DWC3_LINK_STATE_LPBK:
|
|
|
|
return "Loopback";
|
|
|
|
case DWC3_LINK_STATE_RESET:
|
|
|
|
return "Reset";
|
|
|
|
case DWC3_LINK_STATE_RESUME:
|
|
|
|
return "Resume";
|
|
|
|
default:
|
|
|
|
return "UNKNOWN link state\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* dwc3_gadget_event_string - returns event name
|
|
|
|
* @event: the event code
|
|
|
|
*/
|
2016-05-23 16:10:08 +08:00
|
|
|
static inline const char *
|
|
|
|
dwc3_gadget_event_string(const struct dwc3_event_devt *event)
|
2014-08-20 05:37:22 +08:00
|
|
|
{
|
2016-05-23 16:10:08 +08:00
|
|
|
static char str[256];
|
|
|
|
enum dwc3_link_state state = event->event_info & DWC3_LINK_STATE_MASK;
|
|
|
|
|
|
|
|
switch (event->type) {
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_DISCONNECT:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Disconnect: [%s]",
|
|
|
|
dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_RESET:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Reset [%s]", dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_CONNECT_DONE:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Connection Done [%s]",
|
|
|
|
dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_LINK_STATUS_CHANGE:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Link Change [%s]",
|
|
|
|
dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_WAKEUP:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "WakeUp [%s]", dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_EOPF:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "End-Of-Frame [%s]",
|
|
|
|
dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_SOF:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Start-Of-Frame [%s]",
|
|
|
|
dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_ERRATIC_ERROR:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Erratic Error [%s]",
|
|
|
|
dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_CMD_CMPL:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Command Complete [%s]",
|
|
|
|
dwc3_gadget_link_string(state));
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEVICE_EVENT_OVERFLOW:
|
2016-05-23 16:10:08 +08:00
|
|
|
sprintf(str, "Overflow [%s]", dwc3_gadget_link_string(state));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
sprintf(str, "UNKNOWN");
|
2014-08-20 05:37:22 +08:00
|
|
|
}
|
|
|
|
|
2016-05-23 16:10:08 +08:00
|
|
|
return str;
|
2014-08-20 05:37:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* dwc3_ep_event_string - returns event name
|
|
|
|
* @event: then event code
|
|
|
|
*/
|
2016-05-23 16:10:08 +08:00
|
|
|
static inline const char *
|
|
|
|
dwc3_ep_event_string(const struct dwc3_event_depevt *event)
|
2014-08-20 05:37:22 +08:00
|
|
|
{
|
2016-05-23 16:10:08 +08:00
|
|
|
u8 epnum = event->endpoint_number;
|
|
|
|
static char str[256];
|
|
|
|
int status;
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
ret = sprintf(str, "ep%d%s: ", epnum >> 1,
|
|
|
|
(epnum & 1) ? "in" : "in");
|
|
|
|
if (ret < 0)
|
|
|
|
return "UNKNOWN";
|
|
|
|
|
|
|
|
switch (event->endpoint_event) {
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEPEVT_XFERCOMPLETE:
|
2016-05-23 16:10:08 +08:00
|
|
|
strcat(str, "Transfer Complete");
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEPEVT_XFERINPROGRESS:
|
2016-05-23 16:10:08 +08:00
|
|
|
strcat(str, "Transfer In-Progress");
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEPEVT_XFERNOTREADY:
|
2016-05-23 16:10:08 +08:00
|
|
|
strcat(str, "Transfer Not Ready");
|
|
|
|
status = event->status & DEPEVT_STATUS_TRANSFER_ACTIVE;
|
|
|
|
strcat(str, status ? " (Active)" : " (Not Active)");
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEPEVT_RXTXFIFOEVT:
|
2016-05-23 16:10:08 +08:00
|
|
|
strcat(str, "FIFO");
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEPEVT_STREAMEVT:
|
2016-05-23 16:10:08 +08:00
|
|
|
status = event->status;
|
|
|
|
|
|
|
|
switch (status) {
|
|
|
|
case DEPEVT_STREAMEVT_FOUND:
|
|
|
|
sprintf(str + ret, " Stream %d Found",
|
|
|
|
event->parameters);
|
|
|
|
break;
|
|
|
|
case DEPEVT_STREAMEVT_NOTFOUND:
|
|
|
|
default:
|
|
|
|
strcat(str, " Stream Not Found");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
2014-08-20 05:37:22 +08:00
|
|
|
case DWC3_DEPEVT_EPCMDCMPLT:
|
2016-05-23 16:10:08 +08:00
|
|
|
strcat(str, "Endpoint Command Complete");
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
sprintf(str, "UNKNOWN");
|
2014-08-20 05:37:22 +08:00
|
|
|
}
|
|
|
|
|
2016-05-23 16:10:08 +08:00
|
|
|
return str;
|
2014-08-20 05:37:22 +08:00
|
|
|
}
|
|
|
|
|
2014-08-20 05:49:20 +08:00
|
|
|
/**
|
|
|
|
* dwc3_gadget_event_type_string - return event name
|
|
|
|
* @event: the event code
|
|
|
|
*/
|
|
|
|
static inline const char *dwc3_gadget_event_type_string(u8 event)
|
|
|
|
{
|
|
|
|
switch (event) {
|
|
|
|
case DWC3_DEVICE_EVENT_DISCONNECT:
|
|
|
|
return "Disconnect";
|
|
|
|
case DWC3_DEVICE_EVENT_RESET:
|
|
|
|
return "Reset";
|
|
|
|
case DWC3_DEVICE_EVENT_CONNECT_DONE:
|
|
|
|
return "Connect Done";
|
|
|
|
case DWC3_DEVICE_EVENT_LINK_STATUS_CHANGE:
|
|
|
|
return "Link Status Change";
|
|
|
|
case DWC3_DEVICE_EVENT_WAKEUP:
|
|
|
|
return "Wake-Up";
|
|
|
|
case DWC3_DEVICE_EVENT_HIBER_REQ:
|
|
|
|
return "Hibernation";
|
|
|
|
case DWC3_DEVICE_EVENT_EOPF:
|
|
|
|
return "End of Periodic Frame";
|
|
|
|
case DWC3_DEVICE_EVENT_SOF:
|
|
|
|
return "Start of Frame";
|
|
|
|
case DWC3_DEVICE_EVENT_ERRATIC_ERROR:
|
|
|
|
return "Erratic Error";
|
|
|
|
case DWC3_DEVICE_EVENT_CMD_CMPL:
|
|
|
|
return "Command Complete";
|
|
|
|
case DWC3_DEVICE_EVENT_OVERFLOW:
|
|
|
|
return "Overflow";
|
|
|
|
default:
|
|
|
|
return "UNKNOWN";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-23 16:10:08 +08:00
|
|
|
static inline const char *dwc3_decode_event(u32 event)
|
|
|
|
{
|
|
|
|
const union dwc3_event evt = (union dwc3_event) event;
|
|
|
|
|
|
|
|
if (evt.type.is_devspec)
|
|
|
|
return dwc3_gadget_event_string(&evt.devt);
|
|
|
|
else
|
|
|
|
return dwc3_ep_event_string(&evt.depevt);
|
|
|
|
}
|
|
|
|
|
2016-05-23 19:02:33 +08:00
|
|
|
static inline const char *dwc3_ep_cmd_status_string(int status)
|
|
|
|
{
|
|
|
|
switch (status) {
|
|
|
|
case -ETIMEDOUT:
|
|
|
|
return "Timed Out";
|
|
|
|
case 0:
|
|
|
|
return "Successful";
|
|
|
|
case DEPEVT_TRANSFER_NO_RESOURCE:
|
|
|
|
return "No Resource";
|
|
|
|
case DEPEVT_TRANSFER_BUS_EXPIRY:
|
|
|
|
return "Bus Expiry";
|
|
|
|
default:
|
|
|
|
return "UNKNOWN";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-23 19:16:19 +08:00
|
|
|
static inline const char *dwc3_gadget_generic_cmd_status_string(int status)
|
|
|
|
{
|
|
|
|
switch (status) {
|
|
|
|
case -ETIMEDOUT:
|
|
|
|
return "Timed Out";
|
|
|
|
case 0:
|
|
|
|
return "Successful";
|
|
|
|
case 1:
|
|
|
|
return "Error";
|
|
|
|
default:
|
|
|
|
return "UNKNOWN";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-01 06:45:10 +08:00
|
|
|
void dwc3_trace(void (*trace)(struct va_format *), const char *fmt, ...);
|
|
|
|
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 23:10:58 +08:00
|
|
|
#ifdef CONFIG_DEBUG_FS
|
2016-04-12 19:10:18 +08:00
|
|
|
extern void dwc3_debugfs_init(struct dwc3 *);
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 23:10:58 +08:00
|
|
|
extern void dwc3_debugfs_exit(struct dwc3 *);
|
|
|
|
#else
|
2016-04-12 19:10:18 +08:00
|
|
|
static inline void dwc3_debugfs_init(struct dwc3 *d)
|
|
|
|
{ }
|
usb: Introduce DesignWare USB3 DRD Driver
The DesignWare USB3 is a highly
configurable IP Core which can be
instantiated as Dual-Role Device (DRD),
Peripheral Only and Host Only (XHCI)
configurations.
Several other parameters can be configured
like amount of FIFO space, amount of TX and
RX endpoints, amount of Host Interrupters,
etc.
The current driver has been validated with
a virtual model of version 1.73a of that core
and with an FPGA burned with version 1.83a
of the DRD core. We have support for PCIe
bus, which is used on FPGA prototyping, and
for the OMAP5, more adaptation (or glue)
layers can be easily added and the driver
is half prepared to handle any possible
configuration the HW engineer has chosen
considering we have the information on
one of the GHWPARAMS registers to do
runtime checking of certain features.
More runtime checks can, and should, be added
in order to make this driver even more flexible
with regards to number of endpoints, FIFO sizes,
transfer types, etc.
While this supports only the device side, for
now, we will add support for Host side (xHCI -
see the updated series Sebastian has sent [1])
and OTG after we have it all stabilized.
[1] http://marc.info/?l=linux-usb&m=131341992020339&w=2
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-19 23:10:58 +08:00
|
|
|
static inline void dwc3_debugfs_exit(struct dwc3 *d)
|
|
|
|
{ }
|
|
|
|
#endif
|
2014-08-20 05:37:22 +08:00
|
|
|
#endif /* __DWC3_DEBUG_H */
|