summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/omap_hsmmc.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: OMAP: Split plat/mmc.h into local headers and platform_dataTony Lindgren2012-10-151-3/+1
| | | | | | | | | | | | | We need to remove this from plat for ARM common zImage support. Also remove includes not needed by the omap_hsmmc.c driver. Cc: linux-mmc@vger.kernel.org Acked-by: Chris Ball <cjb@laptop.org> Acked-by: Venkatraman S <svenkatr@ti.com> [tony@atomide.com: fold in removal of unused driver includes] Signed-off-by: Tony Lindgren <tony@atomide.com>
* Merge tag 'mmc-merge-for-3.7-rc1' of ↵Linus Torvalds2012-10-101-91/+34
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc Pull MMC updates from Chris Ball: "Core: - Add DT properties for card detection (broken-cd, cd-gpios, non-removable) - Don't poll non-removable devices - Fixup/rework eMMC sleep mode/"power off notify" feature - Support eMMC background operations (BKOPS). To set the one-time programmable fuse that enables bkops on an eMMC that doesn't already have it set, you can use the "mmc bkops enable" command in: git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git Drivers: - atmel-mci, dw_mmc, pxa-mci, dove, s3c, spear: Add device tree support - bfin_sdh: Add support for the controller in bf60x - dw_mmc: Support Samsung Exynos SoCs - eSDHC: Add ADMA support - sdhci: Support testing a cd-gpio (from slot-gpio) instead of presence bit - sdhci-pltfm: Support broken-cd DT property - tegra: Convert to only supporting DT (mach-tegra has gone DT-only)" * tag 'mmc-merge-for-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (67 commits) mmc: core: Fixup broken suspend and eMMC4.5 power off notify mmc: sdhci-spear: Add clk_{un}prepare() support mmc: sdhci-spear: add device tree bindings mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume mmc: core: Replace MMC_CAP2_BROKEN_VOLTAGE with test for fixed regulator mmc: sdhci-pxav3: Use sdhci_get_of_property for parsing DT quirks mmc: dt: Support "broken-cd" property in sdhci-pltfm mmc: sdhci-s3c: fix the wrong number of max bus clocks mmc: sh-mmcif: avoid oops on spurious interrupts mmc: sh-mmcif: properly handle MMC_WRITE_MULTIPLE_BLOCK completion IRQ mmc: sdhci-s3c: Fix crash on module insertion for second time mmc: sdhci-s3c: Enable only required bus clock mmc: Revert "mmc: dw_mmc: Add check for IDMAC configuration" mmc: mxcmmc: fix bug that may block a data transfer forever mmc: omap_hsmmc: Pass on the suspend failure to the PM core mmc: atmel-mci: AP700x PDC is not connected to MCI mmc: atmel-mci: DMA can be used with other controllers mmc: mmci: use clk_prepare_enable and clk_disable_unprepare mmc: sdhci-s3c: Add device tree support mmc: dw_mmc: add support for exynos specific implementation of dw-mshc ...
| * mmc: omap_hsmmc: Pass on the suspend failure to the PM coreVaibhav Bedia2012-10-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases mmc_suspend_host() is not able to claim the host and proceed with the suspend process. The core returns -EBUSY to the host controller driver. Unfortunately, the host controller driver does not pass on this information to the PM core and hence the system suspend process continues. ret = mmc_suspend_host(host->mmc); if (ret) { host->suspended = 0; if (host->pdata->resume) { ret = host->pdata->resume(dev, host->slot_id); The return status from mmc_suspend_host() is overwritten by return status from host->pdata->resume. So the original return status is lost. In these cases the MMC core gets to an unexpected state during resume and multiple issues related to MMC crop up. 1. Host controller driver starts accessing the device registers before the clocks are enabled which leads to a prefetch abort. 2. A file copy thread which was launched before suspend gets stuck due to the host not being reclaimed during resume. To avoid such problems pass on the -EBUSY status to the PM core from the host controller driver. With this change, MMC core suspend might still fail but it does not end up making the system unusable. Suspend gets aborted and the user can try suspending the system again. Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> Acked-by: Venkatraman S <svenkatr@ti.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: omap_hsmmc: consolidate error report handling of HSMMC IRQVenkatraman S2012-09-041-42/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Consolidate the duplicated code around the handling of CMD_TIMEOUT, CMD_CRC, DATA_TIMEOUT, DATA_CRC and CARD_ERR handling into a single function. This generally shrinks code bloat, but is also required for implementing software based guard timers. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: omap_hsmmc: consolidate flush posted writes for HSMMC IRQsVenkatraman S2012-09-041-13/+4
| | | | | | | | | | | | | | | | | | Flushing spurious IRQs from HSMMC IP is done twice in omap_hsmmc_irq and omap_hsmmc_do_irq. Consolidate them to one location. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: omap_hsmmc: remove access to SYSCONFIG registerVenkatraman S2012-09-041-22/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SYSCONFIG register of HSMMC IP is managed by the omap hwmod abstraction layer. Resetting the IP and configuring the correct SYSCONFIG mode is centrally managed by hwmod. Remove code which manipulates IP reset and SYSCONFIG directly in the driver. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: omap_hsmmc: remove unused vars and includesVenkatraman S2012-09-041-10/+4
| | | | | | | | | | | | | | | | | | | | Some straight forward cleanup of unnecessary #include's and host variables. Some of the verbose and redundant debug messages are converted to use dev_vdbg. Signed-off-by: Venkatraman S <svenkatr@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
| * mmc: omap_hsmmc: Handle failure of regulator_get better.NeilBrown2012-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 1/ If regulator_get fails, return an error. This is important if it failed with EPROBE_DEFER, as the probe needs to be deferred. 2/ Don't set .set_power until the regulator has been found, or the deferred probe will not bother calling omap_hsmmc_reg_get(). Signed-off-by: NeilBrown <neilb@suse.de> Acked-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds2012-10-011-1/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull ARM soc general cleanups from Olof Johansson: "This is a large branch that contains a handful of different cleanups: - Fixing up the I/O space remapping on PCI on ARM. This is a series from Rob Herring that restructures how all pci devices allocate I/O space, and it's part of the work to allow multiplatform kernels. - A number of cleanup series for OMAP, moving and removing some headers, sparse irq rework and in general preparation for multiplatform. - Final removal of all non-DT boards for Tegra, it is now device-tree-only! - Removal of a stale platform, nxp4008. It's an old mobile chipset that is no longer in use, and was very likely never really used with a mainline kernel. We have not been able to find anyone interested in keeping it around in the kernel. - Removal of the legacy dmaengine driver on tegra + A handful of other things that I haven't described above." Fix up some conflicts with the staging tree (and because nxp4008 was removed) * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (184 commits) ARM: OMAP2+: serial: Change MAX_HSUART_PORTS to 6 ARM: OMAP4: twl-common: Support for additional devices on i2c1 bus ARM: mmp: using for_each_set_bit to simplify the code ARM: tegra: harmony: fix ldo7 regulator-name ARM: OMAP2+: Make omap4-keypad.h local ARM: OMAP2+: Make l4_3xxx.h local ARM: OMAP2+: Make l4_2xxx.h local ARM: OMAP2+: Make l3_3xxx.h local ARM: OMAP2+: Make l3_2xxx.h local ARM: OMAP1: Move irda.h from plat to mach ARM: OMAP2+: Make hdq1w.h local ARM: OMAP2+: Make gpmc-smsc911x.h local ARM: OMAP2+: Make gpmc-smc91x.h local ARM: OMAP1: Move flash.h from plat to mach ARM: OMAP2+: Make debug-devices.h local ARM: OMAP1: Move board-voiceblue.h from plat to mach ARM: OMAP1: Move board-sx1.h from plat to mach ARM: OMAP2+: Make omap-wakeupgen.h local ARM: OMAP2+: Make omap-secure.h local ARM: OMAP2+: Make ctrl_module_wkup_44xx.h local ...
| * | ARM: OMAP: remove plat/board.h fileIgor Grinberg2012-09-101-1/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | plat/board.h file is now empty - remove it. Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com> Cc: Chris Ball <cjb@laptop.org> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: linux-mmc@vger.kernel.org Cc: linux-mtd@lists.infradead.org Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Chris Ball <cjb@laptop.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
* | Merge tag 'fixes-non-critical' of ↵Linus Torvalds2012-10-011-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull non-critical ARM soc bug fixes from Olof Johansson: "These were submitted as bug fixes before v3.6 but not considered important enough to be included in it. Some of them cross over to cleanup territory as well, and aren't strictly bugfixes." * tag 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits) ARM: nomadik: remove NAND_NO_READRDY use ARM: pxa: fix return value check in pxa2xx_drv_pcmcia_probe() ARM: SAMSUNG: Add missing variable declaration in s3c64xx_spi1_set_platdata() ARM: S3C24XX: removes unnecessary semicolon ARM: S3C24xx: delete double assignment ARM: EXYNOS: fix address for EXYNOS4 MDMA1 ARM: EXYNOS: fixed SYSMMU setup definition to mate parameter name ARM: ep93xx: Move ts72xx.h out of include/mach ARM: ep93xx: use __iomem pointers for MMIO ARM: msm: Fix early debug uart mapping on some memory configs ARM: msm: io: Change the default static iomappings to be shared ARM: msm: io: Remove 7x30 iomap region from 7x00 ARM: msm: Remove call to missing FPGA init on 8660 ARM: OMAP4: wakeupgen: remove duplicate AUXCOREBOOT* read/write ARM: OMAP4: wakeupgen: Fix the typo in AUXCOREBOOT register save dma: tegra: make data used as *of_device_id.data const can: mpc5xxx_can: make data used as *of_device_id.data const macintosh/mediabay: make data used as *of_device_id.data const i2c/mpc: make data used as *of_device_id.data const mfd/da9052: make i2c_device_id array const ...
| * | mmc/omap_hsmmc: add a const qualifierUwe Kleine-König2012-09-111-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | This prepares *of_device_id.data becoming const. Without this change the following warning would occur: drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe': drivers/mmc/host/omap_hsmmc.c:1808: warning: initialization discards qualifiers from pointer target type Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
* | Merge branch 'for-linus' of ↵Linus Torvalds2012-10-011-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull the trivial tree from Jiri Kosina: "Tiny usual fixes all over the place" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits) doc: fix old config name of kprobetrace fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc btrfs: fix the commment for the action flags in delayed-ref.h btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID vfs: fix kerneldoc for generic_fh_to_parent() treewide: fix comment/printk/variable typos ipr: fix small coding style issues doc: fix broken utf8 encoding nfs: comment fix platform/x86: fix asus_laptop.wled_type module parameter mfd: printk/comment fixes doc: getdelays.c: remember to close() socket on error in create_nl_socket() doc: aliasing-test: close fd on write error mmc: fix comment typos dma: fix comments spi: fix comment/printk typos in spi Coccinelle: fix typo in memdup_user.cocci tmiofb: missing NULL pointer checks tools: perf: Fix typo in tools/perf tools/testing: fix comment / output typos ...
| * mmc: fix comment typosMasanari Iida2012-09-011-1/+1
| | | | | | | | | | | | | | Correct spelling typo in drivers/mmc Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | Merge branch 'dmaengine' of git://git.linaro.org/people/rmk/linux-armLinus Torvalds2012-08-011-101/+103
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * ARM: 7464/1: mmc: omap_hsmmc: ensure probe returns error if DMA channel ↵Kevin Hilman2012-07-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | request fails If dma_request_channel() fails (e.g. because DMA enine is not built into the kernel), the return value from probe is zero causing the driver to be bound to the device even though probe failed. To fix, ensure that probe returns an error value when a DMA channel request fail. Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * mmc: omap: add DMA engine supportRussell King2012-07-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | Add DMA engine support to the OMAP driver. This supplements the private DMA API implementation contained within this driver, and the driver can be switched at build time between using DMA engine and the private DMA API. Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * mmc: omap_hsmmc: remove private DMA API implementationRussell King2012-07-311-200/+63
| | | | | | | | | | | | | | | | | | Remove the private DMA API implementation from omap_hsmmc, making it use entirely the DMA engine API. Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * mmc: omap_hsmmc: add DMA engine supportRussell King2012-07-311-27/+165
| | | | | | | | | | | | | | | | | | | | | | | | Add DMA engine support to the OMAP HSMMC driver. This supplements the private DMA API implementation contained within this driver, and the driver can be switched at build time between using DMA engine and the private DMA API. Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | mmc: omap_hsmmc: ensure probe returns error upon resource failureKevin Hilman2012-07-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <khilman@ti.com> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: omap_hsmmc: add clk_prepare and clk_unprepareRajendra Nayak2012-07-221-7/+7
|/ | | | | | | | | 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 <rnayak@ti.com> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* Revert "mmc: omap_hsmmc: Enable Auto CMD12"Ming Lei2012-06-261-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reverts the commit dba3c29ea4a1d5d544. After bisecting, this commit dba3c29 is found to ruin micro-SD card data (writing incorrect file, or fs is corrupt after several times mount) on the beagle-xm revB, and reverting the commit will fix the problem. Also from TRM of OMAP3/OMAP4/DM37x, the below is mentioned about the Auto CMD12 Enable bit. - SDIO does not support this feature. - SD card only. Looks it is not suitable to always enable Auto CMD12 in host controller driver. Considered that the commit is not mature enough, so ask to revert it first. Cc: Balaji T K <balajitk@ti.com> Cc: Venkatraman S <svenkatr@ti.com> Buglink: https://lkml.org/lkml/2012/6/10/225 Reported-by: Paolo Pisati <p.pisati@gmail.com> Reported-bisected-and-tested-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Ming Lei <ming.lei@canonical.com> Acked-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* Merge tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds2012-05-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull arm-soc driver specific updates from Olof Johansson: "These changes are specific to some driver that may be used by multiple boards or socs. The most significant change in here is the move of the samsung iommu code from a platform specific in-kernel interface to the generic iommu subsystem." Fix up trivial conflicts in arch/arm/mach-exynos/Kconfig * tag 'drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits) mmc: dt: Consolidate DT bindings iommu/exynos: Add iommu driver for EXYNOS Platforms ARM: davinci: optimize the DMA ISR ARM: davinci: implement DEBUG_LL port choice ARM: tegra: Add SMMU enabler in AHB ARM: tegra: Add Tegra AHB driver Input: pxa27x_keypad add choice to set direct_key_mask Input: pxa27x_keypad direct key may be low active Input: pxa27x_keypad bug fix for direct_key_mask Input: pxa27x_keypad keep clock on as wakeup source ARM: dt: tegra: pinmux changes for USB ULPI ARM: tegra: add USB ULPI PHY reset GPIO to device tree ARM: tegra: don't hard-code USB ULPI PHY reset_gpio ARM: tegra: change pll_p_out4's rate to 24MHz ARM: tegra: fix pclk rate ARM: tegra: reparent sclk to pll_c_out1 ARM: tegra: Add pllc clock init table ARM: dt: tegra cardhu: basic audio support ARM: dt: tegra30.dtsi: Add audio-related nodes ARM: tegra: add AUXDATA required for audio ...
| * mmc: dt: Consolidate DT bindingsArnd Bergmann2012-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | This patch unifies the current DT MMC bindings documentation and code, adds generic MMC DT bindings documentation, and updates .dts files for consistency. [cjb: typo fixes, addition of max-frequency property] Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* | mmc: omap_hsmmc: pass IRQF_ONESHOT to request_threaded_irqMing Lei2012-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The flag of IRQF_ONESHOT should be passed to request_threaded_irq, otherwise the following failure message should be dumped because hardware handler is defined as NULL: [ 3.383483] genirq: Threaded irq requested with handler=NULL and !ONESHOT for irq 368 [ 3.392730] omap_hsmmc: probe of omap_hsmmc.0 failed with error -22 The patch fixes one kernel hang bug which is caused by mmc card probe failure and root device can't be brought up. Signed-off-by: Ming Lei <ming.lei@canonical.com> Acked-by: Venkatraman S <svenkatr@ti.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: omap_hsmmc: release correct resourceRussell King2012-04-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | res can be one of several resources, as this variable is re-used several times during probe. This can cause the wrong resource parameters to be passed to release_mem_region(). Get the original memory resource before calling release_mem_region(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: omap_hsmmc: Cleanup use of cpu_is_* for debounce_clockRajendra Nayak2012-04-221-22/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | There really does not seem to be a need to use cpu_is_* check for getting the debounce clock as clkdev is perfectly capable of handling situations when certain clocks are only available on select platforms. Also get rid of the 'got_dbclk' flag and instead use the dbclk clock pointer to know if a valid debounce clock exists for the platform. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: omap_hsmmc: use spinlock IRQ safe variantVenkatraman S2012-04-221-8/+11
| | | | | | | | | | | | | | Prevent possible races between HSMMC/DMA IRQs and next requests. Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: omap_hsmmc: add DDR supportBalaji T K2012-04-221-0/+5
| | | | | | | | | | | | | | | | Add Dual data rate support for omap_hsmmc. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* | mmc: omap_hsmmc: Enable Auto CMD12Balaji T K2012-04-221-3/+12
|/ | | | | | | | | Enable Auto-CMD12 for multi block read/write on HSMMC. Tested on OMAP4430, OMAP3430 and OMAP2430 SDP Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Get rid of of_have_populated_dt() usageRajendra Nayak2012-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | of_have_populated_dt() is not expected to be used in drivers but instead only in early platform init code. Drivers on the other hand should rely on dev->of_node or of_match_device(). Besides usage of of_have_populated_dt() also throws up build error as below which was reported by Balaji TK, when omap_hsmmc is built as a module. ERROR: "allnodes" [drivers/mmc/host/omap_hsmmc.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 So get rid of all of_have_populated_dt() usage in omap_hsmmc driver and instead use dev->of_node to make the same dicisions as earlier. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Reported-by: Benoit Cousson <b-cousson@ti.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Rob Herring <rob.herring@calxeda.com> Reviewed-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: build fix for CONFIG_OF=y and CONFIG_MMC_OMAP_HS=mChris Ball2012-04-201-1/+1
| | | | | | | | | | Commit 46856a68dc ("mmc: omap_hsmmc: Convert hsmmc driver to use device tree") introduced in 3.4-rc1 has a missing semi-colon, causing: drivers/mmc/host/omap_hsmmc.c:1745: error: expected ',' or ';' before 'extern' Reported-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: fix module re-insertionBalaji T K2012-04-051-3/+1
| | | | | | | | | | | | 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 <balajitk@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: convert to module_platform_driverFelipe Balbi2012-04-051-15/+1
| | | | | | | | This will delete some boilerplate code, no functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: make it behave well as a moduleFelipe Balbi2012-04-051-4/+5
| | | | | | | | | | | | 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 <balbi@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: trivial cleanupsFelipe Balbi2012-04-051-77/+70
| | | | | | | | | | | 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 <balbi@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: context save after enabling runtime pmBalaji T K2012-04-051-2/+2
| | | | | | | | | | 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 <balajitk@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Cc: <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: use runtime put sync in probe error patchBalaji T K2012-04-051-2/+1
| | | | | | | | | | | pm_runtime_put_sync instead of autosuspend pm runtime API because iounmap(host->base) follows immediately. Reported-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Cc: <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Avoid a regulator voltage change with dtRajendra Nayak2012-03-271-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting with Device tree, the omap_hsmmc driver does not program the pbias cell (inside OMAP control module) during a regulator voltage change. In case of non-dt boot, this is handled using callbacks from within platform_data and implemented in machine code. To be able to do this with device tree, without invoking any machine code, a OMAP control module driver is needed which is yet missing. The pbias cell is used to provide a 1.8v or 3.0v reference to the mmc/sd/sdio1 interface supporting both 1.8v and 3.0v voltages. Until a OMAP control module driver is available to handle this, when booting with a device tree blob, never change the regulator voltage which might then require a pbias cell re-program. There are 2 instances where in the mmc regulator voltage can be changed. -1- when the regulator is turned OFF. -2- when attempting a switch to 1.8v from 3.0v for dual volt cards This patch avoids a voltage change in both cases when booting from device tree, and hence compromises on power savings. Once the OMAP control module driver is available and hsmmc driver is modified to then do pbias programming even when booting with device tree, these limitaions can be removed to achieve better power savings. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Convert hsmmc driver to use device treeRajendra Nayak2012-03-271-0/+73
| | | | | | | | | Define dt bindings for the ti-omap-hsmmc, and adapt the driver to extract data (which was earlier passed as platform_data) from device tree. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: convert all pr_* to dev_*Rajendra Nayak2012-03-271-4/+4
| | | | | | | | | Convert all instances of pr_* prints within the driver to instead use dev_* prints. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Fix "Unbalanced pm_runtime_enable!" warningTony Lindgren2012-03-271-0/+1
| | | | | | | | | | | | Otherwise we can get following warning when re-loading the omap_hsmmc driver module when gpio_twl4030 module is not loaded: omap_hsmmc omap_hsmmc.0: Unbalanced pm_runtime_enable! omap_hsmmc omap_hsmmc.0: Unable to grab MMC CD IRQ omap_hsmmc: probe of omap_hsmmc.0 failed with error -22 Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: start removing enable / disable APIAdrian Hunter2012-03-271-12/+3
| | | | | | | | | | Most parts of the enable / disable API are no longer used and can be removed. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Venkatraman S <svenkatr@ti.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Don't expect MMC1 to always have vmmc supplyRajendra Nayak2012-03-271-29/+2
| | | | | | | | | | | | | MMC1 is not the only instance that can be used/wired for SD. So remove this assumption from the driver. Now that all the mmc id based usage is removed, get rid of all the DEVID defines and also the 'id' field from the omap_hsmmc_host structure. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Venkatraman S <svenkatr@ti.com> Tested-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Get rid of omap_hsmmc_4_set_power functionRajendra Nayak2012-03-271-20/+1
| | | | | | | | | | | | | | | Now that omap_hsmmc_set_power() already has a check to return 0 if !host->vcc, it seems like it can be used even on MMC4 instead of the dummy omap_hsmmc_4_set_power(). This also helps get rid of all the host->id based check to populate the right function for on-chip/external level shifting and use omap_hsmmc_set_power() for all MMC modules. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Venkatraman S <svenkatr@ti.com> Tested-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Get rid of omap_hsmmc_1_set_power functionRajendra Nayak2012-03-271-27/+3
| | | | | | | | | | | | | | | | Use omap_hsmmc_235_set_poweri() (now renamed as omap_hsmmc_set_power()) for MMC1 instance as well and get rid of omap_hsmmc_1_set_power() completely. omap_hsmmc_235_set_power() seems to be implemented as a superset of omap_hsmmc_1_set_power() with additional functionality implemented based on additional checks and hence should just work for MMC1 as well. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Venkatraman S <svenkatr@ti.com> Tested-by: Balaji T K <balajitk@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: Use OMAP_HSMMC_SUPPORTS_DUAL_VOLT flag to remove host->id ↵Balaji T K2012-03-271-1/+1
| | | | | | | | | | | | based hardcoding Use OMAP_HSMMC_SUPPORTS_DUAL_VOLT flag instead of host->id for identifying SD bus voltage capabilities. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: remove unused .set_sleep functionBalaji T K2012-03-271-60/+0
| | | | | | | | | set_sleep seems to be unused in omap_hsmmc driver. so get rid of it. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: omap_hsmmc: use platform_get_resource_byname for tx/rx DMA channelsBalaji T K2012-03-271-24/+11
| | | | | | | | | | | Git rid of hardcoded tx/rx DMA channels based on pdev->id and use platform_get_resource_byname() to retrieve them instead. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Tested-by: Venkatraman S <svenkatr@ti.com> Signed-off-by: Chris Ball <cjb@laptop.org>
* ARM: OMAP: hsmmc: add max_freq fieldDaniel Mack2012-03-271-2/+6
| | | | | | | | | | External circuitry like level shifters may limit the maximum operation speed of the hsmmc controller. Add a field to struct omap2_hsmmc_info so boards can adjust the setting on demand. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Chris Ball <cjb@laptop.org>
OpenPOWER on IntegriCloud