]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mmc: detect boot sectors using EXT_CSD_BOOT_MULT too
authorStephen Warren <swarren@nvidia.com>
Mon, 30 Jul 2012 10:55:43 +0000 (10:55 +0000)
committerAndy Fleming <afleming@freescale.com>
Wed, 5 Sep 2012 22:32:41 +0000 (17:32 -0500)
Some eMMC devices contain boot partitions, but do not set the PART_SUPPORT
bit in EXT_CSD_PARTITIONING_SUPPORT. Allow partition selection on such
devices, by enabling partition switching when EXT_CSD_BOOT_MULT is set.

Note that the Linux kernel enables access to boot partitions solely based
on the value of EXT_CSD_BOOT_MULT; EXT_CSD_PARTITIONING_SUPPORT only
influences access to "general" partitions.

eMMC devices affected by this issue exist on various NVIDIA Tegra
platforms (and presumably many others too), such as Harmony (plug-in eMMC),
Seaboard, Springbank, and Whistler (plug-in eMMC).

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
drivers/mmc/mmc.c
include/mmc.h

index 1f666c2fdc9122057021f7fe44a2e4247834fcc2..64abe5b1c8597a396eb3d877926e328f7466b88f 100644 (file)
@@ -1137,7 +1137,8 @@ int mmc_startup(struct mmc *mmc)
                }
 
                /* store the partition info of emmc */
-               if (ext_csd[EXT_CSD_PARTITIONING_SUPPORT] & PART_SUPPORT)
+               if ((ext_csd[EXT_CSD_PARTITIONING_SUPPORT] & PART_SUPPORT) ||
+                   ext_csd[EXT_CSD_BOOT_MULT])
                        mmc->part_config = ext_csd[EXT_CSD_PART_CONF];
        }
 
index 7b094a4146eb25bf8ba7552ef7b45e6d6f0e1b99..a13e2bdcf16886a755a8cf8b74974b3425ca373b 100644 (file)
 #define EXT_CSD_CARD_TYPE              196     /* RO */
 #define EXT_CSD_SEC_CNT                        212     /* RO, 4 bytes */
 #define EXT_CSD_HC_ERASE_GRP_SIZE      224     /* RO */
+#define EXT_CSD_BOOT_MULT              226     /* RO */
 
 /*
  * EXT_CSD field definitions