]> Git Repo - linux.git/commitdiff
Merge tag 'mmc-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
authorLinus Torvalds <[email protected]>
Sat, 29 Dec 2018 00:52:18 +0000 (16:52 -0800)
committerLinus Torvalds <[email protected]>
Sat, 29 Dec 2018 00:52:18 +0000 (16:52 -0800)
Pull MMC updates from Ulf Hansson:
 "This time, this pull request contains changes crossing subsystems and
  archs/platforms, which is mainly because of a bigger modernization of
  moving from legacy GPIO to GPIO descriptors for MMC (by Linus
  Walleij).

  Additionally, once again, I am funneling changes to
  drivers/misc/cardreader/* and drivers/memstick/* through my MMC tree,
  mostly due to that we lack a maintainer for these.

  Summary:

  MMC core:
   - Cleanup BKOPS support
   - Introduce MMC_CAP_SYNC_RUNTIME_PM
   - slot-gpio: Delete legacy slot GPIO handling

  MMC host:
   - alcor: Add new mmc host driver for Alcor Micro PCI based cardreader
   - bcm2835: Several improvements to better recover from errors
   - jz4740: Rework and fixup pre|post_req support
   - mediatek: Add support for SDIO IRQs
   - meson-gx: Improve clock phase management
   - meson-gx: Stop descriptor on errors
   - mmci: Complete the sbc error path by sending a stop command
   - renesas_sdhi/tmio: Fixup reset/resume operations
   - renesas_sdhi: Add support for r8a774c0 and R7S9210
   - renesas_sdhi: Whitelist R8A77990 SDHI
   - renesas_sdhi: Fixup eMMC HS400 compatibility issues for H3 and M3-W
   - rtsx_usb_sdmmc: Re-work card detection/removal support
   - rtsx_usb_sdmmc: Re-work runtime PM support
   - sdhci: Fix timeout loops for some variant drivers
   - sdhci: Improve support for error handling due to failing commands
   - sdhci-acpi/pci: Disable LED control for Intel BYT-based controllers
   - sdhci_am654: Add new SDHCI variant driver to support TI's AM654 SOCs
   - sdhci-of-esdhc: Add support for eMMC HS400 mode
   - sdhci-omap: Fixup reset support
   - sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures
   - sdhci-msm: Fixup sporadic write transfers issues for SDR104/HS200
   - sdhci-msm: Fixup dynamical clock gating issues
   - various: Complete converting all hosts into using slot GPIO descriptors

  Other:
   - Move GPIO mmc platform data for mips/sh/arm to GPIO descriptors
   - Add new Alcor Micro cardreader PCI driver
   - Support runtime power management for memstick rtsx_usb_ms driver
   - Use USB remote wakeups for card detection for rtsx_usb misc driver"

* tag 'mmc-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (99 commits)
  mmc: mediatek: Add MMC_CAP_SDIO_IRQ support
  mmc: renesas_sdhi_internal_dmac: Whitelist r8a774c0
  dt-bindings: mmc: renesas_sdhi: Add r8a774c0 support
  mmc: core: Cleanup BKOPS support
  mmc: core: Drop redundant check in mmc_send_hpi_cmd()
  mmc: sdhci-omap: Workaround errata regarding SDR104/HS200 tuning failures (i929)
  dt-bindings: sdhci-omap: Add note for cpu_thermal
  mmc: sdhci-acpi: Disable LED control for Intel BYT-based controllers
  mmc: sdhci-pci: Disable LED control for Intel BYT-based controllers
  mmc: sdhci: Add quirk to disable LED control
  mmc: mmci: add variant property to set command stop bit
  misc: alcor_pci: fix spelling mistake "invailid" -> "invalid"
  mmc: meson-gx: add signal resampling
  mmc: meson-gx: align default phase on soc vendor tree
  mmc: meson-gx: remove useless lock
  mmc: meson-gx: make sure the descriptor is stopped on errors
  mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver
  dt-bindings: mmc: sdhci-of-arasan: Add deprecated message for AM65
  dt-bindings: mmc: sdhci-am654: Document bindings for the host controllers on TI's AM654 SOCs
  mmc: sdhci-msm: avoid unused function warning
  ...

1  2 
arch/arm/mach-pxa/palmld.c
drivers/mmc/core/block.c

index a37ceec2290361b65a788eff9c385a6567afde01,93d1124d21c248be5733f8befe46d0e72d2153a2..bf2b0cfc86df2f13ebcc9fb986c0544df6d33311
@@@ -288,20 -288,8 +288,20 @@@ static struct platform_device palmld_id
        .id     = -1,
  };
  
 +static struct gpiod_lookup_table palmld_ide_gpio_table = {
 +      .dev_id = "pata_palmld",
 +      .table = {
 +              GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_IDE_PWEN,
 +                          "power", GPIO_ACTIVE_HIGH),
 +              GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_IDE_RESET,
 +                          "reset", GPIO_ACTIVE_LOW),
 +              { },
 +      },
 +};
 +
  static void __init palmld_ide_init(void)
  {
 +      gpiod_add_lookup_table(&palmld_ide_gpio_table);
        platform_device_register(&palmld_ide_device);
  }
  #else
@@@ -332,6 -320,19 +332,19 @@@ static void __init palmld_map_io(void
        iotable_init(palmld_io_desc, ARRAY_SIZE(palmld_io_desc));
  }
  
+ static struct gpiod_lookup_table palmld_mci_gpio_table = {
+       .dev_id = "pxa2xx-mci.0",
+       .table = {
+               GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_DETECT_N,
+                           "cd", GPIO_ACTIVE_LOW),
+               GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_READONLY,
+                           "wp", GPIO_ACTIVE_LOW),
+               GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_POWER,
+                           "power", GPIO_ACTIVE_HIGH),
+               { },
+       },
+ };
  static void __init palmld_init(void)
  {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config));
        pxa_set_btuart_info(NULL);
        pxa_set_stuart_info(NULL);
  
-       palm27x_mmc_init(GPIO_NR_PALMLD_SD_DETECT_N, GPIO_NR_PALMLD_SD_READONLY,
-                       GPIO_NR_PALMLD_SD_POWER, 0);
+       palm27x_mmc_init(&palmld_mci_gpio_table);
        palm27x_pm_init(PALMLD_STR_BASE);
        palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
        palm27x_irda_init(GPIO_NR_PALMLD_IR_DISABLE);
diff --combined drivers/mmc/core/block.c
index 62e7619d5a4da3939cf8fb96b320abd55761b6be,48386473dcd7dcbf151dee6e736a5b3091f10689..aef1185f383d42f3a3f7192b2003d521471acd18
@@@ -100,6 -100,7 +100,6 @@@ static DEFINE_IDA(mmc_rpmb_ida)
   * There is one mmc_blk_data per slot.
   */
  struct mmc_blk_data {
 -      spinlock_t      lock;
        struct device   *parent;
        struct gendisk  *disk;
        struct mmc_queue queue;
@@@ -1487,7 -1488,7 +1487,7 @@@ static void mmc_blk_cqe_complete_rq(str
                blk_mq_end_request(req, BLK_STS_OK);
        }
  
 -      spin_lock_irqsave(q->queue_lock, flags);
 +      spin_lock_irqsave(&mq->lock, flags);
  
        mq->in_flight[mmc_issue_type(mq, req)] -= 1;
  
  
        mmc_cqe_check_busy(mq);
  
 -      spin_unlock_irqrestore(q->queue_lock, flags);
 +      spin_unlock_irqrestore(&mq->lock, flags);
  
        if (!mq->cqe_busy)
                blk_mq_run_hw_queues(q, true);
@@@ -1960,7 -1961,7 +1960,7 @@@ static void mmc_blk_urgent_bkops(struc
                                 struct mmc_queue_req *mqrq)
  {
        if (mmc_blk_urgent_bkops_needed(mq, mqrq))
-               mmc_start_bkops(mq->card, true);
+               mmc_run_bkops(mq->card);
  }
  
  void mmc_blk_mq_complete(struct request *req)
@@@ -1992,16 -1993,17 +1992,16 @@@ static void mmc_blk_mq_poll_completion(
  
  static void mmc_blk_mq_dec_in_flight(struct mmc_queue *mq, struct request *req)
  {
 -      struct request_queue *q = req->q;
        unsigned long flags;
        bool put_card;
  
 -      spin_lock_irqsave(q->queue_lock, flags);
 +      spin_lock_irqsave(&mq->lock, flags);
  
        mq->in_flight[mmc_issue_type(mq, req)] -= 1;
  
        put_card = (mmc_tot_in_flight(mq) == 0);
  
 -      spin_unlock_irqrestore(q->queue_lock, flags);
 +      spin_unlock_irqrestore(&mq->lock, flags);
  
        if (put_card)
                mmc_put_card(mq->card, &mq->ctx);
@@@ -2097,11 -2099,11 +2097,11 @@@ static void mmc_blk_mq_req_done(struct 
                 * request does not need to wait (although it does need to
                 * complete complete_req first).
                 */
 -              spin_lock_irqsave(q->queue_lock, flags);
 +              spin_lock_irqsave(&mq->lock, flags);
                mq->complete_req = req;
                mq->rw_wait = false;
                waiting = mq->waiting;
 -              spin_unlock_irqrestore(q->queue_lock, flags);
 +              spin_unlock_irqrestore(&mq->lock, flags);
  
                /*
                 * If 'waiting' then the waiting task will complete this
        /* Take the recovery path for errors or urgent background operations */
        if (mmc_blk_rq_error(&mqrq->brq) ||
            mmc_blk_urgent_bkops_needed(mq, mqrq)) {
 -              spin_lock_irqsave(q->queue_lock, flags);
 +              spin_lock_irqsave(&mq->lock, flags);
                mq->recovery_needed = true;
                mq->recovery_req = req;
 -              spin_unlock_irqrestore(q->queue_lock, flags);
 +              spin_unlock_irqrestore(&mq->lock, flags);
                wake_up(&mq->wait);
                schedule_work(&mq->recovery_work);
                return;
  
  static bool mmc_blk_rw_wait_cond(struct mmc_queue *mq, int *err)
  {
 -      struct request_queue *q = mq->queue;
        unsigned long flags;
        bool done;
  
         * Wait while there is another request in progress, but not if recovery
         * is needed. Also indicate whether there is a request waiting to start.
         */
 -      spin_lock_irqsave(q->queue_lock, flags);
 +      spin_lock_irqsave(&mq->lock, flags);
        if (mq->recovery_needed) {
                *err = -EBUSY;
                done = true;
                done = !mq->rw_wait;
        }
        mq->waiting = !done;
 -      spin_unlock_irqrestore(q->queue_lock, flags);
 +      spin_unlock_irqrestore(&mq->lock, flags);
  
        return done;
  }
@@@ -2331,11 -2334,12 +2331,11 @@@ static struct mmc_blk_data *mmc_blk_all
                goto err_kfree;
        }
  
 -      spin_lock_init(&md->lock);
        INIT_LIST_HEAD(&md->part);
        INIT_LIST_HEAD(&md->rpmbs);
        md->usage = 1;
  
 -      ret = mmc_init_queue(&md->queue, card, &md->lock, subname);
 +      ret = mmc_init_queue(&md->queue, card);
        if (ret)
                goto err_putdisk;
  
This page took 0.138114 seconds and 4 git commands to generate.