atmel_lcdfb: LCDC startup fix
atmel_lcdfb: LCDC startup fix

This patch adds an additional loop, that delays turning off the DMA
until the LCDC core has been turned off. This prevents the picture
to be shifted some random length when the kernel re-initializes
the LCDC.

Without this patch, the LCDC keeps running for some small time after the
PWRCON:LCD_PWR has been cleared ; the FIFO suffers an underrun and on
re-starting the LCDC the FIFO data stays shifted.

This behavior has been seen and fixed on AT91SAM9261-EK and two custom
AT91SAM9261 boards, all of them having different LCD panels.

Thanks a lot to Anti Sullin for submitting this patch (long
time ago).

Signed-off-by: Anti Sullin <85ea49cdea06d3f107fe899ac90ba1e2fea77eab@artecdesign.ee>
Signed-off-by: Andrew Victor <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@sanpeople.com>
Signed-off-by: Nicolas Ferre <45b517be0e5ec6dc3a39715767c1d18e090d39b4@atmel.com>
Acked-by: Haavard Skinnemoen <de7418319212d7eab32260a76732c1f83e514852@atmel.com>
Cc: "Antonino A. Daplas" <be03a811842969f6b435f66cb85a30eb479a8702@pol.net>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs