summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2019-01-30 09:51:42 -0800
committerchrome-bot <chrome-bot@chromium.org>2019-01-31 18:19:15 -0800
commite11ae2cfca63a900e7efff07abc112b57dce4eb2 (patch)
treef91ddd5fe12fb7048f5e703d86aa7d45623052fd
parentbe4160a3ed1e7f88432ea6552d61fad3642acf0e (diff)
downloadchrome-ec-e11ae2cfca63a900e7efff07abc112b57dce4eb2.tar.gz
flash_fp_mcu: use bash per style guide and remove unused config
https://www.chromium.org/chromium-os/shell-style-guidelines BRANCH=nocturne,nami BUG=none TEST=flash_fp_mcu /opt/google/biod/fw/nocturne_fp_v2.2.110-b936c0a3c.bin Change-Id: Ic95ab83bf436f3b4bb3af93cc543da07f053fd82 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1446535 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
-rwxr-xr-xboard/nami_fp/flash_fp_mcu6
-rwxr-xr-xboard/nocturne_fp/flash_fp_mcu20
2 files changed, 6 insertions, 20 deletions
diff --git a/board/nami_fp/flash_fp_mcu b/board/nami_fp/flash_fp_mcu
index 23af0bcaec..e7adeb017e 100755
--- a/board/nami_fp/flash_fp_mcu
+++ b/board/nami_fp/flash_fp_mcu
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -6,7 +6,7 @@
# Kabylake PCH GPIOs
KBL_GPIOCHIP="gpiochip360"
-if [ -e "/sys/class/gpio/${KBL_GPIOCHIP}" ]; then
+if [[ -e "/sys/class/gpio/${KBL_GPIOCHIP}" ]]; then
# Ekko configuration
echo "NOTE: For use with updating FP MCU on NAMI boards only"
SPIDEV="/dev/spidev32765.0"
@@ -23,7 +23,7 @@ else
exit 1
fi
-if [ ! -f "$1" ]; then
+if [[ ! -f "$1" ]]; then
echo "Invalid image file: $1"
echo "Usage: $0 ec.bin"
exit 1
diff --git a/board/nocturne_fp/flash_fp_mcu b/board/nocturne_fp/flash_fp_mcu
index 0fc40b7d12..09a364bc65 100755
--- a/board/nocturne_fp/flash_fp_mcu
+++ b/board/nocturne_fp/flash_fp_mcu
@@ -1,26 +1,12 @@
-#!/bin/sh
+#!/bin/bash
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# Cannonlake PCH GPIOs
-CNL_GPIOCHIP="gpiochip268"
# Kabylake PCH GPIOs
KBL_GPIOCHIP="gpiochip360"
-if [ -e "/sys/class/gpio/${CNL_GPIOCHIP}" ]; then
- # Meowth configuration
-
- SPIDEV="/dev/spidev1.0"
- # GSPI1 ACPI device for FP MCU
- SPIID="spi-PRP0001:01"
- # FPMCU RST_ODL is on GPP_A23 = 268 + 23 = 291
- GPIO_NRST=291
- # FPMCU BOOT0 is on GPP_A21 = 268 + 21 = 289
- GPIO_BOOT0=289
- # FP_PWR_EN is on GPP_A11 = 268 + 11 = 279
- GPIO_PWREN=279
-elif [ -e "/sys/class/gpio/${KBL_GPIOCHIP}" ]; then
+if [[ -e "/sys/class/gpio/${KBL_GPIOCHIP}" ]]; then
# Nocturne configuration
SPIDEV="/dev/spidev32765.0"
@@ -37,7 +23,7 @@ else
exit 1
fi
-if [ ! -f "$1" ]; then
+if [[ ! -f "$1" ]]; then
echo "Invalid image file: $1"
echo "Usage: $0 ec.bin"
exit 1