Commit Graph

610628 Commits

Author SHA1 Message Date
Chen Jinsen
2cff4571e0 ARM: dts: rk3288-th804: bind dsi to vopb for panel
The aclk_vop is limited by vio_limit_freq and RK3288_LIMIT_PLL_VIO1
set as 410MHZ. if bind dsi to vopl (the clk freq will be 272MHZ),
it will be some scenarios with insufficient frame rates

Change-Id: I2fe15d51c579dbc5fe666cfb320055f0e179d2fc
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
2018-07-31 15:47:35 +08:00
Ziyuan Xu
80e853f602 net: wireless: bcmdhd: fixup sdio wifi deivice response crc error while resume
Change-Id: I3a9aa6f5346c2393ae0c90ab1592bc043c5f2d25
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
2018-07-31 15:45:55 +08:00
Yao Xiao
b4f51792fa mmc: core: export retune_enable/disable api for wifi drivers
Change-Id: I084e155ed71057fa7f39e160a4f3fde964557185
Signed-off-by: Yao Xiao <xiaoyao@rock-chips.com>
2018-07-31 15:45:25 +08:00
Herman Chen
0dfdb6557f video: rockchip: Fix warning by checkpatch
Fix warning reported by checkpatch.sh

Change-Id: I3973c7387c64a2c3b5b21f311869fe58ed49597c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-07-31 15:44:12 +08:00
Tang Yun ping
90efddf9eb PM / devfreq: rockchip_dmc: add rk322x dfs init code
Change-Id: I5d81d19286dda9ddd096e648ec59370389c296e1
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2018-07-31 15:17:16 +08:00
Herman Chen
f9fb1637dc video: rockchip: Fix error on device remove
Fix vcodec_remove errors:
1. vcodec_remove needs to call corresponding subdev remove according to
subdev count.
2. Kernel vpu_session has to be freed with main device rather than
subdev remove.
3. Workqueue should be clear on device remove.
4. devfreq_unregister_opp_notifier and dev_pm_opp_of_remove_table
should be call to insure next insmod's success.
5. These is a great defect on subdev probe: the subdev has no
corresponding driver. The connection on main device and subdev is only
the dts name. This should be fixed in next framework. And now we have
to clear the resource allocated in subdev then we can insure next
insmod's success.

Change-Id: I336331e9e88564a5602796755f02af1786ddd7f9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-07-31 09:54:44 +08:00
Lin Huang
ca01ec35d7 UPSTREAM: arm64: dts: rockchip: assign clock rate for cpll child clocks on rk3399
These clocks do not assign default clock frequency, and use the
default cru register value to get frequency, so if cpll increase
frequency, these clocks also increase their frequency, that may
exceed their signed off frequency. So assign default clock for
them to avoid it.

NOTE: on none of the boards currently in mainline do we expect
CPLL to be anything other than 800 MHz, but some future boards
might have it. It's still good to be explicit about the clock
rates to make diffing against future boards easier and also to
rely less on BIOS muxing.

Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit e702e13f0b)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: If6a2341e2797f3c35f90fe1c621b1df13632694e
2018-07-30 17:57:51 +08:00
Shunqian Zheng
d7f331169b UPSTREAM: arm64: dts: rockchip: assign clock rate for ACLK_VIO on rk3399
The ACLK_VIO is a parent clock used by a several children,
its suggested clock rate is 400MHz. Right now it gets 400MHz
because it sources from CPLL(800M) and divides by 2 after reset.
It's good not to rely on default values like this, so let's
explicitly set it.
NOTE: it's expected that at least one board may override cru node and
set the CPLL to 1.6 GHz. On that board it will be very important to be
explicit about aclk-vio being 400 MHz.

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit 3f7f3b0fb4)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Conflicts:
	arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi

Change-Id: Iadd22356e399e8d9b3a1f2bec981f2b41d813f3c
2018-07-30 17:56:23 +08:00
Shunqian Zheng
394c4096b7 UPSTREAM: arm64: dts: rockchip: set to CCI clock of RK3399 to 600M
Per testing, this can reduce the memory latency and d8 gets
better scores.

Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit bb4b6201d2)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Change-Id: I6f305e0bc60a91f18f606fb7a8012d80fcd378b5
2018-07-30 17:47:41 +08:00
Jaehoon Chung
31911458d6 UPSTREAM: arm64: dts: rockchip: replace to "max-frequency" instead of "clock-freq-min-max"
In drivers/mmc/core/host.c, there is "max-freqeuncy" property.
It should be same behavior, So Use the "max-frequency" instead of
"clock-freq-min-max".

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit c49590691f)
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Conflicts:
	arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dts

Change-Id: I92f321b167cf4af9bb91e4814e797f0429ad80af
2018-07-30 17:47:19 +08:00
Lin Jianhua
c56df50fad ARM: dts: rockchip: rk3308-dot-v10-aarch32: wifi ext_clk_freq change to ref-clock-frequency
Change-Id: I2e796ba38736cc7da40436fcd8635f2ab4e0dbd5
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-07-30 17:20:03 +08:00
Nick Desaulniers
56bb2ed623 tracing: do not leak kernel addresses
CVE-2017-0630

This likely breaks tracing tools like trace-cmd.  It logs in the same
format but now addresses are all 0x0.

Bug: 34277115
Change-Id: Ifb0d4d2a184bf0d95726de05b1acee0287a375d9
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2018-07-30 16:57:51 +08:00
Finley Xiao
5f09850f65 clk: Fix error parent when show and change parent clock
This patch fixes the following crash:

Internal error: Accessing user space memory outside uaccess.h routines:
96000005 [#1] PREEMPT SMP
Modules linked in: bcmdhd
CPU: 2 PID: 1293 Comm: cat Not tainted 4.4.138 #873
Hardware name: Rockchip PX30 evb ddr3 board (DT)
task: ffffffc044f0de80 task.stack: ffffffc044040000
PC is at clock_available_parent_show+0x58/0x78
LR is at seq_read+0x120/0x404
pc : [<ffffff800885a470>] lr : [<ffffff80081e2128>] pstate: 80400145
sp : ffffffc044043cd0
x29: ffffffc044043cd0 x28: ffffffc053f8c880
x27: ffffffc044fce400 x26: ffffffc044043d78
x25: ffffffc044043eb0 x24: 0000005b07cd4868
x23: ffffff8009196000 x22: ffffffc00a28d100
x21: ffffff8008f89317 x20: ffffffc053f8c840
x19: 0000000000000000 x18: 00000075016fd000
x17: 0000007501694f4c x16: ffffff80081c0dac
x15: aaaaaaaaaaaaaaab x14: 0000007501000000
x13: 0000000000000000 x12: 0000000000000000
x11: 0000000000000001 x10: 0101010101010101
x9 : 0000000000001000 x8 : 000000000000003f
x7 : ffffff8009196000 x6 : ffffff80081e2008
x5 : ffffff8008c75170 x4 : 0000000000000000
x3 : 0000000000000000 x2 : ffffff800885a418
x1 : 0000000000000001 x0 : 0000000000000000

Internal error: Accessing user space memory outside uaccess.h routines:
96000005 [#1] PREEMPT SMP
Modules linked in: bcmdhd
CPU: 1 PID: 1036 Comm: sh Not tainted 4.4.138 #871
Hardware name: Rockchip PX30 evb ddr3 board (DT)
task: ffffffc04c2e1b00 task.stack: ffffffc052868000
PC is at clock_parent_write+0x100/0x158
LR is at clock_parent_write+0xe4/0x158
pc : [<ffffff800885c310>] lr : [<ffffff800885c2f4>] pstate: 80400145
sp : ffffffc05286bb40
x29: ffffffc05286bb40 x28: ffffffc04c2e1b00
x27: ffffff8008b62000 x26: 0000000000000040
x25: 000000000000011d x24: ffffffc00a28d100
x23: ffffff8009196000 x22: 0000000000000008
x21: ffffff8009196000 x20: 0000000000000000
x19: 000000000000000e x18: 0000007a98c56000
x17: 0000007a98bee57c x16: ffffff80081c0e68
x15: aaaaaaaaaaaaaaab x14: 0000007a98600000
x13: 000000000000000d x12: 0000000000000019
x11: 0000000000000000 x10: 0000000000000001
x9 : 0000000000000000 x8 : ffffff80091c5850
x7 : ffffff80093efcd0 x6 : ffffffc05286bb96
x5 : ffffffc05286bb96 x4 : 0000000000000140
x3 : ffffffc052873b87 x2 : cb88537fdc8ba68a
x1 : 0000000000000000 x0 : 0000000000000000

Fixes: cd6fa34b83 ("clk: add/modify debugfs support for clocks")
Change-Id: I5988376845ef5ad096219c548055972c0998e02c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-07-30 16:45:56 +08:00
Weiguo Hu
285184880f net: wireless: rockchip_wlan: ssv6051 remove debug log
Change-Id: I989a0375daf7c7f4885fa1a3213be2dbada18781
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2018-07-30 16:39:49 +08:00
Jian Qiu
9ce8852cca staging: android: sync: fix CVE-2016-6684
CVE-2016-6684

An information disclosure vulnerability in Sync could enable a local
malicious application to access data outside of its permission levels.
The format specifier %p can leak kernel addresses while not valuing
the kptr_restrict system settings.
The fix is designed to use %pK instead of %p, which also evaluates
whether kptr_restrict is set.

Change-Id: I6d52a4d6193770b3fa1479a1086a5d73a210de07
Signed-off-by: Jian Qiu <qiujian@rock-chips.com>
2018-07-30 16:33:06 +08:00
Huibin Hong
882829d5bf Bluetooth: hci_ldisc: fix race between open, close and send data
Fix the bug below, it may be reproduced after open and close bt about 7000 times:

<1>[73036.938137] Unable to handle kernel NULL pointer dereference at virtual address 0000001c
<1>[73036.939316] pgd = ffffff800886d000
<1>[73036.939627] [0000001c] *pgd=000000000fffe003, *pud=000000000fffe003, *pmd=0000000000000000
<0>[73036.940396] Internal error: Oops: 96000006 [#1] PREEMPT SMP
<4>[73036.940899] Modules linked in:
<4>[73036.941193] CPU: 2 PID: 2989 Comm: kworker/2:2 Not tainted 4.4.138 #3
<4>[73036.942409] Workqueue: events hci_uart_write_work
<4>[73036.942836] task: ffffffc00d688ac0 task.stack: ffffffc00b184000
<4>[73036.943365] PC is at _raw_spin_lock_irqsave+0x1c/0x50
<4>[73036.943815] LR is at skb_dequeue+0x20/0x74
<4>[73036.944185] pc : [<ffffff8008576398>] lr : [<ffffff800840f9a4>] pstate: 800001c5
<4>[73036.944832] sp : ffffffc00b187d00
<4>[73036.945127] x29: ffffffc00b187d00 x28: 0000000000000000
<4>[73036.945620] x27: 0000000000000000 x26: 0000000000000000
<4>[73036.946114] x25: ffffffc00e1280e0 x24: ffffffc00038d000
<4>[73036.946606] x23: ffffffc00e1271f8 x22: ffffffc00e127f00
<4>[73036.947099] x21: 000000000000001c x20: 0000000000000008
<4>[73036.947592] x19: 0000000000000000 x18: 0000000000000000
<4>[73036.948086] x17: 0000007fade08530 x16: ffffff80080e308c
<4>[73036.948579] x15: 0000000000000000 x14: 65736f6c63207568
<4>[73036.949073] x13: 205d303537373339 x12: 2e36333033375b0a
<4>[73036.949566] x11: 3220746e63666572 x10: 00000000000006f0
<4>[73036.950060] x9 : ffffffc00b187d30 x8 : ffffffc00d689210
<4>[73036.950553] x7 : 0000000000002d31 x6 : 0000000000000400
<4>[73036.951046] x5 : 0000000000113d82 x4 : 0000000000002f32
<4>[73036.951539] x3 : 0000000000000140 x2 : ffffffc00d688ac0
<4>[73036.952032] x1 : 0000000000000001 x0 : 000000000000001c
<4>[73037.068289] [<ffffff8008576398>] _raw_spin_lock_irqsave+0x1c/0x50
<4>[73037.068858] [<ffffff8008377094>] h4_dequeue+0x14/0x1c
<4>[73037.069335] [<ffffff8008376924>] hci_uart_write_work+0x50/0x12c
<4>[73037.069893] [<ffffff80080abbc8>] process_one_work+0x1b0/0x294
<4>[73037.070426] [<ffffff80080ac920>] worker_thread+0x2d8/0x398
<4>[73037.070935] [<ffffff80080b0f28>] kthread+0xc8/0xd8
<4>[73037.071388] [<ffffff8008082e80>] ret_from_fork+0x10/0x50

	thread0               		thread1
	   |				   |
	hci_uart_tty_close		hci_uart_write_work
	   |				   |
	h4_close			h4_dequeue
	   |				   |
	free (h4_struct) h4		   |
	   |             _raw_spin_lock_irqsave access h4 null pointer

Change-Id: I61d8ad5fb4c9349e0a304d2e87332681240f22e2
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2018-07-30 14:09:04 +08:00
xiaoyao
5444d248aa ARM: dts: rockchip: wireless-wlan support ext clk for rk3308-voice-module-mainboard-v10-aarch32
Change-Id: I13bf086f7b8f58606609e16e3ce0acac13f6dbc1
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2018-07-27 17:22:20 +08:00
xiaoyao
b906edb495 net: wifi: clk: rk3308: Add external clock instead of crystal vibration
Change-Id: Iadc3c1976fe09060308cca9bde11f4fab5fd47e2
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
2018-07-27 17:20:38 +08:00
William Wu
41ff4d6b62 usb: dwc2: gadget: fix frame overrun issue
The frame_overrun flag is used to indicates
SOF number (current_frame) overrun in DSTS
and the target_frame over DSTS_SOFFN_LIMIT.

Clear the frame_overrun flag only if target_frame
below DSTS_SOFFN_LIMIT and current_frame less
than target_frame.

Change-Id: I91cf9001324a9bbbcc4bc28b335695d607fb69d4
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-27 17:19:06 +08:00
William Wu
504c382d1c usb: gadget: f_uac1: set period size and buffer size
The default period size is only 64 frames, this
will cause usb audio playback with noise via
internal audio codec. This patch sets the period
size to (snd->rate / 10), and also sets the buffer
size to snd->rate.

Change-Id: I4a4eb1b4dd79aec65f5c44eacd8a2fa101dfbd1b
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-27 17:18:48 +08:00
William Wu
1d162b6ce6 usb: gadget: f_uac1: disable ep in f_audio_disable()
The f_audio_disable() doesn't disable usb ep, and
this cause usb enumeration fail. So add usb ep
disable operation.

This patch also reinitializes the opts->bound flag
to false in f_audio_free(), and then it can setup
ALSA audio device again in f_audio_bind().

Change-Id: I7b10630f5085b1a03792bc4b9e7eabb02d2bd5a2
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-27 17:17:09 +08:00
William Wu
e46fe08c85 usb: dwc2: add pm runtime support
Adds pm_runtime support for dwc2, so that power domain is
enabled only when there is a transaction going on to help
save power.

Change-Id: I318552774d20eeaed521ff179f99b2551ee24183
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-07-27 15:19:06 +08:00
Xing Zheng
85a3a104a2 arm64: dts: rockchip: rk3308-evb: switch to multicodecs for bluetooth_sound
Dues to the loading order of multiple sound cards is
not constant, we need to specify bluetooth pcm sound
as the slave card via 'rockchip,wait-card-locked'
property. It looks like this:

========
From
[    1.180441] ALSA device list:
[    1.180458]   #0: rockchip,rk3308-pcm
[    1.180467]   #1: rockchip,rk3308-vad

To
[    1.175590] ALSA device list:
[    1.175606]   #0: rockchip,rk3308-vad
[    1.175614]   #1: rockchip,rk3308-pcm
========

Change-Id: Ic4d7625ca3b06106a317a59defcc45bab190ae95
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-27 14:59:05 +08:00
Xing Zheng
94b7e1a99e ASoC: rockchip: add property 'rockchip,wait-card-locked'
Change-Id: I6c81abfe3f57c5db8c547c74929202bd7484ca9a
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-27 14:57:40 +08:00
Xing Zheng
49950d606a ASoC: rockchip: multicodecs: add support property 'rockchip,wait-card-locked'
Some times, we would like to specify the order of
loading sound card, and can use this property to
wait other sound cards are locked. Therefore, this
sound card with the property should be slave card.

Change-Id: I3dcd77a527ad902a5a3c00bcce2c81cf6e782549
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-27 14:56:50 +08:00
Liang Chen
d6742a2bf1 cpufreq: rockchip: correct the offset of bin flag in efuse for rk3288w
Change-Id: I15154876e3b54d64b63c9659cfe2548d19ccb7a9
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-07-27 14:52:39 +08:00
Xing Zheng
533311c112 ASoC: rockchip: update properties for daifmt
Change-Id: Id10b0280c43f941f81afaa8b979903053975f7f9
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-27 14:48:56 +08:00
Xing Zheng
97555c6a0a ASoC: rockchip: multicodecs: add support sound daifmt
This patch supports parse sound daifmt dynamically.

Change-Id: I63761499dd9e1c16a84a1aba8a04e6dff67a70cc
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-27 14:48:45 +08:00
Hu Kejun
6bd928b249 media: rk-isp10: update to v0.2.0
Change-Id: I81dbc96a5464a266fbb5adc753a18f433fa58bc7
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-27 11:33:53 +08:00
Hu Kejun
bdf361007e media: rk-isp10: fix the issue cannot set exposure by mp path device
Change-Id: Id057859035356b52e9538df14b908ca631df836c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-27 11:33:53 +08:00
Hu Kejun
6ac96e1bec media: rk-isp10: get correct isp out width/height
Change-Id: I7d5b9fae16c56ebe108673ba46faa10d9a962b10
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-27 11:33:53 +08:00
Hu Kejun
12a0f8c529 media: rk-isp10: support stream on/off/on/off...
Change-Id: Ia4683924cfdd5cdc3b15ff3cef1a78b36cb6420f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-27 11:33:53 +08:00
Hu Kejun
018f73607d media: rk-isp10: add check of iommu status
Change-Id: I31057963bff7d51ef0c208b5cc24797f4384e59f
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-27 11:33:53 +08:00
huweiguo
69b01aa897 mac80211: add p2p interface
Change-Id: Id17f68b9ccae0e216dd1892a3a841c3fe2e03acd
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2018-07-27 11:17:35 +08:00
Weiguo Hu
e654e0bd6a net: wireless: rockchip_wlan: ssv6051 solve parser-conf.sh permission problem
Change-Id: I57853c091246cc7664568b79f6efb807d076e48c
Signed-off-by: Weiguo Hu <hwg@rock-chips.com>
2018-07-27 11:09:24 +08:00
Xing Zheng
48cd822978 ARM: dts: rockchip: rk3308-voice-module: enable 200ms delay play property
Due to the PA CS8509 on rk3308 voice module startup time
is ~200ms, we need to hold it some times, avoid lossing
audio data during start playback.

Change-Id: I44ac3caa0ceddbe7720d8eb63179ae56baa168a9
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-26 18:48:52 +08:00
Xing Zheng
5693bc3e7e ASoC: rk3308_codec: add 'rockchip,delay-start-play-ms' property
Change-Id: I7e2c6737899bb44ccf453a68ae5ca20335d513b1
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-26 18:48:52 +08:00
Xing Zheng
4f4d129d68 ASoC: rk3308_codec: add support 'rockchip,delay-start-play-ms' property
It may be that many amplifiers have a long startup delay.
If the playback is too early before the amplifier is
turned on and stable, it may cause loss of audio data.
Therefore, we need to delay playback according to
different amplifier performance.

Change-Id: I7d54f89217df560a68c080e82313eb2399d44b0a
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-07-26 18:48:52 +08:00
Jianqun Xu
d6f0e7b388 ARM64: rockchip: rk3399 reorder codes in rk3399-cdn-dp
Sync with upstream codes.

Change-Id: Ic5306bdf16125e46892b5a85339afec67ad85482
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-07-26 18:41:37 +08:00
Jianqun Xu
6bc17c0755 ARM64: dts: rockchip: rk3399 reorder nodes
Sync with upstream

Change-Id: I24aa7e127c21d1b4f2516a70b6d2c27339da0bbc
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-07-26 15:44:39 +08:00
Tao Huang
2fc8501e44 Revert "ARM: dma-mapping: silence warning if atomic_pool_size=0"
This reverts commit 234d421421.
We do not use coherent_pool=0 anymore.

Change-Id: I3b05f15955c8f4b156cf8a4dfd8c0977e33a24b9
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-07-26 15:25:04 +08:00
Tao Huang
d97bada31e ARM: rk3308_linux_aarch32[_debug]_defconfig: coherent_pool=4k
If coherent_pool size is zero, kernel will panic when arm_dma_free.
It seems kernel do not like without atomic_pool, so keep this pool
as small as possible.

Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = deb70000
[00000004] *pgd=1e571835, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP THUMB2
Modules linked in:
CPU: 2 PID: 674 Comm: sh Not tainted 4.4.138 #187
Hardware name: Generic DT based system
task: deb89540 task.stack: df37a000
PC is at addr_in_gen_pool+0x10/0x3c
LR is at addr_in_gen_pool+0xf/0x3c
pc : [<c0154b24>]    lr : [<c0154b23>]    psr: 00000033
sp : df37be80  ip : df37a07c  fp : 000686ec
r10: debc6f48  r9 : 1e406000  r8 : 00000000
r7 : e091d000  r6 : e091d000  r5 : e091efff  r4 : 00000000
r3 : 00000001  r2 : deb89540  r1 : e091d000  r0 : 00000000
[<c0154b24>] (addr_in_gen_pool) from [<c0064a55>] (arch_free_from_atomic_pool+0x19/0x54)
[<c0064a55>] (arch_free_from_atomic_pool) from [<c0064ae3>] (__arm_dma_free+0x53/0xb0)
[<c0064ae3>] (__arm_dma_free) from [<c0064b61>] (arm_dma_free+0xf/0x12)
[<c0064b61>] (arm_dma_free) from [<c017f1a7>] (serial8250_release_dma+0x71/0xd2)
[<c017f1a7>] (serial8250_release_dma) from [<c017dda1>] (serial8250_do_shutdown+0x23/0x98)
[<c017dda1>] (serial8250_do_shutdown) from [<c017ad6b>] (uart_shutdown+0x87/0xba)
[<c017ad6b>] (uart_shutdown) from [<c017b543>] (uart_close+0x8b/0x116)
[<c017b543>] (uart_close) from [<c0174539>] (tty_release+0x20d/0x318)
[<c0174539>] (tty_release) from [<c00db5af>] (__fput+0x8b/0x120)
[<c00db5af>] (__fput) from [<c007b83b>] (task_work_run+0x6b/0x7c)
[<c007b83b>] (task_work_run) from [<c005f551>] (do_work_pending+0x65/0x66)
[<c005f551>] (do_work_pending) from [<c005d301>] (slow_work_pending+0x9/0x18)

Change-Id: If3fc962e4e936132fee021f5e6932cdabfd5ffda
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-07-26 15:24:36 +08:00
Hu Kejun
cb6cdc8c7d media: rk-isp10: fix compile warning
Change-Id: Ie4c1c04d20d53528430dbde33920bbe340e2b926
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-07-26 14:23:03 +08:00
Brian Norris
300437d7dc UPSTREAM: arm64: dts: rockchip: Arch counter doesn't tick in system suspend
The "arm,no-tick-in-suspend" property was introduced to note
implementations where the system counter does not quite follow the ARM
specification that it "must be implemented in an always-on power
domain".

Particularly, RK3399's counter stops ticking when we switch from the
24MHz clock to the 32KHz clock in low-power suspend, so let's mark it as
such.

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
(cherry picked from commit e6186820a7)

Change-Id: Ib1d54426c985235ba0a383012a6e4437a9fae80c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-07-26 14:17:16 +08:00
Masahiro Yamada
a2938f6042 UPSTREAM: arm64: dts: drop "arm,amba-bus" in favor of "simple-bus" part 2
Tree-wide replacement was done by commit 2ef7d5f342 (ARM, ARM64:
dts: drop "arm,amba-bus" in favor of "simple-bus"), but we have some
new users of "arm,amba-bus" at Linux 4.7-rc1.  Eliminate them now.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
(cherry picked from commit 15b7cc78f0)

Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Conflicts:
	arch/arm64/boot/dts/lg/lg1312.dtsi

Change-Id: I249c73ade56946fa0548b9f36889abaa7e77d3df
2018-07-26 14:11:15 +08:00
huweiguo
ad56b4cbe8 arm: dts: rk3128h-box: add ssv6051 wifi
Change-Id: Ice915d2ad532eead129627a410f23ea2f0f290be
Signed-off-by: huweiguo <hwg@rock-chips.com>
2018-07-26 11:27:42 +08:00
huweiguo
101d35e3f6 arm: rockchip_defconfig: add ssv6051
Change-Id: I1746973993b4c8980036e305fcdada1afefe4ddb
Signed-off-by: huweiguo <hwg@rock-chips.com>
2018-07-26 11:27:42 +08:00
Jianqun Xu
b99697297f ARM64: dts: rockchip: rk3399 sync codes with upstream
Change-Id: Idcefe76d4b823593a7f316e0e24d740ead46c7a0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-07-26 11:03:07 +08:00
Jianqun Xu
639880b498 ARM64: dts: rockchip: rk3399 efuse node sync with upstream
Modify "efuse_id" to "cpu_id"

Change-Id: Iac229325d611c2db86b075eb47d6fe84dbbc0020
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-07-26 09:39:57 +08:00
Caesar Wang
bda0252702 UPSTREAM: arm64: dts: rockchip: update dynamic-power-coefficient for rk3399
This patch updates the dynamic-power-coefficient for big cluster on
rk3399 SoCs.

The dynamic power consumption of the CPU is proportional to the square of
the Voltage (V) and the clock frequency (f). The coefficient is used to
calculate the dynamic power as below -
Pdyn = dynamic-power-coefficient * V^2 * f
Where Voltage is in uV, frequency is in MHz.

As the following is the tested data on rk3399's big cluster.
frequency(MHz)  Voltage(V)  Current(mA) Dynamic-power-coefficient
24              0.8         15
48              0.8         23          ~417
96              0.8         40          ~443
216             0.8         82          ~438
312             0.8         115         ~430
408             0.8         150         ~455
So the dynamic-power-coefficient average value is about 436.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>

Conflicts:
	arch/arm64/boot/dts/rockchip/rk3399.dtsi

Change-Id: I05a573eb7e0a74301f35fdeb2517f7fe3be9b8fb
2018-07-26 09:36:00 +08:00