Jared McNeill
6a05f063ed
Convert Allwinner port to extres clk/hwreset/regulator APIs.
...
Reviewed by: andrew, gonzo, Emmanuel Vadot <manu@bidouilliste.com>
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D5752
2016-04-06 23:11:03 +00:00
Jared McNeill
d7acb49aee
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
Luiz Otavio O Souza
715a136ddf
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
Luiz Otavio O Souza
5df539274f
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
Luiz Otavio O Souza
da9a326be3
Remove unnecessary includes and, while here, sort them.
2015-09-20 13:15:09 +00:00
Luiz Otavio O Souza
8fbc5d1840
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
Luiz Otavio O Souza
1d7a730974
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
Luiz Otavio O Souza
ff0752c870
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
Luiz Otavio O Souza
a5221d68dc
Fix the sent packets statistics for if_dwc.
2015-07-06 03:06:13 +00:00
Luiz Otavio O Souza
ecb3497f56
Fix wrong variable name in the previous commit.
...
Pointy hat to: loos
Reported by: araujo
2015-06-03 15:18:32 +00:00
Luiz Otavio O Souza
9500101c2f
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
Ruslan Bukin
db8a143a94
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
Ruslan Bukin
d8e5258da2
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
Gleb Smirnoff
08c95c53d7
Mechanically convert to if_inc_counter().
2014-09-27 20:43:01 +00:00
Ruslan Bukin
5d43fd685b
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