[U-Boot] [PATCH 11/24] usb: s3c-otg: Rename s3c_ep0_*() functions

Marek Vasut marex at denx.de
Fri Dec 4 03:38:09 CET 2015


The driver is actually for the Designware DWC2 controller.
This patch renames the s3c_ep0_*() functions to reflect this.

Signed-off-by: Marek Vasut <marex at denx.de>
---
 drivers/usb/gadget/s3c_udc_otg.c          |  6 +++---
 drivers/usb/gadget/s3c_udc_otg_xfer_dma.c | 22 +++++++++++-----------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/usb/gadget/s3c_udc_otg.c b/drivers/usb/gadget/s3c_udc_otg.c
index 22b9518..a5091dc 100644
--- a/drivers/usb/gadget/s3c_udc_otg.c
+++ b/drivers/usb/gadget/s3c_udc_otg.c
@@ -95,10 +95,10 @@ static int s3c_queue(struct usb_ep *ep, struct usb_request *, gfp_t gfp_flags);
 static int s3c_dequeue(struct usb_ep *ep, struct usb_request *);
 static int s3c_fifo_status(struct usb_ep *ep);
 static void s3c_fifo_flush(struct usb_ep *ep);
-static void s3c_ep0_read(struct dwc2_udc *dev);
-static void s3c_ep0_kick(struct dwc2_udc *dev, struct dwc2_ep *ep);
+static void dwc2_ep0_read(struct dwc2_udc *dev);
+static void dwc2_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 dwc2_ep0_write(struct dwc2_udc *dev);
 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,
diff --git a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
index a8237d4..aa50639 100644
--- a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
@@ -62,7 +62,7 @@ static void s3c_udc_pre_setup(void)
 
 }
 
-static inline void s3c_ep0_complete_out(void)
+static inline void dwc2_ep0_complete_out(void)
 {
 	u32 ep_ctrl;
 
@@ -268,7 +268,7 @@ static void complete_tx(struct dwc2_udc *dev, u8 ep_num)
 
 	if (dev->ep0state == WAIT_FOR_NULL_COMPLETE) {
 		dev->ep0state = WAIT_FOR_OUT_COMPLETE;
-		s3c_ep0_complete_out();
+		dwc2_ep0_complete_out();
 		return;
 	}
 
@@ -315,7 +315,7 @@ static void complete_tx(struct dwc2_udc *dev, u8 ep_num)
 				__func__, ep_num);
 			done(ep, req, 0);
 			dev->ep0state = WAIT_FOR_OUT_COMPLETE;
-			s3c_ep0_complete_out();
+			dwc2_ep0_complete_out();
 		} else {
 			debug_cond(DEBUG_IN_EP,
 				"%s: ep_num = %d, invalid ep state\n",
@@ -646,7 +646,7 @@ static int s3c_queue(struct usb_ep *_ep, struct usb_request *_req,
 		if (ep_num == 0) {
 			/* EP0 */
 			list_add_tail(&req->queue, &ep->queue);
-			s3c_ep0_kick(dev, ep);
+			dwc2_ep0_kick(dev, ep);
 			req = 0;
 
 		} else if (ep_is_in(ep)) {
@@ -779,7 +779,7 @@ static inline void s3c_udc_ep0_set_stall(struct dwc2_ep *ep)
 	s3c_udc_pre_setup();
 }
 
-static void s3c_ep0_read(struct dwc2_udc *dev)
+static void dwc2_ep0_read(struct dwc2_udc *dev)
 {
 	struct dwc2_request *req;
 	struct dwc2_ep *ep = &dev->ep[0];
@@ -816,7 +816,7 @@ static void s3c_ep0_read(struct dwc2_udc *dev)
 /*
  * DATA_STATE_XMIT
  */
-static int s3c_ep0_write(struct dwc2_udc *dev)
+static int dwc2_ep0_write(struct dwc2_udc *dev)
 {
 	struct dwc2_request *req;
 	struct dwc2_ep *ep = &dev->ep[0];
@@ -1262,7 +1262,7 @@ static int s3c_udc_set_feature(struct usb_ep *_ep)
 /*
  * WAIT_FOR_SETUP (OUT_PKT_RDY)
  */
-static void s3c_ep0_setup(struct dwc2_udc *dev)
+static void dwc2_ep0_setup(struct dwc2_udc *dev)
 {
 	struct dwc2_ep *ep = &dev->ep[0];
 	int i;
@@ -1456,7 +1456,7 @@ static void s3c_handle_ep0(struct dwc2_udc *dev)
 	if (dev->ep0state == WAIT_FOR_SETUP) {
 		debug_cond(DEBUG_OUT_EP != 0,
 			   "%s: WAIT_FOR_SETUP\n", __func__);
-		s3c_ep0_setup(dev);
+		dwc2_ep0_setup(dev);
 
 	} else {
 		debug_cond(DEBUG_OUT_EP != 0,
@@ -1465,16 +1465,16 @@ static void s3c_handle_ep0(struct dwc2_udc *dev)
 	}
 }
 
-static void s3c_ep0_kick(struct dwc2_udc *dev, struct dwc2_ep *ep)
+static void dwc2_ep0_kick(struct dwc2_udc *dev, struct dwc2_ep *ep)
 {
 	debug_cond(DEBUG_EP0 != 0,
 		   "%s: ep_is_in = %d\n", __func__, ep_is_in(ep));
 	if (ep_is_in(ep)) {
 		dev->ep0state = DATA_STATE_XMIT;
-		s3c_ep0_write(dev);
+		dwc2_ep0_write(dev);
 
 	} else {
 		dev->ep0state = DATA_STATE_RECV;
-		s3c_ep0_read(dev);
+		dwc2_ep0_read(dev);
 	}
 }
-- 
2.1.4



More information about the U-Boot mailing list