sun7i: Remove super-standby support fixup

Removing the dram parameter parsing was not a good idea, since for sun7i that
is used for regular standby too.

Also do some misc. cleanups.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun7i: fix debug macro build.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-hcd0: Fix build in host-only mode

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: Don't log a useless error when we fail to get a gpio

Instead let the caller log a meaning-full error (and allow the caller to
simply ignore this if not getting the gpio is a valid thing to happen).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-video: check there is enough memory

Check there is enough memory for an EDID discovered mode, and if not don't
use it. This avoids crashing with a kernel panic when we encounter modes
for which we don't have enough reserved fbmem.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-video: Fix high res mode (>= 1920x1080) issues on sun5i and sun7i

Fix 1920x1200 hdmi output being very distorted, and also fix some pixels
flickering and hdmiaudio not working at 1920x1080.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi: Add dma-compat code

The sun4i/sun5i and sun7i code from Allwinner have significant different
dma controller code, including a different API. This patch adds a wrapper
over the sun4i/sun5i and sun7i code, offering a consistent interface for
drivers, making it easier to write a driver supporting both.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-sound-soc: Use new sunxi dma-compat code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-sound-soc: Add support for sun7i

Note: spdif untested, i2s disabled for sun7i since the i2s code needs various
adjustments for sun7i support.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-codec: Fix memleak on hw_free()

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-hdmi-audio: Fix un-support sample_rate errors

sndhdmi_hw_params gets called before sun4i_hdmiaudio_trigger, causing
hdmi_audio_enable to be called before hdmi_set_audio_para, which makes
the hdmi_core.c: audio_config() unhappy and report errors like this one:
[DISP] un-support sample_rate,value=0

This patch fixes this by moving the calling of hdmi_set_audio_para to
sndhdmi_hw_params. It also makes some changes to avoid doing audio_config
multiple times if not necessary, and lastly it makes Hdmi_run_thread check
for changes 4 times / second, rather then once every 2 seconds, so that
audio-setting changes get applied with a maximum latency of 250 ms.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun7i: Use high-res counter for sched-clock

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun7i: Make early boot a bit more quiet

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sunxi-sound-codec: Silence some uninteresting debug messages

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Don't use sid for mac address if it is all 0

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Remove dead dma tx code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Remove dead ccmu code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Remove dead plat_data code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Remove dead eeprom code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
sun4i_wemac: Remove dead internal phy code

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