#!/bin/sh # Talos II VRM sanity check # Check for errors reported by the FPGA # If errors were found, dump what data we can. # check for err_found status=$(i2cget -y 12 0x31 0x7) if [ "$status" == "0x4" ]; then reg1=$(i2cget -y 12 0x31 0x18) reg2=$(i2cget -y 12 0x31 0x19) echo "FPGA reported error!" echo "status: $status reg1: $reg1 reg2: $reg2" echo "Current VRM settings (if available):" vrm-control.sh vdda vcsa vdna vioa vddb vcsb vdnb viob exit 1 fi exit 0