summaryrefslogtreecommitdiffstats
path: root/include/mtd
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2015-10-23 16:50:51 +0100
committerStefan Roese <sr@denx.de>2015-10-27 11:51:53 +0100
commit622b95274e4d699f3c713c325e958565312625ad (patch)
tree28ec0682890f858c4d434b166a70ca04f67bf4eb /include/mtd
parent677f970bc62a661690b3431543d5a5d5e682ba70 (diff)
downloadblackbird-obmc-uboot-622b95274e4d699f3c713c325e958565312625ad.tar.gz
blackbird-obmc-uboot-622b95274e4d699f3c713c325e958565312625ad.zip
cfi_flash: use specific width types for cword
This patch changes the cword union to use specific length types that are architecture indepented. This patch also renames the members of the cword union to represent their usage, i.e.: c -> w8 s -> w16 l -> w32 ll -> w64 Where "w" stands for "width" in bits. I discovered this problem when enabling CFI flash on vexpress64. cword.l was an unsigned long int, but it was intended to be 32 bits wide. Unfortunately, it's 64-bits wide on a 64-bit system, meaning that a 64-bit system fails when attempting to use 32-bit wide CFI flash parts. Similar problems also existed with the other cword sizes. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/mtd')
-rw-r--r--include/mtd/cfi_flash.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/mtd/cfi_flash.h b/include/mtd/cfi_flash.h
index 048b4773fc..52572b9b02 100644
--- a/include/mtd/cfi_flash.h
+++ b/include/mtd/cfi_flash.h
@@ -105,10 +105,10 @@
#define NUM_ERASE_REGIONS 4 /* max. number of erase regions */
typedef union {
- unsigned char c;
- unsigned short w;
- unsigned long l;
- unsigned long long ll;
+ u8 w8;
+ u16 w16;
+ u32 w32;
+ u64 w64;
} cfiword_t;
/* CFI standard query structure */
OpenPOWER on IntegriCloud