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

3 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
     
  • This patch adds support for the HS200 mode on the host side.
    Also enables the tuning feature required when the HS200 mode
    is selected.

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

    Girish K S
     
  • 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
     

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
     
  • Even if a driver provides separate card detection, an interrupt
    is still needed to abort mmc requests that are in progress.
    SDHCI_QUIRK2_OWN_CARD_DETECTION prevents that, so remove it.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • Add a means of getting platform data for the SDHCI PCI
    devices. The data is stored against the slot not the
    device in order to support multi-slot devices.

    The data allows platform-specific setup (such as getting
    GPIO numbers from firmware or setting up wl12xx for SDIO)
    to be done in platform support files instead of the
    sdhci-pci driver.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • 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
     
  • SD/MMC controllers provide different card insertion and removal detection
    methods. On some of them the controller itself issues an interrupt, on
    others polling is used, on yet others auxiliary means are used for this
    purpose, e.g., a GPIO IRQ. Further, on some systems one of those methods
    can be chosen at driver probing time and configured in software. E.g., on
    some systems the SD/MMC controller card hot-plug detection pin can be
    configured either as a respective controller functions, or an IRQ-capable
    GPIO. To support such flexible configurations a card hot-plug context
    is added by this patch.

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

    Guennadi Liakhovetski
     
  • This patch adds another capabilities field for MMC_CAPS2_XXX.

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

    Seungwon Jeon
     
  • 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
     
  • 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
     

11 Dec, 2011

1 commit

  • 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
     

27 Oct, 2011

20 commits

  • 'DISK_NAME_LEN' is undeclared when CONFIG_BLOCK is disabled; its use was
    introduced via genhd.h by the general purpose partition patch.

    To fix, we just add our own MAX_MMC_PART_NAME_LEN macro instead of using
    DISK_NAME_LEN.

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

    Namjae Jeon
     
  • 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: Paul Walmsley
    Cc: Dave Hylands
    Tested-by: Steve Sakoman
    Signed-off-by: Chris Ball

    Paul Walmsley
     
  • 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
     
  • 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
     
  • 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
     
  • In dw_mmc 2.40a spec, Data register's offset is changed.
    Before we used Data register offset 0x100. but if somebody uses a
    2.40a controller, we must use 0x200 for Data register.

    This patch adds a version-id checking point and uses SDMMC_DATA(x)
    instead of SDMMC_DATA. It assumes 2.40a is the latest version.

    Signed-off-by: Jaehoon Chung
    Signed-off-by: Kyungmin Park
    Acked-by: James Hogan
    Signed-off-by: Chris Ball

    Jaehoon Chung
     
  • 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
     
  • 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
     
  • Ths patch allows runtime PM for sdhci-pci, runtime suspending after
    inactivity of 50ms and ensuring runtime resume before SDHC registers
    are accessed. During runtime suspend, interrupts are masked.
    The host controller state is restored at runtime resume.

    For Medfield, the host controller's card detect mechanism is
    supplanted by an always-on GPIO which provides for card detect wake-up.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • 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
     
  • Intel Medfield platform blocks access to eMMC boot partitions which
    results in switch errors. Since there is no access, mmcboot0/1
    devices should not be created. Add a host capability to reflect that.

    Signed-off-by: Adrian Hunter
    Signed-off-by: Chris Ball

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

    Girish K S
     
  • Provide platforms with a simplified way to specify MMCIF DMA slave IDs in
    a way, similar to SDHI and other sh_dma clients.

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

    Guennadi Liakhovetski
     
  • 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: Adrian Hunter
    Signed-off-by: Chris Ball

    Adrian Hunter
     
  • The err condition in post_req() is set to undo a call made to pre_req()
    that hasn't been started yet. The err condition is not set if an MMC
    request returns an error.

    Signed-off-by: Per Forlin
    Acked-by: Linus Walleij
    Signed-off-by: Chris Ball

    Per Forlin
     
  • Adds a quirk which can be turned on for SDIO devices that do not support
    512 byte requests in byte mode during CMD53. These requests will always
    be sent in block mode instead.

    This patch also enables this quirk for ST-Ericsson CW1200 WLAN device.

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

    Stefan Nilsson XK
     
  • Allow named IRQs to use corresponding specific handlers. If named IRQs are
    used, at least an "sdcard" IRQ has to be specified by the platform. If
    names are not used, an arbitrary number of IRQs can be provided by the
    platform, in which case the generic ISR will be used for each of them.

    Cc: Guennadi Liakhovetski
    Acked-by: Magnus Damm
    Signed-off-by: Simon Horman
    [g.liakhovetski@gmx.de: style and typo corrections, platform data check]
    Signed-off-by: Guennadi Liakhovetski
    Signed-off-by: Chris Ball

    Simon Horman
     
  • This adds support to inject data errors after a completed host transfer.
    The mmc core will return error even though the host transfer is successful.
    This simple fault injection proved to be very useful to test the
    non-blocking error handling in the mmc_blk_issue_rw_rq().
    Random faults can also test how the host driver handles pre_req()
    and post_req() in case of errors.

    Signed-off-by: Per Forlin
    Acked-by: Akinobu Mita
    Reviewed-by: Linus Walleij
    Signed-off-by: Chris Ball

    Per Forlin
     

14 Aug, 2011

1 commit


21 Jul, 2011

2 commits

  • Non default Drive Strength cannot be set automatically. It is a function
    of the board design and only if there is a specific platform handler can
    it be set. The platform handler needs to take into account the board
    design. Pass to the platform code the necessary information.

    For example: The card and host controller may indicate they support HIGH
    and LOW drive strength. There is no way to know what should be chosen
    without specific board knowledge. Setting HIGH may lead to reflections
    and setting LOW may not suffice. There is no mechanism (like ethernet
    duplex or speed pulses) to determine what should be done automatically.

    If no platform handler is defined -- use the default value.

    Signed-off-by: Philip Rakity
    Reviewed-by: Arindam Nath
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • 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: Per Forlin
    Acked-by: Kyungmin Park
    Acked-by: Arnd Bergmann
    Reviewed-by: Venkatraman S
    Tested-by: Sourav Poddar
    Tested-by: Linus Walleij
    Signed-off-by: Chris Ball

    Per Forlin