Skip to contentSkip to conversation

usb: mv_udc: Rename to ci_udc

PATCH New Marek Vasut 3 participants 5 messages Feb 6, 2014 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: mv_udc: Rename to ci_udc

The mv_udc is not marvell-specific anymore. The mv_udc is used to drive generic ChipIdea CI13xxx series OTG cores, so rename the driver to ci_udc instead.

Cc Eric Nelson <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/boundary/nitrogen6x/nitrogen6x.c    |   2 +-
 drivers/serial/usbtty.h                   |   4 +-
 drivers/usb/gadget/Makefile               |   2 +-
 drivers/usb/gadget/{mv_udc.c => ci_udc.c} | 178 +++++++++++++++---------------
 drivers/usb/gadget/{mv_udc.h => ci_udc.h} |  12 +-
 drivers/usb/gadget/gadget_chips.h         |   8 +-
 include/configs/nitrogen6x.h              |   2 +-
 include/configs/sansa_fuze_plus.h         |   2 +-
 include/configs/xfi3.h                    |   2 +-
 include/usb/{mv_udc.h => ci_udc.h}        |   6 +-
 10 files changed, 109 insertions(+), 109 deletions(-)
 rename drivers/usb/gadget/{mv_udc.c => ci_udc.c} (79%)
 rename drivers/usb/gadget/{mv_udc.h => ci_udc.h} (94%)
 rename include/usb/{mv_udc.h => ci_udc.h} (73%)
board/boundary/nitrogen6x/nitrogen6x.c +1 -1
index 3f4cfa1..d9c05b0 100644
@@ -389,7 +389,7 @@ int board_eth_init(bd_t *bis)
 	}
 #endif
 
-#ifdef CONFIG_MV_UDC
+#ifdef CONFIG_CI_UDC
 	/* For otg ethernet*/
 	usb_eth_initialize(bis);
 #endif
drivers/serial/usbtty.h +2 -2
index 819dec6..21a3ef4 100644
@@ -20,8 +20,8 @@
 #include <usb/pxa27x_udc.h>
 #elif defined(CONFIG_DW_UDC)
 #include <usb/designware_udc.h>
-#elif defined(CONFIG_MV_UDC)
-#include <usb/mv_udc.h>
+#elif defined(CONFIG_CI_UDC)
+#include <usb/ci_udc.h>
 #endif
 
 #include <usb/udc.h>
drivers/usb/gadget/Makefile +1 -1
index f13b172..804a2bd 100644
@@ -21,7 +21,7 @@ endif
 ifdef CONFIG_USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
-obj-$(CONFIG_MV_UDC)	+= mv_udc.o
+obj-$(CONFIG_CI_UDC)	+= ci_udc.o
 obj-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
 else
 # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
drivers/usb/gadget/ci_udc.c renamed from drivers/usb/gadget/mv_udc.c +89 -89

452 lines not on this page · raw message

drivers/usb/gadget/ci_udc.h renamed from drivers/usb/gadget/mv_udc.h +6 -6
similarity index 94%
rename from drivers/usb/gadget/mv_udc.h
rename to drivers/usb/gadget/ci_udc.h
index c7d8b33..42f6ef4 100644
@@ -3,12 +3,12 @@
  *
  * Licensed under the GPL-2 or later.
  */
-#ifndef __GADGET__MV_UDC_H__
-#define __GADGET__MV_UDC_H__
+#ifndef __GADGET__CI_UDC_H__
+#define __GADGET__CI_UDC_H__
 
 #define NUM_ENDPOINTS		6
 
-struct mv_udc {
+struct ci_udc {
 #define MICRO_8FRAME	0x8
 #define USBCMD_ITC(x)	((((x) > 0xff) ? 0xff : x) << 16)
 #define USBCMD_FS2	(1 << 15)
@@ -48,7 +48,7 @@ struct mv_udc {
 	u32 epctrl[16];		/* 0x1c0 */
 };
 
-struct mv_ep {
+struct ci_ep {
 	struct usb_ep ep;
 	struct list_head queue;
 	const struct usb_endpoint_descriptor *desc;
@@ -59,14 +59,14 @@ struct mv_ep {
 	uint8_t b_fast[64] __aligned(ARCH_DMA_MINALIGN);
 };
 
-struct mv_drv {
+struct ci_drv {
 	struct usb_gadget		gadget;
 	struct usb_gadget_driver	*driver;
 	struct ehci_ctrl		*ctrl;
 	struct ept_queue_head		*epts;
 	struct ept_queue_item		*items[2 * NUM_ENDPOINTS];
 	uint8_t				*items_mem;
-	struct mv_ep			ep[NUM_ENDPOINTS];
+	struct ci_ep			ep[NUM_ENDPOINTS];
 };
 
 struct ept_queue_head {
drivers/usb/gadget/gadget_chips.h +4 -4
index aa54b85..cc94771 100644
@@ -144,10 +144,10 @@
 #define	gadget_is_m66592(g)	0
 #endif
 
-#ifdef CONFIG_MV_UDC
-#define gadget_is_mv(g)        (!strcmp("mv_udc", (g)->name))
+#ifdef CONFIG_CI_UDC
+#define gadget_is_ci(g)        (!strcmp("ci_udc", (g)->name))
 #else
-#define gadget_is_mv(g)        0
+#define gadget_is_ci(g)        0
 #endif
 
 #ifdef CONFIG_USB_GADGET_FOTG210
@@ -219,7 +219,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
 		return 0x19;
 	else if (gadget_is_m66592(gadget))
 		return 0x20;
-	else if (gadget_is_mv(gadget))
+	else if (gadget_is_ci(gadget))
 		return 0x21;
 	else if (gadget_is_fotg210(gadget))
 		return 0x22;
include/configs/nitrogen6x.h +1 -1
index f4ff5cd..e44ec88 100644
@@ -31,7 +31,7 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_MISC_INIT_R
 #define CONFIG_MXC_GPIO
-#define CONFIG_MV_UDC
+#define CONFIG_CI_UDC
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_ETHER
include/configs/sansa_fuze_plus.h +1 -1
index a85eb1c..8cce34a 100644
@@ -56,7 +56,7 @@
 #define CONFIG_EHCI_MXS_PORT0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 
-#define CONFIG_MV_UDC		/* ChipIdea CI13xxx UDC */
+#define CONFIG_CI_UDC		/* ChipIdea CI13xxx UDC */
 #define CONFIG_USB_GADGET_DUALSPEED
 
 #define CONFIG_USB_ETHER
include/configs/xfi3.h +1 -1
index 022bc95..8e6b365 100644
@@ -55,7 +55,7 @@
 #define CONFIG_EHCI_MXS_PORT0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 
-#define CONFIG_MV_UDC		/* ChipIdea CI13xxx UDC */
+#define CONFIG_CI_UDC		/* ChipIdea CI13xxx UDC */
 #define CONFIG_USB_GADGET_DUALSPEED
 
 #define CONFIG_USB_ETHER
include/usb/ci_udc.h renamed from include/usb/mv_udc.h +3 -3
similarity index 73%
rename from include/usb/mv_udc.h
rename to include/usb/ci_udc.h
index f6c7b5e..0dee504 100644
@@ -6,9 +6,9 @@
  */
 
 
-#ifndef __MV_UDC_H__
-#define __MV_UDC_H__
+#ifndef __CI_UDC_H__
+#define __CI_UDC_H__
 
 #define EP_MAX_PACKET_SIZE	0x200
 #define EP0_MAX_PACKET_SIZE	64
-#endif /* __MV_UDC_H__ */
+#endif /* __CI_UDC_H__ */
Signature · 1 line
1.8.5.3
#2 lore raw

PATCH 1/1 usb: mv_udc: Rename to ci_udc

In reply to Marek Vasut

Hi Marek,

Quoted 4 lines · Marek Vasut

The mv_udc is not marvell-specific anymore. The mv_udc is used to drive generic ChipIdea CI13xxx series OTG cores, so rename the driver to ci_udc instead.

Sounds good.

Quoted 28 lines
Cc Eric Nelson <[email protected]>
Cc Stefano Babic <[email protected]>
---
  board/boundary/nitrogen6x/nitrogen6x.c    |   2 +-
  drivers/serial/usbtty.h                   |   4 +-
  drivers/usb/gadget/Makefile               |   2 +-
  drivers/usb/gadget/{mv_udc.c => ci_udc.c} | 178 +++++++++++++++---------------
  drivers/usb/gadget/{mv_udc.h => ci_udc.h} |  12 +-
  drivers/usb/gadget/gadget_chips.h         |   8 +-
  include/configs/nitrogen6x.h              |   2 +-
  include/configs/sansa_fuze_plus.h         |   2 +-
  include/configs/xfi3.h                    |   2 +-
  include/usb/{mv_udc.h => ci_udc.h}        |   6 +-
  10 files changed, 109 insertions(+), 109 deletions(-)

rename drivers/usb/gadget/{mv_udc.c => ci_udc.c} (79%) rename drivers/usb/gadget/{mv_udc.h => ci_udc.h} (94%) rename include/usb/{mv_udc.h => ci_udc.h} (73%)

...

drivers/usb/gadget/ci_udc.c renamed from drivers/usb/gadget/mv_udc.c +0 -0
similarity index 79%
rename from drivers/usb/gadget/mv_udc.c
rename to drivers/usb/gadget/ci_udc.c
index da41738..6c5ef4c 100644

drivers/usb/gadget/ci_udc.c

Quoted 2 lines
drivers/usb/gadget/ci_udc.c renamed from drivers/usb/gadget/mv_udc.c +0 -0
 
...

I think you missed the mvudc_probe() routine though:

drivers/usb/gadget/ci_udc.c static int mvudc_probe(void)

Quoted 1 line
drivers/usb/gadget/ci_udc.c renamed from drivers/usb/gadget/mv_udc.c +0 -0
@@ -673,23 +673,23 @@ static int mvudc_probe(void)

Aside from that...

#3 lore raw

PATCH 1/1 usb: mv_udc: Rename to ci_udc

Quoted 39 lines · Eric Nelson

Hi Marek,

Quoted 3 lines · Marek Vasut

The mv_udc is not marvell-specific anymore. The mv_udc is used to drive generic ChipIdea CI13xxx series OTG cores, so rename the driver to ci_udc instead.

Sounds good.

Quoted 30 lines
Cc Eric Nelson <[email protected]>
Cc Stefano Babic <[email protected]>

---

  board/boundary/nitrogen6x/nitrogen6x.c    |   2 +-
  drivers/serial/usbtty.h                   |   4 +-
  drivers/usb/gadget/Makefile               |   2 +-
  drivers/usb/gadget/{mv_udc.c => ci_udc.c} | 178
  +++++++++++++++--------------- drivers/usb/gadget/{mv_udc.h =>
  ci_udc.h} |  12 +-
  drivers/usb/gadget/gadget_chips.h         |   8 +-
  include/configs/nitrogen6x.h              |   2 +-
  include/configs/sansa_fuze_plus.h         |   2 +-
  include/configs/xfi3.h                    |   2 +-
  include/usb/{mv_udc.h => ci_udc.h}        |   6 +-
  10 files changed, 109 insertions(+), 109 deletions(-)

rename drivers/usb/gadget/{mv_udc.c => ci_udc.c} (79%) rename drivers/usb/gadget/{mv_udc.h => ci_udc.h} (94%) rename include/usb/{mv_udc.h => ci_udc.h} (73%)

...

drivers/usb/gadget/ci_udc.c renamed from drivers/usb/gadget/mv_udc.c +0 -0
similarity index 79%
rename from drivers/usb/gadget/mv_udc.c
rename to drivers/usb/gadget/ci_udc.c
index da41738..6c5ef4c 100644
Quoted 8 lines
Quoted 1 line

...

I think you missed the mvudc_probe() routine though:

drivers/usb/gadget/ci_udc.c static int mvudc_probe(void)

Quoted 1 line
drivers/usb/gadget/ci_udc.c renamed from drivers/usb/gadget/mv_udc.c +0 -0
@@ -673,23 +673,23 @@ static int mvudc_probe(void)

Aside from that...

Thanks, fixed in V2.

Best regards,
Marek Vasut

#4 lore raw

PATCH v2 1/1 usb: mv_udc: Rename to ci_udc

In reply to Marek Vasut

The mv_udc is not marvell-specific anymore. The mv_udc is used to drive generic ChipIdea CI13xxx series OTG cores, so rename the driver to ci_udc instead.

Cc Eric Nelson <[email protected]>
Cc Stefano Babic <[email protected]>
---
 board/boundary/nitrogen6x/nitrogen6x.c    |   2 +-
 drivers/serial/usbtty.h                   |   4 +-
 drivers/usb/gadget/Makefile               |   2 +-
 drivers/usb/gadget/{mv_udc.c => ci_udc.c} | 182 +++++++++++++++---------------
 drivers/usb/gadget/{mv_udc.h => ci_udc.h} |  12 +-
 drivers/usb/gadget/gadget_chips.h         |   8 +-
 include/configs/nitrogen6x.h              |   2 +-
 include/configs/sansa_fuze_plus.h         |   2 +-
 include/configs/xfi3.h                    |   2 +-
 include/usb/{mv_udc.h => ci_udc.h}        |   6 +-
 10 files changed, 111 insertions(+), 111 deletions(-)
 rename drivers/usb/gadget/{mv_udc.c => ci_udc.c} (79%)
 rename drivers/usb/gadget/{mv_udc.h => ci_udc.h} (94%)
 rename include/usb/{mv_udc.h => ci_udc.h} (73%)

V2: Rename mvudc_probe() to ci_udc_probe()

board/boundary/nitrogen6x/nitrogen6x.c +1 -1
index 3f4cfa1..d9c05b0 100644
@@ -389,7 +389,7 @@ int board_eth_init(bd_t *bis)
 	}
 #endif
 
-#ifdef CONFIG_MV_UDC
+#ifdef CONFIG_CI_UDC
 	/* For otg ethernet*/
 	usb_eth_initialize(bis);
 #endif
drivers/serial/usbtty.h +2 -2
index 819dec6..21a3ef4 100644
@@ -20,8 +20,8 @@
 #include <usb/pxa27x_udc.h>
 #elif defined(CONFIG_DW_UDC)
 #include <usb/designware_udc.h>
-#elif defined(CONFIG_MV_UDC)
-#include <usb/mv_udc.h>
+#elif defined(CONFIG_CI_UDC)
+#include <usb/ci_udc.h>
 #endif
 
 #include <usb/udc.h>
drivers/usb/gadget/Makefile +1 -1
index f13b172..804a2bd 100644
@@ -21,7 +21,7 @@ endif
 ifdef CONFIG_USB_ETHER
 obj-y += ether.o
 obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
-obj-$(CONFIG_MV_UDC)	+= mv_udc.o
+obj-$(CONFIG_CI_UDC)	+= ci_udc.o
 obj-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
 else
 # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
drivers/usb/gadget/ci_udc.c renamed from drivers/usb/gadget/mv_udc.c +91 -91

463 lines not on this page · raw message

drivers/usb/gadget/ci_udc.h renamed from drivers/usb/gadget/mv_udc.h +6 -6
similarity index 94%
rename from drivers/usb/gadget/mv_udc.h
rename to drivers/usb/gadget/ci_udc.h
index c7d8b33..42f6ef4 100644
@@ -3,12 +3,12 @@
  *
  * Licensed under the GPL-2 or later.
  */
-#ifndef __GADGET__MV_UDC_H__
-#define __GADGET__MV_UDC_H__
+#ifndef __GADGET__CI_UDC_H__
+#define __GADGET__CI_UDC_H__
 
 #define NUM_ENDPOINTS		6
 
-struct mv_udc {
+struct ci_udc {
 #define MICRO_8FRAME	0x8
 #define USBCMD_ITC(x)	((((x) > 0xff) ? 0xff : x) << 16)
 #define USBCMD_FS2	(1 << 15)
@@ -48,7 +48,7 @@ struct mv_udc {
 	u32 epctrl[16];		/* 0x1c0 */
 };
 
-struct mv_ep {
+struct ci_ep {
 	struct usb_ep ep;
 	struct list_head queue;
 	const struct usb_endpoint_descriptor *desc;
@@ -59,14 +59,14 @@ struct mv_ep {
 	uint8_t b_fast[64] __aligned(ARCH_DMA_MINALIGN);
 };
 
-struct mv_drv {
+struct ci_drv {
 	struct usb_gadget		gadget;
 	struct usb_gadget_driver	*driver;
 	struct ehci_ctrl		*ctrl;
 	struct ept_queue_head		*epts;
 	struct ept_queue_item		*items[2 * NUM_ENDPOINTS];
 	uint8_t				*items_mem;
-	struct mv_ep			ep[NUM_ENDPOINTS];
+	struct ci_ep			ep[NUM_ENDPOINTS];
 };
 
 struct ept_queue_head {
drivers/usb/gadget/gadget_chips.h +4 -4
index aa54b85..cc94771 100644
@@ -144,10 +144,10 @@
 #define	gadget_is_m66592(g)	0
 #endif
 
-#ifdef CONFIG_MV_UDC
-#define gadget_is_mv(g)        (!strcmp("mv_udc", (g)->name))
+#ifdef CONFIG_CI_UDC
+#define gadget_is_ci(g)        (!strcmp("ci_udc", (g)->name))
 #else
-#define gadget_is_mv(g)        0
+#define gadget_is_ci(g)        0
 #endif
 
 #ifdef CONFIG_USB_GADGET_FOTG210
@@ -219,7 +219,7 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
 		return 0x19;
 	else if (gadget_is_m66592(gadget))
 		return 0x20;
-	else if (gadget_is_mv(gadget))
+	else if (gadget_is_ci(gadget))
 		return 0x21;
 	else if (gadget_is_fotg210(gadget))
 		return 0x22;
include/configs/nitrogen6x.h +1 -1
index f4ff5cd..e44ec88 100644
@@ -31,7 +31,7 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_MISC_INIT_R
 #define CONFIG_MXC_GPIO
-#define CONFIG_MV_UDC
+#define CONFIG_CI_UDC
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_ETHER
include/configs/sansa_fuze_plus.h +1 -1
index a85eb1c..8cce34a 100644
@@ -56,7 +56,7 @@
 #define CONFIG_EHCI_MXS_PORT0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 
-#define CONFIG_MV_UDC		/* ChipIdea CI13xxx UDC */
+#define CONFIG_CI_UDC		/* ChipIdea CI13xxx UDC */
 #define CONFIG_USB_GADGET_DUALSPEED
 
 #define CONFIG_USB_ETHER
include/configs/xfi3.h +1 -1
index 022bc95..8e6b365 100644
@@ -55,7 +55,7 @@
 #define CONFIG_EHCI_MXS_PORT0
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 
-#define CONFIG_MV_UDC		/* ChipIdea CI13xxx UDC */
+#define CONFIG_CI_UDC		/* ChipIdea CI13xxx UDC */
 #define CONFIG_USB_GADGET_DUALSPEED
 
 #define CONFIG_USB_ETHER
include/usb/ci_udc.h renamed from include/usb/mv_udc.h +3 -3
similarity index 73%
rename from include/usb/mv_udc.h
rename to include/usb/ci_udc.h
index f6c7b5e..0dee504 100644
@@ -6,9 +6,9 @@
  */
 
 
-#ifndef __MV_UDC_H__
-#define __MV_UDC_H__
+#ifndef __CI_UDC_H__
+#define __CI_UDC_H__
 
 #define EP_MAX_PACKET_SIZE	0x200
 #define EP0_MAX_PACKET_SIZE	64
-#endif /* __MV_UDC_H__ */
+#endif /* __CI_UDC_H__ */
Signature · 1 line
1.8.5.3