From 13fe0ec37ab7efc11cabb5b5cc112aa029712f7c Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Wed, 11 Jun 2014 23:30:03 +0200 Subject: mmc: usdhi6rol0: fix compiler warnings Fix a number of wrong print formats. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Ulf Hansson --- drivers/mmc/host/usdhi6rol0.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index eb2bbbef19c6..f0a39eb049af 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -357,7 +357,7 @@ static void *usdhi6_sg_map(struct usdhi6_host *host) WARN(host->pg.page, "%p not properly unmapped!\n", host->pg.page); if (WARN(sg_dma_len(sg) % data->blksz, - "SG size %zd isn't a multiple of block size %zd\n", + "SG size %u isn't a multiple of block size %u\n", sg_dma_len(sg), data->blksz)) return NULL; @@ -459,7 +459,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host) done = (host->page_idx << PAGE_SHIFT) + host->offset; total = host->sg->offset + sg_dma_len(host->sg); - dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %u\n", __func__, + dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %zu\n", __func__, done, total, host->offset); if (done < total && host->offset) { @@ -489,7 +489,7 @@ static void usdhi6_sg_advance(struct usdhi6_host *host) host->sg = next; if (WARN(next && sg_dma_len(next) % data->blksz, - "SG size %zd isn't a multiple of block size %zd\n", + "SG size %u isn't a multiple of block size %u\n", sg_dma_len(next), data->blksz)) data->error = -EINVAL; @@ -896,7 +896,7 @@ static void usdhi6_request_done(struct usdhi6_host *host) struct mmc_data *data = mrq->data; if (WARN(host->pg.page || host->head_pg.page, - "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%x %ux%u in SG%u!\n", + "Page %p or %p not unmapped: wait %u, CMD%d(%c) @ +0x%zx %ux%u in SG%u!\n", host->pg.page, host->head_pg.page, host->wait, mrq->cmd->opcode, data ? (data->flags & MMC_DATA_READ ? 'R' : 'W') : '-', data ? host->offset : 0, data ? data->blocks : 0, @@ -1666,7 +1666,7 @@ static void usdhi6_timeout_work(struct work_struct *work) case USDHI6_WAIT_FOR_READ: case USDHI6_WAIT_FOR_WRITE: dev_dbg(mmc_dev(host->mmc), - "%c: page #%u @ +0x%x %ux%u in SG%u. Current SG %u bytes @ %u\n", + "%c: page #%u @ +0x%zx %ux%u in SG%u. Current SG %u bytes @ %u\n", data->flags & MMC_DATA_READ ? 'R' : 'W', host->page_idx, host->offset, data->blocks, data->blksz, data->sg_len, sg_dma_len(host->sg), host->sg->offset); -- cgit v1.2.3 From ed1761d7d8b83a632f34bfe6a636ceba85bfe8c8 Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Tue, 10 Jun 2014 11:27:19 -0700 Subject: mmc: sdhci-msm: Fix fallout from sdhci refactoring The sdhci core was refactored recently and some of those refactorings required changes in every sdhci platform driver. Those updates happened around the same time as when the msm driver was merged so the refactorings missed the msm driver. Hook in the basic library functions so that we can boot apq8074 dragonboards again instead of crashing when we try to jump to NULL function pointers. Reported-by: Kevin Hilman Cc: Georgi Djakov Cc: Russell King Signed-off-by: Stephen Boyd Acked-by: Kumar Gala Reviewed-by: Georgi Djakov Tested-by: Kevin Hilman Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdhci-msm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index acb0e9eb55f1..40573a58486a 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -468,6 +468,10 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_match); static struct sdhci_ops sdhci_msm_ops = { .platform_execute_tuning = sdhci_msm_execute_tuning, + .reset = sdhci_reset, + .set_clock = sdhci_set_clock, + .set_bus_width = sdhci_set_bus_width, + .set_uhs_signaling = sdhci_set_uhs_signaling, }; static int sdhci_msm_probe(struct platform_device *pdev) -- cgit v1.2.3 From bf614c7a214592c4cd2a2ccffc0f43539437af6b Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 5 Jun 2014 23:14:38 +0200 Subject: mmc: atmel-mci: incude asm/cacheclush.h This avoids a build error due to the use of flush_dcache_page. drivers/mmc/host/atmel-mci.c: In function 'atmci_read_data_pio': drivers/mmc/host/atmel-mci.c:1870:5: error: implicit declaration of function 'flush_dcache_page' [-Werror=implicit-function-declaration] flush_dcache_page(sg_page(sg)); ^ Signed-off-by: Arnd Bergmann Cc: Ludovic Desroches Acked-by: Ludovic Desroches Signed-off-by: Ulf Hansson --- drivers/mmc/host/atmel-mci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index aece7cafbb97..bb585d940901 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -37,6 +37,7 @@ #include #include +#include #include #include -- cgit v1.2.3 From d7fe833f3fc9a02806c96dd28f48e5e28c8484a8 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 5 Jun 2014 23:14:39 +0200 Subject: mmc: mvsdio: avoid compiler warning gcc correctly points out that hw_state can be used uninitially in the mvsd_setup_data() function. This rearranges the function to ensure it always contains a proper value. Signed-off-by: Arnd Bergmann Cc: Nicolas Pitre Cc: Chris Ball Cc: Thomas Petazzoni Cc: Jason Cooper Cc: Andrew Lunn Cc: linux-mmc@vger.kernel.org Acked-by: Nicolas Pitre Signed-off-by: Ulf Hansson --- drivers/mmc/host/mvsdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c index 9377284f8544..6b4c5ad3b393 100644 --- a/drivers/mmc/host/mvsdio.c +++ b/drivers/mmc/host/mvsdio.c @@ -79,11 +79,11 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) unsigned long t = jiffies + HZ; unsigned int hw_state, count = 0; do { + hw_state = mvsd_read(MVSD_HW_STATE); if (time_after(jiffies, t)) { dev_warn(host->dev, "FIFO_EMPTY bit missing\n"); break; } - hw_state = mvsd_read(MVSD_HW_STATE); count++; } while (!(hw_state & (1 << 13))); dev_dbg(host->dev, "*** wait for FIFO_EMPTY bit " -- cgit v1.2.3 From 60a549fcda819b69b349a03e6a9300139ab234a9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 5 Jun 2014 23:14:40 +0200 Subject: mmc: omap: don't select TPS65010 The MMC host driver should not select the pmic driver, since that may have other dependencies, notably i2c in this case. It's not clear what the exact requirement of the driver is, but to preserve the behavior, this patch changes the 'select' into 'depends on', meaning you now have to turn on TPS65010 explicitly and then MMC_OMAP. Found during randconfig build testing. Signed-off-by: Arnd Bergmann Cc: linux-omap@vger.kernel.org Cc: Jarkko Nikula Signed-off-by: Ulf Hansson --- drivers/mmc/host/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 7fee22432e94..5115445cded1 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -295,7 +295,7 @@ config MMC_MOXART config MMC_OMAP tristate "TI OMAP Multimedia Card Interface support" depends on ARCH_OMAP - select TPS65010 if MACH_OMAP_H2 + depends on TPS65010 || !MACH_OMAP_H2 help This selects the TI OMAP Multimedia card Interface. If you have an OMAP board with a Multimedia Card slot, -- cgit v1.2.3 From 5d01b7684b7ebade6d9ea9c94a31357aec731ecd Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 5 Jun 2014 23:14:41 +0200 Subject: mmc: simplify SDHCI Kconfig dependencies We have a number of front-end drivers for SDHCI_PLTFM, some of them use 'select MMC_SDHCI_PLTFM', others use 'depends on'. This is inconsistent and confusing, and in one case has also led to a build error because of incomplete dependencies: warning: (MMC_SDHCI_PXAV3 && MMC_SDHCI_PXAV2 && MMC_SDHCI_BCM_KONA) selects MMC_SDHCI_PLTFM which has unmet direct dependencies (MMC && MMC_SDHCI) drivers/built-in.o: In function `sdhci_sirf_resume': :(.text+0xaaacb4): undefined reference to `sdhci_resume_host' drivers/built-in.o: In function `sdhci_sirf_suspend': :(.text+0xaaacf8): undefined reference to `sdhci_suspend_host' drivers/built-in.o: In function `sdhci_sirf_probe': :(.text+0xaaaf44): undefined reference to `sdhci_add_host' :(.text+0xaaaf50): undefined reference to `sdhci_remove_host' This changes Kconfig to use 'depends on MMC_SDHCI_PLTFM' for all these cases, to fix the build error and make the logic more logical. Signed-off-by: Arnd Bergmann Signed-off-by: Ulf Hansson --- drivers/mmc/host/Kconfig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 5115445cded1..a5652548230a 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -216,8 +216,7 @@ config MMC_SDHCI_SIRF config MMC_SDHCI_PXAV3 tristate "Marvell MMP2 SD Host Controller support (PXAV3)" depends on CLKDEV_LOOKUP - select MMC_SDHCI - select MMC_SDHCI_PLTFM + depends on MMC_SDHCI_PLTFM default CPU_MMP2 help This selects the Marvell(R) PXAV3 SD Host Controller. @@ -229,8 +228,7 @@ config MMC_SDHCI_PXAV3 config MMC_SDHCI_PXAV2 tristate "Marvell PXA9XX SD Host Controller support (PXAV2)" depends on CLKDEV_LOOKUP - select MMC_SDHCI - select MMC_SDHCI_PLTFM + depends on MMC_SDHCI_PLTFM default CPU_PXA910 help This selects the Marvell(R) PXAV2 SD Host Controller. @@ -264,7 +262,7 @@ config MMC_SDHCI_S3C_DMA config MMC_SDHCI_BCM_KONA tristate "SDHCI support on Broadcom KONA platform" depends on ARCH_BCM_MOBILE - select MMC_SDHCI_PLTFM + depends on MMC_SDHCI_PLTFM help This selects the Broadcom Kona Secure Digital Host Controller Interface(SDHCI) support. -- cgit v1.2.3