static void s3c_ep0_kick(struct dwc2_udc *dev, struct dwc2_ep *ep);
static void s3c_handle_ep0(struct dwc2_udc *dev);
static int s3c_ep0_write(struct dwc2_udc *dev);
-static int write_fifo_ep0(struct dwc2_ep *ep, struct s3c_request *req);
-static void done(struct dwc2_ep *ep, struct s3c_request *req, int status);
+static int write_fifo_ep0(struct dwc2_ep *ep, struct dwc2_request *req);
+static void done(struct dwc2_ep *ep, struct dwc2_request *req, int status);
static void stop_activity(struct dwc2_udc *dev,
struct usb_gadget_driver *driver);
static int udc_enable(struct dwc2_udc *dev);
/*
* done - retire a request; caller blocked irqs
*/
-static void done(struct dwc2_ep *ep, struct s3c_request *req, int status)
+static void done(struct dwc2_ep *ep, struct dwc2_request *req, int status)
{
unsigned int stopped = ep->stopped;
*/
static void nuke(struct dwc2_ep *ep, int status)
{
- struct s3c_request *req;
+ struct dwc2_request *req;
debug("%s: %s %p\n", __func__, ep->ep.name, ep);
/* called with irqs blocked */
while (!list_empty(&ep->queue)) {
- req = list_entry(ep->queue.next, struct s3c_request, queue);
+ req = list_entry(ep->queue.next, struct dwc2_request, queue);
done(ep, req, status);
}
}
static struct usb_request *s3c_alloc_request(struct usb_ep *ep,
gfp_t gfp_flags)
{
- struct s3c_request *req;
+ struct dwc2_request *req;
debug("%s: %s %p\n", __func__, ep->name, ep);
static void s3c_free_request(struct usb_ep *ep, struct usb_request *_req)
{
- struct s3c_request *req;
+ struct dwc2_request *req;
debug("%s: %p\n", __func__, ep);
- req = container_of(_req, struct s3c_request, req);
+ req = container_of(_req, struct dwc2_request, req);
WARN_ON(!list_empty(&req->queue));
kfree(req);
}
static int s3c_dequeue(struct usb_ep *_ep, struct usb_request *_req)
{
struct dwc2_ep *ep;
- struct s3c_request *req;
+ struct dwc2_request *req;
unsigned long flags = 0;
debug("%s: %p\n", __func__, _ep);
}
-static int setdma_rx(struct dwc2_ep *ep, struct s3c_request *req)
+static int setdma_rx(struct dwc2_ep *ep, struct dwc2_request *req)
{
u32 *buf, ctrl;
u32 length, pktcnt;
}
-int setdma_tx(struct dwc2_ep *ep, struct s3c_request *req)
+int setdma_tx(struct dwc2_ep *ep, struct dwc2_request *req)
{
u32 *buf, ctrl = 0;
u32 length, pktcnt;
static void complete_rx(struct dwc2_udc *dev, u8 ep_num)
{
struct dwc2_ep *ep = &dev->ep[ep_num];
- struct s3c_request *req = NULL;
+ struct dwc2_request *req = NULL;
u32 ep_tsr = 0, xfer_size = 0, is_short = 0;
if (list_empty(&ep->queue)) {
}
- req = list_entry(ep->queue.next, struct s3c_request, queue);
+ req = list_entry(ep->queue.next, struct dwc2_request, queue);
ep_tsr = readl(®->out_endp[ep_num].doeptsiz);
if (ep_num == EP0_CON)
if (!list_empty(&ep->queue)) {
req = list_entry(ep->queue.next,
- struct s3c_request, queue);
+ struct dwc2_request, queue);
debug_cond(DEBUG_OUT_EP != 0,
"%s: Next Rx request start...\n",
__func__);
static void complete_tx(struct dwc2_udc *dev, u8 ep_num)
{
struct dwc2_ep *ep = &dev->ep[ep_num];
- struct s3c_request *req;
+ struct dwc2_request *req;
u32 ep_tsr = 0, xfer_size = 0, is_short = 0;
u32 last;
}
- req = list_entry(ep->queue.next, struct s3c_request, queue);
+ req = list_entry(ep->queue.next, struct dwc2_request, queue);
ep_tsr = readl(®->in_endp[ep_num].dieptsiz);
done(ep, req, 0);
if (!list_empty(&ep->queue)) {
- req = list_entry(ep->queue.next, struct s3c_request, queue);
+ req = list_entry(ep->queue.next, struct dwc2_request, queue);
debug_cond(DEBUG_IN_EP,
"%s: Next Tx request start...\n", __func__);
setdma_tx(ep, req);
static inline void s3c_udc_check_tx_queue(struct dwc2_udc *dev, u8 ep_num)
{
struct dwc2_ep *ep = &dev->ep[ep_num];
- struct s3c_request *req;
+ struct dwc2_request *req;
debug_cond(DEBUG_IN_EP,
"%s: Check queue, ep_num = %d\n", __func__, ep_num);
if (!list_empty(&ep->queue)) {
- req = list_entry(ep->queue.next, struct s3c_request, queue);
+ req = list_entry(ep->queue.next, struct dwc2_request, queue);
debug_cond(DEBUG_IN_EP,
"%s: Next Tx request(0x%p) start...\n",
__func__, req);
static int s3c_queue(struct usb_ep *_ep, struct usb_request *_req,
gfp_t gfp_flags)
{
- struct s3c_request *req;
+ struct dwc2_request *req;
struct dwc2_ep *ep;
struct dwc2_udc *dev;
unsigned long flags = 0;
u32 ep_num, gintsts;
- req = container_of(_req, struct s3c_request, req);
+ req = container_of(_req, struct dwc2_request, req);
if (unlikely(!_req || !_req->complete || !_req->buf
|| !list_empty(&req->queue))) {
/****************************************************************/
/* return: 0 = still running, 1 = completed, negative = errno */
-static int write_fifo_ep0(struct dwc2_ep *ep, struct s3c_request *req)
+static int write_fifo_ep0(struct dwc2_ep *ep, struct dwc2_request *req)
{
u32 max;
unsigned count;
static void s3c_ep0_read(struct dwc2_udc *dev)
{
- struct s3c_request *req;
+ struct dwc2_request *req;
struct dwc2_ep *ep = &dev->ep[0];
if (!list_empty(&ep->queue)) {
- req = list_entry(ep->queue.next, struct s3c_request, queue);
+ req = list_entry(ep->queue.next, struct dwc2_request, queue);
} else {
debug("%s: ---> BUG\n", __func__);
*/
static int s3c_ep0_write(struct dwc2_udc *dev)
{
- struct s3c_request *req;
+ struct dwc2_request *req;
struct dwc2_ep *ep = &dev->ep[0];
int ret, need_zlp = 0;
if (list_empty(&ep->queue))
req = 0;
else
- req = list_entry(ep->queue.next, struct s3c_request, queue);
+ req = list_entry(ep->queue.next, struct dwc2_request, queue);
if (!req) {
debug_cond(DEBUG_EP0 != 0, "%s: NULL REQ\n", __func__);
if (value && ep_is_in(ep) && !list_empty(&ep->queue)) {
debug("%s: %s queue not empty, req = %p\n",
__func__, ep->ep.name,
- list_entry(ep->queue.next, struct s3c_request, queue));
+ list_entry(ep->queue.next, struct dwc2_request, queue));
return -EAGAIN;
}