diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-23 04:40:54 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 19:39:42 +0300 |
commit | 194ff4f1f5d44b12e9cb06ddafa6adb20174a13c (patch) | |
tree | 823835cd29daf8901a31ac14c7e6534abf199be3 /meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings | |
parent | 4feb727cd6b77a68bdaca63e121b378d814f5eaf (diff) | |
download | openbmc-194ff4f1f5d44b12e9cb06ddafa6adb20174a13c.tar.xz |
[Subtree] Bring openbmc machines to top level
The new subtree model brings the subtrees up from the openbmc-machines
layer.
Change-Id: I58a03ae1be374bc79ae1438e65e888375d12d0c0
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings')
-rw-r--r-- | meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings deleted file mode 100644 index d75d4b74d..000000000 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/hostboot-settings/hb_settings +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/sh -# Copyright 2018 IBM Corp -# SPDX-License-Identifier: Apache-2.0 -# Authored May 2018, Joel Stanley <joel@jms.id.au> -# -# This script sets the SIO scratch registers 0x2D in order to configure -# hostboot. It supports boot flags v1 as defined in hostboot source: -# src/usr/initservice/bootconfig/bootconfig_ast2400.C -# src/usr/console/ast2400.C -# -# BOOT_FLAGS_VERSION_REG = 0x28, -# Serial config reg: 0x2d -# Serial config mask: 0xc0 -# -# NONE = 0x00, // No output selected -# SELECT_SUART = 0x40, // SIO Uart -# SELECT_VUART = 0x80, // SOL virtual uart -# RESERVED = 0xc0, // Reserved - - -SYSFS_SIO=/sys/devices/platform/ahb/ahb:apb/1e789000.lpc/1e789080.lpc-host/1e789080.lpc-host:regs -SYSFS_SIO28=$SYSFS_SIO/sio_28 -SYSFS_SIO2D=$SYSFS_SIO/sio_2d - -FLAGS_VERSION1=$((0x42)) - -usage() -{ - echo "usage: hb_settings [[-u|--uart vuart|suart|none] | [-s|--show] | [-h]]" -} - -show_regs() -{ - SIO28=$(cat $SYSFS_SIO28) - SIO2D=$(cat $SYSFS_SIO2D) - - case $SIO28 in - $FLAGS_VERSION1) - echo "Boot flags version 1" - ;; - * ) - echo "Unknown boot flags version" - ;; - esac - - case $(($SIO2D >> 6)) in - 0) - echo "Hostboot serial output disabled" - ;; - 1) - echo "Hostboot serial output on SUART" - ;; - 2) - echo "Hostboot serial output on VUART" - ;; - 3) - echo "Reserved value" - ;; - * ) - echo "Invalid uart value" - ;; - esac -} - -set_regs() -{ - case $uart in - suart) - echo "Hostboot serial output on SUART" - VAL=0x40 - ;; - vuart) - echo "Hostboot serial output on VUART" - VAL=0x80 - ;; - none) - echo "Hostboot serial output disabled" - VAL=0x00 - ;; - * ) - echo "Invalid uart value" - usage - exit 1 - esac - - echo $FLAGS_VERSION1 > $SYSFS_SIO28 - echo $VAL > $SYSFS_SIO2D -} - -while [ "$1" != "" ]; do - case $1 in - -u | --uart) shift - uart=$1 - set_regs - exit - ;; - -s | --show ) show_regs - exit - ;; - -h | --help ) usage - exit - ;; - * ) usage - exit 1 - esac - shift -done - -usage -exit 0 |