02 Aug, 2012

1 commit

  • Pull ARM DMA engine updates from Russell King:
    "This looks scary at first glance, but what it is is:
    - a rework of the sa11x0 DMA engine driver merged during the previous
    cycle, to extract a common set of helper functions for DMA engine
    implementations.
    - conversion of amba-pl08x.c to use these helper functions.
    - addition of OMAP DMA engine driver (using these helper functions),
    and conversion of some of the OMAP DMA users to use DMA engine.

    Nothing in the helper functions is ARM specific, so I hope that other
    implementations can consolidate some of their code by making use of
    these helpers.

    This has been sitting in linux-next most of the merge cycle, and has
    been tested by several OMAP folk. I've tested it on sa11x0 platforms,
    and given it my best shot on my broken platforms which have the
    amba-pl08x controller.

    The last point is the addition to feature-removal-schedule.txt, which
    will have a merge conflict. Between myself and TI, we're planning to
    remove the old TI DMA implementation next year."

    Fix up trivial add/add conflicts in Documentation/feature-removal-schedule.txt
    and drivers/dma/{Kconfig,Makefile}

    * 'dmaengine' of git://git.linaro.org/people/rmk/linux-arm: (53 commits)
    ARM: 7481/1: OMAP2+: omap2plus_defconfig: enable OMAP DMA engine
    ARM: 7464/1: mmc: omap_hsmmc: ensure probe returns error if DMA channel request fails
    Add feature removal of old OMAP private DMA implementation
    mtd: omap2: remove private DMA API implementation
    mtd: omap2: add DMA engine support
    spi: omap2-mcspi: remove private DMA API implementation
    spi: omap2-mcspi: add DMA engine support
    ARM: omap: remove mmc platform data dma_mask and initialization
    mmc: omap: remove private DMA API implementation
    mmc: omap: add DMA engine support
    mmc: omap_hsmmc: remove private DMA API implementation
    mmc: omap_hsmmc: add DMA engine support
    dmaengine: omap: add support for cyclic DMA
    dmaengine: omap: add support for setting fi
    dmaengine: omap: add support for returning residue in tx_state method
    dmaengine: add OMAP DMA engine driver
    dmaengine: sa11x0-dma: add cyclic DMA support
    dmaengine: sa11x0-dma: fix DMA residue support
    dmaengine: PL08x: ensure all descriptors are freed when channel is released
    dmaengine: PL08x: get rid of write only pool_ctr and free_txd locking
    ...

    Linus Torvalds
     

31 Jul, 2012

5 commits


27 Jul, 2012

1 commit

  • Pull ARM SoC fixes from Olof Johansson:
    "A mixed bag of fixes, some for merge window fallout (tegra, MXS), and
    a short series of fixes for marvell platforms that didn't make it in
    before 3.5."

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: mxs: fix compile error caused by prom_update_property change
    ARM: dt: tegra trimslice: enable USB2 port
    ARM: dt: tegra trimslice: add vbus-gpio property
    ARM: vt8500: Add maintainer for VT8500 architecture
    ARM: Kirkwood: Replace mrvl with marvell
    ARM: Orion: fix driver probe error handling with respect to clk
    ARM: Dove: Fixup ge00 initialisation
    ARM: Kirkwood: Fix PHY disable clk problems
    ARM: Kirkwood: Ensure runit clock always ticks.
    ARM: versatile: Don't use platform clock for Integrator & VE
    ARM: tegra: harmony: add regulator supply name and its input supply

    Linus Torvalds
     

26 Jul, 2012

1 commit


25 Jul, 2012

2 commits

  • The clk patches added code to get and enable clocks in the
    respective driver probe functions. If the probe function failed
    for some reason after enabling the clock, the clock was not
    disabled again in many cases.

    Signed-off-by: Simon Baatz
    Signed-off-by: Andrew Lumm

    Simon Baatz
     
  • Pull slave-dmaengine update from Vinod Koul:
    "This time we have a new dmaengine driver from the tegra folks. Also
    we have Guennadi's cleanup of sh drivers which incudes a library for
    sh drivers. And the usual odd fixes in bunch of drivers and some nice
    cleanup of dw_dmac from Andy."

    Fix up conflicts in drivers/mmc/host/sh_mmcif.c

    * 'next' of git://git.infradead.org/users/vkoul/slave-dma: (46 commits)
    dmaengine: Cleanup logging messages
    mmc: sh_mmcif: switch to the new DMA channel allocation and configuration
    dma: sh: provide a migration path for slave drivers to stop using .private
    dma: sh: use an integer slave ID to improve API compatibility
    dmaengine: shdma: prepare to stop using struct dma_chan::private
    sh: remove unused DMA device pointer from SIU platform data
    ASoC: siu: don't use DMA device for channel filtering
    dmaengine: shdma: (cosmetic) simplify a static function
    dmaengine: at_hdmac: add a few const qualifiers
    dw_dmac: use 'u32' for LLI structure members, not dma_addr_t
    dw_dmac: mark dwc_dump_lli inline
    dma: mxs-dma: Export missing symbols from mxs-dma.c
    dma: shdma: convert to the shdma base library
    ASoC: fsi: prepare for conversion to the shdma base library
    usb: renesas_usbhs: prepare for conversion to the shdma base library
    ASoC: siu: prepare for conversion to the shdma base library
    serial: sh-sci: prepare for conversion to the shdma base library
    mmc: sh_mobile_sdhi: prepare for conversion to the shdma base library
    mmc: sh_mmcif: remove unneeded struct sh_mmcif_dma, prepare to shdma conversion
    dma: shdma: prepare for conversion to the shdma base library
    ...

    Linus Torvalds
     

24 Jul, 2012

2 commits

  • Pull arm-soc clk changes from Arnd Bergmann:
    "Clock support is moving to the clk subsystem. These tegra, omap and
    imx changes are for code that is still platform specific and not (yet)
    part of that subsystem."

    Fix up conflicts in arch/arm/mach-{imx/clk-imx51-imx53.c,omap2/Makefile}

    * tag 'clk' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (23 commits)
    ARM: imx: clk-imx31: Fix clock id for rnga driver
    ARM: imx: add missing item to the list of clock event modes
    ARM: i.MX5x CSPI: Fixed clock name for CSPI
    ARM: i.MX5x clocks: Fix GPT clocks
    ARM: i.MX5x clocks: Fix parent for PWM clocks
    ARM: i.MX5x clocks: Add EPIT support
    ARM: mx27: Reenable silicon version print
    ARM: clk-imx27: Fix rtc clock id
    ARM: tegra: Provide clock for only one PWM controller
    ARM: tegra: Fix PWM clock programming
    ARM: OMAP3+: clock33xx: Add AM33XX clock tree data
    ARM: OMAP3+: clock: Move common clksel_rate & clock data to common file
    ARM: tegra: dma: rename driver name for clock to "tegra-apbdma"
    ARM: tegra: Remove second instance of uart clk
    crypto: add clk_prepare/clk_unprepare
    ASoC: tegra: add clk_prepare/clk_unprepare
    staging: nvec: add clk_prepare/clk_unprepare
    spi/tegra: add clk_prepare/clk_unprepare
    Input: tegra-kbc - add clk_prepare/clk_unprepare
    USB: ehci-tegra: add clk_prepare/clk_unprepare
    ...

    Linus Torvalds
     
  • Pull general arm-soc cleanups from Arnd Bergmann:
    "These are all boring changes, moving stuff around or renaming things
    mostly, and also getting rid of stuff that is duplicate or should not
    be there to start with. Platform-wise this is all over the place,
    mainly omap, samsung, at91, imx and tegra."

    Resolve trivial conflict in arch/arm/mach-omap2/clockdomains3xxx_data.c

    * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (67 commits)
    ARM: clps711x: Remove the setting of the time
    ARM: clps711x: Removed superfluous transform virt_to_bus and related functions
    ARM: clps711x/p720t: Replace __initcall by .init_early call
    ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board
    ARM: S3C24XX: Remove unused GPIO definitions for port J
    ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases
    ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API
    ARM: S3C24XX: Convert the PM code to gpiolib API
    ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
    ARM: S3C24XX: Convert SMDK board file to the gpiolib API
    ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code
    ARM: imx: remove unused pdata from device macros
    ARM: imx: Kconfig: Remove IMX_HAVE_PLATFORM_IMX_SSI from MACH_MX25_3DS
    ARM: at91: fix new build errors
    ARM: at91: add AIC5 support
    ARM: at91: remove mach/irqs.h
    ARM: at91: sparse irq support
    ARM: at91: at91 based machines specify their own irq handler at run time
    ARM: at91: remove static irq priorities for sam9x5
    ARM: at91: add of irq priorities support
    ...

    Linus Torvalds
     

23 Jul, 2012

22 commits

  • As mach-dove is moving towards common clock framework prepare
    the sdhci driver to grab its clock.

    Signed-off-by: Sebastian Hesselbarth
    Signed-off-by: Chris Ball

    Sebastian Hesselbarth
     
  • The sdio controller on dove doesn't have a bit to indicate
    high-speed. With the quirk set it fixes accessing high-speed
    sdcards.

    Signed-off-by: Sebastian Hesselbarth
    Signed-off-by: Chris Ball

    Sebastian Hesselbarth
     
  • If platform_get_resource_by_name() fails, driver probe is aborted an
    should return an error so the driver is not bound to the device.

    However, in the current error path of platform_get_resource_by_name(),
    probe returns zero since the return value (ret) is not properly set.
    With a zero return value, the driver core assumes probe was successful
    and will bind the driver to the device.

    Fix this by ensuring that probe returns an error code in this failure
    path.

    Signed-off-by: Kevin Hilman
    Acked-by: Venkatraman S
    Signed-off-by: Chris Ball

    Kevin Hilman
     
  • The write-protect GPIO is inverted on some boards. Handle such case.

    Signed-off-by: Marek Vasut
    Signed-off-by: Chris Ball

    Marek Vasut
     
  • Patch to not set reserved bits in i.MX25 PROCTL register. DMA stops
    working if those bits get set.

    Signed-off-by: Wilson Callan
    Acked-by: Sascha Hauer
    Signed-off-by: Chris Ball

    Wilson Callan
     
  • Add a call to mmc_set_signal_voltage() to set signal voltage to 3.3v in
    mmc_power_up so that we do not need to touch signal voltage setting in
    mmc/sd/sdio init functions and rescan function.

    For mmc/sd cards, when doing a suspend/resume cycle, consider the unsafe
    resume case, the card will lose its power and when powered on again, we
    will set signal voltage to 3.3v in mmc_power_up before its resume function
    gets called, which will re-init the card.

    And for sdio cards, when doing a suspend/resume cycle, consider the unsafe
    resume case, the card will either lose its power or not depending on if it
    wants to wakeup the host. If power is not maintained, it is the same case as
    mmc/sd cards. If power is maintained, mmc_power_up will not be called and
    the card's signal voltage will remain at the last setting.

    Signed-off-by: Aaron Lu
    Tested-by: Venkatraman S
    Signed-off-by: Chris Ball

    Aaron Lu
     
  • Host has different current capabilities at different voltages, we need
    to record these settings seperately. The defined voltages are 1.8/3.0/3.3.
    For other voltages, we do not touch current limit setting.

    Before we set the current limit for the sd card, find out the host's
    operating voltage first and then find out the current capabilities of
    the host at that voltage to set the current limit.

    Signed-off-by: Aaron Lu
    Reviewed-by: Philip Rakity
    Signed-off-by: Chris Ball

    Aaron Lu
     
  • In preparation for OMAP moving to the Common Clock Framework (CCF)
    add clk_prepare() and clk_unprepare() for the hsmmc clocks.

    Signed-off-by: Rajendra Nayak
    Acked-by: Venkatraman S
    Signed-off-by: Chris Ball

    Rajendra Nayak
     
  • Power needs to be removed from the card when switching to 1.8v fails.

    If a regulator is used to control vmmc we need to turn the
    regulator off and then back on otherwise power will not be
    removed from the card.

    Signed-off-by: Philip Rakity
    Reviewed-by: Aaron Lu
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • Modify clock division displaying in debugfs for matching
    the new CLKDIV,CLKODD user interface arrangement.
    Is using the has_odd_clk_div property to choose the proper format.

    Signed-off-by: Nicolas Ferre
    Acked-by: Ludovic Desroches
    Signed-off-by: Chris Ball

    Nicolas Ferre
     
  • Setting host->data to NULL is incorrect sequence in STATE_SENDING_STOP
    state of FSM: This early setting leads to the skip of dma_unmap_sg()
    in atmci_dma_cleanup() which is a bug.

    Idea taken from dw_mmc by Seungwon Jeon.

    Signed-off-by: Nicolas Ferre
    Cc: Seungwon Jeon
    Acked-by: Ludovic Desroches
    Signed-off-by: Chris Ball

    Nicolas Ferre
     
  • The Marvell CaFe is now marked as having bad card detection to fix
    a problem during system resume.

    Now on the OLPC XO-1 we are facing the issue that the card is marked
    as logically unremovable (via MMC_UNSAFE_RESUME), which means that
    mmc_card_is_removable considers the card non-removable. The existing
    code logic decides not to poll for card presence in this case, and
    card detection is also disabled because of the quirk being set.
    This means that no SD cards are detected when inserted after boot.

    Refine the logic to enable card presence polling in the case when
    a card is logically unremovable, only avoiding the poll in the case
    when the card is physically non-removable (denoted with
    MMC_CAP_NONREMOVABLE).

    Signed-off-by: Daniel Drake
    Signed-off-by: Chris Ball

    Daniel Drake
     
  • Add a new flag of SDHCI_USING_RETUNING_TIMER to represent if the host
    is using a retuning timer for the card inserted.

    This flag is set when the host does tuning the first time for the card
    and the host's retuning mode is 1. This flag is used afterwards whenever
    needs to decide if the host is currently using a retuning timer.

    This flag is cleared when the card is removed in sdhci_reinit.

    The set/clear of the flag and the start/stop of the retuning timer is
    associated with the card's init/remove time, so there is no need to
    touch it when the host is to be removed as at that time the card should
    have already been removed.

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

    Aaron Lu
     
  • When debugging one bad issue, got lots of pr_warning messages
    "queuing unknown CIS tuple" which caused a printk storm and
    flooded the console.

    This patch changes the pr_warning to use pr_warn_ratelimited.

    Signed-off-by: Liu Chuansheng
    Signed-off-by: Chris Ball

    Liu Chuansheng
     
  • In mmc_read_switch, just do a one time mode 0 switch command to get the
    support bits information, no need to do multiple times as the support
    bits do not change with different arguments.

    And no need to check current limit support bits, as these bits are
    fixed according to the signal voltage. If the signal voltage is 1.8V,
    the support bits would be 0xf and if the signal voltage is 3.3V, the
    support bits would be 0x01. We will check host's ability to set the
    current limit.

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

    Aaron Lu
     
  • Some of the host settings are affected by different cards inserted, e.g.
    when an UHS-I card is inserted, the SDHCI_NEEDS_RETUING flag might be
    set when the tuning timer expired and host's max_blk_count will be
    reduced to make sure the data transfer for a command does not exceed 4MiB
    to meet the retuning mode 1's requirement.

    When the card is removed, we should restore the original setting of the
    host since we can't be sure the next card being inserted will still be
    an UHS-I card that needs tuning. The original setting include its
    max_blk_count and no set of the flag of SDHCI_NEEDS_RETUNING.

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

    Aaron Lu
     
  • For SD hosts using retuning mode 1, when retuning timer expired, it will
    need to do retuning in sdhci_request before processing the actual
    request. But the retuning command is fixed: cmd19 for SD card and cmd21
    for eMMC card, so we can't use the original request's command to do the
    tuning.

    And since the tuning command depends on the card type attached to the
    host, we will need to know the card type to use the correct tuning
    command.

    Signed-off-by: Aaron Lu
    Reviewed-by: Philip Rakity
    Cc: stable [3.3+]
    Signed-off-by: Chris Ball

    Aaron Lu
     
  • At http://dev.laptop.org/ticket/11980 we have determined that the
    Marvell CaFe SDHCI controller reports bad card presence during
    resume. It reports that no card is present even when it is.
    This is a regression -- resume worked back around 2.6.37.

    Around 400ms after resuming, a "card inserted" interrupt is
    generated, at which point it starts reporting presence.

    Work around this hardware oddity by setting the
    SDHCI_QUIRK_BROKEN_CARD_DETECTION flag.
    Thanks to Chris Ball for helping with diagnosis.

    Signed-off-by: Daniel Drake
    [stable@: please apply to 3.0+]
    Cc:
    Signed-off-by: Chris Ball

    Daniel Drake
     
  • For most error conditions sdhci_add_host() will print a diagnostic
    message indicating why it failed but there are a few cases where this
    does not happen. Add error messages in these cases to aid diagnosis.

    Signed-off-by: Mark Brown
    Signed-off-by: Chris Ball

    Mark Brown
     
  • The s3c2410_gpio* calls are obsolete and have been scheduled for
    removal since several kernel releases. Remove them and use common
    gpiolib API.

    This patch is a prerequisite for removal of the S3C24XX SoC specific
    arch/arm/plat-samsung/include/gpio-fns.h header.

    Tested on Micro2440-SDK.

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Chris Ball

    Sylwester Nawrocki
     
  • Currently only the capability_0 register can be set if
    SDHCI_QUIRK_MISSING_CAPS is defined. This is a problem when
    the capability_1 register also needs changing. Use the quirk
    SDHCI_QUIRK_MISSING_CAPS to allow both registers to be set.

    Redefining caps[1] is useful when the board design does not
    support 1.8v vccq so UHS modes are not available. The code that
    calls sdhci_add_host can then detect this condition and adjust
    the caps so the UHS mode will not be attempted on UHS cards.

    Signed-off-by: Philip Rakity
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • If bootloader or platform initialization code does not enable the
    power supply to mmc slot, we need to do it in mmc driver.

    Signed-off-by: Shawn Guo
    Signed-off-by: Chris Ball

    Shawn Guo
     

21 Jul, 2012

6 commits

  • The effect of the existing code is that we continue blindly when we
    should warn about an invalid allocation unit.

    Reported-by: dcb314@hotmail.com
    Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44061
    Signed-off-by: Alan Cox
    Signed-off-by: Chris Ball

    Alan Cox
     
  • If we are using a regulator the SD Host Controller and the
    regulator should agree about the voltages supported. Use
    the common subset that is supported.

    Signed-off-by: Philip Rakity
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • max_current_caps can return 0 if not available from the sd controller.
    If no regulator is present or the regulator specifies a current
    less then 200ma, we no longer still set the 200mA caps bit anyway.

    Signed-off-by: Philip Rakity
    Reviewed-by: Aaron Lu
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • The sd host controller spec indicates the the MAX_CURRENT value may
    be returned as 0. In this case other methods need to be used to
    return the current. If 0 is returned and there is a regulator,
    ask the regulator for how much current is available.

    Signed-off-by: Philip Rakity
    Signed-off-by: Mark F. Brown
    Reviewed-by: Aaron Lu
    Signed-off-by: Chris Ball

    Philip Rakity
     
  • Extend the sh_mmcif driver to support GPIO card detection, provided by the
    slot function module. The original .get_cd() platform callback is also
    preserved for now.

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

    Guennadi Liakhovetski
     
  • Currently mmc host drivers have to decide whether to enable card
    detection before calling mmc_add_host() -- in which case a card
    insertion event can arrive before the host has been completely
    initialised -- or after mmc_add_host(), in which case the initial
    card detection can be problematic.

    This patch adds an explicit indication of when card detection should
    not be carried out. With it in place enabling card detection before
    calling mmc_add_host() should be safe. Similarly, disabling it again
    after calling mmc_remove_host() will avoid any races.

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

    Guennadi Liakhovetski