Age | Commit message (Collapse) | Author |
|
See 1e45860f541497d73162305d48b638d9b87e1ae3 "ARM: 7366/3: amba: Remove AMBA level regulator support"
for more precision.
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
|
|
Do not use polling to detect non removable cards.
ST-Ericsson ID: 372618
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I18797e5f85d83213bbf520277576425bed4c68f2
Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/51859
|
|
Due to timing issues for command direction signaling when
using a levelshifter, we limit the frequency to 25 MHz while
sending commands. The frequency is just limited during the
command send/response, then it is restored to it's original
value.
ST-Ericsson ID: 355531
ST-Ericsson Linux next: -
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I15d06e3c331a4db717a904937ce6ce60972d185e
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/51785
|
|
Don't prepare DMA in the pre_req hook if there is no
previous request. Instead, prepare DMA while
start command is being issued.
ST-Ericsson Linux next: N/A
ST-Ericsson ID: 371812
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I0008b79cbe0e87f830365e689795f344aac3014b
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36181
Reviewed-by: QATOOLS
Reviewed-by: QABUILD
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
|
|
Do DMA preparations after start_command() instead of before.
DMA is being prepared while the controller process the read/write cmd.
This flow will decrease the start up latency which improves the
throughput, especially for small transfers.
ST-Ericsson Linux next: N/A
ST-Ericsson ID: 371812
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I98db024658cac5fe6ee09e4250c31e53a643bead
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/36180
Reviewed-by: QABUILD
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
|
|
This function switches I/O voltage, which is needed to
support UHS-I cards with 1.8V I/O.
Change-Id: Id33a9c6e15bd4ba598e533bf9115cb7583369706
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/50383
Reviewed-by: Per FORLIN <per.forlin@stericsson.com>
|
|
The next pointers for the next dma job needs to be reset
when an error occurs.
Change-Id: Ieae63ccb97b11c0f6edb7b383c84259082b83760
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/50454
Reviewed-by: Per FORLIN <per.forlin@stericsson.com>
Reviewed-by: QABUILD
|
|
mmci_dma_finalize must not be executed when a data error irq
has been received. We do mmci_dma_unmap directly instead and
moreover make sure the dma handles are reset as soon as the
dma job is done/terminated.
Change-Id: Ib4ed3f380f4383cb2a28613552569b950c5204a5
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/49925
Reviewed-by: Per FORLIN <per.forlin@stericsson.com>
|
|
The cookie is now used to indicate if dma_unmap_sg shall be
done in post_request. At DMA errors, the DMA job is immediately
not only terminated but also unmapped. To indicate that this
has been done the cookie is reset to zero. post_request will
thus only do dma_umap_sg for requests which has a cookie not set
to zero.
Some corresponding duplicated code could then be removed and
moreover some minor corrections at DMA errors for terminating
the same DMA job twice has also been fixed.
ST-Ericsson Linux next: N/A
ST-Ericsson ID: 371812
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I2fedfc906ec861ab431f43c333237adb85f2fa99
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47628
|
|
BUG: key df230ba4 not in .data!
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2885 sysfs_add_file_mode+0x4c/0xb0()
Modules linked in:
[<c01a36ac>] (unwind_backtrace+0x0/0xec) from [<c01c90a0>] (warn_slowpath_common+0x4c/0x64)
[<c01c90a0>] (warn_slowpath_common+0x4c/0x64) from [<c01c90d0>] (warn_slowpath_null+0x18/0x1c)
[<c01c90d0>] (warn_slowpath_null+0x18/0x1c) from [<c02c5ad8>] (sysfs_add_file_mode+0x4c/0xb0)
[<c02c5ad8>] (sysfs_add_file_mode+0x4c/0xb0) from [<c04c1df4>] (mmc_add_disk+0xb8/0x154)
[<c04c1df4>] (mmc_add_disk+0xb8/0x154) from [<c04c1f78>] (mmc_blk_probe+0xe8/0x138)
[<c04c1f78>] (mmc_blk_probe+0xe8/0x138) from [<c04b72d4>] (mmc_bus_probe+0x18/0x1c)
[<c04b72d4>] (mmc_bus_probe+0x18/0x1c) from [<c03f2c90>] (really_probe+0x98/0x148)
[<c03f2c90>] (really_probe+0x98/0x148) from [<c03f2d88>] (driver_probe_device+0x48/0x60)
[<c03f2d88>] (driver_probe_device+0x48/0x60) from [<c03f21e8>] (bus_for_each_drv+0x44/0x74)
[<c03f21e8>] (bus_for_each_drv+0x44/0x74) from [<c03f2f08>] (device_attach+0x78/0xa4)
[<c03f2f08>] (device_attach+0x78/0xa4) from [<c03f2020>] (bus_probe_device+0x24/0x40)
[<c03f2020>] (bus_probe_device+0x24/0x40) from [<c03f0ff0>] (device_add+0x174/0x2b4)
[<c03f0ff0>] (device_add+0x174/0x2b4) from [<c04b7500>] (mmc_add_card+0x138/0x188)
[<c04b7500>] (mmc_add_card+0x138/0x188) from [<c04b91bc>] (mmc_attach_mmc+0x108/0x178)
[<c04b91bc>] (mmc_attach_mmc+0x108/0x178) from [<c04b5c08>] (mmc_rescan_try_freq+0x5c/0x7c)
[<c04b5c08>] (mmc_rescan_try_freq+0x5c/0x7c) from [<c04b67ec>] (mmc_rescan+0x1c8/0x20c)
[<c04b67ec>] (mmc_rescan+0x1c8/0x20c) from [<c01e250c>] (process_one_work+0x2ac/0x4c8)
[<c01e250c>] (process_one_work+0x2ac/0x4c8) from [<c01e29f8>] (worker_thread+0x144/0x234)
[<c01e29f8>] (worker_thread+0x144/0x234) from [<c01e8280>] (kthread+0x80/0x88)
[<c01e8280>] (kthread+0x80/0x88) from [<c019dc88>] (kernel_thread_exit+0x0/0x8)
---[ end trace 90d62d7618c6b90e ]---
Change-Id: I123e84b08e085d1b562674533417cb43f295095d
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
ST-Ericsson ID: 413918
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I216974bfa1323d3a390ee8e8acc029c13a9525f5
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47172
Tested-by: Rabin VINCENT <rabin.vincent@stericsson.com>
Reviewed-by: QABUILD
Reviewed-by: Johan RUDHOLM <johan.rudholm@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
To disable a levelshifter when we are in an idle state will
decrease current consumption. We make use of the ios_handler
at runtime suspend and at regular suspend to accomplish this.
Of course depending on the used levelshifter the decrease of
current differs. For ST6G3244ME the value is up to ~200 uA.
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Change-Id: Ie782d3af7932730c442dcb6c7f12b2f69dcac75e
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/44399
Reviewed-by: QABUILD
Reviewed-by: QATEST
|
|
In the runtime_suspend callback we make use of mmci_save
to disable the VCORE regulator and the MCLK to decrease
current consumption. At runtime resume, we use mmci_restore
to re-enable the resourses again.
From now on this will mean that especially the mmci_restore
function must be fast to execute since otherwise request
latency will be introduced.
For the ARM Primcell PL180, the MMCIPOWER register is used
to control an external power supply to the card. Thus we
need to prevent the runtime callbacks from doing save and
restore, otherwise the power to card will be cut. This is
done by adding a new flag to the variant data.
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Change-Id: Ic6af2f59e57df82acb4be730bb855e1d39c9439b
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/44398
Reviewed-by: QABUILD
|
|
To decrease current consumption in suspend state the
VCORE regulator, the MCLK and PCLK for the ARM PL18x
are now disabled.
When resuming the resourses are re-enabled and
register values for MMCICLOCK, MMCIPOWER and MMCIMASK0
are restored.
Change-Id: I400237bf67fa37861d6fb47c4a2fd493b58c3a60
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/44397
Reviewed-by: QABUILD
|
|
Add backwards-compatible sysfs nodes for locking the boot partitions
power and permanently read-only. This is done by writing "pwr_ro"
or "perm_ro" to
/sys/block/mmcblkXbootY/ro_lock
ST-Ericsson ID: 344197
ST-Ericsson FOSS-OUT ID: Trivial
ST-Ericsson Linux next: NA
Change-Id: Ibe1874bbb3b1b6ce9f7955537b5e083e97f69d11
Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/44842
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
|
|
HW flow control should not be used for write transfers less then
8 bytes. All other transfers should use HW flow control.
ST-Ericsson Linux next: NA
ST-Ericsson ID: 398871
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I51044d26cfc7df033852becbbc6e796396dfb45f
Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/40191
Reviewed-by: QATOOLS
Reviewed-by: QABUILD
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
|
|
Typically an sd/mmc card takes around 200 - 1100 ms to
initialize when the power to the card has been cut, which
is what happens during a suspend/resume sequence.
All device's resume time adds up to the total kernel resume
time. Some use cases requires the kernel to be resumed fast,
to be able to meet deadlines. One use case example is WLAN
SOFT_AP, but there are certainly more.
This patch schedules a delayed work to do a deferred resume
of the mmc host, if the bus holds a card of SD or MMC type.
The reason for not supporting SDIO and SDcombo cards at this
stage, is because the SDIO API is synchronus, which complicates
request locking mechanism when waiting for a deferred resume to
be completed.
While waiting for a deferred resume to be completed, detect works
are prevented from doing a new rescan. If a mmcblk request arrives,
the deferred resume will be synced immediately.
The deferred resume is scheduled 3000 ms after the resume request
arrived. The idea behind this timer value is to let the mmc host
being able to accept a new suspend request before it has been
deferred resumed and thus not increase the resume to suspend time
if not really needed.
Change-Id: I7e97e59c8709cf5d8e3c76478771ddf6062a54ec
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/39692
|
|
Add MMC_PM_KEEP_POWER to pm_caps so SDIO clients are able
to use this option to prevent power off in suspend.
Change-Id: I36df77e66ca8845ceeffb9d5163d4c1e77821b7d
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34918
|
|
Add test cases to verify alignment with 4 bytes and 32 bytes
for sg element lengths and memory addresses.
These tests were added to investigate DMA constraints when
transferring buffers that are not aligned with 32 bytes.
ST-Ericsson ID: 363565
ST-Ericsson FOSS-OUT ID: Trivial
ST-Ericsson Linux next: NA
Change-Id: I6363a018647f22e5d69920af2cb30dfe2b2a699e
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34362
Reviewed-by: QATOOLS
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
|
|
Buffers must be 4 bytes aligned due to restrictions that
the PL18x FIFO accesses must be done in a 4-byte aligned manner.
Enable DMA_REQCTL for SDIO to support write of not 32 bytes aligned
sg element lengths. In PIO mode any buffer length can be handled
as long as the buffer address is 4 byte aligned.
Signed-off-by: Ulf Hansson <(address hidden)>
Signed-off-by: Per Forlin <(address hidden)>
Signed-off-by: Stefan Nilsson XK <(address hidden)>
|
|
For data writes smaller <= 8 bytes (only SDIO case), HW flow control was
disabled but never re-enabled again. This meant that a following large read
request would randomly give buffer overrun errors.
Moreover HW flow control is not needed for transfers that fits in the
FIFO of PL18x. Thus it is disabled for write operations <= the FIFO size.
Signed-off-by: Ulf Hansson <(address hidden)>
Signed-off-by: Stefan Nilsson XK <(address hidden)>
|
|
For the ux500v2 variant of the PL18x block, non power of two block
sizes are supported. This will make it possible to decrease data
overhead for SDIO transfers.
Signed-off-by: Stefan Nilsson XK <(address hidden)>
Signed-off-by: Ulf Hansson <(address hidden)>
|
|
Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.
* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine/amba-pl08x : reset phychan_hold on terminate all
dma: pl330: fix a couple of compilation warnings
dma/ste_dma40: fix erroneous comparison
dma/ste_dma40: explicitly include regulator consumer header
dma40: Improve the logic of stopping logical chan
dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
dma: mxs-dma: enable channel in device_issue_pending call
dmaengine: imx-dma: dont complete descriptor for cyclic dma
|
|
Since SDIO drivers may want to do some SDIO operations in their suspend
callback functions, we must not keep the host claimed when calling them.
Daniel Drake reported that libertas_sdio encountered a deadlock in its
suspend function.
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Tested-by: Daniel Drake <dsd@laptop.org>
[stable@: please apply to 3.2-stable and 3.3-stable]
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
Now, dma_ops is assumed that use the IDMAC. But if dma_ops is assigned
the pdata->dma_ops, we didn't ensure that callback function is defined.
If the callback isn't defined, then we should run in PIO mode.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
This was broken by me in 37865fe91582582a6f6c00652f6a2b1ff71f8a78
("mmc: sdhci-esdhc-imx: fix timeout on i.MX's sdhci") where more
extensive tests would have shown that read or write of data to the
card were failing (even if the partition table was correctly read).
Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
Include the linux/mmc/cd-gpio.h header to pickup the prototypes
for the two exported symbols.
This quiets the sparse warnings:
warning: symbol 'mmc_cd_gpio_request' was not declared. Should it be static?
warning: symbol 'mmc_cd_gpio_free' was not declared. Should it be static?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
Commit c79396c191bc19 ("mmc: sdhci: prevent card detection activity
for non-removable cards") disables card detection where the cards
are marked as non-removable.
This makes sense, but the implementation detail of calling
mmc_card_is_removable() causes some problems, because
mmc_card_is_removable() is overloaded with CONFIG_MMC_UNSAFE_RESUME
semantics.
In the OLPC XO case, we need CONFIG_MMC_UNSAFE_RESUME because our root
filesystem is stored on SD, but we also have external SD card slots
where we want automatic card detection.
Refine the check to only apply to hosts marked as MMC_CAP_NONREMOVABLE,
which is defined to mean that the card is *really* nonremovable. This
could be revisited in future if we find a way to improve
CONFIG_MMC_UNSAFE_RESUME semantics.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
[stable@: please apply to 3.3-stable]
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
When dw_mci_pre_dma_transfer returns failure in some reasons,
dw_mci_submit_data will prepare to switch the PIO mode from DMA.
After switching to PIO mode, DMA(IDMAC in particular) is still
enabled. This makes the corruption in handling interrupt and
the driver lock-up.
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
MMC bus is using legacy suspend/resume method, which is not compatible if
runtime pm callbacks are used. In this scenario, MMC bus suspend/resume
callbacks cannot be called when system entering S3. So change to use the
new defined dev_pm_ops for system sleeping mode.
Tested on AM335x Platform. Solves major issue/crash reported at
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg65425.html
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Tested-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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>
|
|
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>
|
|
eMMC v4.5 sanitize operation erases all copies of unmapped
data. However trim or erase operations must be used first
to unmap the required sectors. That was not being done.
Fixes apply to linux 3.2 on.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: <stable@vger.kernel.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
eMMC v4.5 discard operation is significantly different from the
existing trim operation because it is not guaranteed to work with
the new sanitize operation. Consequently mmc_can_trim() is
separated from mmc_can_discard().
Also the new discard operation does not result in the sectors being
set to all-zeros, so discard_zeroes_data must not be set.
In addition, the new discard has the same timeout as trim, but from
v4.5 trim is defined to use the hc timeout. The timeout calculation
is adjusted accordingly.
Fixes apply to linux 3.2 on.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: <stable@vger.kernel.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
Enable channel in device_issue_pending call, so that the order between
cookie assignment and channel enabling can be ensured naturally.
It fixes the mxs gpmi-nand breakage which is caused by the incorrect
order of cookie assigning and channel enabling.
Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Huang Shijie <b32955@freescale.com>
Tested-by <samgandhi9@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
|
|
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
<Chase.Maupin@ti.com>, 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 <paul@pwsan.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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 <alf@i100.no>
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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 <acooper@gmail.com>
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: Chris Ball <cjb@laptop.org>
|
|
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 <cjb@laptop.org>
|
|
This reverts commit c16e981b2fd9455af670a69a84f4c8cf07e12658, because
it's no longer useful once MSI support is reverted.
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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 <subhashj@codeaurora.org>
Acked-by: Girish K S <girish.shivananjappa@linaro.org>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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 <neilb@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
[stable: please apply to 3.3-stable only]
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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 <subhashj@codeaurora.org>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Aaron Lu <aaron.lu@amd.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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 <manuel.lauss@googlemail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
|
|
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 <magnus.damm@gmail.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Tested-by: Cao Minh Hiep <hiepcm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Chris Ball <cjb@laptop.org>
|