Commit Graph

14 Commits

Author SHA1 Message Date
jmcneill
aa85fc5f7d Add support for resetting the PHY via GPIO.
Submitted by:		Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by:		andrew, jmcneill
Approved by:		adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5505
2016-03-03 22:26:36 +00:00
loos
058e1a61ea Fix the build by adding the alternate descriptors and MII clock defines.
This obviously should be in the last commit.
2015-09-20 14:28:06 +00:00
loos
1387cdb079 Add alternate descriptors support for if_dwc.
This also adds a newbus interface that allows a SoC to override the
following settings:

 - if_dwc specific SoC initialization;
 - if_dwc descriptor type;
 - if_dwc MII clock.

This seems to be an old version of the hardware descriptors but it is
still in use in a few SoCs (namely Allwinner A20 and Amlogic at least).

Tested on Cubieboard2 and Banana pi.

Tested for regressions on Altera Cyclone by br@ (old version).

Obtained from:	NetBSD
2015-09-20 14:13:29 +00:00
loos
2314610893 Remove unnecessary includes and, while here, sort them. 2015-09-20 13:15:09 +00:00
loos
15535e5191 Do not call mii_mediachg() from NIC interrupt handler.
This fixes the link instability on banana pi (A20).

Suggested by:	yongari
2015-09-12 16:46:41 +00:00
loos
e3e76db925 When initializing the (unused) TX descriptors it is not necessary set the
chain bit.

Obtained from:	NetBSD
2015-07-06 17:13:17 +00:00
loos
aef26f5321 Use uint32_t consistently to store registers values.
Always use unsigned numbers to avoid undefined behavior on (1 << 31).

Remove unused variables and some stray semicolons.

No functional changes.
2015-07-06 16:45:48 +00:00
loos
67af1c5d96 Fix the sent packets statistics for if_dwc. 2015-07-06 03:06:13 +00:00
loos
51c23dd838 Fix wrong variable name in the previous commit.
Pointy hat to:	loos
Reported by:	araujo
2015-06-03 15:18:32 +00:00
loos
ba1bb7cdf1 Fix the OACTIVE handling on if_dwc.
Previously the OACTIVE flag was being set when the tx descriptors are fully
allocated but it wasn't unset anywhere.

As soon as a packet is transmitted, unset the OACTIVE flag and call start
routine to push any pending packets from the tx queue.

This closes another race where a full tx queue would jam the tx path (tx
queue is full, new packets cannot be added to queue and dwc_txstart never
gets called).
2015-06-03 14:48:03 +00:00
br
f2d115ccaa o Remove superfluous includes
o Avoid NULL pointer access
o Fix 'set but not used' warning

Submitted by:	Sebastian Huber <sebastian.huber@embedded-brains.de>
2015-04-03 11:37:23 +00:00
br
bec17c987f o Correct the condition in reset procedure
o Setup interrupt hander after reset, not before

This fixes operation on ODROID-C1 (Amlogic S805)

Submitted by:	John Wehle <john@feith.com>
2015-02-13 11:00:13 +00:00
glebius
c2cbfb5b5f Mechanically convert to if_inc_counter(). 2014-09-27 20:43:01 +00:00
br
0bafc6e378 Add driver for Synopsys DesignWare 3504-0 Universal 10/100/1000
Ethernet MAC.

Sponsored by:	DARPA, AFRL
2014-09-25 18:03:14 +00:00