summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-06-14 09:13:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-06-14 09:13:41 +0200
commit6bfb591cc11ddc297ac8dcb0fc4ecab310ee6b1e (patch)
treef91bbc3b151cd0bb3065fcfc1330ba393a83fd26 /include
parent336dcea5a1f07885ce787a74b928604dd8e2645e (diff)
parentad741d94b31bcba922e69d1a325d50eaaccf0080 (diff)
downloadbarebox-6bfb591cc11ddc297ac8dcb0fc4ecab310ee6b1e.tar.gz
barebox-6bfb591cc11ddc297ac8dcb0fc4ecab310ee6b1e.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'include')
-rw-r--r--include/crypto/crc.h16
-rw-r--r--include/digest.h1
-rw-r--r--include/mci.h7
3 files changed, 23 insertions, 1 deletions
diff --git a/include/crypto/crc.h b/include/crypto/crc.h
new file mode 100644
index 0000000000..6428634d0a
--- /dev/null
+++ b/include/crypto/crc.h
@@ -0,0 +1,16 @@
+/*
+ * Common values for CRC algorithms
+ */
+
+#ifndef _CRYPTO_CRC_H
+#define _CRYPTO_CRC_H
+
+#include <linux/types.h>
+
+#define CRC32_DIGEST_SIZE 4
+
+struct crc32_state {
+ ulong crc;
+};
+
+#endif
diff --git a/include/digest.h b/include/digest.h
index fe30cc27e0..4552e58255 100644
--- a/include/digest.h
+++ b/include/digest.h
@@ -41,6 +41,7 @@ enum hash_algo {
HASH_ALGO_TGR_128,
HASH_ALGO_TGR_160,
HASH_ALGO_TGR_192,
+ HASH_ALGO_CRC32,
HASH_ALGO__LAST
};
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