diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-14 08:26:52 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-02-14 16:30:13 +0100 |
commit | 9bdef9e7f2955728dddc189b03d587e42c950ce3 (patch) | |
tree | 4df148d07b8da00d7d908d42f1f22debdd3fa1a7 /include/mci.h | |
parent | 403fbbbc3411a3dccc80f0c0798b0c2c9924eda9 (diff) | |
download | barebox-9bdef9e7f2955728dddc189b03d587e42c950ce3.tar.gz barebox-9bdef9e7f2955728dddc189b03d587e42c950ce3.tar.xz |
mci: Fix version handling
Currently the version defines reflect the digits in the version
number. MMC_VERSION_4_41 is defined as 0x441 and MMC_VERSION_4_5
is defined as 0x405. This results in MMC_VERSION_4_5 < MMC_VERSION_4_41
becoming true which was surely not intended. Fix this by
redefining the versions as 0x<major><minor><micro>. This makes the
string generation more complicated but makes versions comparable
again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/mci.h')
-rw-r--r-- | include/mci.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/mci.h b/include/mci.h index 40a712b4dc..cd3e2c2870 100644 --- a/include/mci.h +++ b/include/mci.h @@ -33,21 +33,21 @@ #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 | 0x10a) +#define SD_VERSION_1_10 (SD_VERSION_SD | 0x1a0) /* Firmware revisions for MMC cards */ #define MMC_VERSION_MMC 0x10000 #define MMC_VERSION_UNKNOWN (MMC_VERSION_MMC) -#define MMC_VERSION_1_2 (MMC_VERSION_MMC | 0x102) -#define MMC_VERSION_1_4 (MMC_VERSION_MMC | 0x104) -#define MMC_VERSION_2_2 (MMC_VERSION_MMC | 0x202) +#define MMC_VERSION_1_2 (MMC_VERSION_MMC | 0x120) +#define MMC_VERSION_1_4 (MMC_VERSION_MMC | 0x140) +#define MMC_VERSION_2_2 (MMC_VERSION_MMC | 0x220) #define MMC_VERSION_3 (MMC_VERSION_MMC | 0x300) #define MMC_VERSION_4 (MMC_VERSION_MMC | 0x400) -#define MMC_VERSION_4_1 (MMC_VERSION_MMC | 0x401) -#define MMC_VERSION_4_2 (MMC_VERSION_MMC | 0x402) -#define MMC_VERSION_4_3 (MMC_VERSION_MMC | 0x403) -#define MMC_VERSION_4_41 (MMC_VERSION_MMC | 0x429) -#define MMC_VERSION_4_5 (MMC_VERSION_MMC | 0x405) +#define MMC_VERSION_4_1 (MMC_VERSION_MMC | 0x410) +#define MMC_VERSION_4_2 (MMC_VERSION_MMC | 0x420) +#define MMC_VERSION_4_3 (MMC_VERSION_MMC | 0x430) +#define MMC_VERSION_4_41 (MMC_VERSION_MMC | 0x441) +#define MMC_VERSION_4_5 (MMC_VERSION_MMC | 0x450) #define MMC_CAP_SPI (1 << 0) #define MMC_CAP_4_BIT_DATA (1 << 1) |