13 Apr, 2012

1 commit

  • The AMBA bus regulator support is being used to model on/off switches
    for power domains which isn't terribly idiomatic for modern kernels with
    the generic power domain code and creates integration problems on platforms
    which don't use regulators for their power domains as it's hard to tell
    the difference between a regulator that is needed but failed to be provided
    and one that isn't supposed to be there (though DT does make that easier).

    Platforms that wish to use the regulator API to manage their power domains
    can indirect via the power domain interface.

    This feature is only used with the vape supply of the db8500 PRCMU
    driver which supplies the UARTs and MMC controllers, none of which have
    support for managing vcore at runtime in mainline (only pl022 SPI
    controller does). Update that supply to have an always_on constraint
    until the power domain support for the system is updated so that it is
    enabled for these users, this is likely to have no impact on practical
    systems as probably at least one of these devices will be active and
    cause AMBA to hold the supply on anyway.

    Signed-off-by: Mark Brown
    Acked-by: Linus Walleij
    Tested-by: Shawn Guo
    Signed-off-by: Russell King

    Mark Brown
     

10 Apr, 2012

1 commit

  • The task handoff notifier leaks task_struct since it never gets freed
    after the callback returns NOTIFY_OK, which means it is responsible for
    doing so.

    It turns out the lowmemorykiller actually doesn't need this notifier at
    all. It's used to prevent unnecessary killing by waiting for a thread
    to exit as a result of lowmem_shrink(), however, it's possible to do
    this in the same way the kernel oom killer works by setting TIF_MEMDIE
    and avoid killing if we're still waiting for it to exit.

    The kernel oom killer will already automatically set TIF_MEMDIE for
    threads that are attempting to allocate memory that have a fatal signal.
    The thread selected by lowmem_shrink() will have such a signal after the
    lowmemorykiller sends it a SIGKILL, so this won't result in an
    unnecessary use of memory reserves for the thread to exit.

    This has the added benefit that we don't have to rely on
    CONFIG_PROFILING to prevent needlessly killing tasks.

    Reported-by: Werner Landgraf
    Cc: stable@vger.kernel.org
    Signed-off-by: David Rientjes
    Acked-by: Colin Cross
    Signed-off-by: Linus Torvalds

    David Rientjes
     

08 Apr, 2012

2 commits

  • Pull two more small regmap fixes from Mark Brown:
    - Now we have users for it that aren't running Android it turns out
    that regcache_sync_region() is much more useful to drivers if it's
    exported for use by modules. Who knew?
    - Make sure we don't divide by zero when doing debugfs dumps of
    rbtrees, not visible up until now because everything was providing at
    least some cache on startup.

    * tag 'regmap-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
    regmap: prevent division by zero in rbtree_show
    regmap: Export regcache_sync_region()

    Linus Torvalds
     
  • Pull SuperH fixes from Paul Mundt.

    * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
    sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver
    serial: sh-sci: use serial_port_in/out vs sci_in/out.
    sh: vsyscall: Fix up .eh_frame generation.
    sh: dma: Fix up device attribute mismatch from sysdev fallout.
    sh: dwarf unwinder depends on SHcompact.
    sh: fix up fallout from system.h disintegration.

    Linus Torvalds
     

07 Apr, 2012

13 commits

  • Pull ACPI & Power Management patches from Len Brown:
    "Two fixes for cpuidle merge-window changes, plus a URL fix in
    MAINTAINERS"

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
    MAINTAINERS: Update git url for ACPI
    cpuidle: Fix panic in CPU off-lining with no idle driver
    ACPI processor: Use safe_halt() rather than halt() in acpi_idle_play_dead()

    Linus Torvalds
     
  • Pull target fixes from Nicholas Bellinger:
    "Pull two tcm_fc fabric related fixes for -rc2:

    Note that both have been CC'ed to stable, and patch #1 is the
    important one that addresses a memory corruption bug related to FC
    exchange timeouts + command abort.

    Thanks again to MDR for tracking down this issue!"

    * '3.4-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    tcm_fc: Do not free tpg structure during wq allocation failure
    tcm_fc: Add abort flag for gracefully handling exchange timeout

    Linus Torvalds
     
  • Avoid freeing a registered tpg structure if an alloc_workqueue call
    fails. This fixes a bug where the failure was leaking memory associated
    with se_portal_group setup during the original core_tpg_register() call.

    Signed-off-by: Mark Rustad
    Acked-by: Kiran Patil
    Cc:
    Signed-off-by: Nicholas Bellinger

    Mark Rustad
     
  • Add abort flag and use it to terminate processing when an exchange
    is timed out or is reset. The abort flag is used in place of the
    transport_generic_free_cmd function call in the reset and timeout
    cases, because calling that function in that context would free
    memory that was in use. The aborted flag allows the lifetime to
    be managed in a more normal way, while truncating the processing.

    This change eliminates a source of memory corruption which
    manifested in a variety of ugly ways.

    (nab: Drop unused struct fc_exch *ep in ft_recv_seq)

    Signed-off-by: Mark Rustad
    Acked-by: Kiran Patil
    Cc:
    Signed-off-by: Nicholas Bellinger

    Mark Rustad
     
  • Len Brown
     
  • Pull arch/tile bug fixes from Chris Metcalf:
    "This includes Paul Gortmaker's change to fix the
    disintegration issues on tile, a fix to unbreak the tilepro ethernet
    driver, and a backlog of bugfix-only changes from internal Tilera
    development over the last few months.

    They have all been to LKML and on linux-next for the last few days.
    The EDAC change to MAINTAINERS is an oddity but discussion on the
    linux-edac list suggested I ask you to pull that change through my
    tree since they don't have a tree to pull edac changes from at the
    moment."

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (39 commits)
    drivers/net/ethernet/tile: fix netdev_alloc_skb() bombing
    MAINTAINERS: update EDAC information
    tilepro ethernet driver: fix a few minor issues
    tile-srom.c driver: minor code cleanup
    edac: say "TILEGx" not "TILEPro" for the tilegx edac driver
    arch/tile: avoid accidentally unmasking NMI-type interrupt accidentally
    arch/tile: remove bogus performance optimization
    arch/tile: return SIGBUS for addresses that are unaligned AND invalid
    arch/tile: fix finv_buffer_remote() for tilegx
    arch/tile: use atomic exchange in arch_write_unlock()
    arch/tile: stop mentioning the "kvm" subdirectory
    arch/tile: export the page_home() function.
    arch/tile: fix pointer cast in cacheflush.c
    arch/tile: fix single-stepping over swint1 instructions on tilegx
    arch/tile: implement panic_smp_self_stop()
    arch/tile: add "nop" after "nap" to help GX idle power draw
    arch/tile: use proper memparse() for "maxmem" options
    arch/tile: fix up locking in pgtable.c slightly
    arch/tile: don't leak kernel memory when we unload modules
    arch/tile: fix bug in delay_backoff()
    ...

    Linus Torvalds
     
  • Pull xen fixes from Konrad Rzeszutek Wilk:
    "Two fixes for regressions:
    * one is a workaround that will be removed in v3.5 with proper fix in
    the tip/x86 tree,
    * the other is to fix drivers to load on PV (a previous patch made
    them only load in PVonHVM mode).

    The rest are just minor fixes in the various drivers and some cleanup
    in the core code."

    * tag 'stable/for-linus-3.4-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen/pcifront: avoid pci_frontend_enable_msix() falsely returning success
    xen/pciback: fix XEN_PCI_OP_enable_msix result
    xen/smp: Remove unnecessary call to smp_processor_id()
    xen/x86: Workaround 'x86/ioapic: Add register level checks to detect bogus io-apic entries'
    xen: only check xen_platform_pci_unplug if hvm

    Linus Torvalds
     
  • Pull MMC fixes from Chris Ball:
    - Disable use of MSI in sdhci-pci, which caused multiple chipsets to
    stop working in 3.4-rc1. I'll wait to turn this on again until we
    have a chipset whitelist for it.
    - Fix a libertas SDIO powered-resume regression introduced in 3.3;
    thanks to Neil Brown and Rafael Wysocki for this fix.
    - Fix module reloading on omap_hsmmc.
    - Stop trusting the spec/card's specified maximum data timeout length,
    and use three seconds instead. Previously we used 300ms.

    Also cleanups and fixes for s3c, atmel, sh_mmcif and omap_hsmmc.

    * tag 'mmc-fixes-for-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (28 commits)
    mmc: use really long write timeout to deal with crappy cards
    mmc: sdhci-dove: Fix compile error by including module.h
    mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.
    Revert "mmc: sdhci-pci: Add MSI support"
    Revert "mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers"
    mmc: core: fix power class selection
    mmc: omap_hsmmc: fix module re-insertion
    mmc: omap_hsmmc: convert to module_platform_driver
    mmc: omap_hsmmc: make it behave well as a module
    mmc: omap_hsmmc: trivial cleanups
    mmc: omap_hsmmc: context save after enabling runtime pm
    mmc: omap_hsmmc: use runtime put sync in probe error patch
    mmc: sdio: Use empty system suspend/resume callbacks at the bus level
    mmc: bus: print bus speed mode of UHS-I card
    mmc: sdhci-pci: add quirks for broken MSI on O2Micro controllers
    mmc: sh_mmcif: Simplify calculation of mmc->f_min
    mmc: sh_mmcif: mmc->f_max should be half of the bus clock
    mmc: sh_mmcif: double clock speed
    mmc: block: Remove use of mmc_blk_set_blksize
    mmc: atmel-mci: add support for odd clock dividers
    ...

    Linus Torvalds
     
  • Fix a NULL pointer dereference panic in cpuidle_play_dead() during
    CPU off-lining when no cpuidle driver is registered. A cpuidle
    driver may be registered at boot-time based on CPU type. This patch
    allows an off-lined CPU to enter HLT-based idle in this condition.

    Signed-off-by: Toshi Kani
    Cc: Boris Ostrovsky
    Reviewed-by: Srivatsa S. Bhat
    Tested-by: Srivatsa S. Bhat
    Signed-off-by: Len Brown

    Toshi Kani
     
  • Pull networking updates from David Miller:

    1) Fix inaccuracies in network driver interface documentation, from Ben
    Hutchings.

    2) Fix handling of negative offsets in BPF JITs, from Jan Seiffert.

    3) Compile warning, locking, and refcounting fixes in netfilter's
    xt_CT, from Pablo Neira Ayuso.

    4) phonet sendmsg needs to validate user length just like any other
    datagram protocol, fix from Sasha Levin.

    5) Ipv6 multicast code uses wrong loop index, from RongQing Li.

    6) Link handling and firmware fixes in bnx2x driver from Yaniv Rosner
    and Yuval Mintz.

    7) mlx4 erroneously allocates 4 pages at a time, regardless of page
    size, fix from Thadeu Lima de Souza Cascardo.

    8) SCTP socket option wasn't extended in a backwards compatible way,
    fix from Thomas Graf.

    9) Add missing address change event emissions to bonding, from Shlomo
    Pongratz.

    10) /proc/net/dev regressed because it uses a private offset to track
    where we are in the hash table, but this doesn't track the offset
    pullback that the seq_file code does resulting in some entries being
    missed in large dumps.

    Fix from Eric Dumazet.

    11) do_tcp_sendpage() unloads the send queue way too fast, because it
    invokes tcp_push() when it shouldn't. Let the natural sequence
    generated by the splice paths, and the assosciated MSG_MORE
    settings, guide the tcp_push() calls.

    Otherwise what goes out of TCP is spaghetti and doesn't batch
    effectively into GSO/TSO clusters.

    From Eric Dumazet.

    12) Once we put a SKB into either the netlink receiver's queue or a
    socket error queue, it can be consumed and freed up, therefore we
    cannot touch it after queueing it like that.

    Fixes from Eric Dumazet.

    13) PPP has this annoying behavior in that for every transmit call it
    immediately stops the TX queue, then calls down into the next layer
    to transmit the PPP frame.

    But if that next layer can take it immediately, it just un-stops the
    TX queue right before returning from the transmit method.

    Besides being useless work, it makes several facilities unusable, in
    particular things like the equalizers. Well behaved devices should
    only stop the TX queue when they really are full, and in PPP's case
    when it gets backlogged to the downstream device.

    David Woodhouse therefore fixed PPP to not stop the TX queue until
    it's downstream can't take data any more.

    14) IFF_UNICAST_FLT got accidently lost in some recent stmmac driver
    changes, re-add. From Marc Kleine-Budde.

    15) Fix link flaps in ixgbe, from Eric W. Multanen.

    16) Descriptor writeback fixes in e1000e from Matthew Vick.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
    net: fix a race in sock_queue_err_skb()
    netlink: fix races after skb queueing
    doc, net: Update ndo_start_xmit return type and values
    doc, net: Remove instruction to set net_device::trans_start
    doc, net: Update netdev operation names
    doc, net: Update documentation of synchronisation for TX multiqueue
    doc, net: Remove obsolete reference to dev->poll
    ethtool: Remove exception to the requirement of holding RTNL lock
    MAINTAINERS: update for Marvell Ethernet drivers
    bonding: properly unset current_arp_slave on slave link up
    phonet: Check input from user before allocating
    tcp: tcp_sendpages() should call tcp_push() once
    ipv6: fix array index in ip6_mc_add_src()
    mlx4: allocate just enough pages instead of always 4 pages
    stmmac: re-add IFF_UNICAST_FLT for dwmac1000
    bnx2x: Clear MDC/MDIO warning message
    bnx2x: Fix BCM57711+BCM84823 link issue
    bnx2x: Clear BCM84833 LED after fan failure
    bnx2x: Fix BCM84833 PHY FW version presentation
    bnx2x: Fix link issue for BCM8727 boards.
    ...

    Linus Torvalds
     
  • The original XenoLinux code has always had things this way, and for
    compatibility reasons (in particular with a subsequent pciback
    adjustment) upstream Linux should behave the same way (allowing for two
    distinct error indications to be returned by the backend).

    Signed-off-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • Prior to 2.6.19 and as of 2.6.31, pci_enable_msix() can return a
    positive value to indicate the number of vectors (less than the amount
    requested) that can be set up for a given device. Returning this as an
    operation value (secondary result) is fine, but (primary) operation
    results are expected to be negative (error) or zero (success) according
    to the protocol. With the frontend fixed to match the XenoLinux
    behavior, the backend can now validly return zero (success) here,
    passing the upper limit on the number of vectors in op->value.

    Signed-off-by: Jan Beulich
    Signed-off-by: Konrad Rzeszutek Wilk

    Jan Beulich
     
  • commit b9136d207f08
    xen: initialize platform-pci even if xen_emul_unplug=never

    breaks blkfront/netfront by not loading them because of
    xen_platform_pci_unplug=0 and it is never set for PV guest.

    Signed-off-by: Andrew Jones
    Signed-off-by: Igor Mammedov
    Signed-off-by: Konrad Rzeszutek Wilk

    Igor Mammedov
     

06 Apr, 2012

23 commits

  • Pull "ARM: SoC fixes: from Olof Johansson:
    "A bunch of fixes for regressions (and a few other problems) in
    3.4-rc1:

    - Fix for regression of mach/io.h cleanup on platforms with PCI or
    PCMCIA (adding back the include file on those for now)
    - AT91 fixes for usb and spi
    - smsc911x ethernet fixes for i.MX
    - smsc911x fixes for OMAP
    - gpio fixes for Tegra
    - A handful of build error and warning fixes for various platforms
    - cpufreq kconfig dependencies, build and lowlevel debug fixes for
    Samsung platforms

    In other words, more or less the regular collection of -rc1/2 type
    material. A few of them, in particular the smsc911x for OMAP series,
    aren't technically regressions for 3.4, but they're valid fixes and
    we're still relatively early in the rc cycle so it seems appropriate
    to include them."

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits)
    ARM: fix __io macro for PCMCIA
    ARM: EXYNOS: Fix compiler warning in dma.c file
    ARM: EXYNOS: fix ISO C90 warning
    ARM: OMAP2+: hwmod: Fix wrong SYSC_TYPE1_XXX_MASK bit definitions
    ARM: OMAP2+: hwmod: Make omap_hwmod_softreset wait for reset status
    ARM: OMAP2+: hwmod: Restore sysc after a reset
    ARM: OMAP2+: omap_hwmod: Allow io_ring wakeup configuration for all modules
    ARM: OMAP3: clock data: fill in some missing clockdomains
    ARM: OMAP4: clock data: Force a DPLL clkdm/pwrdm ON before a relock
    ARM: OMAP4: clock data: fix mult and div mask for USB_DPLL
    ARM: OMAP2+: powerdomain: Wait for powerdomain transition in pwrdm_state_switch()
    gpio: tegra: Iterate over the correct number of banks
    gpio: tegra: fix register address calculations for Tegra30
    EXYNOS: fix dependency for EXYNOS_CPUFREQ
    ARM: at91: dt: remove unit-address part for memory nodes
    ARM: at91: fix check of valid GPIO for SPI and USB
    USB: ehci-atmel: add needed of.h header file
    ARM: at91/NAND DT bindings: add comments
    ARM: at91/at91sam9x5.dtsi: fix NAND ale/cle in DT file
    USB: ohci-at91: trivial return code name change
    ...

    Linus Torvalds
     
  • Pull an APM fix from Jiri Kosina:
    "One deadlock/race fix from Niel that got introduced when we were
    moving away from freezer_*_count() to wait_event_freezable()."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/apm:
    APM: fix deadlock in APM_IOC_SUSPEND ioctl

    Linus Torvalds
     
  • Several people have noticed that crappy SD cards take much longer to
    complete multiple block writes than the 300ms that Linux specifies.
    Try to work around this by using a three second write timeout instead.

    This is a generalized version of a patch from Chase Maupin
    , whose patch description said:

    * With certain SD cards timeouts like the following have been seen
    due to an improper calculation of the dto value:
    mmcblk0: error -110 transferring data, sector 4126233, nr 8,
    card status 0xc00
    * By removing the dto calculation and setting the timeout value
    to the maximum specified by the SD card specification part A2
    section 2.2.15 these timeouts can be avoided.
    * This change has been used by beagleboard users as well as the
    Texas Instruments SDK without a negative impact.
    * There are multiple discussion threads about this but the most
    relevant ones are:
    * http://talk.maemo.org/showthread.php?p=1000707#post1000707
    * http://www.mail-archive.com/linux-omap@vger.kernel.org/msg42213.html
    * Original proposal for this fix was done by Sukumar Ghoral of
    Texas Instruments
    * Tested using a Texas Instruments AM335x EVM

    Signed-off-by: Paul Walmsley
    Tested-by: Tony Lindgren
    Signed-off-by: Chris Ball

    Paul Walmsley
     
  • This patch fixes a compile error in drivers/mmc/host/sdhci-dove.c
    by including the linux/module.h file.

    Signed-off-by: Alf Høgemark
    Cc:
    Signed-off-by: Chris Ball

    Alf Høgemark
     
  • The driver should not try to switch to 1.8V when the SD 3.0 host
    controller does not have any UHS capabilities bits set (SDR50, DDR50
    or SDR104). See page 72 of "SD Specifications Part A2 SD Host
    Controller Simplified Specification Version 3.00" under
    "1.8V Signaling Enable". Instead of setting SDR12 and SDR25 in the host
    capabilities data structure for all V3.0 host controllers, only set them
    if SDR104, SDR50 or DDR50 is set in the host capabilities register. This
    will prevent the switch to 1.8V later.

    Signed-off-by: Al Cooper
    Acked-by: Arindam Nath
    Acked-by: Philip Rakity
    Acked-by: Girish K S
    Signed-off-by: Chris Ball

    Al Cooper
     
  • This reverts commit e6039832bed9a9b967796d7021f17f25b625b616.
    There are reports of MSI breaking SDHCI on multiple chipsets (JMicron
    and O2Micro, at least), so this should be reverted until we come up
    with a whitelist or something.

    Signed-off-by: Chris Ball

    Chris Ball
     
  • This reverts commit c16e981b2fd9455af670a69a84f4c8cf07e12658, because
    it's no longer useful once MSI support is reverted.

    Signed-off-by: Chris Ball

    Chris Ball
     
  • mmc_select_powerclass() function returns error if eMMC
    VDD level supported by host is between 2.7v to 3.2v.

    According to eMMC specification, valid voltage for high
    voltage cards is 2.7v to 3.6v. This patch ensures that
    2.7v to 3.6v VDD range is treated as valid range.

    Also, failure to set the power class shouldn't be treated
    as fatal error because even if setting the power class
    fails, card can still work in default power class.
    If mmc_select_powerclass() returns error, just print
    the warning message and go ahead with rest of the card
    initialization.

    Signed-off-by: Subhash Jadavani
    Acked-by: Girish K S
    Reviewed-by: Namjae Jeon
    Signed-off-by: Chris Ball

    Subhash Jadavani
     
  • OMAP4 and OMAP3 HSMMC IP registers differ by 0x100 offset.
    Adding the offset to platform_device resource structure
    increments the start address for every insmod operation.
    MMC command fails on re-insertion as module due to incorrect register
    base. Fix this by updating the ioremap base address only.

    Signed-off-by: Balaji T K
    Signed-off-by: Venkatraman S
    Signed-off-by: Chris Ball

    Balaji T K
     
  • This will delete some boilerplate code, no functional changes.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Venkatraman S
    Signed-off-by: Chris Ball

    Felipe Balbi
     
  • If we put probe() on __init section, that will never work for multiple
    module insertions/removals.

    In order to make it work properly, move probe to __devinit section and
    use platform_driver_register() instead of platform_driver_probe().

    Signed-off-by: Felipe Balbi
    Signed-off-by: Venkatraman S
    Signed-off-by: Chris Ball

    Felipe Balbi
     
  • A bunch of non-functional cleanups to the omap_hsmmc driver.

    It basically decreases indentation level, drop unneded dereferences
    and drop unneded accesses to the platform_device structure.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Venkatraman S
    Signed-off-by: Chris Ball

    Felipe Balbi
     
  • Call context save api after enabling runtime pm to make sure that
    register access in context save api happens with clk enabled.

    Signed-off-by: Balaji T K
    Signed-off-by: Venkatraman S
    Cc:
    Signed-off-by: Chris Ball

    Balaji T K
     
  • pm_runtime_put_sync instead of autosuspend pm runtime API
    because iounmap(host->base) follows immediately.

    Reported-by: Rajendra Nayak
    Signed-off-by: Balaji T K
    Signed-off-by: Venkatraman S
    Cc:
    Signed-off-by: Chris Ball

    Balaji T K
     
  • Neil Brown reports that commit 35cd133c

    PM: Run the driver callback directly if the subsystem one is not there

    breaks suspend for his libertas wifi, because SDIO has a protocol
    where the suspend method can return -ENOSYS and this means "There is
    no point in suspending, just turn me off". Moreover, the suspend
    methods provided by SDIO drivers are not supposed to be called by
    the PM core or bus-level suspend routines (which aren't presend for
    SDIO). Instead, when the SDIO core gets to suspend the device's
    ancestor, it calls the device driver's suspend function, catches the
    ENOSYS, and turns the device off.

    The commit above breaks the SDIO core's assumption that the device
    drivers' callbacks won't be executed if it doesn't provide any
    bus-level callbacks. If fact, however, this assumption has never
    been really satisfied, because device class or device type suspend
    might very well use the driver's callback even without that commit.

    The simplest way to address this problem is to make the SDIO core
    tell the PM core to ignore driver callbacks, for example by providing
    no-operation suspend/resume callbacks at the bus level for it,
    which is implemented by this change.

    Reported-and-tested-by: Neil Brown
    Signed-off-by: Rafael J. Wysocki
    [stable: please apply to 3.3-stable only]
    Cc:
    Signed-off-by: Chris Ball

    Rafael J. Wysocki
     
  • When UHS-I card is detected also print the bus speed mode in which
    UHS-I card will be running.

    Signed-off-by: Subhash Jadavani
    Reviewed-by: Namjae Jeon
    Acked-by: Aaron Lu
    Signed-off-by: Chris Ball

    Subhash Jadavani
     
  • MSI on my O2Micro OZ600 SD card reader is broken. This patch adds a quirk
    to disable MSI on these controllers.

    Signed-off-by: Manuel Lauss
    Signed-off-by: Chris Ball

    Manuel Lauss
     
  • There is no need to tune mmc->f_min to a value near 400kHz as the MMC core
    begins testing frequencies at 400kHz regardless of the value of mmc->f_min.

    As suggested by Guennadi Liakhovetski.

    Cc: Magnus Damm
    Acked-by: Guennadi Liakhovetski
    Tested-by: Cao Minh Hiep
    Signed-off-by: Simon Horman
    Signed-off-by: Chris Ball

    Simon Horman
     
  • mmc->f_max should be half of the bus clock.
    And now that mmc->f_max is not equal to the bus clock the
    latter should be used directly to calculate mmc->f_min.

    Cc: Magnus Damm
    Tested-by: Cao Minh Hiep
    Acked-by: Guennadi Liakhovetski
    Signed-off-by: Simon Horman
    Signed-off-by: Chris Ball

    Simon Horman
     
  • Correct an off-by one error when calculating the clock divisor in cases
    where the host clock is a power of two of the target clock. Previously the
    divisor was one greater than the correct value in these cases leading to
    the clock being set at half the desired speed.

    Thanks to Guennadi Liakhovetski for working with me on the logic for this
    change.

    Tested-by: Cao Minh Hiep
    Acked-by: Guennadi Liakhovetski
    Signed-off-by: Simon Horman
    Signed-off-by: Chris Ball

    Simon Horman
     
  • According to the specifications for SD and (e)MMC default
    blocksize (named BLOCKLEN in Spec.) must always be 512
    bytes. Since we hardcoded to always use 512 bytes, we do
    not explicitly have to set it. Future improvements should
    potentially make it possible to use a greater blocksize
    than 512 bytes, but until then let's skip this.

    Signed-off-by: Ulf Hansson
    Reviewed-by: Subhash Jadavani
    Signed-off-by: Chris Ball

    Ulf Hansson
     
  • Add an odd clock divider capability available from v5xx. It also involves
    changing the clock divider calculation, and changing the switch-case
    statement to use top-down fallthrough.

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

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

    Ludovic Desroches