sun4i_wemac: Fix scheduling from atomic context oops on tx timeout

On my wobo-i5 the phy is hooked-up to port D rather then port A (to be fixed
in the next patch in this series), this causes things to not work, and thus
the tx timeout watchdog to trigger.

The tx timeout callback may not sleep, but before this patch it called
wemac_init_wemac, which in turns uses wemac_phy_read / wemac_phy_write,
which use mutexes and thus can sleep. This makes the kernel very unhappy!

This patch fixes this by doing the emac reset on tx timeout from a workqueue.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Add support for the mii-phy being connected to PortD

This is possible with the A10s (and used on the wobo-i5), and indicated
by emac_used being 2 rather then 1.

While working on this I noticed that the port related defines in
sun4i_wemac.h are wrong. The port registers are 0x24 bytes apart, not 0x20,
correct the define for PD_CFG0, which this patch uses, and remove all the
others as they are unused anyways.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Fix get_link() function

Things are hardcoded to use the mii interface everywhere, and the flags
get_link checks are never set, so hardcode it to the mii like elsewhere in
the driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Give the phy some time to settle after powering it on

This is necessary to avoid ending up with 10 Mbit half-duplex on
100 Mbit networks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>