summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrent Piepho <tpiepho@kymetacorp.com>2016-05-31 19:58:56 +0000
committerSascha Hauer <s.hauer@pengutronix.de>2016-06-07 08:06:43 +0200
commitedb96cf3d72920d428cef39a80dffb131d67e696 (patch)
treee1f2fb6e12974d0238147dbcffb1268abc02d3a5 /include
parent17f77702e5546021c1a5c55de31d2559c9abae50 (diff)
downloadbarebox-edb96cf3d72920d428cef39a80dffb131d67e696.tar.gz
barebox-edb96cf3d72920d428cef39a80dffb131d67e696.tar.xz
mci: Fix version numbers again
The SD and eMMC version numbers are a pain to print and sort, since they are inconsistent in if a two digit minor version shdoulde be treated as a single number or as minor and micro version numbers. This allows version 1.10 and 4.5 and 4.41, where 41 is less than 5. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/mci.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mci.h b/include/mci.h
index 174d15022a..0370547b0f 100644
--- a/include/mci.h
+++ b/include/mci.h
@@ -30,11 +30,16 @@
#include <block.h>
#include <regulator.h>
+/* These codes should be sorted numerically in order of newness. If the last
+ * nybble is a zero, it will not be printed. So 0x120 -> "1.2" and 0x123 ->
+ * "1.23", 0x1a0 -> "1.10", 0x1b0 and 0x111 -> "1.11" but sort differently.
+ * It's not possible to create "1.20". */
+
/* Firmware revisions for SD cards */
#define SD_VERSION_SD 0x20000
-#define SD_VERSION_2 (SD_VERSION_SD | 0x200)
#define SD_VERSION_1_0 (SD_VERSION_SD | 0x100)
#define SD_VERSION_1_10 (SD_VERSION_SD | 0x1a0)
+#define SD_VERSION_2 (SD_VERSION_SD | 0x200)
/* Firmware revisions for MMC cards */
#define MMC_VERSION_MMC 0x10000