From 70b1434ad7ac69160014397fcee464c2f993909f Mon Sep 17 00:00:00 2001 From: Craig Hesling Date: Thu, 15 Jul 2021 02:10:02 -0400 Subject: Revert "flash_fp_mcu: Add debug spi bytes activity" This reverts commit 9a40c7dbadf8c577660a09807287d9133373803b. This change turned out to not be very useful and non-functional on kernel v4.4. BRANCH=none BUG=b:190744837 TEST=none Change-Id: If5d51e0240f93b43410040e99eb48cb5e080f0e3 Signed-off-by: Craig Hesling Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3027128 Reviewed-by: Patryk Duda Reviewed-by: Jora Jacobi --- util/flash_fp_mcu | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'util') diff --git a/util/flash_fp_mcu b/util/flash_fp_mcu index 4f788bbcd4..a2f7b118a8 100644 --- a/util/flash_fp_mcu +++ b/util/flash_fp_mcu @@ -133,24 +133,6 @@ warn_gpio() { fi } -# TODO(b/190744837): Remove when "Device or resource busy" bug is resolved. -print_spi_bytes() { - local label="$1" - - local timestamp - local deviceid - local bytes_rx - local bytes_tx - - if [[ "${TRANSPORT}" == "SPI" ]]; then - timestamp="$(date)" - deviceid="$(get_spiid)" - bytes_rx="$(cat "/sys/bus/spi/devices/${deviceid}/statistics/bytes_rx")" - bytes_tx="$(cat "/sys/bus/spi/devices/${deviceid}/statistics/bytes_tx")" - echo "${label}: SPI Bytes (${timestamp}): ${bytes_rx} RX and ${bytes_tx} TX" - fi -} - # Taken verbatim from # https://chromium.googlesource.com/chromiumos/docs/+/master/lsb-release.md#shell # This should not be used by anything except get_platform_name. @@ -316,9 +298,6 @@ flash_fp_mcu_stm32() { gpio 1 "${gpio_pwren}" fi - # TODO(b/190744837): Remove when "Device or resource busy" bug is resolved. - print_spi_bytes C - # Remove cros_fp if present if [[ "${transport}" == "UART" ]]; then echo "${deviceid}" > /sys/bus/serial/drivers/cros-ec-uart/unbind @@ -335,9 +314,6 @@ flash_fp_mcu_stm32() { gpio 0 "${gpio_nrst}" sleep 0.001 - # TODO(b/190744837): Remove when "Device or resource busy" bug is resolved. - print_spi_bytes D - if [[ "${transport}" == "UART" ]]; then # load AMDI0020:01 ttyS1 echo AMDI0020:01 > /sys/bus/platform/drivers/dw-apb-uart/unbind; @@ -350,9 +326,6 @@ flash_fp_mcu_stm32() { fi sleep 0.5 - # TODO(b/190744837): Remove when "Device or resource busy" bug is resolved. - print_spi_bytes E - # We do not expect the drivers to change the pin state when binding. # If you receive this warning, the driver needs to be fixed on this board # and this flash attempt will probably fail. @@ -629,18 +602,12 @@ main() { exit "${EXIT_CONFIG}" fi - # TODO(b/190744837): Remove when "Device or resource busy" bug is resolved. - print_spi_bytes A - if [[ "${FLAGS_services}" -eq "${FLAGS_TRUE}" ]]; then echo "# Stopping biod and timberslide" stop biod stop timberslide LOG_PATH=/sys/kernel/debug/cros_fp/console_log fi - # TODO(b/190744837): Remove when "Device or resource busy" bug is resolved. - print_spi_bytes B - # If cros-ec driver isn't bound on startup, this means the final rebinding # may fail. if [[ ! -c "/dev/cros_fp" ]]; then -- cgit v1.2.1