Added SD Card page

This commit is contained in:
Aditya Prayoga 2018-12-13 01:46:52 +08:00
parent 47a94ffb29
commit 0231b2bd89
18 changed files with 623 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1,34 @@
From 76fa8b1b9cd666312ade19e01de7c4a4103efe9b Mon Sep 17 00:00:00 2001
Message-Id: <76fa8b1b9cd666312ade19e01de7c4a4103efe9b.1544609988.git.aditya@kobol.io>
From: Aditya Prayoga <aditya@kobol.io>
Date: Wed, 12 Dec 2018 15:02:16 +0800
Subject: [PATCH] arm: dts: armada-388-helios4: Enable High Speed and UHS-I
support
Enable High Speed and UHS-I mode support on SD card controller as
specified by Functional Specification document.
Signed-off-by: Aditya Prayoga <aditya@kobol.io>
---
arch/arm/boot/dts/armada-388-helios4.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/armada-388-helios4.dts b/arch/arm/boot/dts/armada-388-helios4.dts
index 705adfa..23785ec 100644
--- a/arch/arm/boot/dts/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/armada-388-helios4.dts
@@ -253,6 +253,11 @@
status = "okay";
vmmc = <&reg_3p3v>;
wp-inverted;
+ cap-sd-highspeed;
+ sd-uhs-sdr12;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-ddr50;
};
usb@58000 {
--
2.7.4

View file

@ -0,0 +1,47 @@
#!/bin/bash
get_flash_information() {
# http://www.bunniestudios.com/blog/?page_id=1022
while read Device ; do
DeviceNode="${Device%/*}"
DeviceName="${DeviceNode##*/}"
echo -e "\n### ${DeviceName} info:\n"
find "${DeviceNode}" -maxdepth 1 -type f | while read ; do
NodeName="${REPLY##*/}"
echo -e "$(printf "%20s" ${NodeName}): $(cat "${DeviceNode}/${NodeName}" | tr '\n' " ")"
done
oem=$(cat ${DeviceNode}/name)
CardName="${DeviceName}-[${oem//[^a-zA-Z0-9]/_}]"
done <<< $(find /sys -name oemid)
} # get_flash_information
get_flash_information > card_info.txt
LOGFILE="SD_test_${CardName}_$(date +%Y%m%d_%H%M%S).log"
[[ -d /mnt/sdcard ]] || mkdir -p /mnt/sdcard
mount /dev/mmcblk0p1 /mnt/sdcard
result=$?
if [[ $result -ne 0 ]]; then
echo "failed to mount SD card. Stopped the test"
exit 1
fi
cat card_info.txt | tee -a $LOGFILE
rm -f card_info.txt
echo -e "\n\n===============================\n\n" >> $LOGFILE
echo "Start benchmarking ..." | tee -a ${LOGFILE}
echo "Please wait"
echo -e "\n\n1st run\n\n" | tee -a ${LOGFILE}
iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 -f /mnt/sdcard/iozone-test.dat | tee -a ${LOGFILE}
echo -e "\n\n===============================\n\n" >> $LOGFILE
echo -e "\n\n2nd run\n\n" | tee -a ${LOGFILE}
iozone -e -I -a -s 100M -r 4k -r 16k -r 512k -r 1024k -r 16384k -i 0 -i 1 -i 2 -f /mnt/sdcard/iozone-test.dat | tee -a ${LOGFILE}
echo -e "\n\n===============================\n\n" >> $LOGFILE
umount /mnt/sdcard
echo "Done" | tee -a ${LOGFILE}