From 6c19559f4c6d0697f9c9c7706970ce70bb3d64c6 Mon Sep 17 00:00:00 2001 From: merge Date: Wed, 3 Dec 2008 09:23:13 +0000 Subject: MERGE-via-pending-tracking-hist-MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-MERGE-via-master pending-tracking-hist top was MERGE-via-stable-tracking-MERGE-via-mokopatches-tracking-MERGE-via-master / 6b5c5358de92f78cbdf6cf76eceec2b470ee6f59 ... parent commitmessage: From: merge MERGE-via-stable-tracking-hist-MERGE-via-mokopatches-tracking-MERGE-via-master stable-tracking-hist top was MERGE-via-mokopatches-tracking-MERGE-via-master / 93854082272f850a9faee81c74310030e837a5ae ... parent commitmessage: From: merge MERGE-via-mokopatches-tracking-hist-MERGE-via-master mokopatches-tracking-hist top was MERGE-via-master / c3ec0335ef762adf82547202a675bfb653eb99bb ... parent commitmessage: From: merge MERGE-via-master- master top was / 5221720118174d16dbfdbb63668d2b533ae50101 ... parent commitmessage: From: Andy Green fix-wm8753-DBG.patch Signed-off-by: Andy Green --- arch/arm/plat-s3c/include/plat/uncompress.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'arch/arm/plat-s3c/include/plat') diff --git a/arch/arm/plat-s3c/include/plat/uncompress.h b/arch/arm/plat-s3c/include/plat/uncompress.h index eeef32c4312..6061de87f22 100644 --- a/arch/arm/plat-s3c/include/plat/uncompress.h +++ b/arch/arm/plat-s3c/include/plat/uncompress.h @@ -139,6 +139,28 @@ static void arch_decomp_error(const char *x) static void error(char *err); +#ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO +static inline void arch_enable_uart_fifo(void) +{ + u32 fifocon = uart_rd(S3C2410_UFCON); + + if (!(fifocon & S3C2410_UFCON_FIFOMODE)) { + fifocon |= S3C2410_UFCON_RESETBOTH; + uart_wr(S3C2410_UFCON, fifocon); + + /* wait for fifo reset to complete */ + while (1) { + fifocon = uart_rd(S3C2410_UFCON); + if (!(fifocon & S3C2410_UFCON_RESETBOTH)) + break; + } + } +} +#else +#define arch_enable_uart_fifo() do { } while(0) +#endif + + static void arch_decomp_setup(void) { @@ -149,6 +171,12 @@ arch_decomp_setup(void) arch_detect_cpu(); arch_decomp_wdog_start(); + + /* Enable the UART FIFOs if they where not enabled and our + * configuration says we should turn them on. + */ + + arch_enable_uart_fifo(); } -- cgit v1.2.3