summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0018-Add-a-workaround-to-cover-VGA-memory-size-bug-in-A0.patch
blob: 66a1b564edaf074f73d4b91d5756033c684ffc5d (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
44
45
46
47
48
49
50
51
52
From 2f4d7260a4ab0eb33d1145cd640019aa1fa1414a Mon Sep 17 00:00:00 2001
From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
Date: Thu, 18 Jun 2020 15:08:57 -0700
Subject: [PATCH] Add a workaround to cover VGA memory size bug in A0

AST2600 A0 has a silicon bug which requires setting of VGA memory
size limit. This commit add VGA memory size setting of 8MB for A0
and 16MB for A1.

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

diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
index eac52db538b0..cf709aaa5d98 100644
--- a/arch/arm/mach-aspeed/ast2600/platform.S
+++ b/arch/arm/mach-aspeed/ast2600/platform.S
@@ -212,6 +212,12 @@ do_primary_core_setup:
 
 	bne	0f
 
+	/* limit VGA memory size to 8MB (A0 bug) */
+	ldr	r0, =AST_SCU_HW_STRAP1_CLR
+	movw	r1, #0x6000
+	movt	r1, #0x0000
+	str	r1, [r0]
+
 	/* tune up CPU clocks (A0 only) */
 	ldr	r0, =AST_SCU_HW_STRAP1
 	ldr	r1, [r0]
@@ -250,6 +256,17 @@ wait_lock:
 	bne	2f
 
 1:
+	/* set VGA memory size to 16MB (A1 only) */
+	ldr	r0, =AST_SCU_HW_STRAP1_CLR
+	movw	r1, #0x4000
+	movt	r1, #0x0000
+	str	r1, [r0]
+
+	ldr	r0, =AST_SCU_HW_STRAP1
+	ldr	r1, [r0]
+	orr	r1, #0x2000
+	str	r1, [r0]
+
 	/* disable DMA arbitration on MAC1 (A1 bug) */
 	ldr	r0, =AST_MAC1_CTRL2
 	ldr	r1, [r0]
-- 
2.17.1