Skip to contentSkip to conversation

usb: net: introduce Moschip MCS7830 driver

PATCH Superseded Gerhard Sittig 5 participants 22 messages Mar 8, 2014 – Mar 12, 2014 USB

lore
Share & tools
lore
#0 lore raw

v4 cover usb: net: introduce Moschip MCS7830 driver

this series
- adds a new USB ethernet driver for adapters that are based on the MCS7730/7830/7832 chips
- enables the driver for those boards which previously had support for "all other" USB ethernet adapters
- updates the README.usb documentation file to list all available drivers for USB ethernet adapters

development was done on a taskit stamp9g20, tests were done on the taskit stamp9g20 as well as wandboard both with "Delock 61147" and "Logilink UA0025C" adapters, transferring a 56MB file several times with TFTP

there are several checkpatch warnings
- about CamelCase for NetReceive() and USB related structure members, which cannot get fixed as the names are in the established API
- about a multiple assignment for the "found" flags in the USB endpoint search, which I consider acceptable

Changes in v4:
- remove a duplicate comment in the mcs7830_read_phy() routine
- remove the actually unused mcs7830_read_config() routine

Changes in v3:
- pick up Simon's ACKs for individual patches
- drop the part of the series which moves BIT() to <common.h>
- remove BIT() macro use, declare constant numbers for bit masks for improved portability
- re-word the commit message, include a link to the www.asix.com.tw product page, and explictly list the supported chips

Changes in v2:
- introduced the "no #ifdef for prototypes" patch
- don't #ifdef function prototypes in header files (the newly introduced mcs7830_*() routines in usb_ether.h)
- remove editor navigation pseudo comments (text fold markers)
- reduce the number of timeout declarations (only USB communication and ethernet link status remaining)
- declare the ethernet adapter register set layout by means of a struct and offsetof() instead of magic register index numbers
- separate the bit mask declarations from the register layout declaration, use the common BIT() macro instead of re-inventing its implementation
- rename register layout and bit field macros to reduce excessive identifier lengths, and to not collide with the global CONFIG_* name space
- introduce kernel nano doc comments for data structures, global variables, and all routines
- improve handling of the list of supported dongles, remove the unused sentinel and iterate by means of ARRAY_SIZE(), fixup whitespace for the Sitecom entry
- decorate the mcs7830_read_config() routine with the "__maybe_unused" attribute instead of forcing a reference by means of "(void)identifier;" just to silence a potential compiler warning
- silent operation of the ethernet link status detection according to U-Boot philosophy, which simplifies the .init() callback code path
- factor out common logic of PHY read/write support (the "emit a request and wait for completion" part), unbreak the retry logic (correct number of iterations)
- use proper errno.h codes, and propagate errors up in the call chain
- adjust the Cc: list
- introduce the patch to alpha-sort USB adapter config options
- introduce the patch to add MCS7830 USB ethernet to several boards
- introduce the patch to add MCS7830 USB ethernet for taskit stamp9g20
- introduce the patch to update README.usb for USB ethernet options

Gerhard Sittig (6):
usb: net: don't ifdef routine declarations in usb_ether.h
usb: net: introduce support for Moschip USB ethernet
tegra: omap: alpha-sort USB ethernet items for Asix and SMSC
tegra: imx: omap: enable Moschip USB ethernet support for several
boards
at91: enable USB ethernet for taskit stamp9g20
usb: net: update README.usb to list all USB ethernet options

 doc/README.usb                 |   13 +-
 drivers/usb/eth/Makefile       |    1 +
 drivers/usb/eth/mcs7830.c      |  812 ++++++++++++++++++++++++++++++++++++++++
 drivers/usb/eth/usb_ether.c    |    7 +
 include/configs/harmony.h      |    3 +-
 include/configs/m53evk.h       |    1 +
 include/configs/mx53loco.h     |    1 +
 include/configs/nitrogen6x.h   |    1 +
 include/configs/omap3_beagle.h |    3 +-
 include/configs/stamp9g20.h    |    5 +-
 include/usb_ether.h            |   14 +-
 11 files changed, 850 insertions(+), 11 deletions(-)
 create mode 100644 drivers/usb/eth/mcs7830.c
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH v4 1/6 usb: net: don't ifdef routine declarations in usb_ether.h

while compilation of implemented routines and references from calling sites may be optional, declarations in header files should not be

unconditionally declare the Asix and SMSC related public USB ethernet driver routines in the usb_ether.h header file

---

Changes in v4: None

Changes in v3:
- pick up Simon's ACKs for individual patches

Changes in v2:
- introduced the "no #ifdef for prototypes" patch

 include/usb_ether.h |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
include/usb_ether.h +2 -6
index 678c9dff2524..011ead7a364e 100644
@@ -40,23 +40,19 @@ struct ueth_data {
 };
 
 /*
- * Function definitions for each USB ethernet driver go here, bracketed by
- * #ifdef CONFIG_USB_ETHER_xxx...#endif
+ * Function definitions for each USB ethernet driver go here
+ * (declaration is unconditional, compilation is conditional)
  */
-#ifdef CONFIG_USB_ETHER_ASIX
 void asix_eth_before_probe(void);
 int asix_eth_probe(struct usb_device *dev, unsigned int ifnum,
 		      struct ueth_data *ss);
 int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
 		      struct eth_device *eth);
-#endif
 
-#ifdef CONFIG_USB_ETHER_SMSC95XX
 void smsc95xx_eth_before_probe(void);
 int smsc95xx_eth_probe(struct usb_device *dev, unsigned int ifnum,
 			struct ueth_data *ss);
 int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
 			struct eth_device *eth);
-#endif
 
 #endif /* __USB_ETHER_H__ */
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH v4 1/6 usb: net: don't ifdef routine declarations in usb_ether.h

Quoted 8 lines · Gerhard Sittig

while compilation of implemented routines and references from calling sites may be optional, declarations in header files should not be

unconditionally declare the Asix and SMSC related public USB ethernet driver routines in the usb_ether.h header file

Best regards,
Marek Vasut

#3 lore raw

PATCH v4 1/6 usb: net: don't ifdef routine declarations in usb_ether.h

In reply to Gerhard Sittig
Quoted 9 lines · Gerhard Sittig

while compilation of implemented routines and references from calling sites may be optional, declarations in header files should not be

unconditionally declare the Asix and SMSC related public USB ethernet driver routines in the usb_ether.h header file

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/de13e774/attachment.pgp>
#4 lore raw

PATCH v4 2/6 usb: net: introduce support for Moschip USB ethernet

In reply to Gerhard Sittig

introduce an 'mcs7830' driver for Moschip MCS7830 based (7730/7830/7832) USB 2.0 Ethernet Devices

see "MCS7830 -- USB 2.0 to 10/100M Fast Ethernet Controller" at
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=109;74;109

the driver was implemented based on the U-Boot Asix driver with additional information gathered from the Moschip Linux driver, development was done on "Delock 61147" and "Logilink UA0025C" dongles

---

Changes in v4:
- remove a duplicate comment in the mcs7830_read_phy() routine
- remove the actually unused mcs7830_read_config() routine

Changes in v3:
- drop the part of the series which moves BIT() to <common.h>
- remove BIT() macro use, declare constant numbers for bit masks for improved portability
- re-word the commit message, include a link to the www.asix.com.tw product page, and explictly list the supported chips

Changes in v2:
- don't #ifdef function prototypes in header files (the newly introduced mcs7830_*() routines in usb_ether.h)
- remove editor navigation pseudo comments (text fold markers)
- reduce the number of timeout declarations (only USB communication and ethernet link status remaining)
- declare the ethernet adapter register set layout by means of a struct and offsetof() instead of magic register index numbers
- separate the bit mask declarations from the register layout declaration, use the common BIT() macro instead of re-inventing its implementation
- rename register layout and bit field macros to reduce excessive identifier lengths, and to not collide with the global CONFIG_* name space
- introduce kernel nano doc comments for data structures, global variables, and all routines
- improve handling of the list of supported dongles, remove the unused sentinel and iterate by means of ARRAY_SIZE(), fixup whitespace for the Sitecom entry
- decorate the mcs7830_read_config() routine with the "__maybe_unused" attribute instead of forcing a reference by means of "(void)identifier;" just to silence a potential compiler warning
- silent operation of the ethernet link status detection according to U-Boot philosophy, which simplifies the .init() callback code path
- factor out common logic of PHY read/write support (the "emit a request and wait for completion" part), unbreak the retry logic (correct number of iterations)
- use proper errno.h codes, and propagate errors up in the call chain
- adjust the Cc: list

 drivers/usb/eth/Makefile    |    1 +
 drivers/usb/eth/mcs7830.c   |  812 +++++++++++++++++++++++++++++++++++++++++++
 drivers/usb/eth/usb_ether.c |    7 +
 include/usb_ether.h         |    6 +
 4 files changed, 826 insertions(+)
 create mode 100644 drivers/usb/eth/mcs7830.c
drivers/usb/eth/Makefile +1 -0
index 03f54749f720..94551c4c0c9a 100644
@@ -8,4 +8,5 @@ obj-$(CONFIG_USB_HOST_ETHER) += usb_ether.o
 ifdef CONFIG_USB_ETHER_ASIX
 obj-y += asix.o
 endif
+obj-$(CONFIG_USB_ETHER_MCS7830) += mcs7830.o
 obj-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
drivers/usb/eth/mcs7830.c new file +812 -0

812 lines not on this page · raw message

drivers/usb/eth/usb_ether.c +7 -0
index 2c4126be3601..1dda54c2f116 100644
@@ -30,6 +30,13 @@ static const struct usb_eth_prob_dev prob_dev[] = {
 		.get_info = asix_eth_get_info,
 	},
 #endif
+#ifdef CONFIG_USB_ETHER_MCS7830
+	{
+		.before_probe = mcs7830_eth_before_probe,
+		.probe = mcs7830_eth_probe,
+		.get_info = mcs7830_eth_get_info,
+	},
+#endif
 #ifdef CONFIG_USB_ETHER_SMSC95XX
 	{
 		.before_probe = smsc95xx_eth_before_probe,
include/usb_ether.h +6 -0
index 011ead7a364e..35700a21b59f 100644
@@ -49,6 +49,12 @@ int asix_eth_probe(struct usb_device *dev, unsigned int ifnum,
 int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
 		      struct eth_device *eth);
 
+void mcs7830_eth_before_probe(void);
+int mcs7830_eth_probe(struct usb_device *dev, unsigned int ifnum,
+		      struct ueth_data *ss);
+int mcs7830_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
+			 struct eth_device *eth);
+
 void smsc95xx_eth_before_probe(void);
 int smsc95xx_eth_probe(struct usb_device *dev, unsigned int ifnum,
 			struct ueth_data *ss);
Signature · 1 line
1.7.10.4
#5 lore raw

PATCH v4 2/6 usb: net: introduce support for Moschip USB ethernet

Quoted 11 lines · Gerhard Sittig

introduce an 'mcs7830' driver for Moschip MCS7830 based (7730/7830/7832) USB 2.0 Ethernet Devices

see "MCS7830 -- USB 2.0 to 10/100M Fast Ethernet Controller" at
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=109;74;109

the driver was implemented based on the U-Boot Asix driver with additional information gathered from the Moschip Linux driver, development was done on "Delock 61147" and "Logilink UA0025C" dongles

Best regards,
Marek Vasut

#6 lore raw

PATCH v4 2/6 usb: net: introduce support for Moschip USB ethernet

In reply to Gerhard Sittig
Quoted 6 lines · Gerhard Sittig

introduce an 'mcs7830' driver for Moschip MCS7830 based (7730/7830/7832) USB 2.0 Ethernet Devices

see "MCS7830 -- USB 2.0 to 10/100M Fast Ethernet Controller" at
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=109;74;109

Quoted 6 lines

the driver was implemented based on the U-Boot Asix driver with additional information gathered from the Moschip Linux driver, development was done on "Delock 61147" and "Logilink UA0025C" dongles

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/9faf793d/attachment.pgp>
#7 lore raw

PATCH v4 3/6 tegra: omap: alpha-sort USB ethernet items for Asix and SMSC

In reply to Gerhard Sittig

adjust the harmony and omap3_beagle board configs to make their CONFIG_USB_ETHER_* items appear in alphabetical order

---

Changes in v4: None

Changes in v3:
- pick up Simon's ACKs for individual patches

Changes in v2:
- introduce the patch to alpha-sort USB adapter config options

 include/configs/harmony.h      |    2 +-
 include/configs/omap3_beagle.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/configs/harmony.h +1 -1
index d733be9cd5b6..fa66c665ec8c 100644
@@ -61,8 +61,8 @@
 
 /* USB networking support */
 #define CONFIG_USB_HOST_ETHER
-#define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_SMSC95XX
 
 /* General networking support */
 #define CONFIG_CMD_NET
include/configs/omap3_beagle.h +1 -1
index c58bc91a50c5..e01a6d9547f9 100644
@@ -120,8 +120,8 @@
 
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 #define CONFIG_USB_HOST_ETHER
-#define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_SMSC95XX
 
 /* GPIO banks */
 #define CONFIG_OMAP3_GPIO_5		/* GPIO128..159 is in GPIO bank 5 */
Signature · 1 line
1.7.10.4
#9 lore raw

PATCH v4 3/6 tegra: omap: alpha-sort USB ethernet items for Asix and SMSC

In reply to Gerhard Sittig
Quoted 6 lines · Gerhard Sittig

adjust the harmony and omap3_beagle board configs to make their CONFIG_USB_ETHER_* items appear in alphabetical order

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/2c82dcad/attachment.pgp>
#10 lore raw

PATCH v4 4/6 tegra: imx: omap: enable Moschip USB ethernet support for several boards

In reply to Gerhard Sittig

enable support for the Moschip USB ethernet adapter for those boards which previously had support for "all other" USB ethernet adapters (that's Asix _and_ SMSC) enabled -- which applies to harmony, m53evk, mx53loco, nitrogen6x, omap3_beagle

---

Changes in v4: None

Changes in v3: None

Changes in v2:
- introduce the patch to add MCS7830 USB ethernet to several boards

 include/configs/harmony.h      |    1 +
 include/configs/m53evk.h       |    1 +
 include/configs/mx53loco.h     |    1 +
 include/configs/nitrogen6x.h   |    1 +
 include/configs/omap3_beagle.h |    1 +
 5 files changed, 5 insertions(+)
include/configs/harmony.h +1 -0
index fa66c665ec8c..34b43faeb079 100644
@@ -62,6 +62,7 @@
 /* USB networking support */
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 
 /* General networking support */
include/configs/m53evk.h +1 -0
index bd67603b50a2..16546c28b441 100644
@@ -185,6 +185,7 @@
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_MXC_USB_PORT		1
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
include/configs/mx53loco.h +1 -0
index 77f856770539..1415584463bc 100644
@@ -65,6 +65,7 @@
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_MXC_USB_PORT	1
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
include/configs/nitrogen6x.h +1 -0
index ac517ce25ed8..f2db8c515b92 100644
@@ -115,6 +115,7 @@
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
include/configs/omap3_beagle.h +1 -0
index e01a6d9547f9..73eea304d19f 100644
@@ -121,6 +121,7 @@
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 
 /* GPIO banks */
Signature · 1 line
1.7.10.4
#11 lore raw

PATCH v4 4/6 tegra: imx: omap: enable Moschip USB ethernet support for several boards

Quoted 6 lines · Gerhard Sittig

enable support for the Moschip USB ethernet adapter for those boards which previously had support for "all other" USB ethernet adapters (that's Asix _and_ SMSC) enabled -- which applies to harmony, m53evk, mx53loco, nitrogen6x, omap3_beagle

Even though you might want to group them together into some CONFIG_USB_ETHERNET_ALL eventually. We don't want to touch all those files once we get more and more different USB ethernet chips supported.

Best regards,
Marek Vasut

#12 lore raw

PATCH v4 4/6 tegra: imx: omap: enable Moschip USB ethernet support for several boards

In reply to Gerhard Sittig
Quoted 10 lines

-----Original Message-----
From: Gerhard Sittig [mailto:gsi at denx.de]
Sent: Sunday, March 09, 2014 2:46 AM
To: u-boot at lists.denx.de
Cc: Joe Hershberger; Simon Glass; Marek Vasut; Tom Warren; Tom Rini; Marek Vasut; Liu Hui-R64343; Eric Nelson; Markus Hubig; Gerhard Sittig; Stephen Warren; Stefano Babic
Subject: [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards

Quoted 6 lines

enable support for the Moschip USB ethernet adapter for those boards which previously had support for "all other" USB ethernet adapters (that's Asix _and_ SMSC) enabled -- which applies to harmony, m53evk, mx53loco, nitrogen6x, omap3_beagle

For the i.mx part:

Quoted 79 lines

---

Changes in v4: None

Changes in v3: None

Changes in v2:
- introduce the patch to add MCS7830 USB ethernet to several boards

 include/configs/harmony.h      |    1 +
 include/configs/m53evk.h       |    1 +
 include/configs/mx53loco.h     |    1 +
 include/configs/nitrogen6x.h   |    1 +
 include/configs/omap3_beagle.h |    1 +
 5 files changed, 5 insertions(+)
include/configs/harmony.h index renamed from include/configs/harmony.h +0 -0

fa66c665ec8c..34b43faeb079 100644

include/configs/harmony.h +1 -0
@@ -62,6 +62,7 @@
 /* USB networking support */
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 
 /* General networking support */
include/configs/m53evk.h index renamed from include/configs/m53evk.h +0 -0

bd67603b50a2..16546c28b441 100644

include/configs/m53evk.h +1 -0
@@ -185,6 +185,7 @@
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_MXC_USB_PORT		1
 #define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
include/configs/mx53loco.h +1 -0
index 77f856770539..1415584463bc 100644
@@ -65,6 +65,7 @@
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_MXC_USB_PORT	1
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
include/configs/nitrogen6x.h +1 -0
index ac517ce25ed8..f2db8c515b92 100644
@@ -115,6 +115,7 @@
 #define CONFIG_USB_STORAGE
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 #define CONFIG_USB_ETHER_SMSC95XX
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET	/* For OTG port */
(quoted diff) +0 -0

b/include/configs/omap3_beagle.h index e01a6d9547f9..73eea304d19f 100644

include/configs/omap3_beagle.h +0 -0
@@ -121,6 +121,7 @@
 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3  #define

CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX +#define CONFIG_USB_ETHER_MCS7830
#define CONFIG_USB_ETHER_SMSC95XX

/* GPIO banks */
--
1.7.10.4

#13 lore raw

PATCH v4 4/6 tegra: imx: omap: enable Moschip USB ethernet support for several boards

In reply to Gerhard Sittig
Quoted 7 lines · Gerhard Sittig

enable support for the Moschip USB ethernet adapter for those boards which previously had support for "all other" USB ethernet adapters (that's Asix _and_ SMSC) enabled -- which applies to harmony, m53evk, mx53loco, nitrogen6x, omap3_beagle

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/66c3824c/attachment.pgp>
#14 lore raw

PATCH v4 5/6 at91: enable USB ethernet for taskit stamp9g20

In reply to Gerhard Sittig

enabling CONFIG_MACB makes other locations in the stamp config file enable network related commands (actually prevents disabling them)

enable USB ethernet support by activating generic support as well as Asix and Moschip ethernet adapters

---

Changes in v4: None

Changes in v3: None

Changes in v2:
- introduce the patch to add MCS7830 USB ethernet for taskit stamp9g20

 include/configs/stamp9g20.h |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/configs/stamp9g20.h +4 -1
index 51339b1496e6..01085dc5c114 100644
@@ -140,7 +140,10 @@
  * can enable it here if your baseboard features ethernet.
  */
 
-/* #define CONFIG_MACB */
+#define CONFIG_MACB
+#define CONFIG_USB_HOST_ETHER
+#define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
 
 #ifdef CONFIG_MACB
 # define CONFIG_RMII			/* use reduced MII inteface */
Signature · 1 line
1.7.10.4
#15 lore raw

PATCH v4 5/6 at91: enable USB ethernet for taskit stamp9g20

Dear Gerhard Sittig,

Quoted 7 lines · Gerhard Sittig

enabling CONFIG_MACB makes other locations in the stamp config file enable network related commands (actually prevents disabling them)

enable USB ethernet support by activating generic support as well as Asix and Moschip ethernet adapters

#16 lore raw

PATCH v4 5/6 at91: enable USB ethernet for taskit stamp9g20

In reply to Gerhard Sittig
Quoted 8 lines · Gerhard Sittig

enabling CONFIG_MACB makes other locations in the stamp config file enable network related commands (actually prevents disabling them)

enable USB ethernet support by activating generic support as well as Asix and Moschip ethernet adapters

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/a50cddfe/attachment.pgp>
#17 lore raw

PATCH v4 6/6 usb: net: update README.usb to list all USB ethernet options

In reply to Gerhard Sittig

- extend the discussion of USB network related config options such that all available adapter drivers are listed, and that the 'usb' command for the interactive prompt and scripting becomes available
- suggest to *not* put individual IP configuration parameters into the exectuable, but instead to put them into external environment or fetch them from network

---

Changes in v4: None

Changes in v3:
- pick up Simon's ACKs for individual patches

Changes in v2:
- introduce the patch to update README.usb for USB ethernet options

 doc/README.usb |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
doc/README.usb +11 -2
index 65fb2886d958..bc768a385450 100644
@@ -127,8 +127,14 @@ To enable USB Host Ethernet in U-Boot, your platform must of course
 support USB with CONFIG_CMD_USB enabled and working. You will need to
 add some config settings to your board header file:
 
+#define CONFIG_CMD_USB		/* the 'usb' interactive command */
 #define CONFIG_USB_HOST_ETHER	/* Enable USB Ethernet adapters */
-#define CONFIG_USB_ETHER_ASIX	/* Asix, or whatever driver(s) you want */
+
+and one or more of the following for individual adapter hardware:
+
+#define CONFIG_USB_ETHER_ASIX
+#define CONFIG_USB_ETHER_MCS7830
+#define CONFIG_USB_ETHER_SMSC95XX
 
 As with built-in networking, you will also want to enable some network
 commands, for example:
@@ -148,7 +154,10 @@ settings should start you off:
 
 You can also set the default IP address of your board and the server
 as well as the default file to load when a 'bootp' command is issued.
-All of these can be obtained from the bootp server if not set.
+However note that encoding these individual network settings into a
+common exectuable is discouraged, as it leads to potential conflicts,
+and all the parameters can either get stored in the board's external
+environment, or get obtained from the bootp server if not set.
 
 #define CONFIG_IPADDR		10.0.0.2  (replace with your value)
 #define CONFIG_SERVERIP		10.0.0.1  (replace with your value)
Signature · 1 line
1.7.10.4
#18 lore raw

PATCH v4 6/6 usb: net: update README.usb to list all USB ethernet options

Quoted 9 lines · Gerhard Sittig

- extend the discussion of USB network related config options such that all available adapter drivers are listed, and that the 'usb' command for the interactive prompt and scripting becomes available
- suggest to *not* put individual IP configuration parameters into the exectuable, but instead to put them into external environment or fetch them from network

Best regards,
Marek Vasut

#19 lore raw

PATCH v4 6/6 usb: net: update README.usb to list all USB ethernet options

In reply to Gerhard Sittig
Quoted 10 lines · Gerhard Sittig

- extend the discussion of USB network related config options such that all available adapter drivers are listed, and that the 'usb' command for the interactive prompt and scripting becomes available
- suggest to *not* put individual IP configuration parameters into the exectuable, but instead to put them into external environment or fetch them from network

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140312/1defc419/attachment.pgp>
#20 lore raw

v4 cover usb: net: introduce Moschip MCS7830 driver

In reply to Gerhard Sittig
Quoted 5 lines · Gerhard Sittig

this series
- adds a new USB ethernet driver for adapters that are based on the MCS7730/7830/7832 chips
[ ... ]

I'm sorry. I feel that I have to apologies for the excessive Cc:
list. Not for the cover letter, but for individual patches. These were sent to many more recipients than intended.

This was my first transmission from patman. Unfortunately when git send-email runs, the yes/no/quit/all list of choices doesn't inlude an "adjust the recipients list" option. And before git send-email runs, it's hard to tell what the recipient list will be.

Nevertheless I will have to improve or adjust my mental model, and find a way to better control the list of recipients in the future. It appears that I inappropriately used "Series-Cc:" tags in individual commits.

virtually yours
Gerhard Sittig

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
#21 lore raw

v4 cover usb: net: introduce Moschip MCS7830 driver

In reply to Gerhard Sittig
Quoted 8 lines · Gerhard Sittig

this series
- adds a new USB ethernet driver for adapters that are based on the MCS7730/7830/7832 chips
- enables the driver for those boards which previously had support for "all other" USB ethernet adapters
- updates the README.usb documentation file to list all available drivers for USB ethernet adapters

This v4 submission of the series addresses all feedback that was received, nothing is pending any longer. There has not been any other feedback since 2014-02-24 (past two weeks). So the series appears to be good, if nothing new comes up.

Quoted 8 lines

Gerhard Sittig (6):
usb: net: don't ifdef routine declarations in usb_ether.h
usb: net: introduce support for Moschip USB ethernet
tegra: omap: alpha-sort USB ethernet items for Asix and SMSC
tegra: imx: omap: enable Moschip USB ethernet support for several
boards
at91: enable USB ethernet for taskit stamp9g20
usb: net: update README.usb to list all USB ethernet options

I don't have strong feelings about 5/6 though (which enables USB ethernet support for a board which previously didn't have it, just because I happened to develop the driver on that board). Let's see what the board maintainer has to say, I'm fine with either response. The other parts are non-controversal, or have been ACKed before.

virtually yours
Gerhard Sittig

Signature · 3 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de