diff options
author | Aaron Sierra <asierra@xes-inc.com> | 2011-11-14 19:44:34 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:06:13 -0500 |
commit | 8e987465a137d4824710e02550f06aa891c9b865 (patch) | |
tree | 26edb55e4a9fe8f2f9832ba045286d5b18d3cc40 /drivers/mtd/chips | |
parent | 342ff28f5a2e5aa3236617bd2bddf6c749677ef2 (diff) |
mtd: cfi: Allow per-mapping CFI device endianness
This patch allows each CFI device map to use its own endianness. The
globally defined CFI endianness (CONFIG_MTD_CFI_NOSWAP,
CONFIG_MTD_CFI_BE_BYTE_SWAP or CONFIG_MTD_CFI_LE_BYTE_SWAP) becomes the
default value which can be overridden by a driver for a particular device.
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0020.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 179814a95f3a..666c52f8bf8d 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c | |||
@@ -139,8 +139,9 @@ struct mtd_info *cfi_cmdset_0020(struct map_info *map, int primary) | |||
139 | } | 139 | } |
140 | 140 | ||
141 | /* Do some byteswapping if necessary */ | 141 | /* Do some byteswapping if necessary */ |
142 | extp->FeatureSupport = cfi32_to_cpu(extp->FeatureSupport); | 142 | extp->FeatureSupport = cfi32_to_cpu(map, extp->FeatureSupport); |
143 | extp->BlkStatusRegMask = cfi32_to_cpu(extp->BlkStatusRegMask); | 143 | extp->BlkStatusRegMask = cfi32_to_cpu(map, |
144 | extp->BlkStatusRegMask); | ||
144 | 145 | ||
145 | #ifdef DEBUG_CFI_FEATURES | 146 | #ifdef DEBUG_CFI_FEATURES |
146 | /* Tell the user about it in lots of lovely detail */ | 147 | /* Tell the user about it in lots of lovely detail */ |