summaryrefslogtreecommitdiff
path: root/drivers/mmc/host
AgeCommit message (Collapse)Author
2016-06-22mmc: sdhci: handle command timeout after transfer complete interruptNicolas Serafini
On a tegra3 platform with Hynix eMMC we can observe that sometimes we receive a command timeout after a transfer complete interrupt on a multiple block read request. Here is the output using MMC_DEBUG and ftrace. When it works: tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 0 enabled=1 tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 52000000 enabled=0 __mmc_start_req: mmc0: starting CMD18 arg 00a73044 flags 000000b5 __mmc_start_req: mmc0: blksz 512 blocks 2 flags 00000200 tsac 150 ms nsac 1000 __mmc_start_req: mmc0: CMD12 arg 00000000 flags 0000049d sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001 sdhci_finish_command: sdhci_finish_command:1075 sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000002 sdhci_tasklet_finish: sdhci_tasklet_finish:2064 When we have the error: tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 0 enabled=1 tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 52000000 enabled=0 __mmc_start_req: mmc0: starting CMD18 arg 00a63d12 flags 000000b5 __mmc_start_req: mmc0: blksz 512 blocks 2 flags 00000200 tsac 150 ms nsac 1000 __mmc_start_req: mmc0: CMD12 arg 00000000 flags 0000049d sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001 sdhci_finish_command: sdhci_finish_command:1075 sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00018000 ------NOW THE REQUEST BLOCK UNTIL TIMEOUT------ We can see that when it works the multiple read blocks command stopped by the CMD12 receive two interrupts. The first is the Transfer complete interrupt (SDHCI_INT_RESPONSE) and just after the Block Gap Event interrupt (SDHCI_INT_DATA_END). In this case the command is finished and the data is finished too. In the bad case instead of receiving SDHCI_INT_DATA_END we receive a command timeout error (SDHCI_INT_TIMEOUT) but command was already finished by the SDHCI_INT_RESPONSE so not more command is waiting and the driver wait until the timeout timer end because this case is not managed. Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-06-22mmc: host: sdhci: fix suspend/resume issueMarcel Ziswiler
This fixes the following eMMC suspend/resume issue as seen on Colibri T30 1GB IT V1.1A: [ 75.479664] mmcblk0: error -110 transferring data, sector 287240, nr 2, cmd response 0x900, card status 0xc00 [ 75.580923] end_request: I/O error, dev mmcblk0, sector 287240 [ 75.586782] Buffer I/O error on device mmcblk0p2, logical block 123140 [ 75.593313] lost page write due to I/O error on mmcblk0p2 (fixes an issue probably caused by a merge conflict introduced by commit 7f7b042a978edfc6c7d1e14ec9c6ec01ffcc284b) Signed-off-by: Mirza Krak <mirza.krak@hostmobility.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2015-10-11mmc: sdhci: handle busy-end interrupt during commandChanho Min
It is fully legal for a controller to start handling busy-end interrupt before it has signaled that the command has completed. So make sure we do things in the proper order, Or it results that command interrupt is ignored so it can cause unexpected operations. This is founded at some toshiba emmc with the bellow warning. "mmc0: Got command interrupt 0x00000001 even though no command operation was in progress." This issue has been also reported by Youssef TRIKI: It is not specific to Toshiba devices, and happens with eMMC devices as well as SD card which support Auto-CMD12 rather than CMD23. Also, similar patch is submitted by: Gwendal Grignou <gwendal@chromium.org> Changes since v1: Fixed conflict with the next of git.linaro.org/people/ulf.hansson/mmc.git and Tested if issue is fixed again. Signed-off-by: Hankyung Yu <hankyung.yu@lge.com> Signed-off-by: Chanho Min <chanho.min@lge.com> Tested-by: Youssef TRIKI <youssef.triki@st.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit e99783a45220a2c5f5a598e0e81213ecf2dbcf2f)
2015-10-11sdhci : handle busy timeout irqMatthieu CASTET
When we wait for busy after sending a command, if there is a timeout, we got SDHCI_INT_DATA_TIMEOUT flags. Before this commit we got the message : "Got data interrupt 0x00100000 even though no data operation was in progress." and we need to wait 10s that sdhci_timeout_timer expires. Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit c5abd5e8998e20c2e82999670a03f26f1437d744)
2015-10-11mmc: sdhci: clean up sdio interrupt enable handlingRussell King
We don't need to change the SDHCI_SDIO_IRQ_ENABLED flag when we're merely receiving an interrupt - IRQ handling thread in the MMC core will either re-enable or disable the interrupt via the enable_sdio_irq callback, which will update this status appropriately. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net> (cherry picked from commit ef104333a234f66cd13fd16632086a21b90fced6)
2015-10-11mmc: sdhci: clean up interrupt handlingRussell King
sdhci interrupt handling is a mess; there is a lot of code doing very similar things. Let's clean this up a bit: 1. set's clear down cmd, data and bus power interrupts in one go - we're always going to handle these. 2. use a do { } while () loop for looping while there are pending interrupts. 3. group clearing of bits in intmask into one place. This results in the code becoming simpler and easier to read. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net> (cherry picked from commit 41005003bcaf4ecfc80e02af01247f2670269816)
2015-10-10mmc: sdhci: check interrupt flags in ISR againAlexander Stein
When using MSI it is possible that a new MSI is sent while an earlier MSI is currently handled. In this case SDHCI_INT_STATUS only contains SDHCI_INT_RESPONSE and the ISR would not be called again. But at the end of the ISR SDHCI_INT_DATA_END is now also pending which would be ignored. Fix this by rereading the interrupt flags in the ISR until no interrupt we care is pending. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org> (cherry picked from commit 6379b2375a0c5a6ad437616a4018e6b8fd95e97c)
2015-10-09mmc: sdhci-pci: add runtime pm supportAdrian Hunter
Ths patch allows runtime PM for sdhci-pci, runtime suspending after inactivity of 50ms and ensuring runtime resume before SDHC registers are accessed. During runtime suspend, interrupts are masked. The host controller state is restored at runtime resume. For Medfield, the host controller's card detect mechanism is supplanted by an always-on GPIO which provides for card detect wake-up. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org> (cherry picked from commit 66fd8ad5100b5003046aa744a4f12fa31bb831f9)
2015-02-03eMMC: Fix electric leakage SDMMC4_DAT0~DAT7 in Nakasisimon_chuang
Change-Id: Ia56018522e5d18ca5bfd25858ec943da93d3edc3 (cherry picked from commit e363e576f448d6132340c5d0bda580fef212888d) Conflicts: drivers/mmc/host/sdhci-tegra.c
2015-02-03[PATCH 3/3] mmc: host: sdhci: abort suspend if host suspend fails.kirt_hsieh
Change-Id: I46e3f1a158d61a0b255fae5d510c8f87579c435d Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/47847 Reviewed-by: Kirt Hsieh <Kirt_Hsieh@asus.com> Tested-by: Kirt Hsieh <Kirt_Hsieh@asus.com> Reviewed-by: Vincent Yue <Vincent_Yue@asus.com> Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/48199 Reviewed-by: Jim1 Lin <jim1_lin@asus.com> Tested-by: Jim1 Lin <jim1_lin@asus.com> Reviewed-by: Leslie Yu <Leslie_Yu@asus.com> (cherry picked from commit 8eadc6d514b7838c398ff3499ab5f2e012e2fc06) Conflicts: drivers/mmc/host/sdhci.c
2015-02-03eMMC: Add more debugging messagesban_feng
Change-Id: I28d670944cbfd55e2b2ad98b727368a8dfdc0944 Change-Id: I2bb65335c2468b257473fe264e705826cfd4474e Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/45300 Reviewed-by: Ban Feng <Ban_Feng@asus.com> Tested-by: Ban Feng <Ban_Feng@asus.com> Reviewed-by: Sam hblee <Sam_hblee@asus.com> (cherry picked from commit 1711f72a9840f3667cf93c774ac16c2d8417375c) Conflicts: drivers/mmc/core/core.c
2015-02-03eMMC: Add Product revision, Sector count and driver init logban_feng
Change-Id: I89b544afbb0a109a222621a9948399fba8f77693 Change-Id: Ie366a152100a478e7811b4395f3fae9794bb1386 Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/45221 Reviewed-by: Ban Feng <Ban_Feng@asus.com> Tested-by: Ban Feng <Ban_Feng@asus.com> Reviewed-by: Sam hblee <Sam_hblee@asus.com> Conflicts: drivers/mmc/core/mmc.c include/linux/mmc/card.h asdf
2015-01-16Merge remote-tracking branch 'remotes/nvidia/l4t/l4t-r16-r2' into tegra-nextMarcel Ziswiler
(tegra-l4t-r16-16.5) Conflicts: drivers/media/video/tegra_v4l2_camera.c drivers/mmc/host/sdhci.c drivers/watchdog/tegra_wdt.c include/media/tegra_v4l2_camera.h
2014-10-28mmc: tegra: mark host as CMD23 capableStefan Agner
Newer eMMC standards use CMD23 for multi-block transfer. These command has the advantage that only one command is necessary, no stop command after the transfer is required. The kernel already supports this command, but we need to enable the capability on the host level. Tests verified that the MMC code detects that SD-card do not support CMD23 and hence don't use that command.
2014-07-21mmc: tegra: use 1.8V quirk only on affected instancesStefan Agner
The 1.8V quirk also affected the internal eMMC which disabled newer modes such as SDR50, SDR104 and DDR50. This in turn lead to an out of spec usage since the clock was still 50MHz. By creating a no_1v8 field in the platform data we can now enable this work around on a per-instance basis. Hence we enable the quirk only on the controllers which are connected to the external SD-slots.
2014-05-28mmc: Prevent 1.8V switch for SD hosts that don't support UHS modes.Al Cooper
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. Bug 1402031 Acked-by: Arindam Nath <arindam.nath@amd.com> Acked-by: Philip Rakity <prakity@marvell.com> Acked-by: Girish K S <girish.shivananjappa@linaro.org> Signed-off-by: Al Cooper <acooper@gmail.com> Signed-off-by: Jeetesh Burman <jburman@nvidia.com> Signed-off-by: Chris Ball <cjb@laptop.org> Change-Id: I61d3fdb96fce223649075b6c063a3dd227aef062 Reviewed-on: http://git-master/r/365451 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
2014-05-28mmc: sdhci: add quirk for lack of 1.8v supportJeetesh Burman
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. Bug 1402031 Change-Id: I7ca070a13241e6403eb2e243ebbc441a311110bc Signed-off-by: Daniel Drake <dsd@laptop.org> Reviewed-by: Philip Rakity <prakity@nvidia.com> Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Jeetesh Burman <jburman@nvidia.com> Reviewed-on: http://git-master/r/346323 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
2013-04-23colibri_t20: mmc: sdhci: fix buildMarcel Ziswiler
Fix the following build issue introduced by commit 5cfcbc23d116927a7ae8d5b67baeacf2905b21f9 if neither CONFIG_MACH_APALIS_T30 nor CONFIG_MACH_COLIBRI_T30 is defined as in case of e.g. the Colibri T20: drivers/mmc/host/sdhci-tegra.c:951:2: error: expected expression before '.' token
2013-04-18apalis/colibri_t30: mmc: sdhci: hack to make newer cards workMarcel Ziswiler
SDR12, SDR25, SDR50, SDR104 and DDR50 all require 1.8V signalling which our current T30 designs can't do. Newer cards will fail as follows: Kingston 32GB microSDHC class 10 [ 69.000280] mmc1: error -84 whilst initialising SD card SanDisk Mobile Ultra 8GB microSDHC I [ 28.289174] mmc1: error -110 whilst initialising SD card This patch activates a quirk which signals our lack of 1.8V support.
2013-04-18mmc: 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-11-12Merge branch 'l4t/l4t-r16-r2' into colibriMarcel Ziswiler
Conflicts: arch/arm/mach-tegra/tegra3_usb_phy.c arch/arm/mach-tegra/usb_phy.c drivers/usb/gadget/tegra_udc.c drivers/usb/otg/Makefile drivers/video/tegra/fb.c sound/soc/tegra/tegra_pcm.c
2012-11-12sdhci: colibri_t20: avoid warning messages hackMarcel Ziswiler
Hack to avoid extensive warning messages from Redpine Signals LiteFi driver due to unaligned DMA accesses.
2012-08-01mmc: host: tegra: get rid of tegra_gpio_enable()Laxman Dewangan
The gpio mode of pin is configured when setting direction and hence this call is no more required. Change-Id: I2c9bce83a283f6ef45754075cf3b7b1bc5c1d9ac Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/119612 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-01mmc: tegra: treat compilation warning as errorschowdary
- Add compilation flag to treat warning as error - Modified sdhci-tegra.c to remove compile warning bug 949219 Change-Id: I704ea95e3b8ca8862482b6793b71ca4e5114f832 Signed-off-by: schowdary <schowdary@nvidia.com> Reviewed-on: http://git-master/r/118036 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-07-31Revert "mmc: host: Disable SDIO card clock when idle"Pavan Kunapuli
Without card clock, inband interrupt is not working on some wifi chips. Bug 981683 This reverts commit b31946b34507209f26c6d709e23fd1c0cedd25f8. Change-Id: I2dd86edb2445bd6db7917adf509b7a018d31aaed Reviewed-on: http://git-master/r/110839 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Change-Id: I6f2266ac5b6bd9585272958b4b8a89af1b3cdffb Reviewed-on: http://git-master/r/119009 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2012-07-31mmc: sdhci: Avoid power on/off during sleepPavan Kunapuli
If eMMC sleep support is enabled, set MMC_PM_KEEP_POWER to avoid host power off and power on. Instead, restore the host context in resume. Bug 1007644 Bug 936069 Change-Id: I74578bb1f9e297b3af6bd79b9215364334984836 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/118913 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Min-wuk Lee <mlee@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2012-07-30mmc: tegra: Don't set MMC_PM_KEEP_POWER by defaultPavan Kunapuli
For SDIO devices, MMC_PM_KEEP_POWER would be set by wifi driver during suspend. It need not be set by default. Bug 1011349 Change-Id: I779a438b45afed2cc0fd7283d89c24e9049cfe39 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/118954 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-07-19Revert "mmc: host: Disable SDIO card clock when idle for Tegra 3 only"Pavan Kunapuli
Without the card clock, inband interrupt is not working on some wifi chips. Bug 981683 This reverts commit 0467657691ba046b492504272baf7c626d9a3713. Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/110826 (cherry picked from commit 33c8e504328387097ed0160082cce6b36b994bd8) Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Change-Id: I6683720a9bda1f779a63133d8ca64a024c5d8a08 Reviewed-on: http://git-master/r/116707 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-07-19mmc: tegra: clean up interrupts logic in tuningPavan Kunapuli
Disable the normal interrupts signalling before tuning and enable it only after the entire tuning process is done. Bug 860102 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/111589 (cherry picked from commit 15a97f33f6cf1fc1c25441142f69f62ce5f7029b) Change-Id: I9eba9af65a50928dc4bb475e06cbf401963751bc Reviewed-on: http://git-master/r/116433 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-07-19mmc: tegra: Fix SDR50 clock rate configurationPavan Kunapuli
The host clock configuration in SDR50 mode is incorrectly grouped with DDR50 mode due to which DDR50 mode clock limits are wrongly applied even in SDR50 mode. Bug 965298 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/111566 (cherry picked from commit 2ad290d477e8198bace22d2623856555f07b9bf9) Change-Id: I5d3a446e39a349209e5842d385c1b728bfb7012e Reviewed-on: http://git-master/r/116428 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com> Tested-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-07-16sdhci: tegra: enable sd dpdBitan Biswas
This is a WAR solution that allows for the turning on SD DPD feature. The original issue is that enabling SD DPD immediately after device comes out of LP0 causes ULPI disconnect. The root cause of that is not known. The WAR is to delay the enabling of SD DPD for 100ms after device comes out of LP0. Bug 929628 Change-Id: I946771a8e92459464ce571295f96f197db25c061 Signed-off-by: Bitan Biswas <bbiswas@nvidia.com> (cherry picked from commit beba2b34af7ff9313aed074342b9bb86b12620a8) Reviewed-on: http://git-master/r/113391 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Wen Yi <wyi@nvidia.com> Tested-by: Wen Yi <wyi@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-07-01mmc: sdhci: Deal with failure case in sdhci_suspend_hostAaron Lu
If there are errors happened in sdhci_suspend_host, handle it so that when the function returns with an error, the host's behaviour is the same before this function call, e.g. card detection is enabled and tuning timer is active, etc. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Aaron Lu <aaron.lu@amd.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org> (cherry picked from commit 38a60ea2e7b33ab33ee11d6ef527f259edb102cf) Bug 984811 Change-Id: I532c3914cecf63291a23baa669c650b4ac5448e4 Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-on: http://git-master/r/106351 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Thomas Cherry <tcherry@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-05-30sdhci: tegra: Do not exceed platform voltage limitsnaveenk
check for platform limits before setting the voltage Bug 979504 Change-Id: Iea78be15d6a0eea0f4344c9b78ff9366f4759af8 Signed-off-by: naveen kumar arepalli <naveenk@nvidia.com> Reviewed-on: http://git-master/r/104711 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-05-17dmaengine/dma_slave: fix merge issueLaxman Dewangan
Merges of dma changes from mainline reported conflict and it was not got resolved properly. Fix the resolution issue. Change-Id: I7edc5effc0b9a61363e77e6cc39eb62e315396d0 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/102590 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit
2012-05-15mmc: enable background ops in driverVishal Singh
Adding a new config option and enabling background ops in driver. Correcting the EXT_CSD byte that needs to be written in order to trigger background ops in the MMC firmware. Bug 847037. Change-Id: Ibc517540cab43fa5070b142a416f6b67f2f7e7be Signed-off-by: Vishal Singh <vissingh@nvidia.com> Reviewed-on: http://git-master/r/99117 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-14mmc: tegra: Set eMMC DDR clock based on emc clockPavan Kunapuli
Set the eMMC ddr mode clock dynamically based on emc clock rate. If ddr clock limit is specified and the emc clock is less than max emc freq, then limit emmc ddr clk. If not, set the max eMMC ddr clock. Bug 967719 Change-Id: I9f70077c4ac4bb1f3e6d894fcb8420b1aba284dd Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/100579 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-11mmc: tegra: Fix SDR50 mode clock rate settingPavan Kunapuli
In SDR50 mode, set the controller clock to double the requested clock to ensure that the core voltage is maintained at a min of 1.2V. Bug 965298 Change-Id: I557a07de97efd6b44f812a11da657e03d3ddefd0 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/101522 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-07mmc: host: loglevel of a message to KERN_INFORamalingam C
Some boards don't have a vddio regulator for few rails hence not getting the regulator handle. And we assume that those rails are always powered. Hence rephrased the error message and lowered the loglevel to KERN_INFO. Bug 976177 Change-Id: I92b82f75934eaf7137584a625065e3389b6ae1b7 Signed-off-by: Ramalingam C <ramalingamc@nvidia.com> Reviewed-on: http://git-master/r/100490 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-05-02mmc: host: Disable SDIO card clock when idle for Tegra 3 onlyMursalin Akon
The CL disables SDIO card clock when idle for Tegra 3 only. Bonus: conditional build for some tegra 3 functionalities. Bug 975541 Change-Id: I097c4771f3565bf9137d7854ada10c1fe8535056 Signed-off-by: Mursalin Akon <makon@nvidia.com> Reviewed-on: http://git-master/r/99707 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Allen Martin <amartin@nvidia.com> Reviewed-by: Peer Chen <pchen@nvidia.com>
2012-04-26mmc: tegra: enable MMC_PM_IGNORE_PM_NOTIFYnaveenk
enable MMC_PM_IGNORE_PM_NOTIFY for all sd instances Bug 956238 Bug 932086 Change-Id: I4d455e480eabace403719f1813d97abfa4d01924 Signed-off-by: naveen kumar arepalli <naveenk@nvidia.com> Reviewed-on: http://git-master/r/96071 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-by: Rakesh Kumar <krakesh@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
2012-04-19mmc: tegra: Disable card and host clk separatelyPavan Kunapuli
Disable card clock before disabling internal clock to ensure that there are no abnormal clock waveforms. Bug 947058 Change-Id: I98a3f7f63b4380b62bead05f1018d3cddc0ac217 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/95396 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-19mmc: host: Disable SDIO card clock when idlePavan Kunapuli
Disable SDIO card clock when there are no commands/ data transfers on the SD bus. Bug 958954 Bug 955742 Bug 952344 Change-Id: I7390be0406f7e46c0eb88ede2ae6f904b2181306 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/95390 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-04-19drivers: resolve compilation time warningsSanjay Singh Rawat
bug 949219 Change-Id: I5942ba86bd1cbe1f1bd06a7c9f51a10d83e6cabb Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/92819 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-04-16mmc:host:tegra: make embedded sdio code conditionalMursalin Akon
Enable embedded sdio code, iff MMC_EMBEDDED_SDIO Kconfig is on. Bug 956238 Change-Id: I16539f5cad5fc66082af2f569ea36a54c12457e3 Signed-off-by: Mursalin Akon <makon@nvidia.com> Reviewed-on: http://git-master/r/90655 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
2012-04-05dmaengine/dma_slave: introduce inline wrappersAlexandre Bounine
Add inline wrappers for device_prep_slave_sg() and device_prep_dma_cyclic() interfaces to hide new parameter from current users of affected interfaces. Convert current users to use new wrappers instead of direct calls. Suggested by Russell King [https://lkml.org/lkml/2012/2/3/269]. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> cherry-picked from mainline commit 16052827d98fbc13c31ebad560af4bd53e2b4dd5 Change-Id: I929a49556539621a0546829e88b3caa498c94be2 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/94463
2012-03-30mmc:host: add pm_caps and pm_flags to platform dataMursalin Akon
Initialize pm_caps and pm_flags through platform data. Bug 956238 Change-Id: I400f6e92541fa2e63ccc7f829e204d5eef4697fc Signed-off-by: Mursalin Akon <makon@nvidia.com> Reviewed-on: http://git-master/r/90790 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Gerrit_Virtual_Submit Reviewed-by: Allen Martin <amartin@nvidia.com>
2012-03-06mmc: tegra: Enable SDHCI_QUIRK_BROKEN_CARD_DETECTIONPavan Kunapuli
Enable quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION. Also, implemented tegra_sdhci_get_cd() to return the card presence status. Bug 948943 Change-Id: I42eed23f951304e331a235f5a9199b70ba5e96b5 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/87766 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-06mmc: sdhci: Add get_cd callback in host opsPavan Kunapuli
Add get_cd callback in the host ops to get the card presence status incase SDHCI_QUIRK_BROKEN_ CARD_DETECTION is enabled. Bug 948943 Change-Id: I788d9e907920a0aeb79784751ec0df25bc2a72d6 Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com> Reviewed-on: http://git-master/r/87765 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-06sdhci: Don't set highspeed modeHarry Hong
if SDHCI_QUIRK_NO_HISPD_BIT is set in host->quirks, don't set SDHCI_CTRL_HISPD in sdhci_host_control register. bug 929985 Signed-off-by: Harry Hong <hhong@nvidia.com> Reviewed-on: http://git-master/r/79933 (cherry picked from commit 194670660af90b2bb7bc0efea920332459296141) Change-Id: I7b5f58f5078886309610e9e4cc2bad83f0788168 Reviewed-on: http://git-master/r/87704 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-03-06mmc: enable mmc suspend/resume for sdio deviceOm Prakash Singh
Bug 942826 Change-Id: Ie782f17c51e78994e0fc96da3fbbe2e6592f58dc Signed-off-by: Rakesh Kumar <krakesh@nvidia.com> Reviewed-on: http://git-master/r/84697 Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com> Tested-by: Rakesh Goyal <rgoyal@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>