ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

This is based on the driver Allwinner ships in there Android kernel sources.

Initial porting to upstream kernels done by David Lanzendörfer, additional
fixes and cleanups by Hans de Goede.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: dts: sun4i: Add support for mmc

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: dts: sun5i: Add support for mmc

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: dts: sun7i: Add support for mmc

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
net: stmmac: Enable stmmac main clock when probing hardware

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
net: stmmac: Honor DT parameter to force DMA store and forward mode

"snps,force_sf_dma_mode" is documented in stmmac device tree bindings,
but is never handled by the driver.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
net: stmmac: Use platform data tied with compatible strings

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
net: stmmac: sunxi platfrom extensions for GMAC in Allwinner A20 SoC's

The Allwinner A20 has an ethernet controller that seems to be
an early version of Synopsys DesignWare MAC 10/100/1000 Universal,
which is supported by the stmmac driver.

Allwinner's GMAC requires setting additional registers in the SoC's
clock control unit.

The exact version of the DWMAC IP that Allwinner uses is unknown,
thus the exact feature set is unknown.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun7i: Add GMAC controller node to sun7i DTSI

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun7i: Add pin muxing options for the GMAC

The A20 has EMAC and GMAC muxed on the same pins.
Add pin sets with gmac function for MII and RGMII mode to the DTSI.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun7i: cubietruck: Enable the GMAC

The CubieTruck uses the GMAC with an RGMII phy.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun7i: cubieboard2: Enable GMAC instead of EMAC

GMAC has better performance and fewer hardware issues.
Use the GMAC in MII mode for ethernet instead of the EMAC.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun7i: olinuxino-micro: Enable GMAC instead of EMAC

GMAC has better performance and fewer hardware issues.
Use the GMAC in MII mode for ethernet instead of the EMAC.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun7i: Add ethernet alias for GMAC

U-Boot will insert MAC address into the device tree image.
It looks up ethernet[0-5] aliases to find the ethernet nodes.
Alias GMAC as ethernet0, as it is the only ethernet controller used.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
ARM: dts: sun7i: Add arch timers

Note this requires a new enough uboot, otherwise things won't work, ie:

https://github.com/jwrdegoede/u-boot-sunxi/commits/sunxi-next
or:
http://xenbits.xen.org/gitweb/?p=people/ianc/u-boot.git;a=shortlog;h=refs/heads/devel/sunxi-psci

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libahci: Add a pre ahci_start_engine hook

Allwinner A10 and A20 ARM SoCs have an AHCI sata controller which need a
special register to be poked before starting the DMA engine.

This register gets reset on an ahci_stop_engine call, so there is no other
place then ahci_start_engine where this poking can be done.

This commit adds a pre ahci_start_engine hook for use by the Allwinner AHCI
driver (and potentially other drivers in the future).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sunxi: Add ahci-sunxi driver for the Allwinner SUNXi SoCs sata

This patch adds support for the ahci sata controler found on Allwinner A10
and A20 SoCs.

Orignally written by Olliver Schinagl using the approach of having a platform
device which probe method creates a new child platform device which gets
driven by ahci_platform.c, as done by ahci_imx.c .

Given that almost all functionality already is shared through libahci /
ata-core, and that ahci_platform.c cannot cleanly handle somewhat more complex
platform specific ahci cases, such as the sunxi case, it was refactored into
a stand-alone platform driver by Hans de Goede.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sun4i: dts: Add ahci / sata support

This patch adds sunxi sata support to A10 boards that have such a connector.
Some boards also feature a regulator via a GPIO and support for this is also
added.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sun7i: dts: Add ahci / sata support

This patch adds sunxi sata support to A20 boards that have such a connector.
Some boards also feature a regulator via a GPIO and support for this is also
added.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
ARM: sun4i: dt: Add bindings for USB clocks

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