[U-Boot] [PATCH 2/3] x86: BayTrail: Add function to disable the internal legacy UART
Stefan Roese
sr at denx.de
Mon Jan 18 10:56:57 CET 2016
Some BayTrail boards may want to use a different legacy UART than the
internal one. E.g. one provided by a Winbond Super IO chip, like the
W83627. This patch adds a function to disable this BayTrail internal
UART for this purpose.
Signed-off-by: Stefan Roese <sr at denx.de>
Cc: Bin Meng <bmeng.cn at gmail.com>
Cc: Simon Glass <sjg at chromium.org>
---
arch/x86/cpu/baytrail/early_uart.c | 9 +++++++++
arch/x86/include/asm/u-boot-x86.h | 3 +++
2 files changed, 12 insertions(+)
diff --git a/arch/x86/cpu/baytrail/early_uart.c b/arch/x86/cpu/baytrail/early_uart.c
index b64a3a9..716783c 100644
--- a/arch/x86/cpu/baytrail/early_uart.c
+++ b/arch/x86/cpu/baytrail/early_uart.c
@@ -76,3 +76,12 @@ int setup_early_uart(void)
return 0;
}
+
+int disable_internal_uart(void)
+{
+ /* Disable the legacy UART hardware. */
+ x86_pci_write_config32(PCI_DEV_CONFIG(0, LPC_DEV, LPC_FUNC), UART_CONT,
+ 0);
+
+ return 0;
+}
diff --git a/arch/x86/include/asm/u-boot-x86.h b/arch/x86/include/asm/u-boot-x86.h
index dbf8e95..0c95796 100644
--- a/arch/x86/include/asm/u-boot-x86.h
+++ b/arch/x86/include/asm/u-boot-x86.h
@@ -47,6 +47,9 @@ int default_print_cpuinfo(void);
/* Set up a UART which can be used with printch(), printhex8(), etc. */
int setup_early_uart(void);
+/* Disable the internal legacy UART */
+int disable_internal_uart(void);
+
void setup_pcat_compatibility(void);
void isa_unmap_rom(u32 addr);
--
2.6.5
More information about the U-Boot
mailing list