ENGR00291110 sata: can not link up after suspend resume

issue:
sata phy link down after suspend resume on imx6q TO1.3.
solution:
sata phy ref clock should be gated off/on in suspend/resume

Signed-off-by: Richard Zhu <r65037@freescale.com>
ARM: imx: return zero in case next event gets a large increment

The return of v2_set_next_event() will lead to an infinite loop in
tick_handle_oneshot_broadcast() - "goto again;" with imx6q WAIT mode
(to be enabled).  This happens because when global event did not expire
any CPU local events, the broadcast device will be rearmed to a CPU
local next_event, which could be far away from now and result in a
max_delta_tick programming in set_next_event().

Fix the problem by detecting those next events with increments larger
than 0x7fffffff, and simply return zero in that case.

It leaves mx1_2_set_next_event() unchanged since only v2_set_next_event()
will be running with imx6q WAIT mode support.

Thanks Russell King for helping understand the problem.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
ENGR00295714: GPT Status register bits are cleared inadvertently

GPT Status register bit should be cleared by writing 1.
We do not need to read, modify, write for modifying the bits.
In Linux-3.0.35, while clearing ROV bit we inadvertently clear
other bit causing timer issues.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
ENGR00296217 serial: imx: use the atomic bit operation to sync the TX

Check the DMA status (DMA_IN_PROGRESS) is not strict enough, the two
TXs may also submit the DMA operation to the SDMA at the same time.
And the SDMA will hang at this case.

This patch uses the bit operation to sync the DMA TX.

Also make it always wake up the process in the TX callback.

Signed-off-by: Huang Shijie <b32955@freescale.com>
ENGR00293488 ipu: vdi: Line noise is occurred when play 1080i MPEG2

It is a ipu vdi driver bug, in vdi_split_process function
wrong base offset address is setting and video data will be
copy to wrong place in framebuffer.

Correct the physical address to virtual address transfer and
add cache flush function, the issue is fixed.

Signed-off-by: Sandor Yu <R01008@freescale.com>
ENGR00296249 sata: cr-rst workaround sata phy link issues

- add sata phy cr(offset:0x7f3f) reset in sata resume to
workaround imx6q sata kinds of suspend resume link
issues.
- add sata phy cr reset during imx6q sata initialization,
to initialize the sata phy to be an initialized state.
- add about 100us delay between mpll_clk enable and cr-rst,
make sure that the mpll_clk is stable.
- add about 100us delay between cr-rst and waiting for rx_pll
stable too, make sure that the cr-rst is finished.
- make sure mpll_clk enable(bit1 of gpr13) is cleared,
before set it, otherwise, the sata phy link maybe failed
when some devices are used.
In order to level the compatibility:
- enable the ssc support(bit14 of gpr13)
- change the TX boost control(bit10~7) from 0dB to be the
default value 3.33dB.

Signed-off-by: Richard Zhu <r65037@freescale.com>
ENGR00291667-02 net:fec_ptp: fix the potential issue for storing timestamp

The timestamps generated in the i.MX drivers are generated by the
nanoseconds part coming from the 1588 clock. But the number of seconds
are maintained in a private structure of the interface. Those are
updated in a 1588 clock rollover interrupt.

The timestamp is generated right before a rollover of a second and the
timestamp value is constructed afterwards. Therefore the bigger part of
the timestamp is wrong (the second).

So, the patch Suggested solution (pseudo-code):
  If( actual-time.nsec < timestamp.nsec &&
        !FEC_IEVENT[TS_TIMER] )
            Timestamp.sec = fpp->prtc -1;
  Else
            Timestamp.sec = fpp->prtc;

(cherry picked from kernel 3.10.17
 commit 430dc3830e80a749666f9eb2aa9feba55823c6eb)

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 536d730bf2394bbe77e3256087b611477e0fc769)
ENGR00291667-01 net:fec: reinit multicast address when fec restart

Ptp multicast packet receive does not work after Ethernet link is lost
for a short time and then reconnected again. Because fec call restart()
to reset all multicast when cable hotplug.
(cherry picked from commit adfa64f0c2bf35f8b902ae5700f97e7e11ae1794)

Signed-off-by: Fugang Duan  <B38611@freescale.com>
(cherry picked from commit 57a3f0b6888dfa2a59c7f1b738badbec342b2d10)