Skip to contentSkip to conversation

PXA25x: USB ethernet driver

PATCH New Łukasz Dałek 3 participants 11 messages Aug 21, 2012 – Aug 31, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover PXA25x: USB ethernet driver

I've moved cpu revision detection to arch/arm/cpu/pxa as you suggest. Cleaned ethernet driver. Soon I would also send patches for drivers/usb/gadget/ether.c to work correctly with this pxa driver.

?ukasz Da?ek (2):
pxa: Add some stuff to examine cpu model and rev
pxa25x: Add USB ethernet gadget

 arch/arm/cpu/pxa/cpuinfo.c          |   11 +-
 arch/arm/include/asm/arch-pxa/pxa.h |   13 +
 drivers/usb/gadget/Makefile         |    1 +
 drivers/usb/gadget/pxa25x_udc.c     | 2059 +++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/pxa25x_udc.h     |  168 +++
 5 files changed, 2250 insertions(+), 2 deletions(-)
 create mode 100644 drivers/usb/gadget/pxa25x_udc.c
 create mode 100644 drivers/usb/gadget/pxa25x_udc.h
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 1/2 pxa: Add some stuff to examine cpu model and rev

---
 arch/arm/cpu/pxa/cpuinfo.c          |   11 +++++++++--
 arch/arm/include/asm/arch-pxa/pxa.h |   13 +++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)
arch/arm/cpu/pxa/cpuinfo.c +9 -2
index f1cdd40..bab6340 100644
@@ -24,9 +24,11 @@
 #include <errno.h>
 #include <linux/compiler.h>
 
-#define	CPU_MASK_PXA_REVID	0x00f
+#define	CPU_MASK_PXA_PRODID	0x000003f0
+#define	CPU_MASK_PXA_REVID	0x0000000f
+
+#define	CPU_MASK_PRODREV	(CPU_MASK_PXA_PRODID | CPU_MASK_PXA_REVID)
 
-#define	CPU_MASK_PXA_PRODID	0x3f0
 #define	CPU_VALUE_PXA25X	0x100
 #define	CPU_VALUE_PXA27X	0x110
 
@@ -51,6 +53,11 @@ int cpu_is_pxa27x(void)
 	return id == CPU_VALUE_PXA27X;
 }
 
+uint32_t pxa_get_cpu_revision(void)
+{
+	return pxa_get_cpuid() & CPU_MASK_PRODREV;
+}
+
 #ifdef	CONFIG_DISPLAY_CPUINFO
 static const char *pxa25x_get_revision(void)
 {
arch/arm/include/asm/arch-pxa/pxa.h +13 -0
index 49c6552..b67d8f2 100644
@@ -22,8 +22,21 @@
 #ifndef	__PXA_H__
 #define	__PXA_H__
 
+#define PXA255_A0	0x00000106
+#define PXA250_C0	0x00000105
+#define PXA250_B2	0x00000104
+#define PXA250_B1	0x00000103
+#define PXA250_B0	0x00000102
+#define PXA250_A1	0x00000101
+#define PXA250_A0	0x00000100
+#define PXA210_C0	0x00000125
+#define PXA210_B2	0x00000124
+#define PXA210_B1	0x00000123
+#define PXA210_B0	0x00000122
+
 int cpu_is_pxa25x(void);
 int cpu_is_pxa27x(void);
+uint32_t pxa_get_cpu_revision(void);
 void pxa2xx_dram_init(void);
 
 #endif	/* __PXA_H__ */
Signature · 1 line
1.7.8.6
#2 lore raw

PATCH 1/2 pxa: Add some stuff to examine cpu model and rev

Dear ?ukasz Da?ek,

Quoted 5 lines
---
 arch/arm/cpu/pxa/cpuinfo.c          |   11 +++++++++--
 arch/arm/include/asm/arch-pxa/pxa.h |   13 +++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

I'll push this through the PXA tree.

Best regards,
Marek Vasut

#3 lore raw

PATCH 2/2 pxa25x: Add USB ethernet gadget

In reply to Łukasz Dałek
---
 drivers/usb/gadget/Makefile     |    1 +
 drivers/usb/gadget/pxa25x_udc.c | 2059 +++++++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/pxa25x_udc.h |  168 ++++
 3 files changed, 2228 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/gadget/pxa25x_udc.c
 create mode 100644 drivers/usb/gadget/pxa25x_udc.h
drivers/usb/gadget/Makefile +1 -0
index 87d1918..dc48814 100644
@@ -34,6 +34,7 @@ ifdef CONFIG_USB_ETHER
 COBJS-y += ether.o epautoconf.o config.o usbstring.o
 COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
 COBJS-$(CONFIG_MV_UDC)	+= mv_udc.o
+COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
 else
 # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
 ifdef CONFIG_USB_DEVICE
drivers/usb/gadget/pxa25x_udc.c new file +2059 -0

2,059 lines not on this page · raw message

drivers/usb/gadget/pxa25x_udc.h new file +168 -0

168 lines not on this page · raw message

Signature · 1 line
1.7.8.6
#4 lore raw

PATCH 2/2 pxa25x: Add USB ethernet gadget

Dear ?ukasz Da?ek,

Quoted 9 lines
---
 drivers/usb/gadget/Makefile     |    1 +
 drivers/usb/gadget/pxa25x_udc.c | 2059
+++++++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pxa25x_udc.h | 
168 ++++
 3 files changed, 2228 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/gadget/pxa25x_udc.c
 create mode 100644 drivers/usb/gadget/pxa25x_udc.h

[...]

Quick glance seems mostly OK.

drivers/usb/gadget/pxa25x_udc.h line 166

Quoted 10 lines
drivers/usb/gadget/pxa25x_udc.h new file +9 -1
-*/ +
+#ifdef DEBUG
+# ifdef DEBUG_NOISY
+#  define NOISY 1
+# else
+#  define NOISY 0
+# endif
+#else
+# define NOISY 0
+#endif

So ... define DEBUG_NOISY always and set it to some value ... then you won't need this additional NOISY at all.

Quoted 1 line

+#endif /* __LINUX_USB_GADGET_PXA25X_H */

Best regards,
Marek Vasut

#5 lore raw

cover PXA25x: USB ethernet driver

In reply to Łukasz Dałek

Dear ?ukasz Da?ek,

Quoted 3 lines

I've moved cpu revision detection to arch/arm/cpu/pxa as you suggest. Cleaned ethernet driver. Soon I would also send patches for drivers/usb/gadget/ether.c to work correctly with this pxa driver.

I didn't sleep today ... I'll review it tomorrow.

Quoted 4 lines

?ukasz Da?ek (2):
pxa: Add some stuff to examine cpu model and rev
pxa25x: Add USB ethernet gadget

Quoted 9 lines
 arch/arm/cpu/pxa/cpuinfo.c          |   11 +-
 arch/arm/include/asm/arch-pxa/pxa.h |   13 +
 drivers/usb/gadget/Makefile         |    1 +
 drivers/usb/gadget/pxa25x_udc.c     | 2059
+++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pxa25x_udc.h     | 
168 +++
 5 files changed, 2250 insertions(+), 2 deletions(-)
 create mode 100644 drivers/usb/gadget/pxa25x_udc.c
 create mode 100644 drivers/usb/gadget/pxa25x_udc.h

Best regards,
Marek Vasut

#6 lore raw

cover PXA25x: USB ethernet driver

In reply to Łukasz Dałek

Dear ?ukasz Da?ek,

Quoted 8 lines

I've moved cpu revision detection to arch/arm/cpu/pxa as you suggest. Cleaned ethernet driver. Soon I would also send patches for drivers/usb/gadget/ether.c to work correctly with this pxa driver.

?ukasz Da?ek (2):
pxa: Add some stuff to examine cpu model and rev
pxa25x: Add USB ethernet gadget

Quoted 9 lines
 arch/arm/cpu/pxa/cpuinfo.c          |   11 +-
 arch/arm/include/asm/arch-pxa/pxa.h |   13 +
 drivers/usb/gadget/Makefile         |    1 +
 drivers/usb/gadget/pxa25x_udc.c     | 2059
+++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pxa25x_udc.h     | 
168 +++
 5 files changed, 2250 insertions(+), 2 deletions(-)
 create mode 100644 drivers/usb/gadget/pxa25x_udc.c
 create mode 100644 drivers/usb/gadget/pxa25x_udc.h

Just a dumb question -- do we have any actual user for this stuff?

Best regards,
Marek Vasut

#7 lore raw

cover PXA25x: USB ethernet driver

Quoted 19 lines · Marek Vasut

Dear ?ukasz Da?ek,

Quoted 15 lines

I've moved cpu revision detection to arch/arm/cpu/pxa as you suggest. Cleaned ethernet driver. Soon I would also send patches for drivers/usb/gadget/ether.c to work correctly with this pxa driver.

?ukasz Da?ek (2):
pxa: Add some stuff to examine cpu model and rev
pxa25x: Add USB ethernet gadget

  arch/arm/cpu/pxa/cpuinfo.c          |   11 +-
  arch/arm/include/asm/arch-pxa/pxa.h |   13 +
  drivers/usb/gadget/Makefile         |    1 +
  drivers/usb/gadget/pxa25x_udc.c     | 2059
+++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pxa25x_udc.h     |
168 +++
  5 files changed, 2250 insertions(+), 2 deletions(-)
Quoted 2 lines

create mode 100644 drivers/usb/gadget/pxa25x_udc.c create mode 100644 drivers/usb/gadget/pxa25x_udc.h

Quoted 4 lines

Just a dumb question -- do we have any actual user for this stuff?

Best regards,
Marek Vasut

Me. I have iPAQ h2200 but my patches for this paltmop aren't in the source tree. There is a chance that we don't have any device which uses this.

?ukasz Da?ek

#8 lore raw

cover PXA25x: USB ethernet driver

Dear ?ukasz Da?ek,

Quoted 23 lines · Marek Vasut
Quoted 22 lines

Dear ?ukasz Da?ek,

Quoted 19 lines

I've moved cpu revision detection to arch/arm/cpu/pxa as you suggest. Cleaned ethernet driver. Soon I would also send patches for drivers/usb/gadget/ether.c to work correctly with this pxa driver.

?ukasz Da?ek (2):
pxa: Add some stuff to examine cpu model and rev
pxa25x: Add USB ethernet gadget

  arch/arm/cpu/pxa/cpuinfo.c          |   11 +-
  arch/arm/include/asm/arch-pxa/pxa.h |   13 +
  drivers/usb/gadget/Makefile         |    1 +
  drivers/usb/gadget/pxa25x_udc.c     | 2059

+++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pxa25x_udc.h | 168 +++

  5 files changed, 2250 insertions(+), 2 deletions(-)

create mode 100644 drivers/usb/gadget/pxa25x_udc.c create mode 100644 drivers/usb/gadget/pxa25x_udc.h

Quoted 8 lines
Quoted 4 lines

Just a dumb question -- do we have any actual user for this stuff?

Best regards,
Marek Vasut

Me. I have iPAQ h2200 but my patches for this paltmop aren't in the source tree. There is a chance that we don't have any device which uses this.

Why don't you add support for this ipaq too then ?

Quoted 1 line

?ukasz Da?ek

Best regards,
Marek Vasut

#9 lore raw

cover PXA25x: USB ethernet driver

Quoted 24 lines · Marek Vasut

Dear ?ukasz Da?ek,

Quoted 22 lines · Marek Vasut
Quoted 21 lines

Dear ?ukasz Da?ek,

Quoted 19 lines

I've moved cpu revision detection to arch/arm/cpu/pxa as you suggest. Cleaned ethernet driver. Soon I would also send patches for drivers/usb/gadget/ether.c to work correctly with this pxa driver.

?ukasz Da?ek (2):
pxa: Add some stuff to examine cpu model and rev
pxa25x: Add USB ethernet gadget

   arch/arm/cpu/pxa/cpuinfo.c          |   11 +-
   arch/arm/include/asm/arch-pxa/pxa.h |   13 +
   drivers/usb/gadget/Makefile         |    1 +
   drivers/usb/gadget/pxa25x_udc.c     | 2059

+++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pxa25x_udc.h | 168 +++

   5 files changed, 2250 insertions(+), 2 deletions(-)

create mode 100644 drivers/usb/gadget/pxa25x_udc.c create mode 100644 drivers/usb/gadget/pxa25x_udc.h

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

Just a dumb question -- do we have any actual user for this stuff?

Best regards,
Marek Vasut

Me. I have iPAQ h2200 but my patches for this paltmop aren't in the source tree. There is a chance that we don't have any device which uses this.

Why don't you add support for this ipaq too then ?

I will but first of all I want to finish with pxa25x udc drivers and with bugs in CDC ether driver (ether.c). Then I will send patches adding support for my device.

Quoted 3 lines
Quoted 1 line

?ukasz Da?ek

Best regards,
Marek Vasut

#10 lore raw

cover PXA25x: USB ethernet driver

Dear ?ukasz Da?ek,

Quoted 36 lines · Marek Vasut
Quoted 35 lines

Dear ?ukasz Da?ek,

Quoted 32 lines · Marek Vasut
Quoted 23 lines

Dear ?ukasz Da?ek,

Quoted 13 lines

I've moved cpu revision detection to arch/arm/cpu/pxa as you suggest. Cleaned ethernet driver. Soon I would also send patches for drivers/usb/gadget/ether.c to work correctly with this pxa driver.

?ukasz Da?ek (2):
pxa: Add some stuff to examine cpu model and rev
pxa25x: Add USB ethernet gadget

   arch/arm/cpu/pxa/cpuinfo.c          |   11 +-
   arch/arm/include/asm/arch-pxa/pxa.h |   13 +
   drivers/usb/gadget/Makefile         |    1 +
   drivers/usb/gadget/pxa25x_udc.c     | 2059
Quoted 7 lines

+++++++++++++++++++++++++++++++++++ drivers/usb/gadget/pxa25x_udc.h

| 168 +++
|

   5 files changed, 2250 insertions(+), 2 deletions(-)

create mode 100644 drivers/usb/gadget/pxa25x_udc.c create mode 100644 drivers/usb/gadget/pxa25x_udc.h

Quoted 4 lines

Just a dumb question -- do we have any actual user for this stuff?

Best regards,
Marek Vasut

Me. I have iPAQ h2200 but my patches for this paltmop aren't in the source tree. There is a chance that we don't have any device which uses this.

Quoted 5 lines
Quoted 1 line

Why don't you add support for this ipaq too then ?

I will but first of all I want to finish with pxa25x udc drivers and with bugs in CDC ether driver (ether.c). Then I will send patches adding support for my device.

I'll put those patches on hold then, as it is pointless to put unused code into the tree.

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

?ukasz Da?ek

Best regards,
Marek Vasut

Best regards,
Marek Vasut