summaryrefslogtreecommitdiff
path: root/arch/mips/cpu/mips32
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2012-10-31 19:02:38 +0000
committerAndy Fleming <afleming@freescale.com>2012-11-27 17:48:46 -0600
commit7798f6dbd5e1a3030ed81a81da5dfb57c3307cac (patch)
tree44d6edde9d71397c2d4e1bfa82dbf0954048f117 /arch/mips/cpu/mips32
parented80c931ba7781e6605b9bdaa2a0d58ef365fe71 (diff)
downloadu-boot-imx-7798f6dbd5e1a3030ed81a81da5dfb57c3307cac.zip
u-boot-imx-7798f6dbd5e1a3030ed81a81da5dfb57c3307cac.tar.gz
u-boot-imx-7798f6dbd5e1a3030ed81a81da5dfb57c3307cac.tar.bz2
mmc: Properly determine maximum supported bus width
At some point, a confusion arose about the use of the bit definitions in host_caps for bus widths, and the value in ext_csd. By coincidence, a simple shift could convert between one and the other: MMC_MODE_1BIT = 0, EXT_CSD_BUS_WIDTH_1 = 0 MMC_MODE_4BIT = 0x100, EXT_CSD_BUS_WIDTH_4 = 1 MMC_MODE_8BIT = 0x200, EXT_CSD_BUS_WIDTH_8 = 2 However, as host_caps is a bitmask of supported things, there is not, in fact, a one-to-one correspondence. host_caps is capable of containing MODE_4BIT | MODE_8BIT, so nonsensical things were happening where we would try to set the bus width to 12. The new code clarifies the very different namespaces: host_caps/card_caps = bitmask (MMC_MODE_*) ext CSD fields are just an index (EXT_CSD_BUS_WIDTH_*) mmc->bus_width integer number of bits (1, 4, 8) We create arrays to map between the namespaces, like in Linux. Signed-off-by: Andy Fleming <afleming@freescale.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/mips/cpu/mips32')
0 files changed, 0 insertions, 0 deletions