Commit Graph

60631 Commits

Author SHA1 Message Date
Ulf Hansson
5161f23189 mmc: core: Do not poll for busy with status cmd for all switch cmds
Some switch operations like poweroff notify, shall according to the
spec not be followed by any other new commands. For these cases and
when the host does'nt support MMC_CAP_WAIT_WHILE_BUSY, we must not
send status commands to poll for busy detection. Instead wait for
the stated timeout from the EXT_CSD before completing the request.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 16:16:06 +08:00
Jackey Shen
8feaef3479 mmc: core: clean up duplicate macros
Clean up the duplicate macros:
mmc_sd_card_uhs -> mmc_card_uhs
mmc_sd_card_set_uhs -> mmc_card_set_uhs

Signed-off-by: Jackey Shen <jackey.shen@amd.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 15:44:29 +08:00
Grant Grundler
e439607d23 mmc: core: remove dead function mmc_try_claim_host
cscope says there are no callers for mmc_try_claim_host in the kernel.
No reason to keep it.

Signed-off-by: Grant Grundler <grundler@chromium.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 15:44:06 +08:00
Haijun Zhang
1c9aaaee2c mmc: core: parse voltage from device-tree
Add function to support getting voltage from device-tree.
If voltage-range is specified in device-tree node, this function
will parse it and return the available voltage mask.

Signed-off-by: Haijun Zhang <haijun.zhang@freescale.com>
Acked-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Chris Ball <cjb@laptop.org>

Conflicts:
	drivers/mmc/core/core.c
2014-03-07 15:43:40 +08:00
Laurent Pinchart
a0f135e61b mmc: slot-gpio: Add debouncing capability to mmc_gpio_request_cd()
Add a debounce parameter to the mmc_gpio_request_cd() function that
enables GPIO debouncing when set to a non-zero value. This can be used
by MMC host drivers to enable debouncing on the card detect signal.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Chris Ball <cjb@laptop.org>

Conflicts:
	drivers/mmc/host/jz4740_mmc.c
	drivers/mmc/host/mvsdio.c
2014-03-07 14:12:09 +08:00
Mark Brown
85815b087b regulator: core: Split devres code out into a separate file
Cut down on the size of core.c a bit more and ensure that the devres
versions of things don't do too much peering inside the internals of
the APIs they wrap.

Signed-off-by: Mark Brown <broonie@linaro.org>

Conflicts:
	drivers/regulator/Makefile
	drivers/regulator/core.c
2014-03-07 14:05:47 +08:00
Ulf Hansson
7f584c49c8 mmc: core: Invent MMC_CAP2_FULL_PWR_CYCLE
MMC_CAP2_FULL_PWR_CYCLE shall be set by host drivers which are able to
do a complete power cycle of the card. In the eMMC case that includes
both vcc and vccq.

This CAP is providing the protocol layer with important information,
needed to take optimized decisions during card initialization and in
the suspend/resume sequence.

MMC_CAP2_POWEROFF_NOTIFY is replaced by MMC_CAP2_FULL_PWR_CYCLE, since
it makes sense to use a wider scope for it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 13:38:30 +08:00
Ulf Hansson
cbac2e5201 mmc: core: Handle card shutdown from mmc_bus
Considering shutdown of the card, the responsibility to initate this
sequence shall be driven from the mmc_bus.

This patch enables the mmc_bus to handle this sequence properly. A new
.shutdown callback is added in the mmc_driver struct which is used to
shutdown the blk device.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 13:07:45 +08:00
Simon Baatz
3a392c1df3 mmc: return mmc_of_parse() errors to caller
In addition to just logging errors encountered during DT parsing or
allocating GPIO slots for CD/WP, mmc_of_parse() now returns with an error.

In particular, this is needed if the GPIO allocation may return
EPROBE_DEFER.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 12:53:48 +08:00
Rafael J. Wysocki
e83e9aef51 PM / Runtime: Rework the "runtime idle" helper routine
The "runtime idle" helper routine, rpm_idle(), currently ignores
return values from .runtime_idle() callbacks executed by it.
However, it turns out that many subsystems use
pm_generic_runtime_idle() which checks the return value of the
driver's callback and executes pm_runtime_suspend() for the device
unless that value is not 0.  If that logic is moved to rpm_idle()
instead, pm_generic_runtime_idle() can be dropped and its users
will not need any .runtime_idle() callbacks any more.

Moreover, the PCI, SCSI, and SATA subsystems' .runtime_idle()
routines, pci_pm_runtime_idle(), scsi_runtime_idle(), and
ata_port_runtime_idle(), respectively, as well as a few drivers'
ones may be simplified if rpm_idle() calls rpm_suspend() after 0 has
been returned by the .runtime_idle() callback executed by it.

To reduce overall code bloat, make the changes described above.

Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Kevin Hilman <khilman@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
2014-03-07 12:52:24 +08:00
Fredrik Soderstedt
65cdca4472 mmc: core: Fix select power class after resume
Use the saved values in card->ext_csd when selecting power class.
By doing this the power class will be selected even if mmc_init_card
is called with oldcard != NULL, which is the case after a suspend/resume.

Today ext_csd is NULL if mmc_init_card is called with oldcard != NULL
and power class will not be selected.

According to the eMMC specification the POWER_CLASS value is reset after
power failure, H/W reset assertion and any CMD0 reset.

Signed-off-by: Fredrik Soderstedt <fredrik.soderstedt@stericsson.com>
Reviewed-by: Johan Rudholm <jrudholm@gmail.com>
Acked By: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 12:48:57 +08:00
Ulf Hansson
d7b8a89726 mmc: core: Restructure and simplify code for mmc sleep|awake
The mmc_card_sleep|awake APIs are not being used since the support is
already properly encapsulated within the suspend sequence. Sleep|awake
command is also specific for eMMC.

We remove the sleep|awake bus_ops, the mmc_card_sleep|awake APIs and
move the code into the mmc specific core instead. This also includes
the mmc ops function, mmc_sleepawake. All releated functions have then
become static and we have got far less code to maintain.

Additionally this patch also simplifies the code from mmc_sleepawake,
since it is only used to put the card to sleep and not awake.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 12:48:03 +08:00
Ulf Hansson
0a82e11529 mmc: core: Support aggressive power management for (e)MMC/SD
Aggressive power management is suitable when saving power is
essential. At request inactivity timeout, aka pm runtime
autosuspend timeout, the card will be suspended.

Once a new request arrives, the card will be re-initalized and
thus the first request will suffer from a latency. This latency
is card-specific, experiments has shown in general that SD-cards
has quite poor initialization time, around 300ms-1100ms. eMMC is
not surprisingly far better but still a couple of hundreds of ms
has been observed.

Except for the request latency, it is important to know that
suspending the card will also prevent the card from executing
internal house-keeping operations in idle mode. This could mean
degradation in performance.

To use this feature make sure the request inactivity timeout is
chosen carefully. This has not been done as a part of this patch.

Enable this feature by using host cap MMC_CAP_AGGRESSIVE_PM and
by setting CONFIG_MMC_UNSAFE_RESUME.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 12:46:23 +08:00
Ulf Hansson
22c6d9771f mmc: block: Enable runtime pm for mmc blkdevice
Once the mmc blkdevice is being probed, runtime pm will be enabled.
By using runtime autosuspend, the power save operations can be done
when request inactivity occurs for a certain time. Right now the
selected timeout value is set to 3 s. Obviously this value will likely
need to be configurable somehow since it needs to be trimmed depending
on the power save algorithm.

For SD-combo cards, we are still leaving the enablement of runtime PM
to the SDIO init sequence since it depends on the capabilities of the
SDIO func driver.

Moreover, when the blk device is being suspended, we make sure the device
will be runtime resumed. The reason for doing this is that we want the
host suspend sequence to be unaware of any runtime power save operations
done for the card in this phase. Thus it can just handle the suspend as
the card is fully powered from a runtime perspective.

Finally, this patch prepares to make it possible to move BKOPS handling
into the runtime callbacks for the mmc bus_ops. Thus IDLE BKOPS can be
accomplished.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 12:45:16 +08:00
Maya Erez
cac3fcee6f mmc: card: Adding support for sanitize in eMMC 4.5
The sanitize support is added as a user-app ioctl call, and
was removed from the block-device request, since its purpose is
to be invoked not via File-System but by a user.

This feature deletes the unmap memory region of the eMMC card,
by writing to a specific register in the EXT_CSD.

unmap region is the memory region that was previously deleted
(by erase, trim or discard operation).

In order to avoid timeout when sanitizing large-scale cards,
the timeout for sanitize operation is 240 seconds.

Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>

Conflicts:
	drivers/mmc/card/block.c
2014-03-07 12:40:27 +08:00
Ulf Hansson
59d3e81209 mmc: core: Re-use code for MMC_CAP2_DETECT_ON_ERR in polling mode
Previously the MMC_CAP2_DETECT_ON_ERR was invented for detecting
slow card removal. In was never a realy good solution and a proper
fix has been merged using gpio debouncing instead. We remove this
cap in this patch.

Although when using polling card detect mode, the code invented for
MMC_CAP2_DETECT_ON_ERR is re-used to complete card removal in an
earlier phase. There are no need waiting for the polling timeout to
elapse in this case.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Liu <kliu5@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 12:28:15 +08:00
guoyi
af2d9a0801 porting sensor-dev to 3.10 2014-03-05 18:14:22 +08:00
xbw
fbdd2f071b SDMMC-emmc:add the capability to support hs200 mode 2014-03-04 17:47:47 +08:00
gwl
65626cd9b8 wifi: change some function name to be more formal. 2014-03-04 11:41:09 +08:00
xbw
02b30b0a08 Revert "SDMMC:"
This reverts commit 6216239180.
2014-03-04 11:15:43 +08:00
qjb
443df68724 rk610 kernel3.10 : add rk610 core and rk610 codec support 2014-03-03 17:57:18 +08:00
陈亮
53d5a0a18a dvfs : move dvfs.h to include/linux/rockchip/ 2014-02-28 01:27:21 -08:00
陈亮
f949ee0174 rk3188:linux3.10: add ddr clk node ops 2014-02-28 00:40:56 -08:00
dkl
15b1a654eb clk: rk: merge some defines about clk and add rk3188 prefix 2014-02-28 16:13:10 +08:00
张晴
6fc76d3faa linux3.10: renamed io_vol_domain to rockchip_io_domain 2014-02-28 10:45:18 +08:00
张晴
c87723d9e4 rk31:linux3.10:support io domain setting by regulator 2014-02-28 10:30:02 +08:00
xbw
6216239180 SDMMC:
1.exclude asynchronous transfer for special request.
2.fix async request mechanism for sequential read scenarios
3.don't start new request when the card is removed
4.support packed write command for eMMC4.5 devices
5.fix the host's claim-release in special request
6.Adding support for sanitize in eMMC 4.5
7.Handle card shutdown from mmc_bus
8.fix null pointer use in mmc_blk_remove_req
9.fix host release issue after discard operation
10.modify the switch voltage.
11.add some profile for sd-sdio3.0
2014-02-27 17:20:54 +08:00
luowei
db944ccc1e add rk3288 pinctrl dts code 2014-02-27 16:34:12 +08:00
gwl
a0e2bfba26 wifi: add wifi power manage driver rfkill-wlan.c. 2014-02-27 16:19:40 +08:00
CMY
6181384db8 rk: ion: modify the ION_IOC_XXX name easy to understand 2014-02-25 17:26:01 +08:00
Thierry Reding
4e9f3c94d9 pwm-backlight: Add optional enable GPIO
To support a wider variety of backlight setups, introduce an optional
enable GPIO. Legacy users of the platform data already have a means of
supporting GPIOs by using the .init(), .exit() and .notify() hooks. DT
users however cannot use those, so an alternative method is required.

In order to ease the introduction of the optional enable GPIO, make it
available in the platform data first, so that existing users can be
converted. Once that has happened a second patch will add code to make
use of it in the driver.

Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-02-25 16:57:25 +08:00
黄涛
27e4aea386 pwm-backlight: reset to unpstream version 2014-02-25 16:55:47 +08:00
CMY
4255b3e268 rk: ion: support shared buffer between processes without Binder 2014-02-25 15:32:13 +08:00
yxj
fcecc3d09c rk fb:add more screen property 2014-02-25 09:26:46 +08:00
yxj
486bc247fb port edp anx6345 to linux 3.10 2014-02-25 09:26:46 +08:00
xbw
3510c255c3 SDMMC: add the sdmmc driver to kernel_3.10 2014-02-22 16:03:46 +08:00
CMY
a8cb0a0942 rk: ion: change heap id 2014-02-21 15:41:11 +08:00
CMY
381653de66 rk: ion: add custom ioctl: ION_IOC_GET_PHYS 2014-02-20 11:21:40 +08:00
zwl
1cef1923fb hdmi: add cat66121 hdmi driver dts property 2014-02-18 16:00:47 +08:00
yxj
0ffa237e0d rk fb:fix dma_buf fd 2014-02-12 10:42:51 +08:00
CMY
d968e1a463 rk: ion: remove ^M character 2014-02-11 17:14:56 +08:00
CMY
268a9b7111 move rockchip_ion.h file to include/linux/ 2014-02-11 16:49:54 +08:00
yxj
8f02f3e354 rk fb:use ion interface export by rockchip ion 2014-02-11 15:26:04 +08:00
yxj
3e53afe6e1 rk fb: add ion dam_buf support 2014-02-11 15:10:24 +08:00
zwl
2ffcdebe6d 1.optimize the 'hdmi' global variables 2.fix some compile error 2014-02-10 22:12:11 +08:00
黄涛
c36cf48454 Merge remote-tracking branch 'origin/upstream/linux-linaro-lsk-v3.10-android' into develop-3.10 2014-02-10 16:23:36 +08:00
陈亮
24ea5cf410 rk3188 : add dvfs && cpufreq 2014-02-07 19:33:27 -08:00
Mark Brown
0f3550b731 Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android 2014-01-27 14:57:42 +00:00
Mark Brown
51ad557e21 Merge tag 'v3.10.28' into linux-linaro-lsk
This is the 3.10.28 stable release
2014-01-27 14:57:25 +00:00
yxj
c8c1d278af rk fb:rename layer to win, add iomux for rk3188 lcdc 2014-01-26 16:42:58 +08:00