From 2f4d7260a4ab0eb33d1145cd640019aa1fa1414a Mon Sep 17 00:00:00 2001 From: Jae Hyun Yoo 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 --- 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