From d7cdcbd4222ef3ad6d532c1034f4649432b0a69d 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 aaacb61a1f8b..7e6787e5c6db 100644 --- a/arch/arm/mach-aspeed/ast2600/platform.S +++ b/arch/arm/mach-aspeed/ast2600/platform.S @@ -213,6 +213,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] @@ -251,6 +257,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