Skip to contentSkip to conversation

Support for PXA27X UDC.

PATCH Superseded Vivek Kutal 5 participants 11 messages Feb 23, 2009 – Apr 6, 2009 USB

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

---
 drivers/serial/usbtty.h             |    4 +-
 drivers/usb/Makefile                |    1 +
 drivers/usb/usbdcore_pxa27x.c       |  712 +++++++++++++++++++++++++++++++++++
 include/asm-arm/arch-pxa/pxa-regs.h |  337 +++++++++++++----
 include/usbdcore_pxa27x.h           |   68 ++++
 5 files changed, 1049 insertions(+), 73 deletions(-)
 create mode 100644 drivers/usb/usbdcore_pxa27x.c
 create mode 100644 include/usbdcore_pxa27x.h
drivers/serial/usbtty.h +3 -1
index ecefde5..5fe872e 100644
@@ -27,8 +27,10 @@
 #include <usbdcore.h>
 #if defined(CONFIG_PPC)
 #include <usbdcore_mpc8xx.h>
-#elif defined(CONFIG_ARM)
+#elif defined(CONFIG_OMAP1510)
 #include <usbdcore_omap1510.h>
+#elif defined(CONFIG_PXA27X)
+#include <usbdcore_pxa27x.h>
 #endif
 
 #include <version_autogenerated.h>
drivers/usb/Makefile +1 -0
index b306a65..0a1886a 100644
@@ -47,6 +47,7 @@ COBJS-y += usbdcore_ep0.o
 COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
 COBJS-$(CONFIG_OMAP1610) += usbdcore_omap1510.o
 COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
+COBJS-$(CONFIG_PXA27X) += usbdcore_pxa27x.o
 endif
 
 COBJS	:= $(COBJS-y)
drivers/usb/usbdcore_pxa27x.c new file +712 -0

712 lines not on this page · raw message

include/asm-arm/arch-pxa/pxa-regs.h +265 -72

392 lines not on this page · raw message

include/usbdcore_pxa27x.h new file +68 -0

68 lines not on this page · raw message

Signature · 1 line
1.5.6.3
#1 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

Hello Vivek,

2009/2/23 Vivek Kutal <[email protected]>:

Quoted 2 lines

---

Missing proper description of this patch.

drivers/serial/usbtty.h

Quoted 13 lines
?drivers/serial/usbtty.h ? ? ? ? ? ? | ? ?4 +-
?drivers/usb/Makefile ? ? ? ? ? ? ? ?| ? ?1 +
?drivers/usb/usbdcore_pxa27x.c ? ? ? | ?712 +++++++++++++++++++++++++++++++++++
?include/asm-arm/arch-pxa/pxa-regs.h | ?337 +++++++++++++----
?include/usbdcore_pxa27x.h ? ? ? ? ? | ? 68 ++++

?5 files changed, 1049 insertions(+), 73 deletions(-) ?create mode 100644 drivers/usb/usbdcore_pxa27x.c ?create mode 100644 include/usbdcore_pxa27x.h

drivers/serial/usbtty.h +0 -0
index ecefde5..5fe872e 100644

I get 46 errors and 101 warnings while running linux/checkpatch.pl on this patch.
Please clean up and resubmit.

Kind Regards,

Remy

#2 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

Hi Remy,
There are around ~70 warnings generated for pxa-regs.h
for having more than 80 chars in a line, I have taken all the macro definitions from the linux kernel source code should I fix those warnings too ? Also pxa-regs.h already has many line with more than 80 chars.

--
Thanks
Vivek Kutal

#3 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

Hello Vivek,

2009/3/6 Vivek Kutal <[email protected]>:

Quoted 6 lines

Hi Remy,
? ? ? ? ? ? ? ?There are around ~70 warnings generated for pxa-regs.h for having more than 80 chars in a line, I have taken all the macro definitions from the linux kernel source code should I fix those warnings too ? Also pxa-regs.h already has many line with more than 80 chars.

Thanks for asking.
If you look here: http://www.denx.de/wiki/U-Boot/CodingStyle, you will see that source files originating from different projects (for example the MTD subsystem or the hush shell code from the BusyBox project) may, after careful consideration, be exempted from these rules. For such files, the original coding style may be kept to ease subsequent migration to newer versions of those sources.
Maybe you should also read this: http://www.denx.de/wiki/U-Boot/Patches

Kind regards,

Remy

#4 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

In reply to Remy Bohmer

This Patch adds Support for PXA27X UDC.

---
Resending after code cleanup.

 drivers/serial/usbtty.h             |    4 +-
 drivers/usb/Makefile                |    1 +
 drivers/usb/usbdcore_pxa27x.c       |  719 +++++++++++++++++++++++++++++++++++
 include/asm-arm/arch-pxa/pxa-regs.h |  296 ++++++++++++---
 include/usbdcore_pxa27x.h           |   69 ++++
 5 files changed, 1035 insertions(+), 54 deletions(-)
 create mode 100644 drivers/usb/usbdcore_pxa27x.c
 create mode 100644 include/usbdcore_pxa27x.h
drivers/serial/usbtty.h +3 -1
index ecefde5..5fe872e 100644
@@ -27,8 +27,10 @@
 #include <usbdcore.h>
 #if defined(CONFIG_PPC)
 #include <usbdcore_mpc8xx.h>
-#elif defined(CONFIG_ARM)
+#elif defined(CONFIG_OMAP1510)
 #include <usbdcore_omap1510.h>
+#elif defined(CONFIG_PXA27X)
+#include <usbdcore_pxa27x.h>
 #endif
 
 #include <version_autogenerated.h>
drivers/usb/Makefile +1 -0
index b306a65..0a1886a 100644
@@ -47,6 +47,7 @@ COBJS-y += usbdcore_ep0.o
 COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
 COBJS-$(CONFIG_OMAP1610) += usbdcore_omap1510.o
 COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
+COBJS-$(CONFIG_PXA27X) += usbdcore_pxa27x.o
 endif
 
 COBJS	:= $(COBJS-y)
drivers/usb/usbdcore_pxa27x.c new file +719 -0

719 lines not on this page · raw message

include/asm-arm/arch-pxa/pxa-regs.h +243 -53

360 lines not on this page · raw message

include/usbdcore_pxa27x.h new file +69 -0

69 lines not on this page · raw message

Signature · 1 line
1.5.6.3
#5 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

Quoted 16 lines · On Mon, 9 Mar 2009 18:38:47 +0530 Vivek Kutal <[email protected]> wrote:
drivers/usb/usbdcore_pxa27x.c new file +16 -0
+#ifdef USBDDBG
+static void udc_dump_buffer(char *name, u8 *buf, int len)
+{
+	int i, p, flag = 1;
+
+	usbdbg("%s - buf %p, len %d", name, buf, len);
+	for (i = p = 0; i < len; i++, p++) {
+		if (p == 0) {
+			flag = 0;
+			usbdbg("\t");
+		}
+
+		usbdbg("%02x ", buf[i]);
+
+		if (p == 15) {
+			flag = 1;

drivers/usb/usbdcore_pxa27x.c line 66

Quoted 10 lines
drivers/usb/usbdcore_pxa27x.c new file +10 -0
+			usbdbg("\n");
+			p = -1;
+		}
+	}
+	if (!flag)
+		usbdbg("\n");
+}
+#else
+#define udc_dump_buffer(name, buf, len)		/* void */
+#endif

can we not reinvent the wheel here and use
lib_generic/display_options.c's print_buffer()?

drivers/usb/usbdcore_pxa27x.c line 88

Quoted 5 lines
drivers/usb/usbdcore_pxa27x.c new file +5 -0
+static int udc_write_urb(struct usb_endpoint_instance *endpoint)
+{
+	struct urb *urb = endpoint->tx_urb;
+	int ep_num = endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK;
+

no blank line here please.

drivers/usb/usbdcore_pxa27x.c line 92

Quoted 4 lines
drivers/usb/usbdcore_pxa27x.c new file +4 -0
+	u32 *addr32 = (u32 *) &UDCDN(ep_num),
+		*data32 = (u32 *) urb->buffer;
+	u8  *addr8 = (u8 *) &UDCDN(ep_num),
+		*data8 = (u8 *) urb->buffer;

alignment (or give data* their own entire line).

drivers/usb/usbdcore_pxa27x.c line 287

Quoted 3 lines
drivers/usb/usbdcore_pxa27x.c new file +3 -0
+				/* Check direction */
+				if (ep0_urb->device_request.bmRequestType &
+				USB_REQ_DIRECTION_MASK == USB_REQ_HOST2DEVICE) {

alignment. Might need to add parens for clarity.

Kim

#6 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

This Patch adds Support for PXA27X UDC.

---
Resinding after doing the changes suggested by Kim.

 drivers/serial/usbtty.h             |    4 +-
 drivers/usb/Makefile                |    1 +
 drivers/usb/usbdcore_pxa27x.c       |  702 +++++++++++++++++++++++++++++++++++
 include/asm-arm/arch-pxa/pxa-regs.h |  296 ++++++++++++---
 include/usbdcore_pxa27x.h           |   69 ++++
 5 files changed, 1018 insertions(+), 54 deletions(-)
 create mode 100644 drivers/usb/usbdcore_pxa27x.c
 create mode 100644 include/usbdcore_pxa27x.h
drivers/serial/usbtty.h +3 -1
index ecefde5..5fe872e 100644
@@ -27,8 +27,10 @@
 #include <usbdcore.h>
 #if defined(CONFIG_PPC)
 #include <usbdcore_mpc8xx.h>
-#elif defined(CONFIG_ARM)
+#elif defined(CONFIG_OMAP1510)
 #include <usbdcore_omap1510.h>
+#elif defined(CONFIG_PXA27X)
+#include <usbdcore_pxa27x.h>
 #endif
 
 #include <version_autogenerated.h>
drivers/usb/Makefile +1 -0
index b306a65..0a1886a 100644
@@ -47,6 +47,7 @@ COBJS-y += usbdcore_ep0.o
 COBJS-$(CONFIG_OMAP1510) += usbdcore_omap1510.o
 COBJS-$(CONFIG_OMAP1610) += usbdcore_omap1510.o
 COBJS-$(CONFIG_MPC885_FAMILY) += usbdcore_mpc8xx.o
+COBJS-$(CONFIG_PXA27X) += usbdcore_pxa27x.o
 endif
 
 COBJS	:= $(COBJS-y)
drivers/usb/usbdcore_pxa27x.c new file +702 -0

702 lines not on this page · raw message

include/asm-arm/arch-pxa/pxa-regs.h +243 -53

360 lines not on this page · raw message

include/usbdcore_pxa27x.h new file +69 -0

69 lines not on this page · raw message

Signature · 1 line
1.5.6.3
#7 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

Dear Jean-Christophe & Remy,

Quoted 6 lines · In message <[email protected]> Vivek…

This Patch adds Support for PXA27X UDC.

---
Resinding after doing the changes suggested by Kim.

Quoted 8 lines
 drivers/serial/usbtty.h             |    4 +-
 drivers/usb/Makefile                |    1 +
 drivers/usb/usbdcore_pxa27x.c       |  702 +++++++++++++++++++++++++++++++++++
 include/asm-arm/arch-pxa/pxa-regs.h |  296 ++++++++++++---
 include/usbdcore_pxa27x.h           |   69 ++++
 5 files changed, 1018 insertions(+), 54 deletions(-)
 create mode 100644 drivers/usb/usbdcore_pxa27x.c
 create mode 100644 include/usbdcore_pxa27x.h

Is this going to go through the USB or through the PXA tree?

#8 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

Quoted 18 lines · Wolfgang Denk

Dear Jean-Christophe & Remy,

Quoted 6 lines · In message <[email protected]> Vivek…

This Patch adds Support for PXA27X UDC.

---
Resinding after doing the changes suggested by Kim.

Quoted 8 lines
 drivers/serial/usbtty.h             |    4 +-
 drivers/usb/Makefile                |    1 +
 drivers/usb/usbdcore_pxa27x.c       |  702 +++++++++++++++++++++++++++++++++++
 include/asm-arm/arch-pxa/pxa-regs.h |  296 ++++++++++++---
 include/usbdcore_pxa27x.h           |   69 ++++
 5 files changed, 1018 insertions(+), 54 deletions(-)
 create mode 100644 drivers/usb/usbdcore_pxa27x.c
 create mode 100644 include/usbdcore_pxa27x.h
Quoted 1 line

Is this going to go through the USB or through the PXA tree?

USB I guess
But the patch will need to rebase due to the last usb dev

Best Regards,
J.

#9 lore raw

PATCH v2 1/1 Support for PXA27X UDC.

Hello All,

Quoted 3 lines
Quoted 1 line

Is this going to go through the USB or through the PXA tree?

USB I guess
But the patch will need to rebase due to the last usb dev

USB is fine with me.

Kind Regards,

Remy