1
0
Fork 0
Commit Graph

11 Commits (8ba559fd09bcf4e87faad3efa465dacf04c076c9)

Author SHA1 Message Date
Ulf Hansson 9eadcc0581 mmc: core: Remove MMC_CLKGATE
MMC_CLKGATE was once invented to save power by gating the bus clock at
request inactivity. At that time it served its purpose. The modern way to
deal with power saving for these scenarios, is by using runtime PM.

Nowadays, several host drivers have deployed runtime PM, but for those
that haven't and which still cares power saving at request inactivity,
it's certainly time to deploy runtime PM as it has been around for several
years now.

To simplify code to mmc core and thus decrease maintenance efforts, this
patch removes all code related to MMC_CLKGATE.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2015-10-26 16:00:09 +01:00
Alexander Stein be19c40577 mmc: quirks: Fixup debug message
There is no need for an output like this:
> mmcblk mmc1:0001: calling add_quirk_mmc+0x0/0x20
Instead use this one:
> mmcblk mmc1:0001: calling add_quirk_mmc

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2014-07-09 11:26:03 +02:00
Bing Zhao e5624054c1 mmc: sdio: add a quirk for broken SDIO_CCCR_INTx polling
Polling SDIO_CCCR_INTx could create a fake interrupt with Marvell
SD8797 card. Add a quirk to handle this case. The fixup here is
to issue a dummy CMD52 read to function 0 register 0xff, and this
dummy read must be right after SDIO_CCCR_INTx is read.

Patch has been verified on a dw_mmc controller (Samsung Chromebook)
with MMC_CAP_SDIO_IRQ disabled.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
2014-01-17 22:55:01 -05:00
Paul Gortmaker 3ef77af154 mmc: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required
These two basic defines were everywhere, simply because module.h
was also everywhere.   But we are cleaning up the latter.  So make
the exporters actually call out their need for the include.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:32:06 -04:00
Stefan Nilsson XK 9a0da648ff mmc: sdio: Workaround for dev with broken CMD53
Adds a quirk which can be turned on for SDIO devices that do not support
512 byte requests in byte mode during CMD53. These requests will always
be sent in block mode instead.

This patch also enables this quirk for ST-Ericsson CW1200 WLAN device.

Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
Signed-off-by: Ulf HANSSON <ulf.hansson@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-10-26 16:32:02 -04:00
Andrei Warkentin 32780cd135 mmc: quirks: Extends card quirks with MMC/SD quirks matching the CID.
The current mechanism is SDIO-only. This allows us to create
function-specific quirks, without creating messy Kconfig dependencies,
or polluting core/ with function-specific code.

Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-24 21:00:54 -04:00
Ohad Ben-Cohen 14e7dc76f2 mmc: quirks: wl1271 is MMC_QUIRK_DISABLE_CD
The wl12xx device supports disconnecting the pull-up resistor on
CD/DAT[3] (pin 1) of the card.

Tell SDIO core to disconnect that resistor during card init,
since we don't need it at that point (and anyway all
hosts shall provide pull-up resistors on all data lines DAT[3:0]
as described in section 6 of the SD physical specification).

As a result, this may save some power, but it's also generally healthy
since it prevents both ends from pulling up that pin, which
results in undesirable asymmetric physical bus.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-24 21:00:05 -04:00
Ohad Ben-Cohen 0b4043d70a mmc: quirks: wl1271 is MMC_QUIRK_NONSTD_FUNC_IF
Tell SDIO core to ignore the standard SDIO function interface
codes indicated by the wl1271. This is required because the
wl1271 erroneously indicates its first function as a standard
Bluetooth SDIO interface, and that drives btsdio mad.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-24 20:59:56 -04:00
Pierre Tardy 12f8ef8fb2 mmc: remove BROKEN_CLK_GATING quirk for wl1271
This sdio card supports having its sdio clock shutdown.
It is also not using the SDIO IRQ, but rather uses a side gpio irq.

Signed-off-by: Pierre Tardy <tardyp@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-03-15 13:48:37 -04:00
Pierre Tardy db9935000d mmc: add MMC_QUIRK_BROKEN_CLK_GATING
Some sdio card are not following sdio standard, and do not work
when the sdio bus's clock is gated.

To keep functionnality for all legacy driver, we turn this quirk on
for every sdio card.
Drivers needs to disable the quirk manually when someone verifies that
their supported card works with clock gating.

Signed-off-by: Pierre Tardy <tardyp@gmail.com>
Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-03-15 13:48:35 -04:00
Pierre Tardy 57f0adc7ea mmc: add per device quirk placeholder
Some cards have quirks valid for every platforms using current
platform quirk hooks leads to a lot of code and debug duplication.

So we inspire a bit from what exists in PCI subsystem and do our own
per vendorid/deviceid quirk.  We still drop the complexity of the pci
quirk system (with special section tables, and so on).
That can be added later if needed.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-03-15 13:48:33 -04:00