1. 19 Jan, 2015 4 commits
    • Doug Anderson's avatar
      mmc: dw_mmc: Protect read-modify-write of INTMASK with a lock · f8c58c11
      Doug Anderson authored
      We're running into cases where our enabling of the SDIO interrupt in
      dw_mmc doesn't actually take effect.  Specifically, adding patch like
      this:
      
       +++ b/drivers/mmc/host/dw_mmc.c
       @@ -1076,6 +1076,9 @@ static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb)
      
            mci_writel(host, INTMASK,
                 (int_mask | SDMMC_INT_SDIO(slot->id)));
       +    int_mask = mci_readl(host, INTMASK);
       +    if (!(int_mask & SDMMC_INT_SDIO(slot->id)))
       +      dev_err(&mmc->class_dev, "failed to enable sdio irq\n");
          } else {
      
      ...actually triggers the error message.  That's because the
      dw_mci_enable_sdio_irq() unsafely does a read-modify-write of the
      INTMASK register.
      
      We can't just use the standard host->lock since that lock is not irq
      safe and mmc_signal_sdio_irq() (called from interrupt context) calls
      dw_mci_enable_sdio_irq().  Add a new irq-safe lock to protect INTMASK.
      
      An alternate solution to this is to punt mmc_signal_sdio_irq() to the
      tasklet and then protect INTMASK modifications by the standard host
      lock.  This seemed like a bit more of a high-latency change.
      Reported-by: default avatarBing Zhao <bzhao@marvell.com>
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Reviewed-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      f8c58c11
    • Doug Anderson's avatar
      mmc: dw_mmc: Cleanup disable of low power mode w/ SDIO interrupts · b24c8b26
      Doug Anderson authored
      In the patch (9623b5b9 mmc: dw_mmc: Disable low power mode if SDIO
      interrupts are used) I added code that disabled the low power mode of
      dw_mmc when SDIO interrupts are used.  That code worked but always
      felt a little hacky because we ended up disabling low power as a side
      effect of the first enable_sdio_irq() call.  That wouldn't be so bad
      except that disabling low power involves a complicated process of
      writing to the CMD/CMDARG registers and that extra process makes it
      difficult to cleanly the read-modify-write race in
      dw_mci_enable_sdio_irq() (see future patch in the series).
      
      Change the code to take advantage of the init_card() callback of the
      mmc core to do this right at bootup.
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      b24c8b26
    • Doug Anderson's avatar
      mmc: core: Support the optional init_card() callback for MMC and SD · eac86321
      Doug Anderson authored
      In (3fcb027d ARM: MXC: mxcmmc: work around a bug in the SDHC busy line
      handling) the optional init_card() callback was added.  According to
      the original change it was "for now only called from
      mmc_sdio_init_card()".
      
      This callback really ought to be called from the SD and MMC init
      functions as well.  One current user of this callback
      (mxcmci_init_card) will not work as expected if you insert an SDIO
      card, then eject it and put a normal SD card in.  Specifically the
      normal SD card will not get to run with 4-bit data.
      
      I'd like to use the init_card() callback to handle a similar quirk on
      dw_mmc when using SDIO Interrupts (the "low power" feature of the card
      needs to be disabled), so that will add a second user of the function.
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Reviewed-by: default avatarGrant Grundler <grundler@chromium.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      eac86321
    • Doug Anderson's avatar
      ARM: OMAP2+: Make sure pandora_wl1251_init_card() applies to SDIO only · a48fd4e7
      Doug Anderson authored
      In preparation for having init_card() called for all card types (not
      just SDIO), change pandora_wl1251_init_card() so it checks whether the
      card type is SDIO.
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      a48fd4e7
  2. 18 Jan, 2015 4 commits
    • Linus Torvalds's avatar
      Linux 3.19-rc5 · ec6f34e5
      Linus Torvalds authored
      ec6f34e5
    • Linus Torvalds's avatar
      Merge tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · d0ac5d8e
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "We've been sitting on our fixes branch for a while, so this batch is
        unfortunately on the large side.
      
        A lot of these are tweaks and fixes to device trees, fixing various
        bugs around clocks, reg ranges, etc.  There's also a few defconfig
        updates (which are on the late side, no more of those).
      
        All in all the diffstat is bigger than ideal at this time, but nothing
        in here seems particularly risky"
      
      * tag 'armsoc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
        reset: sunxi: fix spinlock initialization
        ARM: dts: disable CCI on exynos5420 based arndale-octa
        drivers: bus: check cci device tree node status
        ARM: rockchip: disable jtag/sdmmc autoswitching on rk3288
        ARM: nomadik: fix up leftover device tree pins
        ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
        ARM: at91/dt: sam9263: Add missing clocks to lcdc node
        ARM: at91: sama5d3: dt: correct the sound route
        ARM: at91/dt: sama5d4: fix the timer reg length
        ARM: exynos_defconfig: Enable LM90 driver
        ARM: exynos_defconfig: Enable options for display panel support
        arm: dts: Use pmu_system_controller phandle for dp phy
        ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
        ARM: dts: berlin: correct BG2Q's SM GPIO location.
        ARM: dts: berlin: add broken-cd and set bus width for eMMC in Marvell DMP DT
        ARM: dts: berlin: fix io clk and add missing core clk for BG2Q sdhci2 host
        ARM: dts: Revert disabling of smc91x for n900
        ARM: dts: imx51-babbage: Fix ULPI PHY reset modelling
        ARM: dts: dra7-evm: fix qspi device tree partition size
        ARM: omap2plus_defconfig: use CONFIG_CPUFREQ_DT
        ...
      d0ac5d8e
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux · 12ba8571
      Linus Torvalds authored
      Pull clock driver fixes from Mike Turquette:
       "Small number of fixes for clock drivers and a single null pointer
        dereference fix in the framework core code.
      
        The driver fixes vary from fixing section mismatch warnings to
        preventing machines from hanging (and preventing developers from
        crying)"
      
      * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
        clk: fix possible null pointer dereference
        Revert "clk: ppc-corenet: Fix Section mismatch warning"
        clk: rockchip: fix deadlock possibility in cpuclk
        clk: berlin: bg2q: remove non-exist "smemc" gate clock
        clk: at91: keep slow clk enabled to prevent system hang
        clk: rockchip: fix rk3288 cpuclk core dividers
        clk: rockchip: fix rk3066 pll lock bit location
        clk: rockchip: Fix clock gate for rk3188 hclk_emem_peri
        clk: rockchip: add CLK_IGNORE_UNUSED flag to fix rk3066/rk3188 USB Host
      12ba8571
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 901b2082
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is one fix for a Multiqueue sleeping in invalid context problem
        and a MAINTAINER file update for Qlogic"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ->queue_rq can't sleep
        MAINTAINERS: Update maintainer list for qla4xxx
      901b2082
  3. 17 Jan, 2015 18 commits
  4. 16 Jan, 2015 14 commits