public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/24] usb: s3c-otg: Rename struct s3c_request
Date: Fri,  4 Dec 2015 03:38:06 +0100	[thread overview]
Message-ID: <1449196702-8522-9-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1449196702-8522-1-git-send-email-marex@denx.de>

The driver is actually for the Designware DWC2 controller.
This patch renames struct s3c_request to reflect this.

Signed-off-by: Marek Vasut <marex@denx.de>
---
 drivers/usb/gadget/s3c_udc_otg.c          | 18 ++++++++--------
 drivers/usb/gadget/s3c_udc_otg_priv.h     |  2 +-
 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c | 36 +++++++++++++++----------------
 3 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c
index 4caa390..22b9518 100644
--- a/drivers/usb/gadget/s3c_udc_otg.c
+++ b/drivers/usb/gadget/s3c_udc_otg.c
@@ -99,8 +99,8 @@ static void s3c_ep0_read(struct dwc2_udc *dev);
 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);
@@ -305,7 +305,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
 /*
  *	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;
 
@@ -358,13 +358,13 @@ static void done(struct dwc2_ep *ep, struct s3c_request *req, int status)
  */
 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);
 	}
 }
@@ -624,7 +624,7 @@ static int s3c_ep_disable(struct usb_ep *_ep)
 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);
 
@@ -640,11 +640,11 @@ static struct usb_request *s3c_alloc_request(struct usb_ep *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);
 }
@@ -653,7 +653,7 @@ static void s3c_free_request(struct usb_ep *ep, struct usb_request *_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);
diff --git a/drivers/usb/gadget/s3c_udc_otg_priv.h b/drivers/usb/gadget/s3c_udc_otg_priv.h
index bceb037..953cded 100644
--- a/drivers/usb/gadget/s3c_udc_otg_priv.h
+++ b/drivers/usb/gadget/s3c_udc_otg_priv.h
@@ -71,7 +71,7 @@ struct dwc2_ep {
 	int fifo_num;
 };
 
-struct s3c_request {
+struct dwc2_request {
 	struct usb_request req;
 	struct list_head queue;
 };
diff --git a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
index 53c9d4e..0288d44 100644
--- a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
@@ -90,7 +90,7 @@ static inline void s3c_ep0_complete_out(void)
 }
 
 
-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;
@@ -128,7 +128,7 @@ static int setdma_rx(struct dwc2_ep *ep, struct s3c_request *req)
 
 }
 
-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;
@@ -189,7 +189,7 @@ int setdma_tx(struct dwc2_ep *ep, struct s3c_request *req)
 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)) {
@@ -200,7 +200,7 @@ static void complete_rx(struct dwc2_udc *dev, u8 ep_num)
 
 	}
 
-	req = list_entry(ep->queue.next, struct s3c_request, queue);
+	req = list_entry(ep->queue.next, struct dwc2_request, queue);
 	ep_tsr = readl(&reg->out_endp[ep_num].doeptsiz);
 
 	if (ep_num == EP0_CON)
@@ -248,7 +248,7 @@ static void complete_rx(struct dwc2_udc *dev, u8 ep_num)
 
 			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__);
@@ -262,7 +262,7 @@ static void complete_rx(struct dwc2_udc *dev, u8 ep_num)
 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;
 
@@ -280,7 +280,7 @@ static void complete_tx(struct dwc2_udc *dev, u8 ep_num)
 
 	}
 
-	req = list_entry(ep->queue.next, struct s3c_request, queue);
+	req = list_entry(ep->queue.next, struct dwc2_request, queue);
 
 	ep_tsr = readl(&reg->in_endp[ep_num].dieptsiz);
 
@@ -328,7 +328,7 @@ static void complete_tx(struct dwc2_udc *dev, u8 ep_num)
 		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);
@@ -338,13 +338,13 @@ static void complete_tx(struct dwc2_udc *dev, u8 ep_num)
 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);
@@ -582,13 +582,13 @@ static int s3c_udc_irq(int irq, void *_dev)
 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))) {
 
@@ -680,7 +680,7 @@ static int s3c_queue(struct usb_ep *_ep, struct usb_request *_req,
 /****************************************************************/
 
 /* 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;
@@ -781,11 +781,11 @@ static inline void s3c_udc_ep0_set_stall(struct dwc2_ep *ep)
 
 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__);
@@ -818,14 +818,14 @@ static void s3c_ep0_read(struct dwc2_udc *dev)
  */
 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__);
@@ -1050,7 +1050,7 @@ static int s3c_udc_set_halt(struct usb_ep *_ep, int value)
 	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;
 	}
-- 
2.1.4

  parent reply	other threads:[~2015-12-04  2:38 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04  2:37 [U-Boot] [PATCH 00/24] usb: s3c-otg: Rename driver to dwc2-otg Marek Vasut
2015-12-04  2:37 ` [U-Boot] [PATCH 01/24] usb: s3c-otg: Rename regs-otg.h to s3c_udc_otg_regs.h Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 02/24] usb: s3c-otg: Rename struct s3c_udc to dwc2_udc Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 03/24] usb: s3c-otg: Rename struct s3c_usbotg_reg to dwc2_usbotg_reg Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 04/24] usb: s3c-otg: Split private bits from s3c_udc.h Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 05/24] usb: s3c-otg: Rename struct s3c_usbotg_phy to dwc2_usbotg_phy Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 06/24] usb: s3c-otg: Rename struct s3c_dev_*_ep Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 07/24] usb: s3c-otg: Rename struct s3c_ep Marek Vasut
2015-12-04  2:38 ` Marek Vasut [this message]
2015-12-04  2:38 ` [U-Boot] [PATCH 09/24] usb: s3c-otg: Staticize s3c_udc_ep_set_stall Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 10/24] usb: s3c-otg: Staticize functions in s3c_udc_otg_xfer_dma.c Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 11/24] usb: s3c-otg: Rename s3c_ep0_*() functions Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 12/24] usb: s3c-otg: Rename s3c_ep_*() functions Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 13/24] usb: s3c-otg: Rename s3c_udc_*() functions Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 14/24] usb: s3c-otg: Rename remaining local s3c_*() functions Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 15/24] usb: s3c-otg: Zap useless externs Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 16/24] usb: s3c-otg: Change the driver name to dwc2-udc Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 17/24] usb: s3c-otg: Rename local headers to dwc2_*h Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 18/24] usb: s3c-otg: Rename sources to dwc2_*c Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 19/24] usb: s3c-otg: Rename remaining macros Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 20/24] usb: s3c-otg: Tweak the comments Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 21/24] usb: s3c-otg: Rename USB_GADGET_S3C_UDC_OTG* to USB_GADGET_DWC2_OTG* Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 22/24] usb: s3c-otg: Rename struct s3c_plat_otg_data Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 23/24] usb: s3c-otg: Rename s3c_udc_probe() function Marek Vasut
2015-12-04  2:38 ` [U-Boot] [PATCH 24/24] usb: s3c-otg: Rename usb/s3c_udc.h to usb/dwc2_udc.h Marek Vasut
2015-12-04  9:09 ` [U-Boot] [PATCH 00/24] usb: s3c-otg: Rename driver to dwc2-otg Lukasz Majewski
2015-12-04 13:38   ` Marek Vasut
2015-12-04 15:12     ` Lukasz Majewski
2015-12-04 15:22       ` Marek Vasut
2015-12-09  9:37 ` Lukasz Majewski
2015-12-09 14:15   ` Marek Vasut
2015-12-09 15:02     ` Lukasz Majewski
2015-12-09 15:17       ` Marek Vasut
2015-12-09 16:06         ` Lukasz Majewski
2015-12-09 16:22           ` Marek Vasut
2015-12-10 16:07             ` Lukasz Majewski
2015-12-10 16:51               ` Marek Vasut
2015-12-10 17:08                 ` Marek Vasut
2015-12-15 14:40                   ` Lukasz Majewski
2015-12-15 22:50                     ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449196702-8522-9-git-send-email-marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox