15 Jan, 2012

1 commit

  • Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1

    * tag 'for-linus' of git://github.com/rustyrussell/linux:
    module_param: check that bool parameters really are bool.
    intelfbdrv.c: bailearly is an int module_param
    paride/pcd: fix bool verbose module parameter.
    module_param: make bool parameters really bool (drivers & misc)
    module_param: make bool parameters really bool (arch)
    module_param: make bool parameters really bool (core code)
    kernel/async: remove redundant declaration.
    printk: fix unnecessary module_param_name.
    lirc_parallel: fix module parameter description.
    module_param: avoid bool abuse, add bint for special cases.
    module_param: check type correctness for module_param_array
    modpost: use linker section to generate table.
    modpost: use a table rather than a giant if/else statement.
    modules: sysfs - export: taint, coresize, initsize
    kernel/params: replace DEBUGP with pr_debug
    module: replace DEBUGP with pr_debug
    module: struct module_ref should contains long fields
    module: Fix performance regression on modules with large symbol tables
    module: Add comments describing how the "strmap" logic works

    Fix up conflicts in scripts/mod/file2alias.c due to the new linker-
    generated table approach to adding __mod_*_device_table entries. The
    ARM sa11x0 mcp bus needed to be converted to that too.

    Linus Torvalds
     

13 Jan, 2012

4 commits

  • module_param(bool) used to counter-intuitively take an int. In
    fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
    trick.

    It's time to remove the int/unsigned int option. For this version
    it'll simply give a warning, but it'll break next kernel version.

    Acked-by: Mauro Carvalho Chehab
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Performing MMC block IO with simultaneous STR can lead to a deadlock: the
    mmc_pm_notify() function claims the host and then calls bus .remove()
    method, which lands in mmc_blk_remove(), which calls mmc_blk_remove_req()
    then it goes to -> mmc_cleanup_queue() -> kthread_stop(), which waits for
    the mmc-block thread to stop. If the mmc-block thread at that time is
    processing block requests, it will also try to claim the host in
    mmc_blk_issue_rq() and block there. This patch fixes the problem by
    calling .remove() before claiming the host.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Arindam Nath
    Signed-off-by: Chris Ball

    Guennadi Liakhovetski
     
  • This patch adds the support of the HS200 bus speed for eMMC 4.5 devices.
    The eMMC 4.5 devices have support for 200MHz bus speed. The function
    prototype of the tuning function is modified to handle the tuning
    command number which is different in sd and mmc case.

    Signed-off-by: Girish K S
    Signed-off-by: Philip Rakity
    Signed-off-by: Chris Ball

    Girish K S
     
  • Turning the cache off implies flushing cache which doesn't define
    maximum timeout unlike cache-on. This patch will apply the generic
    CMD6 timeout only for cache-on. Additionally the kernel message is
    added for checking failure case of cache-on.

    Signed-off-by: Seungwon Jeon
    Signed-off-by: Chris Ball

    Seungwon Jeon
     

12 Jan, 2012

12 commits

  • Host may now use MMC_CAP2_NO_SLEEP_CMD to disable the use
    of eMMC sleep/awake command.

    This option can be used when your platform has a buggy
    kernel crash dump software, which is supposed to store
    the dump on the eMMC, but is not able to wake up the eMMC
    from sleep state.

    In particular, failures have been seen with u-boot; even if
    it is fixed there, platforms will be slow to update their
    bootloader binaries.

    Signed-off-by: Ulf Hansson
    Reviewed-by: Hanumath Prasad
    Reviewed-by: Srinidhi Kasagar
    Acked-by: Subhash Jadavani
    Signed-off-by: Chris Ball

    Ulf Hansson
     
  • While calling mmc_cache_ctrl() a host is not claimed. This patch
    adds the mmc_try_claim_host() for quick response in suspend.

    Signed-off-by: Seungwon Jeon
    Signed-off-by: Chris Ball

    Seungwon Jeon
     
  • This patch adds a primitive helper to support card hotplug detection on
    platforms, where a GPIO, capable of producing interrupts, is used for
    detection of card-insertion and -removal events.

    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Chris Ball

    Guennadi Liakhovetski
     
  • This patch fixes the wrong comparison before setting the interface
    voltage in DDR mode.

    The assignment to the variable ddr before comaprison is either
    ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison
    is done with the extended csd value if ddr == EXT_CSD_CARD_TYPE_DDR_1_2V.

    Signed-off-by: Girish K S
    Acked-by: Subhash Jadavani
    Acked-by: Philip Rakity
    Cc:
    Signed-off-by: Chris Ball

    Girish K S
     
  • c31b50e (mmc: core: Use delayed work in clock gating framework,
    2011-11-14) missed a few things during review:

    o A useless pr_info()

    o milliseconds was written as two words

    o The sysfs file had units in its output

    Fix all three problems.

    Signed-off-by: Stephen Boyd
    Cc: Sujit Reddy Thumma
    Signed-off-by: Chris Ball

    Stephen Boyd
     
  • Enable boot partitions to be read-only locked until next power on via
    a sysfs entry. There will be one sysfs entry for each boot partition:

    /sys/block/mmcblkXbootY/ro_lock_until_next_power_on

    Each boot partition is locked by writing 1 to its file.

    Signed-off-by: Johan Rudholm
    Signed-off-by: John Beckett
    Signed-off-by: Chris Ball

    Johan Rudholm
     
  • Add a function mmc_detect_card_removed() which upper layers can use to
    determine immediately if a card has been removed. This function should
    be called after an I/O request fails so that all queued I/O requests
    can be errored out immediately instead of waiting for the card device
    to be removed.

    Signed-off-by: Adrian Hunter
    Acked-by: Sujit Reddy Thumma
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • This patch adds support for sdio UHS cards per the version 3.0
    spec.

    UHS mode is only enabled for version 3.0 cards when both the
    host and the controller support UHS modes.

    1.8v signaling support is removed if both the card and the
    host do not support UHS. This is done to maintain
    compatibility and some system/card combinations break when
    1.8v signaling is enabled when the host does not support UHS.

    Signed-off-by: Philip Rakity
    Signed-off-by: Aaron Lu
    Reviewed-by: Arindam Nath
    Tested-by: Bing Zhao
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • Current clock gating framework disables the MCI clock as soon as the
    request is completed and enables it when a request arrives. This aggressive
    clock gating framework, when enabled, cause following issues:

    When there are back-to-back requests from the Queue layer, we unnecessarily
    end up disabling and enabling the clocks between these requests since 8MCLK
    clock cycles is a very short duration compared to the time delay between
    back to back requests reaching the MMC layer. This overhead can effect the
    overall performance depending on how long the clock enable and disable
    calls take which is platform dependent. For example on some platforms we
    can have clock control not on the local processor, but on a different
    subsystem and the time taken to perform the clock enable/disable can add
    significant overhead.

    Also if the host controller driver decides to disable the host clock too
    when mmc_set_ios function is called with ios.clock=0, it adds additional
    delay and it is highly possible that the next request had already arrived
    and unnecessarily blocked in enabling the clocks. This is seen frequently
    when the processor is executing at high speeds and in multi-core platforms
    thus reduces the overall throughput compared to if clock gating is
    disabled.

    Fix this by delaying turning off the clocks by posting request on
    delayed workqueue. Also cancel the unscheduled pending work, if any,
    when there is access to card.

    sysfs entry is provided to tune the delay as needed, default
    value set to 200ms.

    Signed-off-by: Sujit Reddy Thumma
    Acked-by: Linus Walleij
    Signed-off-by: Chris Ball

    Sujit Reddy Thumma
     
  • This patch is to expose the actual SDCLK frequency in
    /sys/kernel/debug/mmcX/ios entry.

    For example, if the max clk for a normal speed card is 20MHz this
    is reported in /sys/kernel/debug/mmcX/ios. Unfortunately the actual
    SDCLK frequency (i.e. Baseclock / divisor) is not reported at all:
    for example, in that case, on Arasan HC, it should be 48/4=12 (MHz).

    Signed-off-by: Giuseppe Cavallaro
    Acked-by: Adrian Hunter
    Signed-off-by: Chris Ball

    Giuseppe CAVALLARO
     
  • This patch allows any block size to be set on the SDIO link,
    and still have an arbitrary sized packet (adjusted in size by
    using sdio_align_size) transferred in an optimal way
    (preferably one transfer).

    Previously if the block size was larger than the default of
    512 bytes and the transfer size was exactly one block size
    (possibly thanks to using sdio_align_size to get an optimal
    transfer size), it was sent as a number of byte transfers instead
    of one block transfer. Also if the number of blocks was
    (max_blocks * N) + 1, the tranfer would be conducted with a number
    of blocks and finished off with a number of byte transfers.

    When doing this change it was also possible to break out the quirk
    for broken byte mode in a much cleaner way, and collect the logic of
    when to do byte or block transfer in one function instead of two.

    Signed-off-by: Stefan Nilsson XK
    Signed-off-by: Ulf Hansson
    Acked-by: Linus Walleij
    Signed-off-by: Chris Ball

    Stefan Nilsson XK
     
  • Add new macros for the high speed 50MHz case, rather than having
    a confusing reuse of the value for UHS SDR50, which is 100MHz.

    Reported-by: Aaron Lu
    Signed-off-by: Chris Ball

    Qiang Liu
     

20 Dec, 2011

1 commit

  • When SDIO runtime PM was originally introduced, we immediately faced
    two regressions with two different chipsets, and in response decided
    not to enable it by default.

    With the recent work on the 8686 we hoped we found all the gotchas,
    so 08da834 did make sense (at least experimentally).

    Unfortunately we now see that some setups out there still refuse to
    work when SDIO runtime PM is enabled by default (see
    http://www.spinics.net/lists/linux-mmc/msg11161.html), and obviously
    we can't live with these kind of regressions.

    This reverts commit 08da834a24312157f512224691ad1fddd11c1073.

    Signed-off-by: Ohad Ben-Cohen
    Cc: Daniel Drake
    Signed-off-by: Chris Ball

    Ohad Ben-Cohen
     

11 Dec, 2011

5 commits

  • mmc_suspend_host() tries to claim host during suspend
    and release it only when the bus suspend operation is
    compeleted. If CONFIG_MMC_UNSAFE_RESUME is defined and
    the host is flagged as removable, mmc_suspend_host()
    tries to remove the card. In this process, the file system
    sync can get blocked trying to acquire host which is already
    claimed by mmc_suspend_host() causing deadlock.

    Fix this deadlock by releasing host before ->remove() is called.

    Signed-off-by: Sujit Reddy Thumma
    Acked-by: Ulf Hansson
    Acked-by: Linus Walleij
    Signed-off-by: Chris Ball

    Sujit Reddy Thumma
     
  • 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: Kyungmin Park
    Signed-off-by: Chris Ball

    Kyungmin Park
     
  • 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: Girish K S
    Signed-off-by: Chris Ball

    Girish K S
     
  • 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: Girish K S
    Acked-by: Ulf Hansson
    Signed-off-by: Chris Ball

    Girish K S
     
  • Adds a quirk that sets the data read timeout to a fixed value instead
    of relying on the information in the CSD. The timeout value chosen
    is 300ms since that has proven enough for the problematic cards found,
    but could be increased if other cards require this.

    This patch also enables this quirk for certain Micron cards known to
    have this problem.

    Signed-off-by: Stefan Nilsson XK
    Signed-off-by: Ulf Hansson
    Acked-by: Linus Walleij
    Cc:
    Signed-off-by: Chris Ball

    Stefan Nilsson XK
     

01 Nov, 2011

2 commits


27 Oct, 2011

15 commits

  • 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: Seungwon Jeon
    Signed-off-by: Chris Ball

    Seungwon Jeon
     
  • While trying to suspend the mmc host there could still be
    ongoing requests that we need to wait for. At the same time
    a device driver must respond to a suspend request rather quickly.

    Instead of potentially wait "forever" by claiming the host we now
    "try" to claim the host instead. If it fails, -EBUSY is returned.

    Signed-off-by: Ulf Hansson
    Reviewed-by: Sujit Reddy Thumma
    Acked-by: Linus Walleij
    Signed-off-by: Chris Ball

    Ulf Hansson
     
  • Table 6-2: CCCR bit Definitions, address 00h. Part E1 SDIO Simplified
    Specification Version 3.00, Feb. 25, 2011.

    This patch has been tested with Marvell WLAN device SD8797.

    Signed-off-by: Bing Zhao
    Signed-off-by: Chris Ball

    Bing Zhao
     
  • Here is Essential conditions to indicate Version 3.00 Card
    (SD_SPEC=2 and SD_SPEC3=1) :
    (1) The card shall support CMD6
    (2) The card shall support CMD8
    (3) The card shall support CMD42
    (4) User area capacity shall be up to 2GB (SDSC) or 32GB (SDHC)
    User area capacity shall be more than or equal to 32GB and
    up to 2TB (SDXC)
    (5) Speed Class shall be supported (SDHC or SDXC)

    So even if SD card doesn't support any of the newly defined
    UHS-I bus speed mode, it can advertise itself as SD3.0 cards
    as long as it supports all the essential conditions of
    SD3.0 cards. Given this, these type of cards should atleast
    run in High Speed mode @50MHZ if it supports HS.

    But current initialization sequence for SD3.0 cards is
    such that these non-UHS-I SD3.0 cards runs in Default
    Speed mode @25MHz.

    This patch makes sure that these non-UHS-I SD3.0 cards run
    in High Speed Mode @50MHz.

    Tested this patch with SanDisk Extreme SDHC 8GB Class 10 card.

    Reported-by: "Hiremath, Vaibhav"
    Signed-off-by: Subhash Jadavani
    Signed-off-by: Chris Ball

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

    Signed-off-by: Jaehoon Chung
    Signed-off-by: Chris Ball

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

    Signed-off-by: Seungwon Jeon
    Signed-off-by: Jaehoon Chung
    Signed-off-by: Chris Ball

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

    Signed-off-by: Seungwon Jeon
    Signed-off-by: Chris Ball

    Seungwon Jeon
     
  • 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: Kyungmin Park
    Signed-off-by: Jaehoon Chung
    Signed-off-by: Chris Ball

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

    Signed-off-by: Kyungmin Park
    Signed-off-by: Jaehoon Chung
    Signed-off-by: Chris Ball

    Kyungmin Park
     
  • 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: Girish K S
    Signed-off-by: Jaehoon Chung
    Signed-off-by: Chris Ball

    Girish K S
     
  • All the files using printk function for displaying kernel messages
    in the mmc driver have been replaced with corresponding macro.

    Signed-off-by: Girish K S
    Signed-off-by: Chris Ball

    Girish K S
     
  • 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: Seungwon Jeon
    Signed-off-by: Jaehoon Chung
    Signed-off-by: Chris Ball

    Seungwon Jeon
     
  • 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: Adrian Hunter
    Acked-by: Ulf Hansson
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • Commit "mmc: add module param to set fault injection attributes" adds
    a module_param to this file. But it is relying on the old implicit
    "module.h is everywhere" behaviour, and without the explicit include
    of moduleparam.h, the pending module.h split up produces this error:

    core/debugfs.c:28:35: error: expected ')' before numeric constant

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Paul Gortmaker
    Signed-off-by: Chris Ball

    Stephen Rothwell
     
  • It allows gerneral purpose partitions in MMC Device. And I try to simply
    make mmc_blk_alloc_parts using mmc_part structure suggested by Andrei
    Warkentin. After patching, we see general purpose partitions like this:
    > cat /proc/partitions
    179 0 847872 mmcblk0
    179 192 4096 mmcblk0gp3
    179 160 4096 mmcblk0gp2
    179 128 4096 mmcblk0gp1
    179 96 1052672 mmcblk0gp0
    179 64 1024 mmcblk0boot1
    179 32 1024 mmcblk0boot0

    Signed-off-by: Namjae Jeon
    Acked-by: Andrei Warkentin
    Signed-off-by: Chris Ball

    Namjae Jeon