Commit Graph

595047 Commits

Author SHA1 Message Date
Shawn Lin
6c29c8fd8b UPSTREAM: spi: rockchip: migrate to dmaengine_terminate_async
dmaengine_terminate_all is deprecated, let's use
dmaengine_terminate_async for interrupt handling.

Change-Id: I8c06ef2147c0583d28eeed5b623920199efa9810
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit 557b7ea34b)
2016-06-16 20:56:53 +08:00
Shawn Lin
d6c1d4eadd UPSTREAM: spi: rockchip: check return value of dmaengine_prep_slave_sg
We should check return value of dmaengine_prep_slave_sg, otherwise
we take risk of null pointer.

Change-Id: I2cc468563d630169f314e353d835ad33091c0d3c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit ea98491133)
2016-06-16 20:46:30 +08:00
Lars-Peter Clausen
9c66d0fd42 UPSTREAM: dmaengine: Add transfer termination synchronization support
The DMAengine API has a long standing race condition that is inherent to
the API itself. Calling dmaengine_terminate_all() is supposed to stop and
abort any pending or active transfers that have previously been submitted.
Unfortunately it is possible that this operation races against a currently
running (or with some drivers also scheduled) completion callback.

Since the API allows dmaengine_terminate_all() to be called from atomic
context as well as from within a completion callback it is not possible to
synchronize to the execution of the completion callback from within
dmaengine_terminate_all() itself.

This means that a user of the DMAengine API does not know when it is safe
to free resources used in the completion callback, which can result in a
use-after-free race condition.

This patch addresses the issue by introducing an explicit synchronization
primitive to the DMAengine API called dmaengine_synchronize().

The existing dmaengine_terminate_all() is deprecated in favor of
dmaengine_terminate_sync() and dmaengine_terminate_async(). The former
aborts all pending and active transfers and synchronizes to the current
context, meaning it will wait until all running completion callbacks have
finished. This means it is only possible to call this function from
non-atomic context. The later function does not synchronize, but can still
be used in atomic context or from within a complete callback. It has to be
followed up by dmaengine_synchronize() before a client can free the
resources used in a completion callback.

In addition to this the semantics of the device_terminate_all() callback
are slightly relaxed by this patch. It is now OK for a driver to only
schedule the termination of the active transfer, but does not necessarily
have to wait until the DMA controller has completely stopped. The driver
must ensure though that the controller has stopped and no longer accesses
any memory when the device_synchronize() callback returns.

This was in part done since most drivers do not pay attention to this
anyway at the moment and to emphasize that this needs to be done when the
device_synchronize() callback is implemented. But it also helps with
implementing support for devices where stopping the controller can require
operations that may sleep.

Change-Id: Ica0822ecbe803ec9605787e30751dfb098bdbe80
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit b36f09c3c4)
2016-06-16 20:45:35 +08:00
Alexander Kochetkov
8ec06b8708 UPSTREAM: spi/rockchip: fix endian mode for 16-bit transfers
16-bit transfers must be in big endian mode on wire.

Change-Id: I21e660de04867871132e4d5b0f2d943a30167aeb
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit 0277e01aeb)
2016-06-16 20:40:11 +08:00
Shawn Lin
b66da51e53 UPSTREAM: spi: rockchip: remove xfer_completion from rockchip_spi
xfer_completion isn't been used anywhere, so it can be
removed.

Change-Id: I5a653609c8afaa83665ebc050274d3c9dcf59777
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit 23366a02bf)
2016-06-16 20:39:33 +08:00
Shawn Lin
1bbada4ffc UPSTREAM: spi: rockchip: add missing spi_master_put
Add missing spi_master_put for rockchip_spi_remove since
it calls spi_master_get already.

Change-Id: If76b124b5122d8ca4c65014831afdf1f4893a7cc
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit 844c9f476a)
2016-06-16 20:39:02 +08:00
Shawn Lin
5d2060410c UPSTREAM: spi: rockchip: disable runtime pm when in err case
Before registering master, driver enables runtime pm.
This patch  pm_runtime_disable in err case while probing
driver to balance pm reference count.

Change-Id: I63688e1b07b0b157a663f67e50ac74c5273ce353
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
 commit b8659adda9)
2016-06-16 20:38:34 +08:00
Shengfei xu
7afbf7d4f4 arm64: dts: rockchip: set the suspend voltage for rk3399-evb-rev2 board
Change-Id: I6e49d935b7aaa54f3a2870a477504970559da6c1
Signed-off-by: Shengfei xu <xsf@rock-chips.com>
2016-06-16 18:36:30 +08:00
Zorro Liu
445814618d driver, iio, mpuxxx: increase spi speed to 20Mhz when read sensor data
Change-Id: Ic8088d26ba87386d39014e6ca25f1b43865af914
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-16 17:59:59 +08:00
Zorro Liu
2685b36475 driver, iio, mpuxxx: add _RATE_DEBUG log
Change-Id: Iabfb6c389013fca39e023f0c9dc96882aef16d40
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-16 17:59:58 +08:00
Yakir Yang
41d5274733 FROMLIST: ARM: dts: rockchip: enable hdmi audio on rk3036-kylin
Enable the basic hdmi audio function on rk3036 kylin board.

Change-Id: Id9d0971203a75bba9a885d590c40b2ddce355b9f
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9178535/)
2016-06-16 16:00:52 +08:00
Yakir Yang
836c1fb5b7 FROMLIST: ARM: dts: rockchip: add simple sound card for RK3036 SoCs
Using I2S as the audio input source, and force the mclk_fs to 256.

Change-Id: Ib85ba7be4de430d5536aaaebe74bb9fde9174f16
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9178533/)
2016-06-16 16:00:38 +08:00
Yakir Yang
b74ea8eb39 FROMLIST: drm/rockchip: inno_hdmi: add audio support
Using the common hdmi-codec driver to support hdmi audio function.

Change-Id: I8d7f4166b8c64bc3975ad305a761e88c3404b136
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9178529/)
2016-06-16 16:00:31 +08:00
Alpha Lin
d15bc1b075 rockchip/vcodec: add shutdown ops
Add a shutdown opertion to prevent a system halt when
reboot executing.

Before this revision, driver will try to trigger hw after
power domain disable during reboot procedure, and cause a
system halt.

Change-Id: I57236c20cb96946a18d78396955f6fd59ee93a59
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2016-06-16 10:26:15 +08:00
xuhuicong
8f17489c88 video: rockchip: hdmi: set hdcp hclk to modify standby crash
Change-Id: I032f85abe08932a2b14dcc71e732bd334825fed2
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-06-16 09:48:12 +08:00
Xing Zheng
933443015f Revert "clk: rockchip: rk3399: remove GRF gates clock nodes from power domains"
This reverts commit aa197c2f23.

Change-Id: I7462950df48ea833f928c7d4d952ed65486f3acb
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-15 15:50:35 +08:00
Xing Zheng
5a7f245ebb Revert "clk: rockchip: rk3399: remove all of the NOC clock nodes"
This reverts commit aa4027b568.

Change-Id: I18d2dbab04fd199ac20146e48d08e3d16b0d6311
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-15 15:50:28 +08:00
Zhangbin Tong
ad9e650757 ARM64: rockchip_defconfig: enable pwm remote control
Change-Id: I31acaaf03a9ca6d471cf74292af7371598c301b1
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-06-15 15:27:38 +08:00
Zhangbin Tong
e36814cb28 input: Add IR decode driver
Change-Id: I7e6f36b70fd1f5356ad64cad9a0b9f2aab18c2b1
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2016-06-15 14:46:49 +08:00
Elaine Zhang
d25b2edaca ARM64: dts: rk3399: qos: fix up the qos node invalid format
Change-Id: I971d32c08d13b3f94da3670800d38a9229afd4d3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-06-14 18:13:13 +08:00
Elaine Zhang
9e76a3ad71 ARM64: dts: rk3399: pd: add clk control when pd on/off
make sure the clk is enabled when read/write qos regs.

Change-Id: Ia88453504bcfd612a86537c4b12d3fd5b53f3d76
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-06-14 17:49:15 +08:00
Finley Xiao
b6b24819f5 MALI: rockchip: add power-off-delay function
As gpu power on and off frequently, and the interval time is smaller
than the polling time of devfreq, add power-off-delay function to
ensure devfreq work fine.

Change-Id: Iba2405c9ead91a437233f1fedf2f3555703aa9e1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-06-14 17:35:20 +08:00
Finley Xiao
5c5729c9b2 ARM64: dts: rockchip: rk3399: add power-off-delay-ms for gpu
Change-Id: Ib050492f466b50a6937b3a43f63f27859619e3b4
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-06-14 17:33:48 +08:00
xubilv
f2c4a8fcb4 dtsi: screen-timing: lcd-ls055r1sx04-mipi: add screen parameter for vr
Change-Id: I035808e7758400a0c50055e959b3e1ec6b54d643
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-06-14 16:01:51 +08:00
Aiyoujun
2a0df017b8 ARM64: dts: rk3399-mid-818-android: modify gt9xx touchscreen config
Change-Id: I79af9d7cb66e036424f3e6f27b1364f2c7659451
Signed-off-by: Aiyoujun <ayj@rock-chips.com>
2016-06-13 23:00:02 +08:00
Aiyoujun
7dbe44dc52 input: touchscreen: gt9xx: add firmware for rk3399 9.7' sample mid
Change-Id: Ie7c5d9ab7da284c96fe3f56fd2108445012bf25a
Signed-off-by: Aiyoujun <ayj@rock-chips.com>
2016-06-13 22:53:24 +08:00
Sugar Zhang
8bade80b78 ARM64: dts: rk3399-evb: rename spdif sound card name
just to compatiable with android sdk, anyway, change it.

Change-Id: I60341c5a8a9050172c6abaca396957442f42434e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-06-13 18:42:33 +08:00
Sugar Zhang
9b9810bf44 ARM64: dts: rk3399-evb: disable spdif sound default
this patch disable spdif sound in rk3399-evb.dtsi, and enable on
product dts side as required.

Change-Id: Icf61f13aeafdfae4c7a52603ce23cf2c04c27ab4
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2016-06-13 18:35:51 +08:00
Zhiqin Wei
51e65247a4 rockchip/rga: add rga support yuv 10 bit
Change-Id: Id7bd3ea75831b671f9739337c457f59c38fde4c3
Signed-off-by: Zhiqin Wei <wzq@rock-chips.com>
2016-06-13 18:10:36 +08:00
Zorro Liu
d0caa4e9aa ARM64: dts: rockchip: rk3399-vr-android.dts: add mpuxxx spi node and disabled i2c node
Change-Id: I0e19ce5c7e9982ccdd995bd273a9833463be4c68
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-13 18:08:54 +08:00
Zorro Liu
73bfeab333 driver, iio, mpuxxx: driver need parse more platform define from dts file
Change-Id: Icecf7f82a4190834bdcaa75a09876a82621c0725
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-13 18:08:25 +08:00
Zorro Liu
10d68681f5 driver, mpuxxx: add i2c disable/enable control when write user_ctrl register
Change-Id: Icedd6d73de9345c5b18fe026053ae35c6546ef78
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-13 18:08:20 +08:00
zzc
66c45228d5 arm64: dts: rockchip: add ap6330 support for rk3399-vr-android
Change-Id: I4ef1e7e4a673299d6e1f713e4945d533d5327276
Signed-off-by: zzc <zzc@rock-chips.com>
2016-06-13 18:07:30 +08:00
zzc
f1355a3b8e net: wireless: rockchip_wlan: rkwifi: fix softap issue
Change-Id: I8eb4a60c1e81b357eeb3aabdfa2aadbcc523d0d5
Signed-off-by: zzc <zzc@rock-chips.com>
2016-06-13 18:04:39 +08:00
Xing Zheng
aa4027b568 clk: rockchip: rk3399: remove all of the NOC clock nodes
There are too many NOC clocks and all of them are critical clocks.
This approach is unnecessary, we only remove them and keep them
always enable, and caused by increased power consumption is only
<=3ma.

Change-Id: I6968dd9fe5632853fade831260d0cbeeb9f8fda3
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-13 17:49:29 +08:00
Xing Zheng
aa197c2f23 clk: rockchip: rk3399: remove GRF gates clock nodes from power domains
To simplify the description of the clock for RK3399, we don't need to
add many GRF gates clock nodes and keep them always enable,

In this case, we can avoid some of the operations GRF registers exception
problems, and caused by increased power consumption is only <=1ma.

Change-Id: Ifee9df2d5f869607191c5fb1165ec3e36e7bef9d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-06-13 17:49:05 +08:00
xuhuicong
f998bee0f4 power: cw2015: fix Power capacity jump after capacity is 0%
Change-Id: I5bfd5bfa05ccd04bd9d4d344ff4c66443561314d
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-06-13 11:13:32 +08:00
xuhuicong
3de246a060 video: rockchip: hdmi: fix certain tv blank when mode switch
Change-Id: Ic980c14c0316c87d6fb160e2b94279411c88dbde
Signed-off-by: xuhuicong <xhc@rock-chips.com>
2016-06-13 10:43:39 +08:00
Huibin Hong
309455f8fd arm64: dts: rockchip: add burst mode for rk3399
Rk3399 support single and burst mode, and flushp instruction.
But burst mode improve transfer efficiency.

Please refer to:
Commit 8e770f371c
"dmaengine: pl330: add burst mode according to dts config"

Change-Id: I2eb36723697cf548dc75aca0e5a276a86cd2419d
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-06-13 10:35:32 +08:00
Huibin Hong
e90e069755 arm64: dts: rockchip: add burst mode for rk3366
Rk3366 support single and burst mode, and flushp instruction.
But burst mode improve transfer efficiency.

Please refer to:
Commit 8e770f371c
"dmaengine: pl330: add burst mode according to dts config"

Change-Id: I5e3fef4684f324dda015c0afd73535c062952fc1
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-06-13 10:33:47 +08:00
Huibin Hong
7c8d79306b arm64: dts: rockchip: add burst mode for rk3368
Because rk3368 pl330 dma controller doesn't support single
mode, so it is necessary to set peripherals-req-type-burst.

Please refer to:
Commit 8e770f371c
"dmaengine: pl330: add burst mode according to dts config"

Change-Id: I44de28cca0085bc3d8f25a5913dbb527c36d8f83
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-06-13 10:32:59 +08:00
Huibin Hong
170b5951a8 ARM: dts: rockchip: add burst mode for rk3288
Because rk3288 pl330 dma controller doesn't support single
mode, so it is necessary to set peripherals-req-type-burst.

Please refer to:
Commit 8e770f371c
"dmaengine: pl330: add burst mode according to dts config"

Change-Id: Ic972880807e858334a1df8fa3f9bb567a8078ff9
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2016-06-13 10:31:35 +08:00
Caesar Wang
a83b750a9f arm64: dts: rockchip: add arm,pl330-broken-no-flushp quirk for rk3368
Pl330 integrated in rk3368 platform doesn't support
DMAFLUSHP function. So we add arm,pl330-broken-no-flushp quirk
for it.

Change-Id: Ia7f4bb6ffa1fba01dac5ac2257499dbbc9887da6
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-06-13 10:31:09 +08:00
wlq
8a9e4a6165 ARM64: dts: rockchip: add rk3399 vr dts rk3399-vr-android.dts
Change-Id: I850c46c15fb7021fcba16df0890f08ddb2145de6
Signed-off-by: WU liangqing <wlq@rock-chips.com>
2016-06-13 09:48:53 +08:00
Aiyoujun
41451bf866 ARM64: dts: rockchip: Add rk3399 MID sample board with PMU of rk818.
Change-Id: Ib55d06e18b81b3f8b214240c6516770165bac900
Signed-off-by: Aiyoujun <ayj@rock-chips.com>
2016-06-12 17:55:04 +08:00
Zorro Liu
56978a68a4 ARM64: rockchip_defconfig: enable sensor driver mpuxxx
Change-Id: I6cefc19ebfd93ddc942cd62637664d4b3a72c2d6
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-12 17:36:21 +08:00
Zorro Liu
ea1371789a staging, iio, mpu: add mpu spi driver
Change-Id: Iac37e5b74ad2b1655d263e5d1a1ed1309d14cc31
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-12 17:34:20 +08:00
Zorro Liu
2185d7c78a staging, iio, mpu: repack mpu driver's communicate interface
Change-Id: Ideac72c0227d10305d3efde7d038bb25a20197bd
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-12 17:33:29 +08:00
Zhangbin Tong
a3c1d3323d staging: iio: new invensence mpu6050/6500 driver
Change-Id: I0f804afa1f5ad0815fe0b8f3663423db1b1c0e43
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2016-06-12 17:32:50 +08:00
xubilv
0739622b08 ARM64: dts: rk3399: android: turn on mipi for evb rev2
Change-Id: I95b5e368288b645a1a04d813cb5c43f474f9b725
Signed-off-by: xubilv <xbl@rock-chips.com>
2016-06-12 17:31:02 +08:00