10 Sep, 2010

1 commit

  • The introduction of support for SD combo cards breaks the initialization
    of all CSR SDIO chips. The GO_IDLE (CMD0) in mmc_sd_get_cid() causes CSR
    chips to be reset (this is non-standard behavior).

    When initializing an SDIO card check for a combo card by using the memory
    present bit in the R4 response to IO_SEND_OP_COND (CMD5). This avoids the
    call to mmc_sd_get_cid() on an SDIO-only card.

    Signed-off-by: David Vrabel
    Acked-by: Michal Mirolaw
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Vrabel
     

12 Aug, 2010

1 commit

  • SD/MMC cards tend to support an erase operation. In addition, eMMC v4.4
    cards can support secure erase, trim and secure trim operations that are
    all variants of the basic erase command.

    SD/MMC device attributes "erase_size" and "preferred_erase_size" have been
    added.

    "erase_size" is the minimum size, in bytes, of an erase operation. For
    MMC, "erase_size" is the erase group size reported by the card. Note that
    "erase_size" does not apply to trim or secure trim operations where the
    minimum size is always one 512 byte sector. For SD, "erase_size" is 512
    if the card is block-addressed, 0 otherwise.

    SD/MMC cards can erase an arbitrarily large area up to and
    including the whole card. When erasing a large area it may
    be desirable to do it in smaller chunks for three reasons:

    1. A single erase command will make all other I/O on the card
    wait. This is not a problem if the whole card is being erased, but
    erasing one partition will make I/O for another partition on the
    same card wait for the duration of the erase - which could be a
    several minutes.

    2. To be able to inform the user of erase progress.

    3. The erase timeout becomes too large to be very useful.
    Because the erase timeout contains a margin which is multiplied by
    the size of the erase area, the value can end up being several
    minutes for large areas.

    "erase_size" is not the most efficient unit to erase (especially for SD
    where it is just one sector), hence "preferred_erase_size" provides a good
    chunk size for erasing large areas.

    For MMC, "preferred_erase_size" is the high-capacity erase size if a card
    specifies one, otherwise it is based on the capacity of the card.

    For SD, "preferred_erase_size" is the allocation unit size specified by
    the card.

    "preferred_erase_size" is in bytes.

    Signed-off-by: Adrian Hunter
    Acked-by: Jens Axboe
    Cc: Kyungmin Park
    Cc: Madhusudhan Chikkature
    Cc: Christoph Hellwig
    Cc: Ben Gardiner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     

11 Aug, 2010

4 commits

  • There are some chips (like TI WL12xx series) that can be interfaced over
    SDIO but don't support the SDIO specification, meaning that they are
    missing CIA (Common I/O Area) with all it's registers. Current Linux SDIO
    implementation relies on those registers to identify and configure the
    card, so non-standard cards can not function and cause lots of warnings
    from the core when it reads invalid data from non-existent registers.

    After this patch, init_card() host callback can now set new quirk
    MMC_QUIRK_NONSTD_SDIO, which means that SDIO core should not try to access
    any standard SDIO registers and rely on init_card() to fill all SDIO
    structures instead. As those cards are usually embedded chips, all the
    required information can be obtained from machine board files by the host
    driver when it's called through init_card() callback.

    Signed-off-by: Grazvydas Ignotas
    Cc: Adrian Hunter
    Cc: Tony Lindgren
    Cc: Bob Copeland
    Cc: Kalle Valo
    Cc: Madhusudhan Chikkature
    Cc: Kishore Kadiyala
    Cc: Russell King
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Grazvydas Ignotas
     
  • If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to
    suspend, the card will be removed, therefore this patch doesn't change the
    behavior of this option.

    However the removal will be done by pm notifier, which runs while
    userspace is still not frozen and thus can freely use del_gendisk, without
    the risk of deadlock which would happen otherwise.

    Card detect workqueue is now disabled while userspace is frozen, Therefore
    if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during
    suspend, the removal will be detected as soon as userspace is unfrozen,
    again at the moment it is safe to call del_gendisk.

    Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate.

    [akpm@linux-foundation.org: clean up function prototype]
    [akpm@linux-foundation.org: fix CONFIG_PM-n linkage, small cleanups]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Maxim Levitsky
    Cc: David Brownell
    Cc: Alan Stern
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maxim Levitsky
     
  • Signed-off-by: Michal Miroslaw
    Cc: Adrian Hunter
    Cc: Chris Ball
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Miroslaw
     
  • The eMMC spec 4.4 and 4.3 + additional feature chips has CSD structure
    version 3 and version 3 have to check the CSD_STRUCTURE byte in the
    EXT_CSD register.

    Also fix EXT_CSD revision message.

    [akpm@linux-foundation.org: fix comment, per Chris Ball]
    Signed-off-by: Kyungmin Park
    Cc: Adrian Hunter
    Cc: Chris Ball
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyungmin Park
     

31 May, 2010

2 commits


28 May, 2010

4 commits

  • Add a glue layer to support the sdhci driver on the ST SPEAr platform.

    Signed-off-by: Viresh Kumar
    Cc:
    Cc: Linus Walleij
    Cc: Russell King
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Viresh KUMAR
     
  • SDIO specification allows RAW (Read after Write) operation using
    IO_RW_DIRECT command (CMD52) by setting the RAW bit. This operation is
    similar to ordinary read/write commands, except that both write and read
    are performed using single command/response pair. The Linux SDIO layer
    already supports this internaly, only external function is missing for
    drivers to make use, which is added by this patch.

    This type of command is required to implement proper power save mode
    support in wl1251 wifi driver.

    Android has similar patch for G1 in it's tree for the same reason:

    http://android.git.kernel.org/?p=kernel/common.git;a=commitdiff;h=74a47786f6ecbe6c1cf9fb15efe6a968451deb52

    Signed-off-by: Grazvydas Ignotas
    Acked-by: Kalle Valo
    Cc: Dmitry Shmidt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Grazvydas Ignotas
     
  • Even though many mmc host drivers pass a pm_message_t argument to
    mmc_suspend_host() that argument isn't used the by MMC core. As host
    drivers are converted to dev_pm_ops they'll have to construct
    pm_message_t's (as they won't be passed by the PM subsystem any more) just
    to appease the mmc suspend interface.

    We might as well just delete the unused paramter.

    Signed-off-by: Matt Fleming
    Acked-by: Anton Vorontsov
    Acked-by: Michal Miroslaw ZZ
    Acked-by: Sascha Sommer
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt Fleming
     
  • MMCIF is the MMC Host Interface in SuperH.

    Signed-off-by: Yusuke Goda
    Cc: Ben Hutchings
    Cc: Paul Mundt
    Cc: Magnus Damm
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yusuke Goda
     

26 May, 2010

1 commit

  • * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (103 commits)
    ARM: 6141/1: Add audio support part in arch/arm/mach-w90x900
    ARM: 5939/1: ARM: Add option CMDLINE_FORCE to force usage of the in-kernel cmdline
    ARM: 6140/1: silence a bogus sparse warning in unwind.c
    ARM: mach-at91: duplicated include
    ARM: arch/arm/nwfpe/fpsr.h: Checkpatch cleanup
    ARM: arch/arm/mach-shark/pci.c: Checkpatch cleanup
    ARM: arch/arm/nwfpe/ChangeLog: Checkpatch cleanup
    ARM: arch/arm/mach-sa1100/leds.c: Checkpatch cleanup
    ARM: arch/arm/mach-h720x/common.h: Checkpatch cleanup
    ARM: arch/arm/mach-footbridge/ebsa285-pci.c: Checkpatch cleanup
    ARM: arch/arm/mach-clps711x/Makefile.boot: Checkpatch cleanup
    ARM: arch/arm/boot/bootp/bootp.lds: Checkpatch cleanup
    ARM: SPEAR6xx: remove duplicated #include
    ARM: s3c6400_defconfig: Add NAND driver
    ARM: s3c6400_defconfig: enable sound as modules
    ARM: s3c6400_defconfig: enable power management
    ARM: s5pv210_defconfig: Update s5pv210_defconfig to v2.6.34
    ARM: s5pc110_defconfig: Update s5pc110_defconfig to v2.6.34
    ARM: s5p6442_defconfig: Update s5p6442_defconfig to v2.6.34
    ARM: s5p6440_defconfig: Update s5p6440_defconfig to v2.6.34
    ...

    Linus Torvalds
     

16 Apr, 2010

1 commit


14 Apr, 2010

1 commit

  • MX3 SoCs have a silicon bug which corrupts CRC calculation of
    multi-block transfers when connected SDIO peripheral doesn't drive the
    BUSY line as required by the specs.

    One way to prevent this is to only allow 1-bit transfers.

    Another way is playing tricks with the DMA engine, but this isn't
    mainline yet. So for now, we live with the performance drawback of 1-bit
    transfers until a nicer solution is found.

    This patch introduces a new host controller callback 'init_card' which
    is for now only called from mmc_sdio_init_card().

    Signed-off-by: Daniel Mack
    Cc: Sascha Hauer
    Cc: Dan Williams
    Cc: Volker Ernst
    Cc: Jiri Kosina
    Cc: Michał Mirosław
    Signed-off-by: Sascha Hauer

    Daniel Mack
     

07 Apr, 2010

1 commit

  • When operating in 1-bit mode, SDAT1 is used as dedicated interrupt line.
    However, the 8686 will only drive this line when the ECSI bit is set in
    the CCCR_IF register.

    Thanks to Alagu Sankar for pointing me in the right direction.

    Signed-off-by: Daniel Mack
    Cc: Alagu Sankar
    Cc: Volker Ernst
    Cc: Dan Williams
    Cc: John W. Linville
    Cc: Holger Schurig
    Cc: Bing Zhao
    Cc: libertas-dev@lists.infradead.org
    Cc: linux-wireless@vger.kernel.org
    Cc: linux-mmc@vger.kernel.org
    Acked-by: Dan Williams
    Signed-off-by: John W. Linville

    Daniel Mack
     

25 Mar, 2010

1 commit

  • In the extended CSD register the CARD_TYPE is an 8-bit value of which the
    upper 6 bits were reserved in JEDEC specifications prior to version 4.4.
    In version 4.4 two of the reserved bits were designated for identifying
    support for the newly added High-Speed Dual Data Rate. Unfortunately the
    mmc_read_ext_csd() function required that the reserved bits be zero
    instead of ignoring them as it should.

    This patch makes mmc_read_ext_csd() ignore the CARD_TYPE bits that are
    reserved or not yet supported. It also stops the function jumping to the
    end as though an error occurred, when it is only warns that the CARD_TYPE
    bits (that it does interpret) are invalid.

    Signed-off-by: Adrian Hunter
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     

07 Mar, 2010

3 commits

  • And bring them back to 4-bit mode during resume.

    Signed-off-by: Daniel Drake
    Signed-off-by: Nicolas Pitre
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Drake
     
  • This patch series provides the core changes needed to allow SDIO cards to
    remain powered and active while the host system is suspended, and let them
    wake up the host system when needed. This is used to implement
    wake-on-lan with SDIO wireless cards at the moment. Patches to add that
    support to the libertas driver will be posted separately.

    This patch:

    Some SDIO cards have the ability to keep on running autonomously when the
    host system is suspended, and wake it up when needed. This however
    requires that the host controller preserve power to the card, and
    configure itself appropriately for wake-up.

    There is however 4 layers of abstractions involved: the host controller
    driver, the MMC core code, the SDIO card management code, and the actual
    SDIO function driver. To make things simple and manageable, host drivers
    must advertise their PM capabilities with a feature bitmask, then function
    drivers can query and set those features from their suspend method. Then
    each layer in the suspend call chain is expected to act upon those bits
    accordingly.

    [akpm@linux-foundation.org: fix typo in comment]
    Signed-off-by: Nicolas Pitre
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     
  • Some SDIO cards expect byte transfers not to exceed the configured block
    transfer size. Add a quirk to that effect.

    Patches to make use of this quirk will be sent separately.

    Signed-off-by: Bing Zhao
    Signed-off-by: Nicolas Pitre
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bing Zhao
     

19 Nov, 2009

1 commit


19 Oct, 2009

1 commit


12 Oct, 2009

1 commit


23 Sep, 2009

9 commits

  • Especially with the PM framework, those are quite handy to have in driver
    code too.

    Signed-off-by: Nicolas Pitre
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolas Pitre
     
  • Normally writes to SDIO function 0 outside the vendor specific CCCR
    registers are prohibited.

    To support embedded devices that require writes to SDIO function 0 outside
    this range (e.g. TI WL127x embedded sdio wifi device),
    MMC_QUIRK_LENIENT_FN0 is introduced.

    A card quirks field is added to `struct mmc_card' to support non-standard
    devices (e.g. embedded sdio devices).

    [akpm@linux-foundation.org: code in C, not cpp!]
    Signed-off-by: Ohad Ben-Cohen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ohad Ben-Cohen
     
  • Add support to disconnect the pull-up resistor on CD/DAT[3] (pin 1)
    of the card. This may be desired on certain setups of boards,
    controllers and embedded sdio devices which do not need the card's
    pull-up. As a result, card detection is disabled and power is saved.

    [akpm@linux-foundation.org: simplify sdio_disable_cd() a bit]
    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Matt Fleming
    Cc: Ian Molton
    Cc: "Roberto A. Foglietta"
    Cc: Philip Langdale
    Cc: Pierre Ossman
    Cc: David Vrabel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ohad Ben-Cohen
     
  • According to the standard, the SWITCH command should be followed by a
    SEND_STATUS command to check for errors.

    Signed-off-by: Adrian Hunter
    Acked-by: Matt Fleming
    Cc: Ian Molton
    Cc: "Roberto A. Foglietta"
    Cc: Jarkko Lavinen
    Cc: Denis Karpov
    Cc: Pierre Ossman
    Cc: Philip Langdale
    Cc: "Madhusudhan"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     
  • Add support for the new MMC command SLEEP_AWAKE.

    Signed-off-by: Jarkko Lavinen
    Signed-off-by: Adrian Hunter
    Acked-by: Matt Fleming
    Cc: Ian Molton
    Cc: "Roberto A. Foglietta"
    Cc: Jarkko Lavinen
    Cc: Denis Karpov
    Cc: Pierre Ossman
    Cc: Philip Langdale
    Cc: "Madhusudhan"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jarkko Lavinen
     
  • Power can be saved by powering off cards that are not in use. This is
    similar to suspend / resume except it is under the control of the driver,
    and does not require any power management support. It can only be used
    when the driver can monitor whether the card is removed, otherwise it is
    unsafe. This is possible because, unlike suspend, the driver still
    receives card detect and / or cover switch interrupts.

    Signed-off-by: Adrian Hunter
    Acked-by: Matt Fleming
    Cc: Ian Molton
    Cc: "Roberto A. Foglietta"
    Cc: Jarkko Lavinen
    Cc: Denis Karpov
    Cc: Pierre Ossman
    Cc: Philip Langdale
    Cc: "Madhusudhan"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     
  • eMMC's are not removable, so unsafe resume is OK always.

    To permit this a new host capability MMC_CAP_NONREMOVABLE has been added
    and suspend / resume updated accordingly.

    Signed-off-by: Adrian Hunter
    Acked-by: Matt Fleming
    Cc: Ian Molton
    Cc: "Roberto A. Foglietta"
    Cc: Jarkko Lavinen
    Cc: Denis Karpov
    Cc: Pierre Ossman
    Cc: Philip Langdale
    Cc: "Madhusudhan"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     
  • This change allows the MMC host to be claimed in situations where the host
    may or may not have already been claimed. Also 'mmc_try_claim_host()' is
    now exported.

    Signed-off-by: Adrian Hunter
    Acked-by: Matt Fleming
    Cc: Ian Molton
    Cc: "Roberto A. Foglietta"
    Cc: Jarkko Lavinen
    Cc: Denis Karpov
    Cc: Pierre Ossman
    Cc: Philip Langdale
    Cc: "Madhusudhan"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     
  • MMC hosts that support power saving can use the 'enable' and 'disable'
    methods to exit and enter power saving states. An explanation of their
    use is provided in the comments added to include/linux/mmc/host.h.

    Signed-off-by: Adrian Hunter
    Acked-by: Matt Fleming
    Cc: Ian Molton
    Cc: "Roberto A. Foglietta"
    Cc: Jarkko Lavinen
    Cc: Denis Karpov
    Cc: Pierre Ossman
    Cc: Philip Langdale
    Cc: "Madhusudhan"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Hunter
     

27 Jul, 2009

1 commit


17 Jun, 2009

1 commit


23 Apr, 2009

1 commit

  • libertas: add support for Marvell SD8688 chip

    Use RxPD->pkt_ptr to locate eth803 header in the packet
    received since SD8688/v10 firmware allows a gap between
    RxPD and eth803 header.

    Set SDIO block size to 256 for CMD53.
    The maximum block size for SD8688 WLAN function is set
    to 512 in TPLFE_MAX_BLK_SIZE. But using 512 as block size
    results upto 2K bytes data (4 blocks) being transferred
    and causes buffer overflow in firmware.

    Both changes above are backward compatible with earlier
    firmware versions for SD8385/SD8686.

    The SDIO_DEVICE_IDs for SD8688 chip are added in
    include/linux/mmc/sdio_ids.h

    Signed-off-by: Kiran Divekar
    Signed-off-by: Bing Zhao
    Acked-by: Dan Williams
    Signed-off-by: John W. Linville

    Bing Zhao
     

31 Mar, 2009

1 commit

  • Glue between MMC and regulator stacks ... verified with
    some OMAP3 boards using adjustable and configured-as-fixed
    regulators on several MMC controllers.

    These calls are intended to be used by MMC host adapters
    using at least one regulator per host. Examples include
    slots with regulators supporting multiple voltages and
    ones using multiple voltage rails (e.g. DAT4..DAT7 using a
    separate supply, or a split rail chip like certain SDIO
    WLAN or eMMC solutions).

    Signed-off-by: David Brownell
    Acked-by: Pierre Ossman
    Signed-off-by: Liam Girdwood

    David Brownell
     

01 Jan, 2009

2 commits


09 Nov, 2008

1 commit


12 Oct, 2008

1 commit