|
@@ -589,9 +589,11 @@ static int dw_mci_idmac_init(struct dw_mci *host)
|
|
|
host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
|
|
|
|
|
|
/* Forward link the descriptor list */
|
|
|
- for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
|
|
|
+ for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++) {
|
|
|
p->des3 = cpu_to_le32(host->sg_dma +
|
|
|
(sizeof(struct idmac_desc) * (i + 1)));
|
|
|
+ p->des1 = 0;
|
|
|
+ }
|
|
|
|
|
|
/* Set the last descriptor as the end-of-ring descriptor */
|
|
|
p->des3 = cpu_to_le32(host->sg_dma);
|
|
@@ -1300,7 +1302,8 @@ static int dw_mci_get_cd(struct mmc_host *mmc)
|
|
|
int gpio_cd = mmc_gpio_get_cd(mmc);
|
|
|
|
|
|
/* Use platform get_cd function, else try onboard card detect */
|
|
|
- if (brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION)
|
|
|
+ if ((brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION) ||
|
|
|
+ (mmc->caps & MMC_CAP_NONREMOVABLE))
|
|
|
present = 1;
|
|
|
else if (!IS_ERR_VALUE(gpio_cd))
|
|
|
present = gpio_cd;
|