From 1333a1ff082cbaec4a44cefaf84d1bcc03ba1510 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 6b447845fe26..55b867ff1b17 100644 --- a/arch/arm/mach-aspeed/ast2600/platform.S +++ b/arch/arm/mach-aspeed/ast2600/platform.S @@ -210,6 +210,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] @@ -235,6 +241,17 @@ wait_lock: b 1f 0: + /* 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