net: dm9k: fix reset routine
Based on Linux's commit:

    commit 09ee9f8
    Author: Michael Abbott <michael.abbott@diamond.ac.uk>
    Date:   Wed Oct 16 11:41:33 2013 +0300

        dm9000: Implement full reset of DM9000 network device

        A Davicom application note for the DM9000 network device recommends
        performing software reset twice to correctly initialise the device.
        Without this reset some devices fail to initialise correctly on
        system startup.

N.B. DM9000B on MIPS Creator CI20 board needs additional workaround
(see the 'Make all GPIO pins outputs' and 'Power internal PHY' lines).

This workaround was taken from this U-boot's commit:

    commit fbcb7ec
    Author: Remy Bohmer <linux@bohmer.net>
    Date:   Tue Jun 3 15:26:24 2008 +0200

        DM9000: Improve eth_reset() routine

        According to the application notes of the DM9000 v1.22 chapter 5.2 bullet 2, the
        reset procedure must be done twice to properly reset the DM9000 by means of software.
        This errata is not needed anymore for the DM9000A, but it does not bother it.

        This change has been tested with DM9000A, DM9000E, DM9000EP.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent d818f02 commit 92f9b36fc0701d2c95d1f5182feeb927a3a25bfa
@Antony Pavlov Antony Pavlov authored on 11 May 2015
Sascha Hauer committed on 12 May 2015
Showing 1 changed file
View
drivers/net/dm9k.c