ARM: i.MX6: cm-fx6: fix the UART clock name

In function cm_fx6_timer_init(), prior to early_console_setup(), there
is a call to clk_get_sys() to get the clock for the early console setup.
The clock name is wrong: cm-fx6 uses UART4 and not UART1 for the
console.
Nevertheless, this has worked so far, because both UART1 and UART4 are
linked to the same clock structure.
So, this fix does not change any functionality, but only assures the
clk_get_sys() function is called with the correct clock name.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
MXC IPU: Replace wait_event with wait_event_interruptible

Having the 4 IPU tasks blocked on wait_event artificially inflates the
load average by 4. wait_event_interruptible should be an acceptable
alternative.

Signed-off-by: Angus Gratton <gus@projectgus.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
ARM: i.MX6: prevent double regulators init

The function mx6_cpu_regulator_init() is called from both the
mxc_cpufreq_driver_init() function and the cm_fx6_init().
As a result, the cpufreq driver failes to scale the voltage and we have
multiple messages in kernel log:
COULD NOT SET GP VOLTAGE!!!!
COULD NOT SET SOC VOLTAGE BACK!!!!

Prevent this by restricting the mx6_cpu_regulator_init() call to only
one time.
Currently, there is a common way to solve the problem and remove the
call to mx6_cpu_regulator_init() from the board specific function, but
leave it in the mxc_cpufreq_driver_init().

We are not sure that the common way is the best one as we'd like to see
those regulators initialized as soon as possible in the boot process.
So calling the mx6_cpu_regulator_init() from cm_fx6_init() is much
earlier than doing it from mxc_cpufreq_driver_init() as it is a
module_init() call.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
ARM: i.MX6: cm-fx6: restrict DVFS fix to MX6Q

The DVFS fix for the soc and pu voltage regulators should be applied
only to Quad/Dual, but not to DualLite/Solo SoCs.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
upgrade gpu kernel driver 4.6.9p10

This patch fixes GPU-related issues, in particular "! AXI BUS ERROR !".
Reference:
[1] https://community.freescale.com/thread/307606
[2] https://community.freescale.com/docs/DOC-93987

Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
ARM: disable preemption in machine_shutdown

Since the smp call to stop the other cpus are handled in those
cpus in interrupt context, there's a potential for those smp
handlers to interrupt threads holding spin locks (such as the
one a mutex holds).  This prevents those threads from ever
releasing their spin lock, so if the cpu doing the shutdown
is allowed to switch to another thread that tries to grab the
same lock/mutex, we could get into a deadlock (the spin lock
call is called with preemption disabled in the mutex lock code).

To avoid that possibility, disable preemption before doing the
smp_send_stop().

Note:
This patch is applied to prevent CM-FX6 from occasional hanging
upon 'reboot'.

Change-Id: I7976c5382d7173fcb3cd14da8cc5083d442b2544
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
ARM: i.MX6: cm-fx6: explicitly disable SATA PHY

Let the Kernel reinitialize the SATA PHY even though it has already
been initialized by U-Boot.
Otherwise the ATA controller cannot go on-line, effectively disabling
SATA in Linux.

Refference:
https://github.com/boundarydevices/linux-imx6/commit/0186ea224ce6bd1cb4757a0f83b0090e26a021f4

Signed-off-by: Valentin Raevsky <valentin@compulab.co.il>
Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
video: mxc: support Startek KD050C LCD display

Support Startek KD050C 800x480 TFT LCD.

Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
ARM: i.MX6: iomux: raise DSE for display signals

While drive strength of display signals is configured for 120 Ohm, some
displays exhibit artifacts.
Typical drive strength should be around 50 Ohm.
To fix the the visual artifacts, we raise the drive strength to 48 Ohm.

This patch fixes artifacts visual with Startek 800x480 LCD.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
touchscreen: ads7846: enable axes inversion

Enable to reverse each axis separately.

Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
ARM: i.MX6: cm-fx6: attach Startek LCD with TS

Attach Startek (800x480) LCD with resistive touchscreen (ADS7846)
replacing Dataimage (Anders) LCD.

Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>