summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check')
-rwxr-xr-xmeta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check
new file mode 100755
index 000000000..31ed3dff7
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/ast-vga-disable/ast-vga-disable-check
@@ -0,0 +1,13 @@
+#!/bin/bash
+#
+# Copyright © 2018 Raptor Engineering, LLC
+
+FPGA_STATUS=$(i2cget -y 12 0x31 0x7)
+AST_VGA_DISABLE=$(( FPGA_STATUS & 0x40 ))
+if [[ $AST_VGA_DISABLE == 64 ]]; then
+ # On-board VGA disabled
+ devmem 0x1e6e207c 32 0x00008000
+else
+ # On-board VGA enabled
+ devmem 0x1e6e2070 32 0x00008000
+fi
OpenPOWER on IntegriCloud