Set a preemptibility command atrribute to MMC commands. This
can be later used by write (multi block), trim etc for
evaluating if a HPI is applicable.
Note the starting time of executing a command so a decision
can be made if it is too late for preemption.
Signed-off-by: Venkatraman S
HPI (and possibly other) procedures require that an ongoing
mmc request issued to a controller be aborted in the middle
of a transaction. Define a abort interface function to the
controller so that individual host controllers can safely
abort a request, stop the dma and cleanup their statemachine
Ongoing request that was preempted during 'programming' state is partially
completed. Number of correctly programmed sectors is available in the
ext_csd field CORRECTLY_PRG_SECTORS_NUM. Read this field to update
the bytes_xfered field of the request
Signed-off-by: Venkatraman S svenk...@ti.com
Provide the abort_req implementation for omap_hsmmc host.
When invoked, the host controller should stop the transfer
and end the ongoing request as early as possible.
If the aborted command is a data transfer command, dma setup is
aborted and a STOP command is issued. The transfer state is
Standard eMMC (Embedded MultiMedia Card) specification expects to execute
one request at a time. If some requests are more important than others, they
can't be aborted while the flash procedure is in progress.
New versions of the eMMC standard (4.41 and above) specfies a feature
called High
From: Ilan Smith ilan.sm...@sandisk.com
Add attribute to identify swapin requests
Mark memory management requests with swapin requests
Signed-off-by: Ilan Smith ilan.sm...@sandisk.com
Signed-off-by: Alex Lemberg alex.lemb...@sandisk.com
Signed-off-by: Venkatraman S svenk...@ti.com
---
Add description on the usage of expedite_dmpg and
expedite_swapin.
Signed-off-by: Venkatraman S svenk...@ti.com
---
Documentation/ABI/testing/sysfs-block | 12
1 file changed, 12 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-block
sysfs entries for DPMG and SWAPIN requests so that they can
be set/reset from userspace.
Signed-off-by: Venkatraman S svenk...@ti.com
---
block/blk-sysfs.c | 16
1 file changed, 16 insertions(+)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index cf15001..764de9f 100644
According to table30 in eMMC spec, only some commands
can be preempted by foreground HPI. Provide a helper function
for the HPI procedure to identify if the command is
preemptible.
Signed-off-by: Venkatraman S svenk...@ti.com
---
include/linux/mmc/core.h | 13 +
1 file changed, 13
When High Priority Interrupt (HPI) is enabled, ongoing requests
might be preempted. It is worthwhile to not preempt some requests
which have progressed in the underlying driver for some time.
The threshold of elapsed time after which HPI is not useful can
be tuned on a per-device basis, using the
Intercept command which require high priority treatment.
If the ongoing command can be preempted according to JEDEC HPI
definition and sufficient window exist to complete an ongoing
request, invoke HPI and abort the current request, and issue
the high priority request.
Otherwise, process the
hpi_time_threshold can be set to configure elapsed time in ms,
after which an ongoing request will not be preempted.
Explain the hpi_time_threhold parameter for MMC devices.
Signed-off-by: Venkatraman S svenk...@ti.com
---
Documentation/ABI/testing/sysfs-devices-mmc | 12
1 file
If both the card and host controller support HPI related
operations, set a flag in MMC queue to remember it.
Signed-off-by: Venkatraman S svenk...@ti.com
---
drivers/mmc/card/block.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/card/block.c
From: Ilan Smith ilan.sm...@sandisk.com
When exp_swapin and exp_dmpg are set, treat read requests
marked with DMPG and SWAPIN as high priority and move to
the front of the queue.
Signed-off-by: Ilan Smith ilan.sm...@sandisk.com
Signed-off-by: Alex Lemberg alex.lemb...@sandisk.com
Signed-off-by:
From: Ilan Smith ilan.sm...@sandisk.com
Add attribute to identify demand paging requests.
Mark readpages with demand paging attribute.
Signed-off-by: Ilan Smith ilan.sm...@sandisk.com
Signed-off-by: Alex Lemberg alex.lemb...@sandisk.com
Signed-off-by: Venkatraman S svenk...@ti.com
---
Venkatraman S svenk...@ti.com writes:
From: Ilan Smith ilan.sm...@sandisk.com
When exp_swapin and exp_dmpg are set, treat read requests
marked with DMPG and SWAPIN as high priority and move to
the front of the queue.
[...]
+ if (bio_swapin(bio) blk_queue_exp_swapin(q)) {
+
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
Please, hold this patch back, until
[PATCH 02/29] sh: ecovec: remove unused .down_pwr() MMCIF callback
is committed.
include/linux/mmc/sh_mmcif.h |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git
From the original version of sh_mmcif the .set_pwr() callback has only been
used to turn the card's power on, and the .down_pwr() callback has been
used to turn it off. .set_pwr() can be used for both these tasks, which is
also how it is implemented by the only user of this API: the SH7724 ecovec
The call to pm_runtime_put() in tmio-mmc's .set_ios() method can switch
off the supplying clock or even power down the whole unit. Therefore,
calling tmio_mmc_clk_stop() after that can be redundant, put it before.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
We don't have to force-enable MMC interrupts in our .probe() method,
mmc_add_host() will trigger card detection, that will enable all the
necessary interrupts.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/host/tmio_mmc_pio.c | 21 +++--
1 files
.down_pwr() on ecovec was equivalent to .set_pwr(0). Now that .down_pwr()
is no longer used by the driver, it can be removed.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Paul Mundt let...@linux-sh.org
---
arch/sh/boards/mach-ecovec24/setup.c |6 --
1 files changed, 0
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Mark Brown broo...@opensource.wolfsonmicro.com
---
drivers/regulator/core.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index fdeabba..a57defb 100644
To handle CD and WP SD/MMC slot pins we need generic flags to specify their
polarity.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
include/linux/mmc/host.h |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/linux/mmc/host.h
A simple extension of mmc slot functions add support for CD GPIO polling
for cases, where the GPIO cannot produce interrupts or this is for some
reason not desired.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/core/slot-gpio.c | 42
The tmio-mmc driver is already using the generic GPIO CD handler in IRQ
mode. This patch adds support for CD polling mode and also checks for
availability of a WP GPIO.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/host/tmio_mmc_pio.c |6 ++
1 files changed,
GPIOs can be used in MMC/SD-card slots not only for hotplug detection, but
also to implement the write-protection pin. Rename cd-gpio helpers to
slot-gpio to make addition of further slot GPIO functions possible.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
Add regulator support to the sh_mmcif driver, but also preserve the current
power-callback.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Mark Brown broo...@opensource.wolfsonmicro.com
---
drivers/mmc/host/sh_mmcif.c | 48 --
1 files
Currently the SDHI glue for the TMIO MMC driver installs dummy .get_cd() and
.set_pwr() callbacks even if the platform didn't supply them. This is not
necessary, since the TMIO MMC driver itself checks for NULL callbacks. This
is also dubious if the platform provides a regulator for SD-card power
Now, that most parameters, required to configure the TMIO MMC driver can be
obtained from OF, we can also add support for it to the SDHI glue, which
also makes it necessary to be able to run without platform data.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Grant Likely
Many MMC host drivers already use OF data to obtain their platform-specific
configuration. Each of them is doing this in its special way, whereas many
parameters are identical and can easily be generalised. This patch adds
such a generic parser. So far it only adds and handles very few basic
Currently the TMIO MMC driver derives the OCR mask from the platform data
and uses a platform callback to turn card power on and off. This patch adds
regulator support to the driver.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Mark Brown broo...@opensource.wolfsonmicro.com
---
Add OF support to the TMIO MMC to parse both standard and driver-specific
properties.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Grant Likely grant.lik...@secretlab.ca
---
drivers/mmc/host/tmio_mmc_pio.c | 39 ---
1 files changed, 36
Add generic MMC OF parsing support to the sh-mmcif driver.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Grant Likely grant.lik...@secretlab.ca
---
drivers/mmc/host/sh_mmcif.c | 33 +++--
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git
Power on the CN11 and CN12 SD/MMC slots on ecovec is controlled by GPIOs,
which makes it possible to use the fixed voltage regulator driver to switch
card power on and off.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Paul Mundt let...@linux-sh.org
---
Optional, mainly FYI
Hi
I was not directly sure, what was the better way to send these out - as
one seriess or as several. I would actually prefer several, but there are
many dependencies. So, maybe best would be to try to review and address
any issues on the MLs, only posting new versions of affected patches, and
Card Write-Protect pin is often implemented, using a GPIO, which makes it
simple to provide a generic handler for it.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/core/slot-gpio.c | 51 -
include/linux/mmc/slot-gpio.h |
The generic MMC OF support can be used to configure GPIO card-detection, use
this ability.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/host/sh_mmcif.c |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/sh_mmcif.c
This prepares for the addition of further slot functions.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/core/host.c |2 +
drivers/mmc/core/slot-gpio.c | 49 +++--
include/linux/mmc/host.h |2 +
3 files changed,
Instead of delivering one static clock frequency value, read from the
hardware during probing, enable the tmio-mmc driver to re-read the
frequency dynamically.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/host/sh_mobile_sdhi.c | 24 +++-
1
struct mmc_host::hotplug is becoming a generic hook for slot functions.
Rename it accordingly.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/core/host.c |2 ++
drivers/mmc/core/slot-gpio.c |8
include/linux/mmc/host.h | 17
devres_destroy() doesn't call the release() method, it only destroys the
resource. The caller should take care to release the associated object
itself.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Mark Brown broo...@opensource.wolfsonmicro.com
---
drivers/regulator/core.c |
mmc.h defines macros for most frequently used MMC opcodes. Use them instead
of hard-coded numbers.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/host/tmio_mmc_pio.c |7 ---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/host/tmio_mmc_pio.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index e843da0..d1eb611 100644
---
Add a function to get a regulator, supplying card's Vdd on a specific host.
If such a regulator is found, the function checks, whether a valid OCR mask
can be obtained from this regulator, and whether it can switch card's power
on and off.
Signed-off-by: Guennadi Liakhovetski
Every time the clockc is enabled after possibly being disabled, we have
to re-read its frequency and update our configuration.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
---
drivers/mmc/host/tmio_mmc_pio.c | 35 ---
include/linux/mfd/tmio.h
Some consumers, e.g., the mmc subsystem, can benefit from an ability to
check, whether a regulator can switch power on and off.
Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de
Cc: Mark Brown broo...@opensource.wolfsonmicro.com
---
drivers/regulator/core.c | 17
On Thu, May 03, 2012 at 05:05:35PM +0200, Guennadi Liakhovetski wrote:
Some consumers, e.g., the mmc subsystem, can benefit from an ability to
check, whether a regulator can switch power on and off.
You're going to have to expand a lot more on why this is a good idea...
Bear in mind that the
On Thu, May 03, 2012 at 05:05:34PM +0200, Guennadi Liakhovetski wrote:
- if (regulator == NULL || IS_ERR(regulator))
+ if (IS_ERR_OR_NULL(regulator))
The bigger question here is why we're accepting NULL in the first place.
signature.asc
Description: Digital signature
On Thu, May 03, 2012 at 05:05:36PM +0200, Guennadi Liakhovetski wrote:
+ ret = mmc_regulator_get_ocrmask(supply);
+ if (ret 0)
+ mmc-ocr_avail = ret;
+
+ if (regulator_can_change_status(supply)) {
+ mmc-caps |= MMC_CAP_POWER_OFF_CARD;
+
On Thu, May 03, 2012 at 05:05:37PM +0200, Guennadi Liakhovetski wrote:
+#include linux/regulator/consumer.h
Where's this used?
+static void sh_mmcif_set_power(struct sh_mmcif_host *host, struct mmc_ios
*ios)
+{
+ struct sh_mmcif_plat_data *pd = host-pd-dev.platform_data;
+
+ if
On Thu, May 03, 2012 at 05:05:42PM +0200, Guennadi Liakhovetski wrote:
+static void tmio_mmc_set_power(struct tmio_mmc_host *host, struct mmc_ios
*ios)
+{
+ if (!(host-mmc-caps MMC_CAP_POWER_OFF_CARD))
+ return;
+
+ if (host-vdd)
+ /* Errors ignored... */
On Thu, May 3, 2012 at 8:08 PM, Jeff Moyer jmo...@redhat.com wrote:
Venkatraman S svenk...@ti.com writes:
From: Ilan Smith ilan.sm...@sandisk.com
When exp_swapin and exp_dmpg are set, treat read requests
marked with DMPG and SWAPIN as high priority and move to
the front of the queue.
On Thu, May 03, 2012 at 05:05:33PM +0200, Guennadi Liakhovetski wrote:
devres_destroy() doesn't call the release() method, it only destroys the
resource. The caller should take care to release the associated object
itself.
+ regulator_put(regulator);
rc =
On Tue, 1 May 2012, Thomas Abraham wrote:
Add device tree based discovery support.
Signed-off-by: Thomas Abraham thomas.abra...@linaro.org
---
.../devicetree/bindings/mmc/synposis-dw-mshc.txt | 85 +
drivers/mmc/host/dw_mmc-pltfm.c| 24 +++
54 matches
Mail list logo