summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch')
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch
new file mode 100644
index 000000000..6196551a2
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0009-AST2600-Disable-DMA-arbitration-options-on-MAC1-and-.patch
@@ -0,0 +1,57 @@
+From 970a7c3b21e7264bb6ada434652795b5ce947ac7 Mon Sep 17 00:00:00 2001
+From: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+Date: Tue, 31 Mar 2020 13:28:31 -0700
+Subject: [PATCH] AST2600: Disable DMA arbitration options on MAC1 and MAC2
+
+Aspeed added 2 new options to DMA arbitration in AST2600A1 MAC1
+and MAC2 but it has a bug in A1 so it might cause the MAC hang if
+we enable these 2 new options.
+Option 1: Round Robin, register MAC58[27]
+Option 2: Tx Valid, register MAC58[28]
+
+So this commit disables options above.
+
+Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo@intel.com>
+---
+ arch/arm/mach-aspeed/ast2600/platform.S | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/arch/arm/mach-aspeed/ast2600/platform.S b/arch/arm/mach-aspeed/ast2600/platform.S
+index e479d0276d39..aaacb61a1f8b 100644
+--- a/arch/arm/mach-aspeed/ast2600/platform.S
++++ b/arch/arm/mach-aspeed/ast2600/platform.S
+@@ -58,6 +58,12 @@
+ #define AST_FMC_WDT1_CTRL_MODE (AST_FMC_BASE + 0x060)
+ #define AST_FMC_WDT2_CTRL_MODE (AST_FMC_BASE + 0x064)
+
++#define AST_MAC1_BASE (0x1E660000)
++#define AST_MAC1_CTRL2 (AST_MAC1_BASE + 0x058)
++
++#define AST_MAC2_BASE (0x1E680000)
++#define AST_MAC2_CTRL2 (AST_MAC2_BASE + 0x058)
++
+ #define AST_GPIO_BASE (0x1E780000)
+ #define AST_GPIOYZ_DATA_VALUE (AST_GPIO_BASE + 0x1E0)
+
+@@ -245,6 +251,18 @@ wait_lock:
+ bne 2f
+
+ 1:
++ /* disable DMA arbitration on MAC1 (A1 bug) */
++ ldr r0, =AST_MAC1_CTRL2
++ ldr r1, [r0]
++ orr r1, #0x18000000
++ str r1, [r0]
++
++ /* disable DMA arbitration on MAC2 (A1 bug) */
++ ldr r0, =AST_MAC2_CTRL2
++ ldr r1, [r0]
++ orr r1, #0x18000000
++ str r1, [r0]
++
+ /* LPC/eSPI mode selection by SW (AST2600/AST2620 A1 only) */
+ ldr r0, =AST_GPIOYZ_DATA_VALUE
+ ldr r0, [r0]
+--
+2.17.1
+