Skip to contentSkip to conversation

Add support Asix's AX88783 ethernet chip v1.00

PATCH New Joe Xue 2 participants 2 messages Feb 4, 2011 – Feb 15, 2011 Network drivers

lore
Share & tools
lore

Joe Xue

author
#0 lore raw

PATCH 1/1 Add support Asix's AX88783 ethernet chip v1.00

for more information about this chip, please check:
http://www.asix.com.tw/products.php?op=pItemdetail&PItemID=98;65;86&PLine=6

Cc Wolfgang Denk <[email protected]>
Cc Stefano Babic <[email protected]>
---
 README                |    6 +
 drivers/net/Makefile  |    1 +
 drivers/net/ax88783.c |  295 +++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/net/ax88783.h |  102 +++++++++++++++++
 include/netdev.h      |    1 +
 5 files changed, 405 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/ax88783.c
 create mode 100644 drivers/net/ax88783.h
README +6 -0
index 755d17c..b5e3c48 100644
@@ -891,6 +891,12 @@ The following options need to be configured:
 			Define this if data bus is 16 bits. If your processor
 			automatically converts one 32 bit word to two 16 bit
 			words you may also try CONFIG_SMC911X_32_BIT.
+	 	CONFIG_DRIVER_AX88783
+	 	Support for ASIX's AX88783 chip
+
+	 		CONFIG_AX88783_BASE
+	 		Define this to hold the physical address
+	 		of the device (I/O space)
 
 - USB Support:
 		At the moment only the UHCI host controller is
drivers/net/Makefile +1 -0
index fd9d0b4..7cd6e2c 100644
@@ -30,6 +30,7 @@ COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o
 COBJS-$(CONFIG_ALTERA_TSE) += altera_tse.o
 COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o
 COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o
+COBJS-$(CONFIG_DRIVER_AX88783) += ax88783.o
 COBJS-$(CONFIG_BCM570x) += bcm570x.o
 COBJS-$(CONFIG_BCM570x) += bcm570x_autoneg.o
 COBJS-$(CONFIG_BCM570x) += 5701rls.o
drivers/net/ax88783.c new file +295 -0

295 lines not on this page · raw message

drivers/net/ax88783.h new file +102 -0

102 lines not on this page · raw message

include/netdev.h +1 -0
index 6f0a971..c302142 100644
@@ -44,6 +44,7 @@ int cpu_eth_init(bd_t *bis);
 int altera_tse_initialize(u8 dev_num, int mac_base,
 			  int sgdma_rx_base, int sgdma_tx_base);
 int ax88180_initialize(bd_t *bis);
+int ax88783_initialize(bd_t *bis);
 int au1x00_enet_initialize(bd_t*);
 int at91emac_register(bd_t *bis, unsigned long iobase);
 int bfin_EMAC_initialize(bd_t *bis);
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 Add support Asix's AX88783 ethernet chip v1.00

Quoted 15 lines · On Friday, February 04, 2011 14:56:42 Joe Xue wrote:
drivers/net/ax88783.c new file +15 -0
+static int ax88783_init(struct eth_device *dev, bd_t * bd)
+{
+	...
+	/* set mac address*/
+	mactmp[0] = dev->enetaddr[5];
+	mactmp[1] = dev->enetaddr[4];
+	mactmp[2] = dev->enetaddr[3];
+	mactmp[3] = dev->enetaddr[2];
+	writel(*mac, &reg->p0mac0);
+
+	mactmp[0] = dev->enetaddr[1];
+	mactmp[1] = dev->enetaddr[0];
+	writel(*mac, &reg->p0mac1);
+
+	/* write mac to forward entry */

drivers/net/ax88783.c line 167

Quoted 10 lines
drivers/net/ax88783.c new file +10 -0
+	mactmp[0] = dev->enetaddr[3];
+	mactmp[1] = dev->enetaddr[2];
+	mactmp[2] = dev->enetaddr[1];
+	mactmp[3] = dev->enetaddr[0];
+	writel(*mac, &reg->ftdata);
+
+	tmp = dev->enetaddr[4] | (dev->enetaddr[5]<<8) | \
+	      FTCMD_FT_PORT(0x2) | FTCMD_FT_STATIC | \
+	      FTCMD_WRITE_FT;
+	writel(tmp, &reg->ftcmd);

implement eth_device->write_hwaddr rather than inlining the code in the init -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110215/5a523bd7/attachment.pgp