diff options
author | Claudiu Manoil <claudiu.manoil@freescale.com> | 2014-02-24 14:13:42 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-25 04:38:20 +0400 |
commit | a328ac92d3149d191a92b681a832d417da72a74c (patch) | |
tree | db74960f179d4240c206688e96eeace0e3e05d31 /drivers/net/ethernet/freescale/gianfar.h | |
parent | 225a9a256627a0b380183364688708a4b5b0a0e4 (diff) | |
download | linux-a328ac92d3149d191a92b681a832d417da72a74c.tar.xz |
gianfar: Implement MAC reset and reconfig procedure
The main MAC config registers like: RCTRL/TCTRL, MRBLR,
MAXFRM, RXIC/TXIC, most fields of MACCFG1/2, should not
be changed on-the-fly, but at least after stopping the
DMA and disabling the Rx/Tx blocks and, for increased
reliability, after a MAC soft reset.
Impelement a complete MAC soft reset and reconfig procedure
following the latest HW advisories - gfar_mac_reset() - to
replace gfar_mac_init() and (the confusing) init_registers()
functions.
Factor out separate config functions for RCTRL and TCTRL,
insure programming order of the relevant config regs after
MAC soft reset.
Split gfar_hw_init() into gfar_mac_reset() and the remaining
global regs that don't need to be reconfigured after MAC soft
reset (FIFOCFG, ATTRELI, HW counters a.s.o).
As gfar_hw_init() now makes all the register writes @probe()
time, based on all the device flags and config options, it
must be moved further down, just before register_netdev(),
as the last config step when the config values are comitted
to HW. Also, move netif_carrier_off() after register_netdev(),
because it has no effect if called before.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar.h')
0 files changed, 0 insertions, 0 deletions