Commit f2b3f49e authored by David Brown's avatar David Brown
Browse files

Merge remote-tracking branch 'kdorfman/emmc_base' into merge/kdorfman



Merge eMMC 4.5 code from upstream kernel. This merges the following
35 commits:

commit a4df3ae4
Author: Paul Gortmaker <paul.gortmaker@windriver.com>
Date:   Sun Jul 3 15:15:51 2011 -0400

    mmc: Add module.h to drivers/mmc users assuming implicit presence.

    We are cleaning up the implicit presence of module.h; these guys are
    some of the people who just assume it will be there.  Call it out
    explitly for those that really need it.

    Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    [kdorfman@codeaurora.org: files are not exists: sdhci-pxav2.c, sdhci-pxav3.c
    file is not updated: sdhci-pltfm.c]
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/mmc_test.c       |    1 +
 drivers/mmc/host/mmc_spi.c        |    1 +
 drivers/mmc/host/mxs-mmc.c        |    1 +
 drivers/mmc/host/sdhci-of-esdhc.c |    1 +
 drivers/mmc/host/sdhci-of-hlwd.c  |    1 +
 drivers/mmc/host/sdhci-pci.c      |    1 +
 drivers/mmc/host/sdhci-spear.c    |    1 +
 drivers/mmc/host/sdhci-tegra.c    |    1 +
 drivers/mmc/host/sdhci.c          |    1 +
 drivers/mmc/host/sdricoh_cs.c     |    1 +
 drivers/mmc/host/sh_mmcif.c       |    1 +
 drivers/mmc/host/sh_mobile_sdhi.c |    1 +
 drivers/mmc/host/tifm_sd.c        |    1 +
 drivers/mmc/host/via-sdmmc.c      |    1 +
 14 files changed, 14 insertions(+), 0 deletions(-)

commit c861f32e
Author: Kyungmin Park <kyungmin.park@samsung.com>
Date:   Thu Nov 17 13:34:33 2011 +0900

    mmc: core: Fix typo at mmc_card_sleep

    Fix wrong bus_ops->sleep check.  (This isn't expected to have real-world
    consequences, because the mmc core always defines both 'awake' and
    'sleep' ops.)

    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

commit 3e0246c4
Author: Girish K S <girish.shivananjappa@linaro.org>
Date:   Tue Nov 15 11:55:46 2011 +0530

    mmc: core: Fix power_off_notify during suspend

    The eMMC 4.5 devices respond to only RESET and AWAKE command in the
    sleep state. Hence the mmc switch command to notify power off state
    should be sent before the device enters sleep state.

    This patch fixes the same.

    Signed-off-by: default avatarGirish K S <girish.shivananjappa@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/core.c |   83 ++++++++++++++++++++++++++++------------------
 drivers/mmc/core/mmc.c  |    2 +-
 2 files changed, 51 insertions(+), 34 deletions(-)

commit 0993da71
Author: Girish K S <girish.shivananjappa@linaro.org>
Date:   Fri Nov 4 16:22:47 2011 +0530

    mmc: core: Fix setting power notify state variable for non-eMMC

    This patch skips the setting of the power notify state variable
    for non eMMC 4.5 devices. Also fixes the problem of omap_hsmmc
    noisy/broken for suspend resume reported by Kevin Hilman.

    Signed-off-by: default avatarGirish K S <girish.shivananjappa@linaro.org>
    Acked-by: default avatarUlf Hansson <ulf.hansson@stericsson.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/mmc.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

commit 1ebbc24a
Author: Seungwon Jeon <tgih.jun@samsung.com>
Date:   Tue Oct 25 09:43:12 2011 +0900

    mmc: core: Cleanup eMMC4.5 conditionals

    Code cleanup, putting all eMMC 4.5 detection cases together.
    This patch removes one if-statement and assembles all. And it also
    removes variable initialization below else-statement -- all members
    of card structure are already set to zero at card-init.

    Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/mmc.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

commit dc5bc789
Author: Paul Walmsley <paul@pwsan.com>
Date:   Thu Oct 6 14:50:33 2011 -0600

    mmc: core: add workaround for controllers with broken multiblock reads

    Due to hardware bugs, some MMC host controllers don't support
    multiple-block reads[1].  To resolve, add a new MMC capability flag,
    MMC_CAP2_NO_MULTI_READ, which can be set by affected host controller
    drivers.  When this capability is set, all reads will be issued one
    sector at a time.

    1. See for example Advisory 2.1.1.128 "MMC: Multiple Block Read
    Operation Issue" in _OMAP3530/3525/3515/3503 Silicon Errata_
    Revision F (October 2010) (SPRZ278F), available from
    http://focus.ti.com/lit/er/sprz278f/sprz278f.pdf



    Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
    Cc: Dave Hylands <dhylands@gmail.com>
    Tested-by: default avatarSteve Sakoman <sakoman@gmail.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |   21 ++++++++++++++-------
 include/linux/mmc/host.h |    1 +
 2 files changed, 15 insertions(+), 7 deletions(-)

commit b8ee2c1f
Author: Jaehoon Chung <jh80.chung@samsung.com>
Date:   Tue Oct 18 01:26:42 2011 -0400

    mmc: core: support HPI send command

    HPI command is defined in eMMC4.41.
    This feature is important for eMMC4.5 devices.

    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/core.c    |   57 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/mmc.c     |   31 ++++++++++++++++++++++++
 drivers/mmc/core/mmc_ops.c |   31 ++++++++++++++++++++++++
 drivers/mmc/core/mmc_ops.h |    1 +
 include/linux/mmc/card.h   |    4 +++
 include/linux/mmc/core.h   |    1 +
 include/linux/mmc/mmc.h    |    3 ++
 7 files changed, 128 insertions(+), 0 deletions(-)

commit a2a134fc
Author: Seungwon Jeon <tgih.jun@samsung.com>
Date:   Tue Oct 18 13:20:57 2011 +0900

    mmc: core: Modify the timeout value for writing power class

    This patch will apply the generic CMD6 timeout to switch command
    for power class.

    Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

commit f8764905
Author: Seungwon Jeon <tgih.jun@samsung.com>
Date:   Fri Oct 14 14:03:21 2011 +0900

    mmc: core: Add cache control for eMMC4.5 device

    This patch adds cache feature of eMMC4.5 Spec.
    If device supports cache capability, host can utilize some specific
    operations.

    Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |   14 ++++++----
 drivers/mmc/core/core.c  |   63 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/mmc.c   |   23 ++++++++++++++++
 include/linux/mmc/card.h |    2 +
 include/linux/mmc/core.h |    1 +
 include/linux/mmc/host.h |    3 ++
 include/linux/mmc/mmc.h  |    3 ++
 7 files changed, 103 insertions(+), 6 deletions(-)

commit a3777a73
Author: Kyungmin Park <kyungmin.park@samsung.com>
Date:   Tue Oct 18 09:34:04 2011 +0900

    mmc: core: new discard feature support at eMMC v4.5

    MMC v4.5 supports the DISCARD feature (CMD38).  It's different from
    trim and there's no check bit.  Currently it's only supported at v4.5.

    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |    4 +++-
 drivers/mmc/core/core.c  |   14 ++++++++++++++
 drivers/mmc/core/mmc.c   |    4 ++++
 include/linux/mmc/card.h |    3 +++
 include/linux/mmc/core.h |    2 ++
 5 files changed, 26 insertions(+), 1 deletions(-)

commit ed1ac8ae
Author: Kyungmin Park <kyungmin.park@samsung.com>
Date:   Fri Oct 14 14:15:48 2011 +0900

    mmc: core: mmc sanitize feature support for v4.5

    In the v4.5, there's no secure erase & trim support.
    Instead it supports the sanitize feature.

    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |    9 ++++++++-
 drivers/mmc/card/queue.c |    2 +-
 drivers/mmc/core/core.c  |    8 ++++++++
 include/linux/mmc/core.h |    1 +
 include/linux/mmc/mmc.h  |    2 ++
 5 files changed, 20 insertions(+), 2 deletions(-)

commit 51abf16d
Author: Girish K S <girish.shivananjappa@linaro.org>
Date:   Thu Oct 13 12:04:16 2011 +0530

    mmc: core: Add Power Off Notify Feature eMMC 4.5

    This patch adds support for the power off notify feature, available in
    eMMC 4.5 devices. If the host has support for this feature, then the
    mmc core will notify the device by setting the POWER_OFF_NOTIFICATION
    byte in the extended csd register with a value of 1 (POWER_ON).

    For suspend mode short timeout is used, whereas for the normal poweroff
    long timeout is used.

    Signed-off-by: default avatarGirish K S <girish.shivananjappa@linaro.org>
    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    [kdorfman@codeaurora.org: caps2 field added to struct mmc_host]
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/core.c  |   34 ++++++++++++++++++++++++++++++++++
 drivers/mmc/core/mmc.c   |   23 +++++++++++++++++++++--
 drivers/mmc/host/sdhci.c |    9 +++++++++
 include/linux/mmc/card.h |    6 ++++++
 include/linux/mmc/host.h |    8 ++++++++
 include/linux/mmc/mmc.h  |    6 ++++++
 6 files changed, 84 insertions(+), 2 deletions(-)

commit 0007bbca
Author: Seungwon Jeon <tgih.jun@samsung.com>
Date:   Fri Sep 23 14:15:29 2011 +0900

    mmc: core: Add default timeout value for CMD6

    EXT_CSD[248] includes the default maximum timeout for CMD6.
    This field is added at eMMC4.5 Spec. And it can be used for default
    timeout except for some operations which don't define the timeout
    (i.e. background operation, sanitize, flush cache) in eMMC4.5 Spec.

    Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/mmc.c   |   16 ++++++++++++----
 include/linux/mmc/card.h |    1 +
 include/linux/mmc/mmc.h  |    1 +
 3 files changed, 14 insertions(+), 4 deletions(-)

commit b5716b4b
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Mon Oct 3 15:33:33 2011 +0300

    mmc: core: move ->request() call from atomic context

    mmc_request_done() is sometimes called from interrupt or other atomic
    context.  Mostly all mmc_request_done() does is complete(), however it
    contains code to retry on error, which uses ->request().  As the error
    path is certainly not performance critical, this may be moved to the
    waiting function mmc_wait_for_req_done().

    This allows ->request() to use runtime PM get_sync() and guarantee it
    is never in an atomic context.

    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Acked-by: default avatarUlf Hansson <ulf.hansson@stericsson.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/core.c |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

commit 8fe21151
Author: Andrei Warkentin <andrey.warkentin@gmail.com>
Date:   Sat Sep 24 12:12:30 2011 -0400

    mmc: core: ext_csd.raw_* used in comparison but never set

    f39b2dd9 ("mmc: core: Bus width testing needs to handle suspend/resume")
    added code to only compare read-only ext_csd fields in bus width testing
    code, yet it's comparing some fields that are never set.

    The affected fields are ext_csd.raw_erased_mem_count and
    ext_csd.raw_partition_support.

    Signed-off-by: default avatarAndrei Warkentin <andrey.warkentin@gmail.com>
    Acked-by: default avatarPhilip Rakity <prakity@marvell.com>
    Cc: <stable@kernel.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/mmc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

commit 4495671c
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Fri Sep 23 12:48:20 2011 +0300

    mmc: block: fix boot partition switch error path

    In the case of a switch error, do not update partition config as though
    the switch succeeded, and ensure blk_end_request is called on the
    failed request.

    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Acked-by: default avatarAndrei Warkentin <andrey.warkentin@gmail.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

commit d4674831
Author: Girish K S <girish.shivananjappa@linaro.org>
Date:   Fri Sep 23 20:41:47 2011 +0530

    mmc: core: eMMC 4.5 Power Class Selection Feature

    This patch adds the power class selection feature available for mmc
    versions 4.0 and above.  During the enumeration stage before switching
    to the lower data bus, check if the power class is supported for the
    current bus width. If the power class is available then switch to the
    power class and use the higher data bus. If power class is not supported
    then switch to the lower data bus in a worst case.

    Signed-off-by: default avatarGirish K S <girish.shivananjappa@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/mmc.c  |   96 +++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mmc/mmc.h |   14 +++++++
 2 files changed, 110 insertions(+), 0 deletions(-)

commit 9ac56f35
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Mon Aug 29 16:42:15 2011 +0300

    mmc: block: add eMMC hardware reset support

    For cards that support hardware reset (just eMMC), try a reset and
    retry before returning an I/O error.  However this is not done for
    ECC errors and is never done twice for the same operation type
    (READ, WRITE, DISCARD, SECURE DISCARD) until that type of operation
    again succeeds.

    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |  201 ++++++++++++++++++++++++++++++++--------------
 drivers/mmc/core/core.c  |    4 +-
 2 files changed, 144 insertions(+), 61 deletions(-)

commit 94a20cdb
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Mon Aug 29 16:42:14 2011 +0300

    mmc: mmc-test: add eMMC hardware reset test

    MMC core provides a checking function that checks if the reset
    has happended.  Add a test to use that function.

    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/mmc_test.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

commit 02efa5a7
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Mon Aug 29 16:42:11 2011 +0300

    mmc: core: add eMMC hardware reset support

    eMMC's may have a hardware reset line.  This patch provides a
    host controller operation to implement hardware reset and
    a function to reset and reinitialize the card.  Also, for MMC,
    the reset is always performed before initialization.

    The host must set the new host capability MMC_CAP_HW_RESET
    to enable hardware reset.

    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/core.c  |   94 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/mmc/core/mmc.c   |    4 +-
 include/linux/mmc/card.h |    1 +
 include/linux/mmc/core.h |    3 +
 include/linux/mmc/host.h |    2 +
 include/linux/mmc/mmc.h  |    4 ++
 6 files changed, 107 insertions(+), 1 deletions(-)

commit bb929d59
Author: Venkatraman S <svenkatr@ti.com>
Date:   Thu Aug 25 00:30:50 2011 +0530

    mmc: fix integer assignments to pointer

    Fix the sparse warning output "warning: Using plain integer as NULL pointer"

    Signed-off-by: default avatarVenkatraman S <svenkatr@ti.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c    |    4 ++--
 drivers/mmc/core/core.c     |    2 +-
 drivers/mmc/core/mmc_ops.c  |    4 ++--
 drivers/mmc/core/sd_ops.c   |    8 ++++----
 drivers/mmc/core/sdio_ops.c |    2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)

commit 1b56ce1d
Author: Jaehoon Chung <jh80.chung@samsung.com>
Date:   Wed Aug 10 18:46:28 2011 +0900

    mmc: core: use defined R1_STATE_PRG macro for card status

    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/mmc_test.c |    2 +-
 drivers/mmc/core/core.c     |    2 +-
 drivers/mmc/core/mmc_ops.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

commit 0d373484
Author: Kyungmin Park <kyungmin.park@samsung.com>
Date:   Tue Jul 26 17:12:37 2011 +0900

    mmc: core: Detect eMMC v4.5 ext_csd entries

    The eMMC v4.5 Spec is released now:

    EXT_CSD_REV	Extended CSD Revision
    255-7		Reserved
    6		Revision 1.6 (for MMC v4.5)
    5		Revision 1.5 (for MMV v4.41)
    ...

    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

commit f011effa
Author: Jaehoon Chung <jh80.chung@samsung.com>
Date:   Wed Jul 13 17:02:16 2011 +0900

    mmc: block: fixed NULL pointer dereference

    We already check for ongoing async transfers when handling discard
    requests, but not in mmc_blk_issue_flush().  This patch fixes that
    omission.

    Tested with an SDHCI controller and eMMC4.41.

    Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarPer Forlin <per.forlin@linaro.org>
    Cc: <stable@kernel.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

commit f45f4cb2
Author: Per Forlin <per.forlin@linaro.org>
Date:   Sun Jul 10 21:21:59 2011 +0200

    mmc: documentation of mmc non-blocking request usage and design.

    Documentation about the background and the design of mmc non-blocking.
    Host driver guidelines to minimize request preparation overhead.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 Documentation/mmc/00-INDEX          |    2 +
 Documentation/mmc/mmc-async-req.txt |   87 +++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 0 deletions(-)

commit 91fd00b8
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:33 2011 +0200

    mmc: block: add handling for two parallel block requests in issue_rw_rq

    Change mmc_blk_issue_rw_rq() to become asynchronous.
    The execution flow looks like this:

    * The mmc-queue calls issue_rw_rq(), which sends the request
      to the host and returns back to the mmc-queue.
    * The mmc-queue calls issue_rw_rq() again with a new request.
    * This new request is prepared in issue_rw_rq(), then it waits for
      the active request to complete before pushing it to the host.
    * When the mmc-queue is empty it will call issue_rw_rq() with a NULL
      req to finish off the active request without starting a new request.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav Poddar <sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |   86 ++++++++++++++++++++++++++++++++++++++--------
 drivers/mmc/card/queue.c |   18 +++++++---
 drivers/mmc/card/queue.h |    1 +
 3 files changed, 85 insertions(+), 20 deletions(-)

commit d07424b5
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:31 2011 +0200

    mmc: queue: add a second mmc queue request member

    Add an additional mmc queue request instance to make way for two active
    block requests. One request may be active while the other request is
    being prepared.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav Poddar <sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/queue.c |   44 ++++++++++++++++++++++++++++++++++++++++++--
 drivers/mmc/card/queue.h |    3 ++-
 2 files changed, 44 insertions(+), 3 deletions(-)

commit d737c89c
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:30 2011 +0200

    mmc: block: move error path in issue_rw_rq to a separate function.

    Break out code without functional changes. This simplifies the code and
    makes way for handling two parallel requests.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav <Poddar&lt;sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    [kdorfman@codeaurora.org: added ERR_NOMEDIA processing]
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |  222 +++++++++++++++++++++++++++-------------------
 1 files changed, 132 insertions(+), 90 deletions(-)

commit a69554e4
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:29 2011 +0200

    mmc: block: add a block request prepare function

    Break out code from mmc_blk_issue_rw_rq to create a block request prepare
    function. This doesn't change any functionallity. This helps when handling
    more than one active block request.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav Poddar <sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |  218 ++++++++++++++++++++++++----------------------
 1 files changed, 114 insertions(+), 104 deletions(-)

commit cb86e7b4
Author: Per Forlin <per.forlin@linaro.org>
Date:   Sat Jul 9 17:12:36 2011 -0400

    mmc: block: add member in mmc queue struct to hold request data

    The way the request data is organized in the mmc queue struct, it only
    allows processing of one request at a time.  This patch adds a new struct
    to hold mmc queue request data such as sg list, request, blk request and
    bounce buffers, and updates any functions depending on the mmc queue
    struct. This prepares for using multiple active requests in one mmc queue.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav Poddar <sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    [kdorman@codeaurora.org: removed CONFIG_MMC_PERF_PROFILING code]
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/block.c |  109 +++++++++++++++-----------------
 drivers/mmc/card/queue.c |  158 ++++++++++++++++++++--------------------------
 drivers/mmc/card/queue.h |   31 +++++++---
 3 files changed, 142 insertions(+), 156 deletions(-)

commit 514a33f5
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:27 2011 +0200

    mmc: mmc_test: test to measure how sg_len affect performance

    Add a test that measures how the mmc bandwidth depends on the numbers of
    sg elements in the sg list. The transfer size if fixed and sg length goes
    from a few up to 512. The purpose is to measure overhead caused by
    multiple sg elements.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav Poddar <sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/mmc_test.c |  151 +++++++++++++++++++++++++++++++++++++++----
 1 files changed, 139 insertions(+), 12 deletions(-)

commit 069dc3af
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:26 2011 +0200

    mmc: mmc_test: add test for non-blocking transfers

    Add four tests for read and write performance per
    different transfer size, 4k to 4M.
     * Read using blocking mmc request
     * Read using non-blocking mmc request
     * Write using blocking mmc request
     * Write using non-blocking mmc request

    The host driver must support pre_req() and post_req()
    in order to run the non-blocking test cases.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav <Poddar&lt;sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/mmc_test.c |  318 +++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 310 insertions(+), 8 deletions(-)

commit f9ce385e
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:25 2011 +0200

    mmc: mmc_test: add debugfs file to list all tests

    Add a debugfs file "testlist" to print all available tests.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav <Poddar&lt;sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/mmc_test.c |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

commit 1cb54eaa
Author: Per Forlin <per.forlin@linaro.org>
Date:   Fri Jul 1 18:55:22 2011 +0200

    mmc: core: add non-blocking mmc request function

    Previously there has only been one function mmc_wait_for_req()
    to start and wait for a request. This patch adds:

     * mmc_start_req() - starts a request wihtout waiting
       If there is on ongoing request wait for completion
       of that request and start the new one and return.
       Does not wait for the new command to complete.

    This patch also adds new function members in struct mmc_host_ops
    only called from core.c:

     * pre_req - asks the host driver to prepare for the next job
     * post_req - asks the host driver to clean up after a completed job

    The intention is to use pre_req() and post_req() to do cache maintenance
    while a request is active. pre_req() can be called while a request is
    active to minimize latency to start next job. post_req() can be used after
    the next job is started to clean up the request. This will minimize the
    host driver request end latency. post_req() is typically used before
    ending the block request and handing over the buffer to the block layer.

    Add a host-private member in mmc_data to be used by pre_req to mark the
    data. The host driver will then check this mark to see if the data is
    prepared or not.

    Signed-off-by: default avatarPer Forlin <per.forlin@linaro.org>
    Acked-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
    Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarVenkatraman S <svenkatr@ti.com>
    Tested-by: default avatarSourav Poddar <sourav.poddar@ti.com>
    Tested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    [kdorfman@codeaurora.org: mmc_card_removed call removed. Instead
    wait_for_completion_io used wait_for_completion]
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/core/core.c  |  117 ++++++++++++++++++++++++++++++++++++++++------
 include/linux/mmc/core.h |    6 ++-
 include/linux/mmc/host.h |   22 +++++++++
 3 files changed, 130 insertions(+), 15 deletions(-)

commit 81306ad7
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Tue Jun 28 17:16:02 2011 +0300

    mmc: queue: let host controllers specify maximum discard timeout

    Some host controllers will not operate without a hardware
    timeout that is limited in value.  However large discards
    require large timeouts, so there needs to be a way to
    specify the maximum discard size.

    A host controller driver may now specify the maximum discard
    timeout possible so that max_discard_sectors can be calculated.

    However, for eMMC when the High Capacity Erase Group Size
    is not in use, the timeout calculation depends on clock
    rate which may change.  For that case Preferred Erase Size
    is used instead.

    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>

 drivers/mmc/card/queue.c |   33 ++++++++++++++------
 drivers/mmc/core/core.c  |   76 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/mmc/core.h |    1 +
 include/linux/mmc/host.h |    1 +
 4 files changed, 101 insertions(+), 10 deletions(-)

Change-Id: Id2244b1017c17588beac0ffaca6b793069cce565
Signed-off-by: default avatarDavid Brown <davidb@codeaurora.org>
parents 1268d1e0 a4df3ae4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment