diff options
-rw-r--r-- | drivers/mmc/card/block.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 2 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index d7eb2c082336..aa66d3f3abb1 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -1480,7 +1480,7 @@ static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md) | |||
1480 | if (!mmc_card_mmc(card)) | 1480 | if (!mmc_card_mmc(card)) |
1481 | return 0; | 1481 | return 0; |
1482 | 1482 | ||
1483 | if (card->ext_csd.boot_size) { | 1483 | if (card->ext_csd.boot_size && mmc_boot_partition_access(card->host)) { |
1484 | ret = mmc_blk_alloc_part(card, md, EXT_CSD_PART_CONFIG_ACC_BOOT0, | 1484 | ret = mmc_blk_alloc_part(card, md, EXT_CSD_PART_CONFIG_ACC_BOOT0, |
1485 | card->ext_csd.boot_size >> 9, | 1485 | card->ext_csd.boot_size >> 9, |
1486 | true, | 1486 | true, |
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 3b30c515cbc2..f8a17f98f3a9 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c | |||
@@ -215,6 +215,8 @@ static int mfd_emmc_probe_slot(struct sdhci_pci_slot *slot) | |||
215 | 215 | ||
216 | slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA; | 216 | slot->host->mmc->caps |= MMC_CAP_8_BIT_DATA; |
217 | 217 | ||
218 | slot->host->mmc->caps2 = MMC_CAP2_BOOTPART_NOACC; | ||
219 | |||
218 | return 0; | 220 | return 0; |
219 | } | 221 | } |
220 | 222 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index b2aefea97048..aed5bc7245f7 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -236,6 +236,10 @@ struct mmc_host { | |||
236 | #define MMC_CAP_CMD23 (1 << 30) /* CMD23 supported. */ | 236 | #define MMC_CAP_CMD23 (1 << 30) /* CMD23 supported. */ |
237 | #define MMC_CAP_HW_RESET (1 << 31) /* Hardware reset */ | 237 | #define MMC_CAP_HW_RESET (1 << 31) /* Hardware reset */ |
238 | 238 | ||
239 | unsigned int caps2; /* More host capabilities */ | ||
240 | |||
241 | #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ | ||
242 | |||
239 | mmc_pm_flag_t pm_caps; /* supported pm features */ | 243 | mmc_pm_flag_t pm_caps; /* supported pm features */ |
240 | 244 | ||
241 | #ifdef CONFIG_MMC_CLKGATE | 245 | #ifdef CONFIG_MMC_CLKGATE |
@@ -404,4 +408,10 @@ static inline int mmc_host_cmd23(struct mmc_host *host) | |||
404 | { | 408 | { |
405 | return host->caps & MMC_CAP_CMD23; | 409 | return host->caps & MMC_CAP_CMD23; |
406 | } | 410 | } |
411 | |||
412 | static inline int mmc_boot_partition_access(struct mmc_host *host) | ||
413 | { | ||
414 | return !(host->caps2 & MMC_CAP2_BOOTPART_NOACC); | ||
415 | } | ||
416 | |||
407 | #endif /* LINUX_MMC_HOST_H */ | 417 | #endif /* LINUX_MMC_HOST_H */ |