All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] x86: fsp: Disable legacy internal UART if necessary
Date: Mon, 18 Jan 2016 10:56:58 +0100	[thread overview]
Message-ID: <1453111018-27744-3-git-send-email-sr@denx.de> (raw)
In-Reply-To: <1453111018-27744-1-git-send-email-sr@denx.de>

The FSP enables the BayTrail internal UART (again). Boards that don't use
this UART but an external one instead (e.g. provided by a Super IO chip)
need to disable this internal UART. So that the one from the Super IO
chip can be used. This patch adds the necessary code, to disable the
internal legacy UART if the Winbond Super IO chip is enabled.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
---
 arch/x86/lib/fsp/fsp_support.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/x86/lib/fsp/fsp_support.c b/arch/x86/lib/fsp/fsp_support.c
index 875c96a..8114b81 100644
--- a/arch/x86/lib/fsp/fsp_support.c
+++ b/arch/x86/lib/fsp/fsp_support.c
@@ -89,6 +89,13 @@ struct fsp_header *__attribute__((optimize("O0"))) find_fsp_header(void)
 
 void fsp_continue(u32 status, void *hob_list)
 {
+	/*
+	 * The FSP enables the BayTrail internal legacy UART (again).
+	 * Disable it again, so that the Winbond one can be used.
+	 */
+	if (IS_ENABLED(CONFIG_WINBOND_W83627))
+		disable_internal_uart();
+
 	post_code(POST_MRC);
 
 	assert(status == 0);
@@ -114,6 +121,13 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
 	setup_early_uart();
 #endif
 
+	/*
+	 * To use the Winbond legacy UART (COM1), the BayTrail internal
+	 * legacy UART needs to get disabled first.
+	 */
+	if (IS_ENABLED(CONFIG_WINBOND_W83627))
+		disable_internal_uart();
+
 	fsp_hdr = find_fsp_header();
 	if (fsp_hdr == NULL) {
 		/* No valid FSP info header was found */
-- 
2.6.5

  parent reply	other threads:[~2016-01-18  9:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18  9:56 [U-Boot] [PATCH 1/3] misc: Add simple driver to enable the legacy UART on Winbond Super IO chips Stefan Roese
2016-01-18  9:56 ` [U-Boot] [PATCH 2/3] x86: BayTrail: Add function to disable the internal legacy UART Stefan Roese
2016-01-19  8:40   ` Bin Meng
2016-01-19  8:44     ` Bin Meng
2016-01-19  8:51       ` Stefan Roese
2016-01-19  9:29       ` Stefan Roese
2016-01-19 10:15         ` Bin Meng
2016-01-19 10:54           ` Stefan Roese
2016-01-19 11:02             ` Bin Meng
2016-01-19 13:06               ` Stefan Roese
2016-01-18  9:56 ` Stefan Roese [this message]
2016-01-19  8:40   ` [U-Boot] [PATCH 3/3] x86: fsp: Disable legacy internal UART if necessary Bin Meng
2016-01-19  9:21     ` Stefan Roese
2016-01-19  8:40 ` [U-Boot] [PATCH 1/3] misc: Add simple driver to enable the legacy UART on Winbond Super IO chips Bin Meng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453111018-27744-3-git-send-email-sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.