All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver
@ 2014-03-08 18:46 Gerhard Sittig
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h Gerhard Sittig
                   ` (7 more replies)
  0 siblings, 8 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 18:46 UTC (permalink / raw)
  To: u-boot


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

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
@ 2014-03-08 18:46 ` Gerhard Sittig
  2014-03-08 19:35   ` Marek Vasut
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 2/6] usb: net: introduce support for Moschip USB ethernet Gerhard Sittig
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 18:46 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
---

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(-)

diff --git a/include/usb_ether.h b/include/usb_ether.h
index 678c9dff2524..011ead7a364e 100644
--- a/include/usb_ether.h
+++ b/include/usb_ether.h
@@ -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__ */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 2/6] usb: net: introduce support for Moschip USB ethernet
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h Gerhard Sittig
@ 2014-03-08 18:46 ` Gerhard Sittig
  2014-03-08 19:37   ` Marek Vasut
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC Gerhard Sittig
                   ` (5 subsequent siblings)
  7 siblings, 2 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 18:46 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Gerhard Sittig <gsi@denx.de>
---

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

diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile
index 03f54749f720..94551c4c0c9a 100644
--- a/drivers/usb/eth/Makefile
+++ b/drivers/usb/eth/Makefile
@@ -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
diff --git a/drivers/usb/eth/mcs7830.c b/drivers/usb/eth/mcs7830.c
new file mode 100644
index 000000000000..c353286b60d5
--- /dev/null
+++ b/drivers/usb/eth/mcs7830.c
@@ -0,0 +1,812 @@
+/*
+ * Copyright (c) 2013 Gerhard Sittig <gsi@denx.de>
+ * based on the U-Boot Asix driver as well as information
+ * from the Linux Moschip driver
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+/*
+ * MOSCHIP MCS7830 based (7730/7830/7832) USB 2.0 Ethernet Devices
+ */
+
+#include <common.h>
+#include <errno.h>
+#include <linux/mii.h>
+#include <malloc.h>
+#include <usb.h>
+
+#include "usb_ether.h"
+
+#define MCS7830_BASE_NAME	"mcs"
+
+#define USBCALL_TIMEOUT		1000
+#define LINKSTATUS_TIMEOUT	5000	/* link status, connect timeout */
+#define LINKSTATUS_TIMEOUT_RES	50	/* link status, resolution in msec */
+
+#define MCS7830_RX_URB_SIZE	2048
+
+/* command opcodes */
+#define MCS7830_WR_BREQ		0x0d
+#define MCS7830_RD_BREQ		0x0e
+
+/* register layout, numerical offset specs for USB API calls */
+struct mcs7830_regs {
+	uint8_t multicast_hashes[8];
+	uint8_t packet_gap[2];
+	uint8_t phy_data[2];
+	uint8_t phy_command[2];
+	uint8_t configuration;
+	uint8_t ether_address[6];
+	uint8_t frame_drop_count;
+	uint8_t pause_threshold;
+};
+#define REG_MULTICAST_HASH	offsetof(struct mcs7830_regs, multicast_hashes)
+#define REG_PHY_DATA		offsetof(struct mcs7830_regs, phy_data)
+#define REG_PHY_CMD		offsetof(struct mcs7830_regs, phy_command)
+#define REG_CONFIG		offsetof(struct mcs7830_regs, configuration)
+#define REG_ETHER_ADDR		offsetof(struct mcs7830_regs, ether_address)
+#define REG_FRAME_DROP_COUNTER	offsetof(struct mcs7830_regs, frame_drop_count)
+#define REG_PAUSE_THRESHOLD	offsetof(struct mcs7830_regs, pause_threshold)
+
+/* bit masks and default values for the above registers */
+#define PHY_CMD1_READ		0x40
+#define PHY_CMD1_WRITE		0x20
+#define PHY_CMD1_PHYADDR	0x01
+
+#define PHY_CMD2_PEND		0x80
+#define PHY_CMD2_READY		0x40
+
+#define CONF_CFG		0x80
+#define CONF_SPEED100		0x40
+#define CONF_FDX_ENABLE		0x20
+#define CONF_RXENABLE		0x10
+#define CONF_TXENABLE		0x08
+#define CONF_SLEEPMODE		0x04
+#define CONF_ALLMULTICAST	0x02
+#define CONF_PROMISCUOUS	0x01
+
+#define PAUSE_THRESHOLD_DEFAULT	0
+
+/* bit masks for the status byte which follows received ethernet frames */
+#define STAT_RX_FRAME_CORRECT	0x20
+#define STAT_RX_LARGE_FRAME	0x10
+#define STAT_RX_CRC_ERROR	0x08
+#define STAT_RX_ALIGNMENT_ERROR	0x04
+#define STAT_RX_LENGTH_ERROR	0x02
+#define STAT_RX_SHORT_FRAME	0x01
+
+/*
+ * struct mcs7830_private - private driver data for an individual adapter
+ * @config:	shadow for the network adapter's configuration register
+ * @mchash:	shadow for the network adapter's multicast hash registers
+ */
+struct mcs7830_private {
+	uint8_t config;
+	uint8_t mchash[8];
+};
+
+/*
+ * mcs7830_read_reg() - read a register of the network adapter
+ * @dev:	network device to read from
+ * @idx:	index of the register to start reading from
+ * @size:	number of bytes to read
+ * @data:	buffer to read into
+ * Return: zero upon success, negative upon error
+ */
+static int mcs7830_read_reg(struct ueth_data *dev, uint8_t idx,
+			    uint16_t size, void *data)
+{
+	int len;
+	ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, size);
+
+	debug("%s() idx=0x%04X sz=%d\n", __func__, idx, size);
+
+	len = usb_control_msg(dev->pusb_dev,
+			      usb_rcvctrlpipe(dev->pusb_dev, 0),
+			      MCS7830_RD_BREQ,
+			      USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+			      0, idx, buf, size,
+			      USBCALL_TIMEOUT);
+	if (len != size) {
+		debug("%s() len=%d != sz=%d\n", __func__, len, size);
+		return -EIO;
+	}
+	memcpy(data, buf, size);
+	return 0;
+}
+
+/*
+ * mcs7830_write_reg() - write a register of the network adapter
+ * @dev:	network device to write to
+ * @idx:	index of the register to start writing to
+ * @size:	number of bytes to write
+ * @data:	buffer holding the data to write
+ * Return: zero upon success, negative upon error
+ */
+static int mcs7830_write_reg(struct ueth_data *dev, uint8_t idx,
+			     uint16_t size, void *data)
+{
+	int len;
+	ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, size);
+
+	debug("%s() idx=0x%04X sz=%d\n", __func__, idx, size);
+
+	memcpy(buf, data, size);
+	len = usb_control_msg(dev->pusb_dev,
+			      usb_sndctrlpipe(dev->pusb_dev, 0),
+			      MCS7830_WR_BREQ,
+			      USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+			      0, idx, buf, size,
+			      USBCALL_TIMEOUT);
+	if (len != size) {
+		debug("%s() len=%d != sz=%d\n", __func__, len, size);
+		return -EIO;
+	}
+	return 0;
+}
+
+/*
+ * mcs7830_phy_emit_wait() - emit PHY read/write access, wait for its execution
+ * @dev:	network device to talk to
+ * @rwflag:	PHY_CMD1_READ or PHY_CMD1_WRITE opcode
+ * @index:	number of the PHY register to read or write
+ * Return: zero upon success, negative upon error
+ */
+static int mcs7830_phy_emit_wait(struct ueth_data *dev,
+				 uint8_t rwflag, uint8_t index)
+{
+	int rc;
+	int retry;
+	uint8_t cmd[2];
+
+	/* send the PHY read/write request */
+	cmd[0] = rwflag | PHY_CMD1_PHYADDR;
+	cmd[1] = PHY_CMD2_PEND | (index & 0x1f);
+	rc = mcs7830_write_reg(dev, REG_PHY_CMD, sizeof(cmd), cmd);
+	if (rc < 0)
+		return rc;
+
+	/* wait for the response to become available (usually < 1ms) */
+	retry = 10;
+	do {
+		rc = mcs7830_read_reg(dev, REG_PHY_CMD, sizeof(cmd), cmd);
+		if (rc < 0)
+			return rc;
+		if (cmd[1] & PHY_CMD2_READY)
+			return 0;
+		if (!retry--)
+			return -ETIMEDOUT;
+		mdelay(1);
+	} while (1);
+	/* UNREACH */
+}
+
+/*
+ * mcs7830_read_phy() - read a PHY register of the network adapter
+ * @dev:	network device to read from
+ * @index:	index of the PHY register to read from
+ * Return: non-negative 16bit register content, negative upon error
+ */
+static int mcs7830_read_phy(struct ueth_data *dev, uint8_t index)
+{
+	int rc;
+	uint16_t val;
+
+	/* issue the PHY read request and wait for its execution */
+	rc = mcs7830_phy_emit_wait(dev, PHY_CMD1_READ, index);
+	if (rc < 0)
+		return rc;
+
+	/* fetch the PHY data which was read */
+	rc = mcs7830_read_reg(dev, REG_PHY_DATA, sizeof(val), &val);
+	if (rc < 0)
+		return rc;
+	rc = le16_to_cpu(val);
+	debug("%s(%s, %d) => 0x%04X\n", __func__, dev->eth_dev.name, index, rc);
+	return rc;
+}
+
+/*
+ * mcs7830_write_phy() - write a PHY register of the network adapter
+ * @dev:	network device to write to
+ * @index:	index of the PHY register to write to
+ * @val:	value to write to the PHY register
+ * Return: zero upon success, negative upon error
+ */
+static int mcs7830_write_phy(struct ueth_data *dev, uint8_t index, uint16_t val)
+{
+	int rc;
+
+	debug("%s(%s, %d, 0x%04X)\n", __func__, dev->eth_dev.name, index, val);
+
+	/* setup the PHY data which is to get written */
+	val = cpu_to_le16(val);
+	rc = mcs7830_write_reg(dev, REG_PHY_DATA, sizeof(val), &val);
+	if (rc < 0)
+		return rc;
+
+	/* issue the PHY write request and wait for its execution */
+	rc = mcs7830_phy_emit_wait(dev, PHY_CMD1_WRITE, index);
+	if (rc < 0)
+		return rc;
+
+	return 0;
+}
+
+/*
+ * mcs7830_write_config() - write to the network adapter's config register
+ * @eth:	network device to write to
+ * Return: zero upon success, negative upon error
+ *
+ * the data which gets written is taken from the shadow config register
+ * within the device driver's private data
+ */
+static int mcs7830_write_config(struct ueth_data *dev)
+{
+	struct mcs7830_private *priv;
+	int rc;
+
+	debug("%s()\n", __func__);
+	priv = dev->dev_priv;
+
+	rc = mcs7830_write_reg(dev, REG_CONFIG,
+			       sizeof(priv->config), &priv->config);
+	if (rc < 0) {
+		debug("writing config to adapter failed\n");
+		return rc;
+	}
+
+	return 0;
+}
+
+/*
+ * mcs7830_write_mchash() - write the network adapter's multicast filter
+ * @eth:	network device to write to
+ * Return: zero upon success, negative upon error
+ *
+ * the data which gets written is taken from the shadow multicast hashes
+ * within the device driver's private data
+ */
+static int mcs7830_write_mchash(struct ueth_data *dev)
+{
+	struct mcs7830_private *priv;
+	int rc;
+
+	debug("%s()\n", __func__);
+	priv = dev->dev_priv;
+
+	rc = mcs7830_write_reg(dev, REG_MULTICAST_HASH,
+			       sizeof(priv->mchash), &priv->mchash);
+	if (rc < 0) {
+		debug("writing multicast hash to adapter failed\n");
+		return rc;
+	}
+
+	return 0;
+}
+
+/*
+ * mcs7830_set_autoneg() - setup and trigger ethernet link autonegotiation
+ * @eth:	network device to run link negotiation on
+ * Return: zero upon success, negative upon error
+ *
+ * the routine advertises available media and starts autonegotiation
+ */
+static int mcs7830_set_autoneg(struct ueth_data *dev)
+{
+	int adv, flg;
+	int rc;
+
+	debug("%s()\n", __func__);
+
+	/*
+	 * algorithm taken from the Linux driver, which took it from
+	 * "the original mcs7830 version 1.4 driver":
+	 *
+	 * enable all media, reset BMCR, enable auto neg, restart
+	 * auto neg while keeping the enable auto neg flag set
+	 */
+
+	adv = ADVERTISE_PAUSE_CAP | ADVERTISE_ALL | ADVERTISE_CSMA;
+	rc = mcs7830_write_phy(dev, MII_ADVERTISE, adv);
+
+	flg = 0;
+	if (!rc)
+		rc = mcs7830_write_phy(dev, MII_BMCR, flg);
+
+	flg |= BMCR_ANENABLE;
+	if (!rc)
+		rc = mcs7830_write_phy(dev, MII_BMCR, flg);
+
+	flg |= BMCR_ANRESTART;
+	if (!rc)
+		rc = mcs7830_write_phy(dev, MII_BMCR, flg);
+
+	return rc;
+}
+
+/*
+ * mcs7830_get_rev() - identify a network adapter's chip revision
+ * @eth:	network device to identify
+ * Return: non-negative number, reflecting the revision number
+ *
+ * currently, only "rev C and higher" and "below rev C" are needed, so
+ * the return value is #1 for "below rev C", and #2 for "rev C and above"
+ */
+static int mcs7830_get_rev(struct ueth_data *dev)
+{
+	uint8_t buf[2];
+	int rc;
+	int rev;
+
+	/* register 22 is readable in rev C and higher */
+	rc = mcs7830_read_reg(dev, REG_FRAME_DROP_COUNTER, sizeof(buf), buf);
+	if (rc < 0)
+		rev = 1;
+	else
+		rev = 2;
+	debug("%s() rc=%d, rev=%d\n", __func__, rc, rev);
+	return rev;
+}
+
+/*
+ * mcs7830_apply_fixup() - identify an adapter and potentially apply fixups
+ * @eth:	network device to identify and apply fixups to
+ * Return: zero upon success (no errors emitted from here)
+ *
+ * this routine identifies the network adapter's chip revision, and applies
+ * fixups for known issues
+ */
+static int mcs7830_apply_fixup(struct ueth_data *dev)
+{
+	int rev;
+	int i;
+	uint8_t thr;
+
+	rev = mcs7830_get_rev(dev);
+	debug("%s() rev=%d\n", __func__, rev);
+
+	/*
+	 * rev C requires setting the pause threshold (the Linux driver
+	 * is inconsistent, the implementation does it for "rev C
+	 * exactly", the introductory comment says "rev C and above")
+	 */
+	if (rev == 2) {
+		debug("%s: applying rev C fixup\n", dev->eth_dev.name);
+		thr = PAUSE_THRESHOLD_DEFAULT;
+		for (i = 0; i < 2; i++) {
+			(void)mcs7830_write_reg(dev, REG_PAUSE_THRESHOLD,
+						sizeof(thr), &thr);
+			mdelay(1);
+		}
+	}
+
+	return 0;
+}
+
+/*
+ * mcs7830_basic_reset() - bring the network adapter into a known first state
+ * @eth:	network device to act upon
+ * Return: zero upon success, negative upon error
+ *
+ * this routine initializes the network adapter such that subsequent invocations
+ * of the interface callbacks can exchange ethernet frames; link negotiation is
+ * triggered from here already and continues in background
+ */
+static int mcs7830_basic_reset(struct ueth_data *dev)
+{
+	struct mcs7830_private *priv;
+	int rc;
+
+	debug("%s()\n", __func__);
+	priv = dev->dev_priv;
+
+	/*
+	 * comment from the respective Linux driver, which
+	 * unconditionally sets the ALLMULTICAST flag as well:
+	 * should not be needed, but does not work otherwise
+	 */
+	priv->config = CONF_TXENABLE;
+	priv->config |= CONF_ALLMULTICAST;
+
+	rc = mcs7830_set_autoneg(dev);
+	if (rc < 0) {
+		error("setting autoneg failed\n");
+		return rc;
+	}
+
+	rc = mcs7830_write_mchash(dev);
+	if (rc < 0) {
+		error("failed to set multicast hash\n");
+		return rc;
+	}
+
+	rc = mcs7830_write_config(dev);
+	if (rc < 0) {
+		error("failed to set configuration\n");
+		return rc;
+	}
+
+	rc = mcs7830_apply_fixup(dev);
+	if (rc < 0) {
+		error("fixup application failed\n");
+		return rc;
+	}
+
+	return 0;
+}
+
+/*
+ * mcs7830_read_mac() - read an ethernet adapter's MAC address
+ * @eth:	network device to read from
+ * Return: zero upon success, negative upon error
+ *
+ * this routine fetches the MAC address stored within the ethernet adapter,
+ * and stores it in the ethernet interface's data structure
+ */
+static int mcs7830_read_mac(struct eth_device *eth)
+{
+	struct ueth_data *dev;
+	int rc;
+	uint8_t buf[ETH_ALEN];
+
+	debug("%s()\n", __func__);
+	dev = eth->priv;
+
+	rc = mcs7830_read_reg(dev, REG_ETHER_ADDR, ETH_ALEN, buf);
+	if (rc < 0) {
+		debug("reading MAC from adapter failed\n");
+		return rc;
+	}
+
+	memcpy(&eth->enetaddr[0], buf, ETH_ALEN);
+	return 0;
+}
+
+/*
+ * mcs7830_write_mac() - write an ethernet adapter's MAC address
+ * @eth:	network device to write to
+ * Return: zero upon success, negative upon error
+ *
+ * this routine takes the MAC address from the ethernet interface's data
+ * structure, and writes it into the ethernet adapter such that subsequent
+ * exchange of ethernet frames uses this address
+ */
+static int mcs7830_write_mac(struct eth_device *eth)
+{
+	struct ueth_data *dev;
+	int rc;
+
+	debug("%s()\n", __func__);
+	dev = eth->priv;
+
+	if (sizeof(eth->enetaddr) != ETH_ALEN)
+		return -EINVAL;
+	rc = mcs7830_write_reg(dev, REG_ETHER_ADDR, ETH_ALEN, eth->enetaddr);
+	if (rc < 0) {
+		debug("writing MAC to adapter failed\n");
+		return rc;
+	}
+	return 0;
+}
+
+/*
+ * mcs7830_init() - network interface's init callback
+ * @eth:	network device to initialize
+ * @bd:		board information
+ * Return: zero upon success, negative upon error
+ *
+ * after initial setup during probe() and get_info(), this init() callback
+ * ensures that the link is up and subsequent send() and recv() calls can
+ * exchange ethernet frames
+ */
+static int mcs7830_init(struct eth_device *eth, bd_t *bd)
+{
+	struct ueth_data *dev;
+	int timeout;
+	int have_link;
+
+	debug("%s()\n", __func__);
+	dev = eth->priv;
+
+	timeout = 0;
+	do {
+		have_link = mcs7830_read_phy(dev, MII_BMSR) & BMSR_LSTATUS;
+		if (have_link)
+			break;
+		udelay(LINKSTATUS_TIMEOUT_RES * 1000);
+		timeout += LINKSTATUS_TIMEOUT_RES;
+	} while (timeout < LINKSTATUS_TIMEOUT);
+	if (!have_link) {
+		debug("ethernet link is down\n");
+		return -ETIMEDOUT;
+	}
+	return 0;
+}
+
+/*
+ * mcs7830_send() - network interface's send callback
+ * @eth:	network device to send the frame from
+ * @packet:	ethernet frame content
+ * @length:	ethernet frame length
+ * Return: zero upon success, negative upon error
+ *
+ * this routine send an ethernet frame out of the network interface
+ */
+static int mcs7830_send(struct eth_device *eth, void *packet, int length)
+{
+	struct ueth_data *dev;
+	int rc;
+	int gotlen;
+	/* there is a status byte after the ethernet frame */
+	ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, PKTSIZE + sizeof(uint8_t));
+
+	dev = eth->priv;
+
+	memcpy(buf, packet, length);
+	rc = usb_bulk_msg(dev->pusb_dev,
+			  usb_sndbulkpipe(dev->pusb_dev, dev->ep_out),
+			  &buf[0], length, &gotlen,
+			  USBCALL_TIMEOUT);
+	debug("%s() TX want len %d, got len %d, rc %d\n",
+	      __func__, length, gotlen, rc);
+	return rc;
+}
+
+/*
+ * mcs7830_recv() - network interface's recv callback
+ * @eth:	network device to receive frames from
+ * Return: zero upon success, negative upon error
+ *
+ * this routine checks for available ethernet frames that the network
+ * interface might have received, and notifies the network stack
+ */
+static int mcs7830_recv(struct eth_device *eth)
+{
+	struct ueth_data *dev;
+	ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, MCS7830_RX_URB_SIZE);
+	int rc, wantlen, gotlen;
+	uint8_t sts;
+
+	debug("%s()\n", __func__);
+	dev = eth->priv;
+
+	/* fetch input data from the adapter */
+	wantlen = MCS7830_RX_URB_SIZE;
+	rc = usb_bulk_msg(dev->pusb_dev,
+			  usb_rcvbulkpipe(dev->pusb_dev, dev->ep_in),
+			  &buf[0], wantlen, &gotlen,
+			  USBCALL_TIMEOUT);
+	debug("%s() RX want len %d, got len %d, rc %d\n",
+	      __func__, wantlen, gotlen, rc);
+	if (rc != 0) {
+		error("RX: failed to receive\n");
+		return rc;
+	}
+	if (gotlen > wantlen) {
+		error("RX: got too many bytes (%d)\n", gotlen);
+		return -EIO;
+	}
+
+	/*
+	 * the bulk message that we received from USB contains exactly
+	 * one ethernet frame and a trailing status byte
+	 */
+	if (gotlen < sizeof(sts))
+		return -EIO;
+	gotlen -= sizeof(sts);
+	sts = buf[gotlen];
+
+	if (sts == STAT_RX_FRAME_CORRECT) {
+		debug("%s() got a frame, len=%d\n", __func__, gotlen);
+		NetReceive(buf, gotlen);
+		return 0;
+	}
+
+	debug("RX: frame error (sts 0x%02X, %s %s %s %s %s)\n",
+	      sts,
+	      (sts & STAT_RX_LARGE_FRAME) ? "large" : "-",
+	      (sts & STAT_RX_LENGTH_ERROR) ?  "length" : "-",
+	      (sts & STAT_RX_SHORT_FRAME) ? "short" : "-",
+	      (sts & STAT_RX_CRC_ERROR) ? "crc" : "-",
+	      (sts & STAT_RX_ALIGNMENT_ERROR) ?  "align" : "-");
+	return -EIO;
+}
+
+/*
+ * mcs7830_halt() - network interface's halt callback
+ * @eth:	network device to cease operation of
+ * Return: none
+ *
+ * this routine is supposed to undo the effect of previous initialization and
+ * ethernet frames exchange; in this implementation it's a NOP
+ */
+static void mcs7830_halt(struct eth_device *eth)
+{
+	debug("%s()\n", __func__);
+}
+
+/*
+ * mcs7830_iface_idx - index of detected network interfaces
+ *
+ * this counter keeps track of identified supported interfaces,
+ * to assign unique names as more interfaces are found
+ */
+static int mcs7830_iface_idx;
+
+/*
+ * mcs7830_eth_before_probe() - network driver's before_probe callback
+ * Return: none
+ *
+ * this routine initializes driver's internal data in preparation of
+ * subsequent probe callbacks
+ */
+void mcs7830_eth_before_probe(void)
+{
+	mcs7830_iface_idx = 0;
+}
+
+/*
+ * struct mcs7830_dongle - description of a supported Moschip ethernet dongle
+ * @vendor:	16bit USB vendor identification
+ * @product:	16bit USB product identification
+ *
+ * this structure describes a supported USB ethernet dongle by means of the
+ * vendor and product codes found during USB enumeration; no flags are held
+ * here since all supported dongles have identical behaviour, and required
+ * fixups get determined@runtime, such that no manual configuration is
+ * needed
+ */
+struct mcs7830_dongle {
+	uint16_t vendor;
+	uint16_t product;
+};
+
+/*
+ * mcs7830_dongles - the list of supported Moschip based USB ethernet dongles
+ */
+static const struct mcs7830_dongle const mcs7830_dongles[] = {
+	{ 0x9710, 0x7832, },	/* Moschip 7832 */
+	{ 0x9710, 0x7830, },	/* Moschip 7830 */
+	{ 0x9710, 0x7730, },	/* Moschip 7730 */
+	{ 0x0df6, 0x0021, },	/* Sitecom LN 30 */
+};
+
+/*
+ * mcs7830_eth_probe() - network driver's probe callback
+ * @dev:	detected USB device to check
+ * @ifnum:	detected USB interface to check
+ * @ss:		USB ethernet data structure to fill in upon match
+ * Return: #1 upon match, #0 upon mismatch or error
+ *
+ * this routine checks whether the found USB device is supported by
+ * this ethernet driver, and upon match fills in the USB ethernet
+ * data structure which later is passed to the get_info callback
+ */
+int mcs7830_eth_probe(struct usb_device *dev, unsigned int ifnum,
+		      struct ueth_data *ss)
+{
+	struct usb_interface *iface;
+	struct usb_interface_descriptor *iface_desc;
+	int i;
+	struct mcs7830_private *priv;
+	int ep_in_found, ep_out_found, ep_intr_found;
+
+	debug("%s()\n", __func__);
+
+	/* iterate the list of supported dongles */
+	iface = &dev->config.if_desc[ifnum];
+	iface_desc = &iface->desc;
+	for (i = 0; i < ARRAY_SIZE(mcs7830_dongles); i++) {
+		if (dev->descriptor.idVendor == mcs7830_dongles[i].vendor &&
+		    dev->descriptor.idProduct == mcs7830_dongles[i].product)
+			break;
+	}
+	if (i == ARRAY_SIZE(mcs7830_dongles))
+		return 0;
+	debug("detected USB ethernet device: %04X:%04X\n",
+	      dev->descriptor.idVendor, dev->descriptor.idProduct);
+
+	/* fill in driver private data */
+	priv = calloc(1, sizeof(*priv));
+	if (!priv)
+		return 0;
+
+	/* fill in the ueth_data structure, attach private data */
+	memset(ss, 0, sizeof(*ss));
+	ss->ifnum = ifnum;
+	ss->pusb_dev = dev;
+	ss->subclass = iface_desc->bInterfaceSubClass;
+	ss->protocol = iface_desc->bInterfaceProtocol;
+	ss->dev_priv = priv;
+
+	/*
+	 * a minimum of three endpoints is expected: in (bulk),
+	 * out (bulk), and interrupt; ignore all others
+	 */
+	ep_in_found = ep_out_found = ep_intr_found = 0;
+	for (i = 0; i < iface_desc->bNumEndpoints; i++) {
+		uint8_t eptype, epaddr;
+		bool is_input;
+
+		eptype = iface->ep_desc[i].bmAttributes;
+		eptype &= USB_ENDPOINT_XFERTYPE_MASK;
+
+		epaddr = iface->ep_desc[i].bEndpointAddress;
+		is_input = epaddr & USB_DIR_IN;
+		epaddr &= USB_ENDPOINT_NUMBER_MASK;
+
+		if (eptype == USB_ENDPOINT_XFER_BULK) {
+			if (is_input && !ep_in_found) {
+				ss->ep_in = epaddr;
+				ep_in_found++;
+			}
+			if (!is_input && !ep_out_found) {
+				ss->ep_out = epaddr;
+				ep_out_found++;
+			}
+		}
+
+		if (eptype == USB_ENDPOINT_XFER_INT) {
+			if (is_input && !ep_intr_found) {
+				ss->ep_int = epaddr;
+				ss->irqinterval = iface->ep_desc[i].bInterval;
+				ep_intr_found++;
+			}
+		}
+	}
+	debug("endpoints: in %d, out %d, intr %d\n",
+	      ss->ep_in, ss->ep_out, ss->ep_int);
+
+	/* apply basic sanity checks */
+	if (usb_set_interface(dev, iface_desc->bInterfaceNumber, 0) ||
+	    !ss->ep_in || !ss->ep_out || !ss->ep_int) {
+		debug("device probe incomplete\n");
+		return 0;
+	}
+
+	dev->privptr = ss;
+	return 1;
+}
+
+/*
+ * mcs7830_eth_get_info() - network driver's get_info callback
+ * @dev:	detected USB device
+ * @ss:		USB ethernet data structure filled in at probe()
+ * @eth:	ethernet interface data structure to fill in
+ * Return: #1 upon success, #0 upon error
+ *
+ * this routine registers the mandatory init(), send(), recv(), and
+ * halt() callbacks with the ethernet interface, can register the
+ * optional write_hwaddr() callback with the ethernet interface,
+ * and initiates configuration of the interface such that subsequent
+ * calls to those callbacks results in network communication
+ */
+int mcs7830_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
+			 struct eth_device *eth)
+{
+	debug("%s()\n", __func__);
+	if (!eth) {
+		debug("%s: missing parameter.\n", __func__);
+		return 0;
+	}
+
+	snprintf(eth->name, sizeof(eth->name), "%s%d",
+		 MCS7830_BASE_NAME, mcs7830_iface_idx++);
+	eth->init = mcs7830_init;
+	eth->send = mcs7830_send;
+	eth->recv = mcs7830_recv;
+	eth->halt = mcs7830_halt;
+	eth->write_hwaddr = mcs7830_write_mac;
+	eth->priv = ss;
+
+	if (mcs7830_basic_reset(ss))
+		return 0;
+
+	if (mcs7830_read_mac(eth))
+		return 0;
+	debug("MAC %pM\n", eth->enetaddr);
+
+	return 1;
+}
diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index 2c4126be3601..1dda54c2f116 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -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,
diff --git a/include/usb_ether.h b/include/usb_ether.h
index 011ead7a364e..35700a21b59f 100644
--- a/include/usb_ether.h
+++ b/include/usb_ether.h
@@ -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);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h Gerhard Sittig
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 2/6] usb: net: introduce support for Moschip USB ethernet Gerhard Sittig
@ 2014-03-08 18:46 ` Gerhard Sittig
  2014-03-08 19:38   ` Marek Vasut
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards Gerhard Sittig
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 18:46 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
---

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(-)

diff --git a/include/configs/harmony.h b/include/configs/harmony.h
index d733be9cd5b6..fa66c665ec8c 100644
--- a/include/configs/harmony.h
+++ b/include/configs/harmony.h
@@ -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
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index c58bc91a50c5..e01a6d9547f9 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -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 */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
                   ` (2 preceding siblings ...)
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC Gerhard Sittig
@ 2014-03-08 18:46 ` Gerhard Sittig
  2014-03-08 19:39   ` Marek Vasut
                     ` (2 more replies)
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 5/6] at91: enable USB ethernet for taskit stamp9g20 Gerhard Sittig
                   ` (3 subsequent siblings)
  7 siblings, 3 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 18:46 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Gerhard Sittig <gsi@denx.de>
---

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(+)

diff --git a/include/configs/harmony.h b/include/configs/harmony.h
index fa66c665ec8c..34b43faeb079 100644
--- a/include/configs/harmony.h
+++ b/include/configs/harmony.h
@@ -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 */
diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h
index bd67603b50a2..16546c28b441 100644
--- a/include/configs/m53evk.h
+++ b/include/configs/m53evk.h
@@ -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)
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 77f856770539..1415584463bc 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -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)
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index ac517ce25ed8..f2db8c515b92 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -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 */
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index e01a6d9547f9..73eea304d19f 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -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

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 5/6] at91: enable USB ethernet for taskit stamp9g20
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
                   ` (3 preceding siblings ...)
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards Gerhard Sittig
@ 2014-03-08 18:46 ` Gerhard Sittig
  2014-03-09  9:17   ` Andreas Bießmann
  2014-03-12 21:06   ` [U-Boot] [U-Boot, v4, " Tom Rini
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 6/6] usb: net: update README.usb to list all USB ethernet options Gerhard Sittig
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 18:46 UTC (permalink / raw)
  To: u-boot

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

Signed-off-by: Gerhard Sittig <gsi@denx.de>
---

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(-)

diff --git a/include/configs/stamp9g20.h b/include/configs/stamp9g20.h
index 51339b1496e6..01085dc5c114 100644
--- a/include/configs/stamp9g20.h
+++ b/include/configs/stamp9g20.h
@@ -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 */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 6/6] usb: net: update README.usb to list all USB ethernet options
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
                   ` (4 preceding siblings ...)
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 5/6] at91: enable USB ethernet for taskit stamp9g20 Gerhard Sittig
@ 2014-03-08 18:46 ` Gerhard Sittig
  2014-03-08 19:40   ` Marek Vasut
  2014-03-12 21:06   ` [U-Boot] [U-Boot, v4, " Tom Rini
  2014-03-08 19:11 ` [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
  2014-03-08 19:22 ` Gerhard Sittig
  7 siblings, 2 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 18:46 UTC (permalink / raw)
  To: u-boot

- 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

Signed-off-by: Gerhard Sittig <gsi@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
---

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(-)

diff --git a/doc/README.usb b/doc/README.usb
index 65fb2886d958..bc768a385450 100644
--- a/doc/README.usb
+++ b/doc/README.usb
@@ -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)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
                   ` (5 preceding siblings ...)
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 6/6] usb: net: update README.usb to list all USB ethernet options Gerhard Sittig
@ 2014-03-08 19:11 ` Gerhard Sittig
  2014-03-08 19:22 ` Gerhard Sittig
  7 siblings, 0 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 19:11 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 19:46 +0100, Gerhard Sittig wrote:
> 
> 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
-- 
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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver
  2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
                   ` (6 preceding siblings ...)
  2014-03-08 19:11 ` [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
@ 2014-03-08 19:22 ` Gerhard Sittig
  7 siblings, 0 replies; 22+ messages in thread
From: Gerhard Sittig @ 2014-03-08 19:22 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 19:46 +0100, Gerhard Sittig wrote:
> 
> 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.


> 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
-- 
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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h Gerhard Sittig
@ 2014-03-08 19:35   ` Marek Vasut
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Marek Vasut @ 2014-03-08 19:35 UTC (permalink / raw)
  To: u-boot

On Saturday, March 08, 2014 at 07:46:13 PM, Gerhard Sittig wrote:
> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 2/6] usb: net: introduce support for Moschip USB ethernet
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 2/6] usb: net: introduce support for Moschip USB ethernet Gerhard Sittig
@ 2014-03-08 19:37   ` Marek Vasut
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Marek Vasut @ 2014-03-08 19:37 UTC (permalink / raw)
  To: u-boot

On Saturday, March 08, 2014 at 07:46:14 PM, Gerhard Sittig wrote:
> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC Gerhard Sittig
@ 2014-03-08 19:38   ` Marek Vasut
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Marek Vasut @ 2014-03-08 19:38 UTC (permalink / raw)
  To: u-boot

On Saturday, March 08, 2014 at 07:46:15 PM, Gerhard Sittig wrote:
> adjust the harmony and omap3_beagle board configs to make
> their CONFIG_USB_ETHER_* items appear in alphabetical order
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards Gerhard Sittig
@ 2014-03-08 19:39   ` Marek Vasut
  2014-03-10  2:35   ` Hui.Liu at freescale.com
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  2 siblings, 0 replies; 22+ messages in thread
From: Marek Vasut @ 2014-03-08 19:39 UTC (permalink / raw)
  To: u-boot

On Saturday, March 08, 2014 at 07:46:16 PM, Gerhard Sittig wrote:
> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>

Acked-by: Marek Vasut <marex@denx.de>

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 6/6] usb: net: update README.usb to list all USB ethernet options
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 6/6] usb: net: update README.usb to list all USB ethernet options Gerhard Sittig
@ 2014-03-08 19:40   ` Marek Vasut
  2014-03-12 21:06   ` [U-Boot] [U-Boot, v4, " Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Marek Vasut @ 2014-03-08 19:40 UTC (permalink / raw)
  To: u-boot

On Saturday, March 08, 2014 at 07:46:18 PM, Gerhard Sittig wrote:
> - 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 5/6] at91: enable USB ethernet for taskit stamp9g20
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 5/6] at91: enable USB ethernet for taskit stamp9g20 Gerhard Sittig
@ 2014-03-09  9:17   ` Andreas Bießmann
  2014-03-12 21:06   ` [U-Boot] [U-Boot, v4, " Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Andreas Bießmann @ 2014-03-09  9:17 UTC (permalink / raw)
  To: u-boot

Dear Gerhard Sittig,

On 08.03.2014 19:46, Gerhard Sittig wrote:
> 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
>
> Signed-off-by: Gerhard Sittig <gsi@denx.de>

Acked-by: Andreas Bie?man <andreas.devel@googlemail.com>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards Gerhard Sittig
  2014-03-08 19:39   ` Marek Vasut
@ 2014-03-10  2:35   ` Hui.Liu at freescale.com
  2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
  2 siblings, 0 replies; 22+ messages in thread
From: Hui.Liu at freescale.com @ 2014-03-10  2:35 UTC (permalink / raw)
  To: u-boot

> -----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
> 
> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>

For the i.mx part:

Acked-by:Jason Liu <r64343@freescale.com>

> ---
> 
> 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(+)
> 
> diff --git a/include/configs/harmony.h b/include/configs/harmony.h index
> fa66c665ec8c..34b43faeb079 100644
> --- a/include/configs/harmony.h
> +++ b/include/configs/harmony.h
> @@ -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 */
> diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h index
> bd67603b50a2..16546c28b441 100644
> --- a/include/configs/m53evk.h
> +++ b/include/configs/m53evk.h
> @@ -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)
> diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
> index 77f856770539..1415584463bc 100644
> --- a/include/configs/mx53loco.h
> +++ b/include/configs/mx53loco.h
> @@ -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)
> diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
> index ac517ce25ed8..f2db8c515b92 100644
> --- a/include/configs/nitrogen6x.h
> +++ b/include/configs/nitrogen6x.h
> @@ -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 */
> diff --git a/include/configs/omap3_beagle.h
> b/include/configs/omap3_beagle.h index e01a6d9547f9..73eea304d19f 100644
> --- a/include/configs/omap3_beagle.h
> +++ b/include/configs/omap3_beagle.h
> @@ -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
> 
> 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [U-Boot, v4, 1/6] usb: net: don't ifdef routine declarations in usb_ether.h
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h Gerhard Sittig
  2014-03-08 19:35   ` Marek Vasut
@ 2014-03-12 21:05   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2014-03-12 21:05 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 07:46:13PM +0100, Gerhard Sittig wrote:

> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [U-Boot, v4, 2/6] usb: net: introduce support for Moschip USB ethernet
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 2/6] usb: net: introduce support for Moschip USB ethernet Gerhard Sittig
  2014-03-08 19:37   ` Marek Vasut
@ 2014-03-12 21:05   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2014-03-12 21:05 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 07:46:14PM +0100, Gerhard Sittig wrote:

> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [U-Boot, v4, 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC Gerhard Sittig
  2014-03-08 19:38   ` Marek Vasut
@ 2014-03-12 21:05   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2014-03-12 21:05 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 07:46:15PM +0100, Gerhard Sittig wrote:

> adjust the harmony and omap3_beagle board configs to make
> their CONFIG_USB_ETHER_* items appear in alphabetical order
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [U-Boot, v4, 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards Gerhard Sittig
  2014-03-08 19:39   ` Marek Vasut
  2014-03-10  2:35   ` Hui.Liu at freescale.com
@ 2014-03-12 21:05   ` Tom Rini
  2 siblings, 0 replies; 22+ messages in thread
From: Tom Rini @ 2014-03-12 21:05 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 07:46:16PM +0100, Gerhard Sittig wrote:

> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [U-Boot, v4, 5/6] at91: enable USB ethernet for taskit stamp9g20
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 5/6] at91: enable USB ethernet for taskit stamp9g20 Gerhard Sittig
  2014-03-09  9:17   ` Andreas Bießmann
@ 2014-03-12 21:06   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2014-03-12 21:06 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 07:46:17PM +0100, Gerhard Sittig wrote:

> 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Andreas Bie?man <andreas.devel@googlemail.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [U-Boot] [U-Boot, v4, 6/6] usb: net: update README.usb to list all USB ethernet options
  2014-03-08 18:46 ` [U-Boot] [PATCH v4 6/6] usb: net: update README.usb to list all USB ethernet options Gerhard Sittig
  2014-03-08 19:40   ` Marek Vasut
@ 2014-03-12 21:06   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2014-03-12 21:06 UTC (permalink / raw)
  To: u-boot

On Sat, Mar 08, 2014 at 07:46:18PM +0100, Gerhard Sittig wrote:

> - 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
> 
> Signed-off-by: Gerhard Sittig <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-03-12 21:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-08 18:46 [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
2014-03-08 18:46 ` [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h Gerhard Sittig
2014-03-08 19:35   ` Marek Vasut
2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-03-08 18:46 ` [U-Boot] [PATCH v4 2/6] usb: net: introduce support for Moschip USB ethernet Gerhard Sittig
2014-03-08 19:37   ` Marek Vasut
2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-03-08 18:46 ` [U-Boot] [PATCH v4 3/6] tegra: omap: alpha-sort USB ethernet items for Asix and SMSC Gerhard Sittig
2014-03-08 19:38   ` Marek Vasut
2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-03-08 18:46 ` [U-Boot] [PATCH v4 4/6] tegra: imx: omap: enable Moschip USB ethernet support for several boards Gerhard Sittig
2014-03-08 19:39   ` Marek Vasut
2014-03-10  2:35   ` Hui.Liu at freescale.com
2014-03-12 21:05   ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-03-08 18:46 ` [U-Boot] [PATCH v4 5/6] at91: enable USB ethernet for taskit stamp9g20 Gerhard Sittig
2014-03-09  9:17   ` Andreas Bießmann
2014-03-12 21:06   ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-03-08 18:46 ` [U-Boot] [PATCH v4 6/6] usb: net: update README.usb to list all USB ethernet options Gerhard Sittig
2014-03-08 19:40   ` Marek Vasut
2014-03-12 21:06   ` [U-Boot] [U-Boot, v4, " Tom Rini
2014-03-08 19:11 ` [U-Boot] [PATCH v4 0/6] usb: net: introduce Moschip MCS7830 driver Gerhard Sittig
2014-03-08 19:22 ` Gerhard Sittig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.