Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11b211ed authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MMC fixes from Ulf Hansson:
 "MMC core:

   - kmalloc sdio scratch buffer to make it DMA-friendly

  MMC host:

   - dw_mmc: Fix behaviour for SDIO IRQs when runtime PM is used

   - sdhci-esdhc-imx: Correct pad I/O drive strength for UHS-DDR50
     cards"

* tag 'mmc-v4.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card
  mmc: dw_mmc: Don't allow Runtime PM for SDIO cards
  mmc: sdio: fix alignment issue in struct sdio_func
parents 4d4dfc1c 9f327845
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ static void sdio_release_func(struct device *dev)
	sdio_free_func_cis(func);

	kfree(func->info);

	kfree(func->tmpbuf);
	kfree(func);
}

@@ -282,6 +282,16 @@ struct sdio_func *sdio_alloc_func(struct mmc_card *card)
	if (!func)
		return ERR_PTR(-ENOMEM);

	/*
	 * allocate buffer separately to make sure it's properly aligned for
	 * DMA usage (incl. 64 bit DMA)
	 */
	func->tmpbuf = kmalloc(4, GFP_KERNEL);
	if (!func->tmpbuf) {
		kfree(func);
		return ERR_PTR(-ENOMEM);
	}

	func->card = card;

	device_initialize(&func->dev);
+9 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/stat.h>
@@ -1621,10 +1622,16 @@ static void dw_mci_init_card(struct mmc_host *mmc, struct mmc_card *card)

		if (card->type == MMC_TYPE_SDIO ||
		    card->type == MMC_TYPE_SD_COMBO) {
			if (!test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) {
				pm_runtime_get_noresume(mmc->parent);
				set_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags);
			}
			clk_en_a = clk_en_a_old & ~clken_low_pwr;
		} else {
			if (test_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags)) {
				pm_runtime_put_noidle(mmc->parent);
				clear_bit(DW_MMC_CARD_NO_LOW_PWR, &slot->flags);
			}
			clk_en_a = clk_en_a_old | clken_low_pwr;
		}

+1 −0
Original line number Diff line number Diff line
@@ -830,6 +830,7 @@ static int esdhc_change_pinstate(struct sdhci_host *host,

	switch (uhs) {
	case MMC_TIMING_UHS_SDR50:
	case MMC_TIMING_UHS_DDR50:
		pinctrl = imx_data->pins_100mhz;
		break;
	case MMC_TIMING_UHS_SDR104:
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ struct sdio_func {
	unsigned int		state;		/* function state */
#define SDIO_STATE_PRESENT	(1<<0)		/* present in sysfs */

	u8			tmpbuf[4];	/* DMA:able scratch buffer */
	u8			*tmpbuf;	/* DMA:able scratch buffer */

	unsigned		num_info;	/* number of info strings */
	const char		**info;		/* info strings */