summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-12-10Merge branch 'acpi-enumeration'Rafael J. Wysocki
* acpi-enumeration: mmc: sdhci-acpi: enable runtime-pm for device HID INT33C6
2012-12-10mmc: sdhci-acpi: enable runtime-pm for device HID INT33C6Adrian Hunter
sdhci-acpi supports ACPI devices which have compatibility ID PNP0D40, however it is not possible to know if those devices will all work correctly with runtime-pm, so that must be configured per hardware ID. For INT33C6, several related quirks, capabilities and flags are set: MMC_CAP_NONREMOVABLE The SDIO card will never be removable SDHCI_ACPI_RUNTIME_PM Enable runtime-pm of the host controller MMC_CAP_POWER_OFF_CARD Enable runtime-pm of the SDIO card MMC_PM_KEEP_POWER SDIO card has the capability to remain powered up during system suspend SDHCI_QUIRK2_HOST_OFF_CARD_ON Always do a full reset during system resume because the card may be already initialized having not been powered off. Wake-ups from the INT33C6 host controller are not supported, so the following capability must *not* be set: MMC_PM_WAKE_SDIO_IRQ Enable wake on card interrupt Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-12-10Revert "revert "Revert "mm: remove __GFP_NO_KSWAPD""" and associated damageLinus Torvalds
This reverts commits a50915394f1fc02c2861d3b7ce7014788aa5066e and d7c3b937bdf45f0b844400b7bf6fd3ed50bac604. This is a revert of a revert of a revert. In addition, it reverts the even older i915 change to stop using the __GFP_NO_KSWAPD flag due to the original commits in linux-next. It turns out that the original patch really was bogus, and that the original revert was the correct thing to do after all. We thought we had fixed the problem, and then reverted the revert, but the problem really is fundamental: waking up kswapd simply isn't the right thing to do, and direct reclaim sometimes simply _is_ the right thing to do. When certain allocations fail, we simply should try some direct reclaim, and if that fails, fail the allocation. That's the right thing to do for THP allocations, which can easily fail, and the GPU allocations want to do that too. So starting kswapd is sometimes simply wrong, and removing the flag that said "don't start kswapd" was a mistake. Let's hope we never revisit this mistake again - and certainly not this many times ;) Acked-by: Mel Gorman <mgorman@suse.de> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Rik van Riel <riel@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-12-10regmap: debugfs: Cache offsets of valid regions for dumpMark Brown
Avoid doing a linear scan of the entire register map for each read() of the debugfs register dump by recording the offsets where valid registers exist when we first read the registers file. This assumes the set of valid registers never changes, if this is not the case invalidation of the cache will be required. This could be further improved for large blocks of contiguous registers by calculating the register we will read from within the block - currently we do a linear scan of the block. An rbtree may also be worthwhile. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regmap: debugfs: Factor out initial seekMark Brown
In preparation for doing things a bit more quickly than a linear scan factor out the initial seek from the debugfs register dump. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10regmap: debugfs: Avoid overflows for very small readsMark Brown
If count is less than the size of a register then we may hit integer wraparound when trying to move backwards to check if we're still in the buffer. Instead move the position forwards to check if it's still in the buffer, we are unlikely to be able to allocate a buffer sufficiently big to overflow here. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
2012-12-10gpio: Provide the STMPE GPIO driver with its own IRQ DomainLee Jones
The STMPE GPIO driver can be used as an IRQ controller by some related devices. Here we provide it with its very own IRQ Domain so that IRQs can be issued dynamically. This will stand the driver in good stead when it is enabled for Device Tree, as this it a prerequisite. Cc: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-12-10gpio: add TS-5500 DIO blocks supportVivien Didelot
Technologic Systems TS-5500 provides digital I/O lines exposed through pin blocks. On this platform, there are three of them, named DIO1, DIO2 and LCD port, that may be used as a DIO block. The TS-5500 pin blocks are described in the product's wiki: http://wiki.embeddedarm.com/wiki/TS-5500#Digital_I.2FO This driver is not limited to the TS-5500 blocks. It can be extended to support similar boards pin blocks, such as on the TS-5600. This patch is the V2 of the previous https://lkml.org/lkml/2012/9/25/671 with corrections suggested by Linus Walleij. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Jerome Oufella <jerome.oufella@savoirfairelinux.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-12-08mfd: vexpress-sysreg: Remove LEDs codePawel Moll
As the current LEDs code breaks other platform, remove it. It shall be replaced by a generic "MMIO LEDs" driver. Reported-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Pawel Moll <pawel.moll@arm.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2012-12-08Merge tag 'sunxi-fixes-for-3.8' of git://github.com/mripard/linux into next/socOlof Johansson
From Maxime Ripard: Fixes in sunXi related drivers for 3.8 * tag 'sunxi-fixes-for-3.8' of git://github.com/mripard/linux: irqchip: irq-sunxi: Add terminating entry for sunxi_irq_dt_ids clocksource: sunxi_timer: Add terminating entry for sunxi_timer_dt_ids
2012-12-07Merge branch 'acpi-general'Rafael J. Wysocki
* acpi-general: pnpacpi: fix incorrect TEST_ALPHA() test ACPI / video: ignore BIOS initial backlight value for HP Folio 13-2000 ACPI : do not use Lid and Sleep button for S5 wakeup
2012-12-07Merge branch 'acpi-enumeration'Rafael J. Wysocki
* acpi-enumeration: ACPI: add Haswell LPSS devices to acpi_platform_device_ids list ACPI: add documentation about ACPI 5 enumeration
2012-12-07Merge branch 'pm-devfreq'Rafael J. Wysocki
* pm-devfreq: (23 commits) PM / devfreq: remove compiler error with module governors (2) PM / devfreq: Fix return value in devfreq_remove_governor() PM / devfreq: Fix incorrect argument in error message PM / devfreq: missing rcu_read_lock() added for find_device_opp() PM / devfreq: remove compiler error when a governor is module PM / devfreq: exynos4_bus.c: Fixed an alignment of the func call args. PM / devfreq: Add sysfs node to expose available governors PM / devfreq: allow sysfs governor node to switch governor PM / devfreq: governors: add GPL module license and allow module build PM / devfreq: map devfreq drivers to governor using name PM / devfreq: register governors with devfreq framework PM / devfreq: provide hooks for governors to be registered PM / devfreq: export update_devfreq PM / devfreq: Add sysfs node for representing frequency transition information. PM / devfreq: Add sysfs node to expose available frequencies PM / devfreq: documentation cleanups for devfreq header PM / devfreq: Use devm_* functions in exynos4_bus.c PM / devfreq: make devfreq_class static PM / devfreq: fix sscanf handling for writable sysfs entries PM / devfreq: kernel-doc typo corrections ...
2012-12-07ACPI: add Haswell LPSS devices to acpi_platform_device_ids listMika Westerberg
All devices behind Haswell LPSS (Low Power Subsystem) should be represented as platform devices so add them to the acpi_platform_device_ids list. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-12-07pnpacpi: fix incorrect TEST_ALPHA() testAlan Cox
TEST_ALPHA() is broken and always returns 0. [akpm@linux-foundation.org: return false for '@' as well, per Bjorn] Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-12-07ACPI, APEI, EINJ: Add missed ACPI5 support for error trigger tableChen Gong
To handle error trigger table correctly, memory region must be removed from request region. We had a series of patches to do this culminating in: commit b4e008dc5 ACPI, APEI, EINJ, Refine the fix of resource conflict but when ACPI5 support was added, we missed updating this area. So when using EINJ table on an ACPI5 enabled machine, we get following error: APEI: Can not request [mem 0x526b80000-0x526b80007] for APEI EINJ Trigger registers Fix this by checking for the acpi5 case and using the same code that was added earlier. Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2012-12-07mmc: sdhci: implement the .card_event() methodGuennadi Liakhovetski
Extracting a part of the SDHCI card tasklet into a .card_event() implementation allows SDHCI hosts to use generic card-detection services, e.g. the GPIO slot function. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-07mmc: extend the slot-gpio card-detection to use host's .card_event() methodGuennadi Liakhovetski
The slot-gpio API provides a generic card-detection handler. To support a wider range of hosts it has to call the host's card-event callback, if implemented. Also increase the debounce interval to 200ms to match the SDHCI driver. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-07mmc: sdhci-s3c: Fix compilation warningSachin Kamat
'sc' is used only when CONFIG_PM_RUNTIME is defined. Hence define it conditionally. Silences the following warning: drivers/mmc/host/sdhci-s3c.c: In function ‘sdhci_s3c_notify_change’: drivers/mmc/host/sdhci-s3c.c:378:20: warning: unused variable ‘sc’ [-Wunused-variable] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-07Merge tag 'mmc-fixes-for-3.7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC fixes from Chris Ball: "Two small regression fixes: - sdhci-s3c: Fix runtime PM regression against 3.7-rc1 - sh-mmcif: Fix oops against 3.6" * tag 'mmc-fixes-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: mmc: sh-mmcif: avoid oops on spurious interrupts (second try) Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts" mmc: sdhci-s3c: fix missing clock for gpio card-detect
2012-12-07gpio: pcf857x: use client->irq for gpio_to_irq()Kuninori Morimoto
6e20a0a429bd4dc07d6de16d9c247270e04e4aa0 (gpio: pcf857x: enable gpio_to_irq() support) added gpio_to_irq() support on pcf857x driver, but it used pdata->irq. This patch modifies driver to use client->irq instead of it. It modifies kzm9g board platform settings, and device probe information too. This patch is tested on kzm9g board Reported-by: Christian Engelmayer <christian.engelmayer@frequentis.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-12-06mmc: sdhci-pci: Enable SDHCI_CAN_DO_HISPD for Ricoh SDHCI controllerMadhvapathi Sriram
The Ricoh SDHCI controllers support Highspeed clocks as evident from the ricoh_mmc_probe_slot() settings. Hence, SDHCI_CAN_DO_HISPD needs to be set to enable SDIO client drivers to set/enable high speed clock settings Signed-off-by: Madhvapathi Sriram <Madhvapathi.Sriram@csr.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-dove: allow GPIOs to be used for card detection on DoveRussell King
This commit taken from Rabeeh's Cubox kernel and re-worked for DT; Sebastian Hasselbrath is believed to be the original author. Some Cuboxes require a GPIO for card detection; this implements the optional GPIO support for card detection. This GPIO is logic 0 for card inserted. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-dove: use two-stage initialization for sdhci-pltfmRussell King
We need to use the two-stage initialization for sdhci-pltfm if we're going to do anything extra at initialization time. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-dove: use devm_clk_get()Russell King
Use devm_clk_get() rather than clk_get() to make cleanup paths more simple. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: eSDHC: Recover from ADMA errorsHaijun Zhang
A-003500: False ADMA Error might be reported when ADMA is used for multiple block read command with Stop at Block Gap. If PROCTL[SABGREQ] is set when the particular block's data is received by the System side logic before entire block (with CRC) data is received by the SD side logic, and also if ADMA descriptor line is fetched at the same time, then DMA engine might report false ADMA error. eSDHC might not be able to Continue (PROCTL[CREQ]=1) after Stop at Block Gap. This issue will impact the eSDHC IP VVN2.3. Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Acked-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: remove duplicated buswidth codeJaehoon Chung
ctype is using 1-bit buswidth mode by default. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: relocate where dw_mci_setup_bus() is called fromJaehoon Chung
To ensure the stable clock need to enable before set the DW_MMC_CARD_NEED_INIT flag. If set DW_MMC_CARD_NEED_INIT flag, wait for 80-clock before first command after power-up. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Acked-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: Limit MMC speed to 52MHz if not HS200Al Cooper
If "caps2" host capabilities does not indicate support for MMC HS200, don't allow clock speeds >52MHz. Currently, for MMC, the clock speed is set to the lesser of the max speed the eMMC module supports (card->ext_csd.hs_max_dtr) or the max base clock of the host controller (host->f_max based on BASE_CLK_FREQ in the host CAPS register). This means that a host controller that doesn't support HS200 mode but has a base clock of 100MHz and an eMMC module that supports HS200 speeds will end up using a 100MHz clock. Signed-off-by: Al Cooper <alcooperx@gmail.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dw_mmc: use devres functions in dw_mmcSeungwon Jeon
Use managed device resource functions for easy handling. This makes driver simpler in the routine of error and exit. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sh_mmcif: remove unneeded clock connection IDGuennadi Liakhovetski
MMCIF only uses one clock, all ARM and SuperH platforms register MMCIF clock lookup entries with no connection ID, hence it can be dropped in the driver too. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sh_mobile_sdhi: remove unneeded clock connection IDGuennadi Liakhovetski
SDHI only uses one clock, all ARM and SuperH platform register SDHI clock lookup entries with no connection ID, hence it can be dropped in the driver too. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sh_mobile_sdhi: fix clock frequency printingGuennadi Liakhovetski
During its probing the SDHI driver prints out the clock frequency, but does it wrongly, always reporting 0Hz. Use the MMC host frequency value to fix this issue. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: Remove redundant null check before kfree in bus.cSachin Kamat
kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: Remove redundant null check before kfree in sdio_bus.cSachin Kamat
kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-imx-esdhc: use more devm_* functionsShawn Guo
Use devm_kzalloc, devm_gpio_request_one and devm_request_irq to make cleanup path simpler. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: dt: add no-1-8-v device tree flagDaniel Drake
The OLPC XO-1.75 laptop includes a SDHCI controller which is 1.8v capable, and it truthfully reports so in its capabilities. This alternate voltage is used for driving new "UHS-I" SD cards at their full speed. However, what the controller doesn't know is that the motherboard physically doesn't have a 1.8v supply available, so attempting to switch to the 1.8v level will result in a situation that cannot be recovered from without physically replugging the SD card. Add a device tree flag that can be used on systems like these, and hook it up to the equivalent SDHCI quirk. Signed-off-by: Daniel Drake <dsd@laptop.org> Reviewed-by: Philip Rakity <prakity@nvidia.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci: add quirk for lack of 1.8v supportDaniel Drake
The OLPC XO-1.75 laptop includes a SDHCI controller which is 1.8v capable, and it truthfully reports so in its capabilities. This alternate voltage is used for driving new "UHS-I" SD cards at their full speed. However, what the controller doesn't know is that the motherboard physically doesn't have a 1.8v supply available. Add a quirk so that systems such as this one can override disable 1.8v support, adding support for UHS-I cards (by running them at 3.3v). This avoids a problem where the system would first try to run the card at 1.8v, fail, and then not be able to fully reset the card to retry at the normal 3.3v voltage. This is more appropriate than using the MISSING_CAPS quirk, which is intended for cases where the SDHCI controller is actually lying about its capabilities, and would force us to somehow override both caps words from another source. Signed-off-by: Daniel Drake <dsd@laptop.org> Reviewed-by: Philip Rakity <prakity@nvidia.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdio: Add empty bus-level suspend/resume callbacksRafael J. Wysocki
Suspend methods provided by SDIO drivers are not supposed to be called by the PM core. Instead, when the SDIO core gets to suspend a device's ancestor, it calls the device driver's suspend routine. However, the PM core executes suspend callback routines directly for device drivers whose bus types don't provide suspend callbacks. In consequece, because the SDIO bus type doesn't provide a suspend callback, the SDIO drivers' suspend routines will be executed by the PM core (which shouldn't happen). To prevent this from happening, add empty system suspend/resume callbacks for the SDIO bus type. An analogous change had been made already by commit (e841a7c mmc: sdio: Use empty system suspend/resume callbacks at the bus level), but then it was reverted inadvertently by commit (d8e2ac3 mmc: sdio: Fix PM_SLEEP related build warnings) that attempted to fix build warnings introduced by commit e841a7c. Reported-by: NeilBrown <neilb@suse.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: vub300: add missing usb_put_devMarina Makienko
Add missing usb_put_dev on failure path in vub300_probe(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Marina Makienko <makienko@ispras.ru> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-spear: Don't call clk_{un}prepare() in suspend/resumeViresh Kumar
clk_{un}prepare is mandatory for platforms using common clock framework. Because for SPEAr we don't do anything in clk_{un}prepare() calls, just call them once in probe/remove. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-spear: Initialize sdhci clk to 50 MHzVipul Kumar Samar
SPEAr sdhci driver expects the clock to be set to 50 MHz for proper functioning. This patch sets clk to 50 MHz in probe. Signed-off-by: Vipul Kumar Samar <vipulkumar.samar@st.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: host: sdhci-s3c: Add support for pinctrlTomasz Figa
This patch adds support for pin configuration using pinctrl subsystem to the sdhci-s3c driver. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: host: sdhci-s3c: Use devm_gpio_request to request GPIOsTomasz Figa
The set of GPIO pins used by sdhci-s3c driver varies between configurations, such as card detect method, pinctrl availability, etc. This overly complicates the code requesting and freeing GPIO pins, which must check which pins are used, when freeing them. This patch modifies the sdhci-s3c driver to use devm_gpio_request to free requested pins automatically after unbinding the driver. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-of-esdhc: support commands with busy response expecting TCJerry Huang
The IP versions older than 2.3 didn't support commands with busy response which expect the TC bit set. But after the VVN2.3, eSDHC IP has supported it. Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: sdhci-s3c: Use NULL instead of 0 for pointersTushar Behera
The third argument for of_get_property() is a pointer, hence pass NULL instead of 0. Fixes the following sparse warning: sdhci-s3c.c:452:48: warning: Using plain integer as NULL pointer sdhci-s3c.c:457:52: warning: Using plain integer as NULL pointer Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: Cleanup bitmap definitions of Interrupt RegisterVenkatraman S
Define the most frequently used bitmasks of the Interrupt Enable / Interrupt Status register with consistent naming ( with _EN suffix). Use meaningful concatenation of bitfields for INT_EN_MASK, which shows which interrupts are enabled by default. No functional changes. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: Convert critical failure reports to dev_errVenkatraman S
Fatal errors for the driver are not reported when just error debug is enabled. Convert selected dev_dbg to dev_err for accurate error reporting. Reported-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: Introduce omap_hsmmc_prepare/completeFelipe Balbi
prepare() is supposed to prevent new children from being registered. On the MMC subsystem, children (new cards) registration starts with the card detect IRQ. Move card detect IRQ disabling to prepare() so that no new cards will be registered while we're trying to suspend. Likewise, move card detect IRQ enabling to complete() so we only try to register new children after our MMC IP is back up. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2012-12-06mmc: omap_hsmmc: Enable HSPE bit for high speed cardsHebbar, Gururaja
HSMMC IP on AM33xx need a special setting to handle High-speed cards. Other platforms like TI81xx, OMAP4 may need this as-well. This depends on the HSMMC IP timing closure done for the high speed cards. From AM335x TRM (SPRUH73F - 18.3.12 Output Signals Generation): The MMC/SD/SDIO output signals can be driven on either falling edge or rising edge depending on the SD_HCTL[2] HSPE bit. This feature allows to reach better timing performance, and thus to increase data transfer frequency. There are few pre-requisites for enabling the HSPE bit - Controller should support High-Speed-Enable Bit and - Controller should not be using DDR Mode and - Controller should advertise that it supports High Speed in capabilities register and - MMC/SD clock coming out of controller > 25MHz Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>