Commit graph

8 commits

Author SHA1 Message Date
Tobias Klauser
8570bcd83d net: bfin_mac: Remove unused stats member from struct bfin_mac_local
The bfin_mac driver keeps its statistics in net_device->stats, so the
stats member in struct bfin_mac_local is unused. Remove it, as well as
the accompanying comment.

Cc: adi-buildroot-devel@lists.sourceforge.net
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-27 16:01:59 -07:00
Philippe Reynes
ec87485dbe net: ethernet: adi: bfin_mac: use phydev from struct net_device
The private structure contain a pointer to phydev, but the structure
net_device already contain such pointer. So we can remove the pointer
phydev in the private structure, and update the driver to use the
one contained in struct net_device.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-07-17 23:22:02 -07:00
Sonic Zhang
159945af1e bfin_mac: convert bfin Ethernet driver to NAPI framework
Ethernet RX DMA buffers are polled in NAPI work queue other than received
directly in DMA RX interrupt handler.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-07-24 23:35:42 -07:00
Joe Perches
3398032c65 adi: Remove extern from function prototypes
There are a mix of function prototypes with and without extern
in the kernel sources.  Standardize on not using extern for
function prototypes.

Function prototypes don't need to be written with extern.
extern is assumed by the compiler.  Its use is as unnecessary as
using auto to declare automatic/local variables in a block.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-24 10:09:18 -04:00
Richard Cochran
dd87b22f90 bfin_mac: offer a PTP Hardware Clock.
The BF518 has a PTP time unit that works in a similar way to other MAC
based clocks, like gianfar, ixp46x, and igb. This patch adds support for
using the blackfin as a PHC. Although the blackfin hardware does offer a
few ancillary features, this patch implements only the basic operations.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01 11:41:35 -04:00
Richard Cochran
bc3c5f634d bfin_mac: replace sys time stamps with raw ones instead.
This patch replaces the sys time stamps and timecompare code with simple
raw hardware time stamps in nanosecond resolution. The only tricky bit is
to find a PTP Hardware Clock period slower than the input clock period
and a power of two.

Compile tested only.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Tested-by: Bob Liu <lliubbo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-01 11:41:35 -04:00
Danny Kukawka
5055d2f236 adi: adapt to eth_hw_addr_random() and changes in arch/blackfin
Adapt adi ethernet driver to changes in bfin_get_ether_addr()
from arch/blackfin. bfin_get_ether_addr() returns now a state.
Set a random mac address via new eth_hw_addr_random() in case
the return value is not 0.

Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.

v2: change the logic to reduce unneeded checks

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-19 19:03:04 -05:00
Jeff Kirsher
7b35f03338 bfin_mac: Move the Analog Devices Inc driver
Move the Analog Devices Inc driver into drivers/net/ethernet/adi/ and
make the necessary Kconfig and Makefile changes.

CC: <uclinux-dist-devel@blackfin.uclinux.org>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Bob Liu <bob.liu@analog.com>
2011-08-12 12:38:13 -07:00
Renamed from drivers/net/bfin_mac.h (Browse further)