From 195fec33cdeae79bbc7415b7f7e397fbfacbc02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20B=C3=B6hm?= Date: Fri, 10 Jun 2022 13:35:18 +0200 Subject: [PATCH] Made spi speed configurable --- ap105-flash | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ap105-flash b/ap105-flash index fe532bb..33be2e9 100755 --- a/ap105-flash +++ b/ap105-flash @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e @@ -7,8 +7,9 @@ if [ -z "${SN}" ] ; then echo A non empty serial number is required as first argument fi +SPEED=${SPEED=16500} CHIP="MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F" -DEV="linux_spi:dev=/dev/spidev0.0,spispeed=16500" +DEV="linux_spi:dev=/dev/spidev0.0,spispeed=${SPEED}" echo "Testing for a flash chip" flashrom -p ${DEV} -c ${CHIP}