Commit Graph

60651 Commits

Author SHA1 Message Date
xbw
7dcb2b4f0a 1.to support eMMC.
2.Resolve conflicts pin used to wifi-sdio-det.
3.Resolve the clock conflict between sd and sdio.
2014-03-11 10:01:46 +08:00
hjc
a5b0564f69 rk3288 lcdc: win0/1/2/3 test at fpga ok 2014-03-11 09:40:16 +08:00
黄涛
ce1d983988 ARM: rockchip: move some head files to include/linux/rockchip 2014-03-10 19:32:43 +08:00
hjc
757b445bdd rk fb: new framework test ok at rk3188
this commit depend on the hwc commit:
commit 59966e5cc0530d936435052d187fbe574684f21e
Author: huangds <hds@rock-chips.com>
Date:   Fri Mar 7 11:17:56 2014 +0800

    lcdc ok ,enable hwc
commit 314b22af926f28c3daa048354a4e4185fc46611b
Author: huangds <hds@rock-chips.com>
Date:   Mon Mar 10 18:19:04 2014 +0800

    lcdc abbort ,RK_FBIOSET_CONFIG_DONE remove for a moment
2014-03-10 19:24:08 +08:00
libing
557ff1228e Merge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10 2014-03-10 17:35:08 +08:00
张晴
71bc8394f2 rk31:linux3.10:pmic:support dc&ldo suspend en/disable,add rk808 pre_init 2014-03-10 14:21:07 +08:00
xbw
c8dc36ca79 SDMMC: 1.to identify eMMC. 2.add the trace log in rk_sdmmc driver. 2014-03-10 12:05:59 +08:00
陈金泉
8ae6fcba5c Audio: delete codec_set_spk, update rk616 codec driver 2014-03-10 11:10:43 +08:00
libing
1b05238eb3 Revert "rk fb: new framework test ok at rk3188"
This reverts commit fe817a682b.
2014-03-08 14:30:22 +08:00
lintao
16fe3de136 Merge branch 'develop-3.10' of ssh://10.10.10.29/rk/kernel into develop-3.10 2014-03-07 20:13:34 +08:00
Santosh Shilimkar
3cb50076ba ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function
Most of the kernel assumes that PFN0 is the start of the physical
memory (RAM). This assumptions is not true on most of the ARM SOCs
and hence and if one try to update the ARM port to follow the assumptions,
we end of breaking the dma bounce limit for few block layer drivers.
One such example is trying to unify the meaning of max*_pfn on ARM
as the bootmem layer expects, breaks few block layer driver dma
bounce limit.

To fix this problem, we introduce dma_max_pfn(dev) generic helper with
a possibility of override from the architecture code. The helper converts
a DMA bitmask of bits to a block PFN number. In all the generic cases,
it is just  "dev->dma_mask >> PAGE_SHIFT" and hence default behavior
is maintained as is.

Subsequent patches will make use of the helper. No functional change.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-03-07 20:07:29 +08:00
Ulf Hansson
10d03026fe 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>

Conflicts:
	drivers/mmc/card/block.c
2014-03-07 19:49:54 +08:00
Bing Zhao
9545e8d7fe 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-03-07 19:39:01 +08:00
Ulf Hansson
0233fd23a5 mmc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume
In some environments it is to prefer to postpone the resume of the card
device until runtime_resume is being carried out, since it will mean a
signficant decrease of the total system resume time.

The reason of the decreased resume time is simply because of the actual
re-initalization of the card, which typically takes hundreds of
milliseconds, is performed outside the resume sequence and wont thus
affect it.

For removable card, the detect work tries to re-detect the card to make
sure it is still present, as a part of that sequence the card will also
be runtime_resumed and thus also fully resumed.

For a non-removable card, typically a mmc blk request will trigger a
runtime_resume and thus fully resume the card. This also means the
first request will likely suffer from an inital latency since the
re-initialization of the card needs to be performed.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 19:35:27 +08:00
Ulf Hansson
4b1ff18255 mmc: Don't force card to active state when entering suspend/shutdown
By adding a card state that records if it is suspended or resumed, we
can accept asyncronus suspend/resume requests for the mmc and sd
bus_ops.

MMC_CAP_AGGRESSIVE_PM, will at request inactivity through the runtime
bus_ops callbacks, execute a suspend of the the card. In the state were
this has been done, we can receive a suspend request for the mmc bus,
which for sd and mmc forced the card to active state by a
pm_runtime_get_sync. In other words, the card was resumed and then
immediately suspended again, completely unnecessary.

Since the suspend/resume bus_ops callbacks for sd and mmc are now
capable of handling asynchronous requests, we no longer need to force
the card to active state before executing suspend. Evidently preventing
the above sequence for MMC_CAP_AGGRESSIVE_PM.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 19:34:01 +08:00
Ulf Hansson
3027099fb5 mmc: core: Remove deprecated mmc_suspend|resume_host APIs
The are no more users of the deprecated mmc_suspend|resume_host API,
so let's remove it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2014-03-07 19:28:24 +08:00
luowei
9f2f43526d add spi_write_and_read interface for spi 2014-03-07 19:06:04 +08:00
luowei
b1d4d15af2 add spi driver support 2014-03-07 19:01:09 +08:00
Ulf Hansson
51dfeaef6a mmc: core: Move cached value of the negotiated ocr mask to card struct
The negotiated ocr mask is directly related to the card. Once a card
gets removed, the mask shall be dropped. By moving the cache of the ocr
mask from the host struct to the card struct we have accomplished this.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>

Conflicts:
	drivers/mmc/core/sd.c
2014-03-07 17:35:23 +08:00
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
hjc
fe817a682b rk fb: new framework test ok at rk3188
this commit depend on the hwc commit:
commit 59966e5cc0530d936435052d187fbe574684f21e
Author: huangds <hds@rock-chips.com>
Date:   Fri Mar 7 11:17:56 2014 +0800

    lcdc ok ,enable hwc
2014-03-07 12:30:05 +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