09 Nov, 2015

8 commits

  • Anytime a write operation is performed with Reliable Write flag enabled,
    the eMMC device is enforced to bypass the cache and do a write to the
    underling NVM device by Jedec specification; this causes a performance
    penalty since write operations can't be optimized by the device cache.

    In our tests, we replayed a typical mobile daily trace pattern and found
    ~9% overall time reduction in trace replay by using this patch. Also the
    write ops within 4KB~64KB chunk size range get a 40~60% performance
    improvement by using the patch (as this range of write chunks are the ones
    affected by REQ_META).

    This patch has been discussed in the Mobile & Embedded Linux Storage Forum
    and it's the results of feedbacks from many people. We also checked with
    fsdevl and f2fs mailing list developers that this change in the usage of
    REQ_META is not affecting FS behavior and we got positive feedbacks.
    Reporting here the feedbacks:
    http://comments.gmane.org/gmane.linux.file-systems/97219
    http://thread.gmane.org/gmane.linux.file-systems.f2fs/3178/focus=3183

    Signed-off-by: Bruce Ford
    Signed-off-by: Luca Porzio
    Fixes: ce39f9d17c14 ("mmc: support packed write command for eMMC4.5 devices")
    Signed-off-by: Ulf Hansson

    Luca Porzio
     
  • If NO_DMA=y:

    ERROR: dma_unmap_sg [drivers/mmc/host/android-goldfish.ko] undefined!
    ERROR: dma_alloc_coherent [drivers/mmc/host/android-goldfish.ko] undefined!
    ERROR: dma_map_sg [drivers/mmc/host/android-goldfish.ko] undefined!
    ERROR: dma_free_coherent [drivers/mmc/host/android-goldfish.ko] undefined!

    Add a dependency on HAS_DMA to fix this.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Ulf Hansson

    Geert Uytterhoeven
     
  • drivers/mmc/host/mtk-sd.c: In function ‘get_best_delay’:
    drivers/mmc/host/mtk-sd.c:1284: warning: ‘delay_phase.start’ is used uninitialized in this function
    drivers/mmc/host/mtk-sd.c:1284: warning: ‘delay_phase.maxlen’ is used uninitialized in this function

    If delay is zero, these fields are indeed not initialized.
    Let the compiler preinitialize the whole struct to fix this.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Ulf Hansson

    Geert Uytterhoeven
     
  • mmc_select_hs400() calls __mmc_switch() which checks the switch is
    successful using CMD13 (SEND_STATUS). The problem is that it does that
    using the timing settings of the previous mode. That is prone to error,
    especially when switching from HS to HS400 because the timing parameters
    for HS mode are tighter than the timing parameters for HS400 mode.

    In the case when CMD13 polling is used (i.e. not MMC_CAP_WAIT_WHILE_BUSY)
    with the switch command, it must be assumed that using different modes on
    the card and host must work.

    However in the case when CMD13 polling is not used
    (i.e. MMC_CAP_WAIT_WHILE_BUSY) mmc_select_hs400() can be made more
    reliable by setting the host to the correct timing before sending CMD13.

    This patch does that.

    Signed-off-by: Adrian Hunter
    Cc: # 4.2+
    Tested-by: Alim Akhtar
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • Move the mmc_switch_status() function in preparation for calling it
    in mmc_select_hs400().

    Signed-off-by: Adrian Hunter
    Cc: # 4.2+
    Tested-by: Alim Akhtar
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • mmc_select_hs400() begins with the card and host in HS200 mode.
    Therefore, any commands sent to the card should use HS200 timing.
    It is incorrect to set the host to High Speed (HS) timing before
    sending the switch command. Doing so is unreliable because
    the timing parameters for HS mode are tighter than the timing
    parameters for HS200 mode. Thus the HS timings should be set
    only after the card has switched mode.

    However, it is not unreasonable first to reduce the frequency to
    the HS mode frequency, which should make the switch command and
    subsequent CMD13 commands more reliable.

    This patch does that.

    Signed-off-by: Adrian Hunter
    Cc: # 4.2+
    Tested-by: Alim Akhtar
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • Currently mmc_select_hs200() uses __mmc_switch() which checks the
    success of the switch to HS200 mode using CMD13 (SEND_STATUS).
    The problem is that it does that using the timing settings of legacy
    mode. That is prone to error, not least because the timing parameters
    for legacy mode are tighter than the timing parameters for HS200 mode.

    In the case when CMD13 polling is used (i.e. not MMC_CAP_WAIT_WHILE_BUSY)
    with the switch command, it must be assumed that using different modes on
    the card and host must work.

    However in the case when CMD13 polling is not used
    (i.e. MMC_CAP_WAIT_WHILE_BUSY) mmc_select_hs200() can be made more
    reliable by setting the host to the correct timing before sending CMD13.

    This patch does that.

    A complication is that the caller, mmc_select_timing(), will ignore a
    switch error (indicated by -EBADMSG), assume the old mode is valid
    and continue, so the old timing must be restored in that case.

    Signed-off-by: Adrian Hunter
    Cc: # 4.2+
    Tested-by: Alim Akhtar
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • The commit converting pxamci to slot-gpio API inverted the logic of the
    read-only gpio. Fix it by inverting the logic again.

    Fixes: fd546ee6a7dc ("mmc: pxamci: fix card detect with slot-gpio API")
    Signed-off-by: Robert Jarzmik
    Cc: stable@vger.kernel.org
    Signed-off-by: Ulf Hansson

    Robert Jarzmik
     

06 Nov, 2015

1 commit

  • Pull spi updates from Mark Brown:
    "Quite a lot of activity in SPI this cycle, almost all of it in drivers
    with a few minor improvements and tweaks in the core.

    - Updates to pxa2xx to support Intel Broxton and multiple chip selects.
    - Support for big endian in the bcm63xx driver.
    - Multiple slave support for the mt8173
    - New driver for the auxiliary SPI controller in bcm2835 SoCs.
    - Support for Layerscale SoCs in the Freescale DSPI driver"

    * tag 'spi-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (87 commits)
    spi: pxa2xx: Rework self-initiated platform data creation for non-ACPI
    spi: pxa2xx: Add support for Intel Broxton
    spi: pxa2xx: Detect number of enabled Intel LPSS SPI chip select signals
    spi: pxa2xx: Add output control for multiple Intel LPSS chip selects
    spi: pxa2xx: Use LPSS prefix for defines that are Intel LPSS specific
    spi: Add DSPI support for layerscape family
    spi: ti-qspi: improve ->remove() callback
    spi/spi-xilinx: Fix race condition on last word read
    spi: Drop owner assignment from spi_drivers
    spi: Add THIS_MODULE to spi_driver in SPI core
    spi: Setup the master controller driver before setting the chipselect
    spi: dw: replace magic constant by DW_SPI_DR
    spi: mediatek: mt8173 spi multiple devices support
    spi: mediatek: handle controller_data in mtk_spi_setup
    spi: mediatek: remove mtk_spi_config
    spi: mediatek: Update document devicetree bindings to support multiple devices
    spi: fix kernel-doc warnings about missing return desc in spi.c
    spi: fix kernel-doc warnings about missing return desc in spi.h
    spi: pxa2xx: Align a few defines
    spi: pxa2xx: Save other reg_cs_ctrl bits when configuring chip select
    ...

    Linus Torvalds
     

04 Nov, 2015

1 commit


29 Oct, 2015

3 commits


28 Oct, 2015

1 commit


27 Oct, 2015

8 commits


26 Oct, 2015

18 commits

  • Enable omap_hsmmc for Keystone 2 architecture which reuses the HSMMC
    IP found on OMAP platforms.

    Signed-off-by: Franklin S Cooper Jr
    Signed-off-by: Ulf Hansson

    Lokesh Vutla
     
  • Add ACPI HIDs for Intel host controllers including one
    supporting HS400.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • Add PCI IDs for Intel host controllers

    Signed-off-by: Adrian Hunter
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • This patch add some macros for HCON register operations
    to make code more readable.

    Signed-off-by: Shawn Lin
    Signed-off-by: Jaehoon Chung
    Signed-off-by: Ulf Hansson

    Shawn Lin
     
  • DesignWare MMC Controller can supports two types of DMA
    mode: external dma and internal dma. We get a RK312x platform
    integrated dw_mmc and ARM pl330 dma controller. This patch add
    edmac ops to support these platforms. I've tested it on RK31xx
    platform with edmac mode and RK3288 platform with idmac mode.

    Signed-off-by: Shawn Lin
    Signed-off-by: Jaehoon Chung
    Signed-off-by: Ulf Hansson

    Shawn Lin
     
  • The eSDHC doesn't have a standard power control register, so when
    writing this register in stack we should do nothing to avoid
    incorrect operation.

    Signed-off-by: Yangbo Lu
    Signed-off-by: Ulf Hansson

    yangbo lu
     
  • There's little sense in releasing the host on mmc_add_card() error
    immediately after reclaiming it, so reclaim the host only in case
    of success.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Ulf Hansson

    Sergei Shtylyov
     
  • The driver depends on GOLDFISH but there isn't a build dependency
    so it's a good idea to allow the driver to always be built when the
    COMPILE_TEST option is enabled.

    That way, the driver can be built with a config generated by make
    allyesconfig and check if a patch would break the build.

    Signed-off-by: Luis de Bethencourt
    Reviewed-by: Jean Delvare
    Signed-off-by: Ulf Hansson

    Luis de Bethencourt
     
  • This algorithm will try 1 degree increments, since there's no way to tell
    what resolution the underlying phase code uses. As an added bonus, doing
    many tunings yields better results since some tests are run more than once
    (ex: if the underlying driver uses 45 degree increments, the tuning code
    will try the same angle more than once).

    It will then construct a list of good phase ranges (even ranges that cross
    360/0), will pick the biggest range then it will set the sample_clk to the
    middle of that range.

    We do not touch ciu_drive (and by extension define default-drive-phase).
    Drive phase is mostly used to define minimum hold times, while one could
    write some code to determine what phase meets the minimum hold time (ex 10
    degrees) this will not work with the current clock phase framework (which
    floors angles, so we'll get 0 deg, and there's no way to know what
    resolution the floors happen at). We assume that the default drive angles
    set by the hardware are good enough.

    If a device has device specific code (like exynos) then that will still
    take precedence, otherwise this new code will execute. If the device wants
    to tune, but has no sample_clk defined we'll return EIO with an error
    message.

    Signed-off-by: Alexandru M Stan
    Signed-off-by: Heiko Stuebner
    Acked-by: Jaehoon Chung
    Signed-off-by: Ulf Hansson

    Alexandru M Stan
     
  • We've introduced a new helper in the MMC core:
    mmc_regulator_set_vqmmc(). Let's use this in dw_mmc. Using this new
    helper has some advantages:

    1. We get the mmc_regulator_set_vqmmc() behavior of trying to match
    VQMMC and VMMC when the signal voltage is 3.3V. This ensures max
    compatibility.

    2. We get rid of a few more warnings when probing unsupported
    voltages.

    3. We get rid of some non-dw_mmc specific code in dw_mmc.

    Signed-off-by: Douglas Anderson
    Signed-off-by: Heiko Stuebner
    Acked-by: Jaehoon Chung
    Signed-off-by: Ulf Hansson

    Douglas Anderson
     
  • This adds logic to the MMC core to set VQMMC. This is expected to be
    called by MMC drivers like dw_mmc as part of (or instead of) their
    start_signal_voltage_switch() callback.

    A few notes:

    * When setting the signal voltage to 3.3V we do our best to make VQMMC
    and VMMC match. It's been reported that this makes some old cards
    happy since they were tested back in the day before UHS when VQMMC
    and VMMC were provided by the same regulator. A nice side effect of
    this is that we don't end up on the hairy edge of VQMMC (2.7V),
    which some EEs claim is a little too close to the minimum for
    comfort.
    This is done in two steps. At first we try to find a VQMMC within
    a 0.3V tolerance of VMMC and if this is not supported by the
    supplying regulator we try to find a suitable voltage within the
    whole 2.7V-3.6V area of the spec.

    * The two step approach is currently necessary, as the used
    regulator_set_voltage_triplet(min, target, max) uses a simple
    implementation that just tries two basic steps:
    regulator_set_voltage(target, max);
    regulator_set_voltage(min, target);
    So with only one step with 2.7-3.6V borders, if a suitable voltage
    is a bit below VMMC, we would directly get the lowest 2.7V
    which some boards (like Rockchips) don't like at all.

    * When setting the signal voltage to 1.8V or 1.2V we aim for that
    specific voltage instead of picking the lowest one in the range.

    * We very purposely don't print errors in mmc_regulator_set_vqmmc().
    There are cases where the MMC core will try several different
    voltages and we don't want to pollute the logs.

    Signed-off-by: Douglas Anderson
    Signed-off-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Douglas Anderson
     
  • We will shortly need the calculation of an ocr-bit to the actual
    voltage in a second place too, so move it from mmc_regulator_set_ocr
    to a common function mmc_ocrbitnum_to_vdd to make that possible.

    Signed-off-by: Heiko Stuebner
    Signed-off-by: Ulf Hansson

    Heiko Stuebner
     
  • MMC_CLKGATE was once invented to save power by gating the bus clock at
    request inactivity. At that time it served its purpose. The modern way to
    deal with power saving for these scenarios, is by using runtime PM.

    Nowadays, several host drivers have deployed runtime PM, but for those
    that haven't and which still cares power saving at request inactivity,
    it's certainly time to deploy runtime PM as it has been around for several
    years now.

    To simplify code to mmc core and thus decrease maintenance efforts, this
    patch removes all code related to MMC_CLKGATE.

    Signed-off-by: Ulf Hansson
    Reviewed-by: Linus Walleij

    Ulf Hansson
     
  • Signed-off-by: Yangbo Lu
    Signed-off-by: Ulf Hansson

    yangbo lu
     
  • Freescale eSDHC driver now supports both little-endian and
    big-endian mode eSDHC IPs for ARM and PPC. So, MMC_SDHCI_OF_ESDHC
    option needs to be reconfigured.

    Signed-off-by: Yangbo Lu
    Signed-off-by: Ulf Hansson

    yangbo lu
     
  • To support little endian eSDHC controller, we redefine both BE and
    LE IO accessors. In the new accessors, use ioread*/iowrite* instead
    of in_be32/out_be32 and will select accessors according to endian
    mode in probe function.

    Signed-off-by: Yangbo Lu
    Signed-off-by: Ulf Hansson

    yangbo lu
     
  • Add another PCI ID for an Intel eMMC host controller.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Ulf Hansson

    Adrian Hunter
     
  • drivers/mmc/host/sdhci-pci-core.c:447:1-4: WARNING: end returns can be simpified

    Simplify a trivial if-return sequence. Possibly combine with a
    preceding function call.

    Generated by: scripts/coccinelle/misc/simple_return.cocci

    CC: Ben Hutchings
    Signed-off-by: Fengguang Wu
    Signed-off-by: Ulf Hansson

    kbuild test robot