summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0029-Set-UART-routing-in-lowlevel_init.patch
blob: 72be1a0b41db4ff047b9092ba303006ce2fac8a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 44321f61f0b0edbde3300cc43b2f3e9f9fd93d44 Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Mon, 26 Apr 2021 13:20:21 -0700
Subject: [PATCH] Set UART routing in lowlevel_init

This commit sets the UART routing back to default in lowlevel_init
to prevent any data dropping from the physical host serial until
SOL service is activated.

Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
---
 arch/arm/mach-aspeed/ast2600/platform.S | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
index e2fcb732b6a6..4cc22e31c604 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -80,6 +80,9 @@
 #define AST_GPIO_BASE		(0x1E780000)
 #define AST_GPIOYZ_DATA_VALUE	(AST_GPIO_BASE + 0x1E0)
 
+#define AST_LPC_BASE		0x1E789000
+#define AST_LPC_HICRA		(AST_LPC_BASE + 0x09C)
+
 /* Revision ID */
 #define REV_ID_AST2600A0	0x05000303
 #define REV_ID_AST2600A1	0x05010303
@@ -433,6 +436,11 @@ skip_fill_wip_bit:
 	moveq	r1, #0xff
 	str	r1, [r0]
 
+	/* set UART routing back to default */
+	ldr	r0, =AST_LPC_HICRA
+	ldr	r1, =0x0
+	str	r1, [r0]
+
 	/* relocate mailbox insn. for cpuN polling SMP go signal */
 	adrl	r0, mailbox_insn
 	adrl	r1, mailbox_insn_end
-- 
2.17.1