08 Mar, 2011

1 commit

  • This fixes a bug introduced by 807e8e40673d ("mmc: Fix sd/sdio/mmc
    initialization frequency retries") that prevented SDIO drivers from
    performing SDIO commands in their probe routines -- the above patch
    called mmc_claim_host() before sdio_add_func(), which causes a deadlock
    if an external SDIO driver calls sdio_claim_host().

    Fix tested on an OLPC XO-1.75 with libertas on SDIO.

    Signed-off-by: Dmitry Shmidt
    Reviewed-and-Tested-by: Chris Ball
    Signed-off-by: Chris Ball

    Dmitry Shmidt
     

31 Jan, 2011

2 commits


28 Jan, 2011

1 commit


26 Jan, 2011

6 commits

  • The bfin_sdh driver allocates the wrong size for the private data
    in the mmc_host. The first parameter of mmc_alloc_host should be
    the size of the local driver struct rather than the common mmc_host.

    Signed-off-by: Sonic Zhang
    Signed-off-by: Mike Frysinger
    Cc:
    Signed-off-by: Chris Ball

    Sonic Zhang
     
  • We have 8-bit width support but is not a v3 controller.
    So we need platform_8bit_width() to support 8-bit buswidth.
    Also we need MMC_CAP_8_BIT_DATA, so we add it in platdata.

    This gets 8-bit support working again on s3c, after we previously
    disabled 8-bit by default on non-v3 controllers.

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

    Jaehoon Chung
     
  • clk_get() returns a struct clk cookie to the driver and some platforms
    may return NULL if they only support a single clock. clk_get() has only
    failed if it returns a ERR_PTR() encoded pointer.

    Signed-off-by: Jamie Iles
    Signed-off-by: Chris Ball

    Jamie Iles
     
  • Don't read the command response from the registers when either the
    command timed out (because there was no response from the card) or
    the checksum on the response was invalid.

    Signed-off-by: Russell King
    Signed-off-by: Chris Ball

    Russell King - ARM Linux
     
  • Including usb.h once is enough in drivers/mmc/host/ushc.c
    This removes the duplicate.

    Signed-off-by: Jesper Juhl
    Signed-off-by: Chris Ball

    Jesper Juhl
     
  • * 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
    ALSA: AACI: fix timeout duration
    ALSA: AACI: fix timeout condition checking
    ARM: 6636/1: ep93xx: default multiplexed gpio ports to gpio mode
    ARM: 6637/1: Make the argument to virt_to_phys() "const volatile"
    ARM: twd: ensure timer reload is reprogrammed on entry to periodic mode
    ARM: 6635/2: Configure reference clock for Versatile Express timers
    ARM: versatile: name configuration options after actual board names
    ARM: realview: name configuration options after actual board names
    ARM: realview,vexpress: fix section mismatch warning for pen_release
    ARM: 6632/3: mmci: stop using the blockend interrupts

    Linus Torvalds
     

24 Jan, 2011

1 commit


22 Jan, 2011

2 commits


14 Jan, 2011

2 commits

  • Explicitly include err.h, of_address.h and of_irq.h.
    Make use of machine_is() conditional on PPC.

    Signed-off-by: Rob Herring
    Signed-off-by: Grant Likely

    Rob Herring
     
  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     

12 Jan, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (39 commits)
    mmc: davinci: add support for SDIO irq handling
    mmc: fix division by zero in MMC core
    mmc: tmio_mmc: fix CMD irq handling
    mmc: tmio_mmc: handle missing HW interrupts
    mfd: sh_mobile_sdhi: activate SDIO IRQ for tmio_mmc
    mmc: tmio_mmc: implement SDIO IRQ support
    mfd: sdhi: require the tmio-mmc driver to bounce unaligned buffers
    mmc: tmio_mmc: silence compiler warnings
    mmc: tmio_mmc: implement a bounce buffer for unaligned DMA
    mmc: tmio_mmc: merge the private header into the driver
    mmc: tmio_mmc: fix PIO fallback on DMA descriptor allocation failure
    mmc: tmio_mmc: allow multi-element scatter-gather lists
    mmc: Register debugfs dir before calling card probe function.
    mmc: MMC_BLOCK_MINORS should depend on MMC_BLOCK.
    mmc: Explain why we make adjacent mmc_bus_{put,get} calls during rescan.
    mmc: Fix sd/sdio/mmc initialization frequency retries
    mmc: fix mmc_set_bus_width_ddr() call without bus-width-test cap
    mmc: dw_mmc: Add Synopsys DesignWare mmc host driver.
    mmc: add sdhci-tegra driver for Tegra SoCs
    mmc: sdhci: add quirk for max len ADMA descriptors
    ...

    Linus Torvalds
     

11 Jan, 2011

1 commit

  • * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
    of/flattree: forward declare struct device_node in of_fdt.h
    ipmi: explicitly include of_address.h and of_irq.h
    sparc: explicitly cast negative phandle checks to s32
    powerpc/405: Fix missing #{address,size}-cells in i2c node
    powerpc/5200: dts: refactor dts files
    powerpc/5200: dts: Change combatible strings on localbus
    powerpc/5200: dts: remove unused properties
    powerpc/5200: dts: rename nodes to prepare for refactoring dts files
    of/flattree: Update dtc to current mainline.
    of/device: Don't register disabled devices
    powerpc/dts: fix syntax bugs in bluestone.dts
    of: Fixes for OF probing on little endian systems
    of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
    of/flattree: Add of_flat_dt_match() helper function
    of_serial: explicitly include of_irq.h
    of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
    of/flattree: Reorder unflatten_dt_node
    of/flattree: Refactor unflatten_dt_node
    of/flattree: Add non-boottime device tree functions
    of/flattree: Add Kconfig for EARLY_FLATTREE
    ...

    Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.

    Linus Torvalds
     

10 Jan, 2011

1 commit


09 Jan, 2011

22 commits

  • The card is not always clocked and the clock frequency zero is perfectly
    legal, thus this code in mmc_set_data_timeout() may cause a division by
    zero. It will be triggered more often if you're using software clock
    gating but can be triggered under other conditions too.

    Reported-by: Pierre Tardy
    Signed-off-by: Linus Walleij
    Reviewed-by: Chris Ball
    Cc:
    Signed-off-by: Chris Ball

    Linus Walleij
     
  • With current code card insert/eject interrupts will acknowledge outstanding
    commands. Normally this seems to be no problem, however if the hardware gets
    stuck and no interrupts for CMD_TIMEOUT or CMD_RESPEND are generated, then
    inserting and ejecting cards will falsely acknowledge outstanding commands
    from the core.

    This patch changes the behavior so that CMDs are only acked, if
    CMD_TIMEOUT or CMD_RESPEND is received.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: Chris Ball

    Arnd Hannemann
     
  • When doing excessive hotplug, e.g., repeated insert/eject operations,
    the hardware may get confused to a point where no CMDTIMEOUT/CMDRESPEND
    interrupts are generated any more. As a result requests get stuck, e.g.:

    [ 360.351562] INFO: task kworker/u:0:5 blocked for more than 120 seconds.
    [ 360.351562] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [ 360.359375] kworker/u:0 D c020c2b4 0 5 2 0x00000000
    [ 360.367187] Backtrace:
    [ 360.367187] [] (schedule+0x0/0x340) from [] (schedule_timeout+0x20/0x190)
    [ 360.375000] r8:c702fd70 r7:00000002 r6:c702e000 r5:c702fdc4 r4:7fffffff
    [ 360.375000] r3:c701e040
    [ 360.382812] [] (schedule_timeout+0x0/0x190) from [] (wait_for_common+0xc4/0x150)
    [ 360.390625] r6:c702e000 r5:c702fdc4 r4:7fffffff
    [ 360.390625] [] (wait_for_common+0x0/0x150) from [] (wait_for_completion+0x18/0x1c)
    [ 360.398437] [] (wait_for_completion+0x0/0x1c) from [] (mmc_wait_for_req+0x214/0x234)
    [ 360.406250] [] (mmc_wait_for_req+0x0/0x234) from [] (mmc_sd_switch+0xfc/0x114)
    [ 360.414062] r7:c702fe4c r6:c702fe20 r5:c7179800 r4:00fffff0
    [ 360.421875] [] (mmc_sd_switch+0x0/0x114) from [] (mmc_sd_setup_card+0x260/0x384)
    [ 360.429687] [] (mmc_sd_setup_card+0x0/0x384) from [] (mmc_sd_init_card+0x13c/0x1e0)
    [ 360.437500] [] (mmc_sd_init_card+0x0/0x1e0) from [] (mmc_attach_sd+0x124/0x1a8)
    [ 360.445312] r8:c02db404 r7:ffffff92 r6:c702ff34 r5:c6007da8 r4:c6007c00
    [ 360.453125] [] (mmc_attach_sd+0x0/0x1a8) from [] (mmc_rescan+0x248/0x2f0)
    [ 360.460937] r5:c6007da8 r4:c6007c00
    [ 360.468750] [] (mmc_rescan+0x0/0x2f0) from [] (process_one_work+0x1ec/0x318)
    [ 360.476562] r7:c6007da8 r6:00000000 r5:c710ec00 r4:c701bde0
    [ 360.484375] [] (process_one_work+0x0/0x318) from [] (worker_thread+0x1b0/0x2cc)
    [ 360.492187] [] (worker_thread+0x0/0x2cc) from [] (kthread+0x8c/0x94)
    [ 360.500000] [] (kthread+0x0/0x94) from [] (do_exit+0x0/0x590)
    [ 360.507812] r7:00000013 r6:c0037fc4 r5:c004b2ac r4:c7021f00

    This patch addresses this problem by introducing timeouts for outstanding
    interrupts. If a hardware interrupt is missing, a soft reset will be
    performed to bring the hardware back to a working state.
    Tested with the SDHI hardware block in sh7372 / AP4EVB.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: Chris Ball

    Arnd Hannemann
     
  • This patch implements SDIO IRQ support for mfds which
    announce the TMIO_MMC_SDIO_IRQ flag for tmio_mmc.
    If MMC_CAP_SDIO_IRQ is also set SDIO IRQ signalling is activated.
    Tested with a b43-based wireless SDIO card and sh_mobile_sdhi.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: Chris Ball

    Arnd Hannemann
     
  • with "mmc: tmio: implement a bounce buffer for unaligned DMA"
    gcc generates the following warnings:

    drivers/mmc/host/tmio_mmc.c:654:6: warning: 'ret' may be used uninitialized in this function
    drivers/mmc/host/tmio_mmc.c:730:6: warning: 'ret' may be used uninitialized in this function

    This patch fixes these by setting ret to -EINVAL in the affected code paths.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: Chris Ball

    Arnd Hannemann
     
  • For example, with SDIO WLAN cards, some transfers happen with buffers at
    odd addresses, whereas the SH-Mobile DMA engine requires even addresses
    for SDHI. This patch extends the tmio driver with a bounce buffer, that
    is used for single entry scatter-gather lists both for sending and
    receiving. If we ever encounter unaligned transfers with multi-element
    sg lists, this patch will have to be extended. For now it just falls
    back to PIO in this and other unsupported cases.

    Signed-off-by: Guennadi Liakhovetski
    Acked-by: Samuel Ortiz
    Signed-off-by: Chris Ball

    Guennadi Liakhovetski
     
  • drivers/mmc/host/tmio_mmc.h is only used by drivers/mmc/host/tmio_mmc.c,
    this needlessly complicates source-code handling.

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

    Guennadi Liakhovetski
     
  • The easiest way to fall back to PIO, when a DMA descriptor allocation
    fails is to disable DMA on the controller but continue with the current
    request in PIO mode. This way tmio_mmc_start_dma() can become void, since
    it cannot be failing any more. The current version is also broken: it is
    testing a wrong pointer and thus failing to recognise, that a descriptor
    allocation wasn't successful.

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

    Guennadi Liakhovetski
     
  • The driver is capable of handling multi-element sg lists in both PIO and
    DMA modes. In DMA mode this also allows to use the DMA sg capability more
    efficiently and almost doubles the throughput.

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

    Guennadi Liakhovetski
     
  • This way, the probe function may register debugfs files if it wants to.
    This fixes a bug with mmc_test where mmc_test_register_file_test() is
    called before the card's debugfs dir exists, and so it fails.

    Signed-off-by: Viresh Kumar
    Tested-by: Chris Ball
    Signed-off-by: Chris Ball

    Viresh Kumar
     
  • Signed-off-by: Chris Ball
    Tested-by: Chris Ball
    Acked-by: Olof Johansson

    Chris Ball
     
  • Signed-off-by: Chris Ball

    Chris Ball
     
  • Rewrite and clean up mmc_rescan() to properly retry frequencies lower
    than 400kHz. Failures can happen both in sd_send_* calls and
    mmc_attach_*. Break out "mmc_rescan_try_freq" from the frequency
    selection loop. Symmetrize claim/release logic in mmc_attach_* API,
    and move the sd_send_* calls there to make mmc_rescan easier to read.

    Signed-off-by: Andy Ross
    Reviewed-and-Tested-by: Hein Tibosch
    Reviewed-by: Chris Ball
    Signed-off-by: Chris Ball

    Andy Ross
     
  • With the bus-width test patch, mmc_set_bus_width*() isn't called properly
    when the driver doesn't set MMC_CAP_BUS_WIDTH and no DDR mode.
    This patch fixes the regression by moving the call up before the cap test.

    Signed-off-by: Takashi Iwai
    Reviewed-by: Chris Ball
    Signed-off-by: Chris Ball

    Takashi Iwai
     
  • This adds the mmc host driver for the Synopsys DesignWare mmc
    host controller, found in a number of embedded SoC designs.

    Signed-off-by: Will Newton
    Reviewed-by: Matt Fleming
    Reviewed-by: Chris Ball
    Signed-off-by: Chris Ball

    Will Newton
     
  • SDHCI driver for Tegra. This driver plugs in as a new variant of
    sdhci-pltfm, using the platform data structure passed in to specify the
    GPIOs to use for card detect, write protect and card power enablement.

    Original driver (of which only the header file is left):
    Signed-off-by: Yvonne Yip

    The rest, which has been rewritten by now:
    Signed-off-by: Olof Johansson
    Reviewed-by: Wolfram Sang
    Acked-by: Mike Rapoport
    Signed-off-by: Chris Ball

    Olof Johansson
     
  • Some controllers misparse segment length 0 as being 0, not 65536. Add
    a quirk to deal with it.

    Signed-off-by: Olof Johansson
    Reviewed-by: Chris Ball
    Signed-off-by: Chris Ball

    Olof Johansson
     
  • Since we make sure the clock is enabled in the mmc_host_clk_exit()
    function we should expect a reference counter of 1, not 0.

    Signed-off-by: Linus Walleij
    Tested-by: Chris Ball
    Signed-off-by: Chris Ball

    Linus Walleij
     
  • This patch supports controllers with no internal clock divider in SDHCI,
    such as the s5pc210 board. The external clock divider can be used to
    make a proper clock because SDHCI doesn't support internal clock divider
    by itself.

    If external clock divider type is selected, some functions related
    to clock control will be overrided by other functions.

    The current clock control index is added to let you know which
    clock bus is used for SDHCI when overriding functions.

    Checking functions are added into sdhci_s3c_consider_clock, because
    the clock divider step is different from that of host controller.

    Signed-off-by: Jeongbae Seo
    Cc: Jaehoon Chung
    Cc: Ben Dooks
    Signed-off-by: Kukjin Kim
    Acked-by: Kyungmin Park
    Signed-off-by: Chris Ball

    Jeongbae Seo
     
  • This patch adds support for additional host capabilities like SD/MMC
    high speed, SDHCI bus width, etc.

    Signed-off-by: Jeongbae Seo
    Signed-off-by: Kukjin Kim
    Signed-off-by: Chris Ball

    Jeongbae Seo
     
  • Signed-off-by: Takashi Iwai
    Signed-off-by: Chris Ball

    Takashi Iwai
     
  • Some old MMC devices fail with the 4/8 bits the driver tries to use
    exclusively. This patch adds a test for the given bus setup and falls
    back to the lower bit mode (until 1-bit mode) when the test fails.

    [Major rework and refactoring by tiwai]
    [Quirk addition and many fixes by prakity]

    Signed-off-by: Aries Lee
    Signed-off-by: Takashi Iwai
    Signed-off-by: Philip Rakity
    Tested-by: Philip Rakity
    Signed-off-by: Chris Ball

    Aries Lee