Made spi speed configurable

main
Alexander Böhm 2022-06-10 13:35:18 +02:00
parent 4a9d00fa42
commit 195fec33cd
1 changed files with 3 additions and 2 deletions

View File

@ -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}