Marek Vasut [Wed, 25 May 2016 22:40:05 +0000 (00:40 +0200)]
UPSTREAM: net: arc: trivial: Replace comma with a semicolon
Fix a typo in the driver, replace comma with a semicolon at the end
of statement. While using comma is a legal C here and probably does
not even generate compiler warning, it was unlikely the intention.
Change-Id: I087d867b24a96d0c6c1fecd7065f4ee5cc86611c
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Caesar Wang <wxt@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
3424d9be8f09649e6290d066c5c3cccff1c0ce77)
Caesar Wang [Mon, 14 Mar 2016 08:01:55 +0000 (16:01 +0800)]
UPSTREAM: net: arc: trivial: cleanup the emac driver
This patch will make the driver more readability
The emac has the error and warnings if you run
'scripts/checkpatch.pl -f --subjective xxx' to check.
Let's clean up such trivial details.
Change-Id: Iecdd4afc6aab8bd5cce1440a70d53a1c31442335
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from git.kernel.org next/linux-next.git master
commit
663713eb477b9b916426124d6f5d5c5e9db919cf)
Caesar Wang [Mon, 14 Mar 2016 08:01:54 +0000 (16:01 +0800)]
UPSTREAM: net: arc_emac: support the phy reset for emac driver
This patch adds to support the emac phy reset.
Different boards may require different phy reset duration. Add property
phy-reset-duration for emac driver, so that the boards that need
a longer reset duration can specify it in their device tree.
Change-Id: I2a3f1b50e685251d4a6d61390c0c6dd63119f134
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from git.kernel.org next/linux-next.git master
commit
1bddd96cba03da0a14b3e5144e98c9a6ff17e983)
Alexander Kochetkov [Tue, 9 Feb 2016 15:20:40 +0000 (18:20 +0300)]
UPSTREAM: net: arc_emac: fix sk_buff leak
EMAC could be disabled, while there is some sb_buff
in use. That buffers got lost for linux.
In order to reproduce run on device during active ethernet work:
ifconfig eth0 down
Change-Id: I7bc8b140be0ea378bc63fd11c026dbaee3f4d042
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
b530b16413b7f99977ded50a3c4bebd2ea79c41b)
Alexander Kochetkov [Tue, 9 Feb 2016 15:20:39 +0000 (18:20 +0300)]
UPSTREAM: net: arc_emac: reset txbd_curr and txbd_dirty pointers to zero
EMAC reset internal tx ring pointer to zero at statup.
txbd_curr and txbd_dirty can be different from zero.
That cause ethernet transfer hang (no packets transmitted).
In order to reproduce, run on device:
ifconfig eth0 down
ifconfig eth0 up
Change-Id: Ie37cbd4761f8df216b2ddc5d07c0d6f036ac7092
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
99f93a156a2aa9ac1e44f7cb1a197425e6d9879a)
Alexander Kochetkov [Tue, 9 Feb 2016 15:20:38 +0000 (18:20 +0300)]
UPSTREAM: net: arc_emac: fix koops caused by sk_buff free
There is a race between arc_emac_tx() and arc_emac_tx_clean().
sk_buff got freed by arc_emac_tx_clean() while arc_emac_tx()
submitting sk_buff.
In order to free sk_buff arc_emac_tx_clean() checks:
if ((info & FOR_EMAC) || !txbd->data)
break;
...
dev_kfree_skb_irq(skb);
If condition false, arc_emac_tx_clean() free sk_buff.
In order to submit txbd, arc_emac_tx() do:
priv->tx_buff[*txbd_curr].skb = skb;
...
priv->txbd[*txbd_curr].data = cpu_to_le32(addr);
...
... <== arc_emac_tx_clean() check condition here
... <== (info & FOR_EMAC) is false
... <== !txbd->data is false
...
*info = cpu_to_le32(FOR_EMAC | FIRST_OR_LAST_MASK | len);
In order to reproduce the situation,
run device:
# iperf -s
run on host:
# iperf -t 600 -c <device-ip-addr>
[ 28.396284] ------------[ cut here ]------------
[ 28.400912] kernel BUG at .../net/core/skbuff.c:1355!
[ 28.414019] Internal error: Oops - BUG: 0 [#1] SMP ARM
[ 28.419150] Modules linked in:
[ 28.422219] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G B 4.4.0+ #120
[ 28.429516] Hardware name: Rockchip (Device Tree)
[ 28.434216] task:
c0665070 ti:
c0660000 task.ti:
c0660000
[ 28.439622] PC is at skb_put+0x10/0x54
[ 28.443381] LR is at arc_emac_poll+0x260/0x474
[ 28.447821] pc : [<
c03af580>] lr : [<
c028fec4>] psr:
a0070113
[ 28.447821] sp :
c0661e58 ip :
eea68502 fp :
ef377000
[ 28.459280] r10:
0000012c r9 :
f08b2000 r8 :
eeb57100
[ 28.464498] r7 :
00000000 r6 :
ef376594 r5 :
00000077 r4 :
ef376000
[ 28.471015] r3 :
0030488b r2 :
ef13e880 r1 :
000005ee r0 :
eeb57100
[ 28.477534] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 28.484658] Control:
10c5387d Table:
8eaf004a DAC:
00000051
[ 28.490396] Process swapper/0 (pid: 0, stack limit = 0xc0660210)
[ 28.496393] Stack: (0xc0661e58 to 0xc0662000)
[ 28.500745] 1e40:
00000002 00000000
[ 28.508913] 1e60:
00000000 ef376520 00000028 f08b23b8 00000000 ef376520 ef7b6900 c028fc64
[ 28.517082] 1e80:
2f158000 c0661ea8 c0661eb0 0000012c c065e900 c03bdeac ffff95e9 c0662100
[ 28.525250] 1ea0:
c0663924 00000028 c0661ea8 c0661ea8 c0661eb0 c0661eb0 0000001e c0660000
[ 28.533417] 1ec0:
40000003 00000008 c0695a00 0000000a c066208c 00000100 c0661ee0 c0027410
[ 28.541584] 1ee0:
ef0fb700 2f158000 00200000 ffff95e8 00000004 c0662100 c0662080 00000003
[ 28.549751] 1f00:
00000000 00000000 00000000 c065b45c 0000001e ef005000 c0647a30 00000000
[ 28.557919] 1f20:
00000000 c0027798 00000000 c005cf40 f0802100 c0662ffc c0661f60 f0803100
[ 28.566088] 1f40:
c0661fb8 c00093bc c000ffb4 60070013 ffffffff c0661f94 c0661fb8 c00137d4
[ 28.574267] 1f60:
00000001 00000000 00000000 c001ffa0 00000000 c0660000 00000000 c065a364
[ 28.582441] 1f80:
c0661fb8 c0647a30 00000000 00000000 00000000 c0661fb0 c000ffb0 c000ffb4
[ 28.590608] 1fa0:
60070013 ffffffff 00000051 00000000 00000000 c005496c c0662400 c061bc40
[ 28.598776] 1fc0:
ffffffff ffffffff 00000000 c061b680 00000000 c0647a30 00000000 c0695294
[ 28.606943] 1fe0:
c0662488 c0647a2c c066619c 6000406a 413fc090 6000807c 00000000 00000000
[ 28.615127] [<
c03af580>] (skb_put) from [<
ef376520>] (0xef376520)
[ 28.621218] Code:
e5902054 e590c090 e3520000 0a000000 (
e7f001f2)
[ 28.627307] ---[ end trace
4824734e2243fdb6 ]---
[ 34.377068] Internal error: Oops: 17 [#1] SMP ARM
[ 34.382854] Modules linked in:
[ 34.385947] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.4.0+ #120
[ 34.392219] Hardware name: Rockchip (Device Tree)
[ 34.396937] task:
ef02d040 ti:
ef05c000 task.ti:
ef05c000
[ 34.402376] PC is at __dev_kfree_skb_irq+0x4/0x80
[ 34.407121] LR is at arc_emac_poll+0x130/0x474
[ 34.411583] pc : [<
c03bb640>] lr : [<
c028fd94>] psr:
60030013
[ 34.411583] sp :
ef05de68 ip :
0008e83c fp :
ef377000
[ 34.423062] r10:
c001bec4 r9 :
00000000 r8 :
f08b24c8
[ 34.428296] r7 :
f08b2400 r6 :
00000075 r5 :
00000019 r4 :
ef376000
[ 34.434827] r3 :
00060000 r2 :
00000042 r1 :
00000001 r0 :
00000000
[ 34.441365] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 34.448507] Control:
10c5387d Table:
8f25c04a DAC:
00000051
[ 34.454262] Process ksoftirqd/0 (pid: 3, stack limit = 0xef05c210)
[ 34.460449] Stack: (0xef05de68 to 0xef05e000)
[ 34.464827] de60:
ef376000 c028fd94 00000000 c0669480 c0669480 ef376520
[ 34.473022] de80:
00000028 00000001 00002ae4 ef376520 ef7b6900 c028fc64 2f158000 ef05dec0
[ 34.481215] dea0:
ef05dec8 0000012c c065e900 c03bdeac ffff983f c0662100 c0663924 00000028
[ 34.489409] dec0:
ef05dec0 ef05dec0 ef05dec8 ef05dec8 ef7b6000 ef05c000 40000003 00000008
[ 34.497600] dee0:
c0695a00 0000000a c066208c 00000100 ef05def8 c0027410 ef7b6000 40000000
[ 34.505795] df00:
04208040 ffff983e 00000004 c0662100 c0662080 00000003 ef05c000 ef027340
[ 34.513985] df20:
ef05c000 c0666c2c 00000000 00000001 00000002 00000000 00000000 c0027568
[ 34.522176] df40:
ef027340 c003ef48 ef027300 00000000 ef027340 c003edd4 00000000 00000000
[ 34.530367] df60:
00000000 c003c37c ffffff7f 00000001 00000000 ef027340 00000000 00030003
[ 34.538559] df80:
ef05df80 ef05df80 00000000 00000000 ef05df90 ef05df90 ef05dfac ef027300
[ 34.546750] dfa0:
c003c2a4 00000000 00000000 c000f578 00000000 00000000 00000000 00000000
[ 34.554939] dfc0:
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 34.563129] dfe0:
00000000 00000000 00000000 00000000 00000013 00000000 ffffffff dfff7fff
[ 34.571360] [<
c03bb640>] (__dev_kfree_skb_irq) from [<
c028fd94>] (arc_emac_poll+0x130/0x474)
[ 34.579840] [<
c028fd94>] (arc_emac_poll) from [<
c03bdeac>] (net_rx_action+0xdc/0x28c)
[ 34.587712] [<
c03bdeac>] (net_rx_action) from [<
c0027410>] (__do_softirq+0xcc/0x1f8)
[ 34.595482] [<
c0027410>] (__do_softirq) from [<
c0027568>] (run_ksoftirqd+0x2c/0x50)
[ 34.603168] [<
c0027568>] (run_ksoftirqd) from [<
c003ef48>] (smpboot_thread_fn+0x174/0x18c)
[ 34.611466] [<
c003ef48>] (smpboot_thread_fn) from [<
c003c37c>] (kthread+0xd8/0xec)
[ 34.619075] [<
c003c37c>] (kthread) from [<
c000f578>] (ret_from_fork+0x14/0x3c)
[ 34.626317] Code:
e8bd8010 e3a00000 e12fff1e e92d4010 (
e59030a4)
[ 34.632572] ---[ end trace
cca5a3d86a82249a ]---
Change-Id: I4cf163c76cd59ba94c314507b9c636c782edd18a
Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
c278c253f3d992c6994d08aa0efb2b6806ca396f)
Xing Zheng [Fri, 8 Jan 2016 01:35:02 +0000 (09:35 +0800)]
UPSTREAM: net: ethernet: arc: Add support emac for RK3036
The RK3036's GRFs offset are different with RK3066/RK3188, and need to set
mac TX/RX clock before probe emac.
Change-Id: Ie1dd5412c1858f7db007a06122f055790fa6fe2f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
af72261f33ee4958bb53e299746014f44e1134c4)
Xing Zheng [Fri, 8 Jan 2016 01:35:01 +0000 (09:35 +0800)]
UPSTREAM: net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs
On the RK3066/RK3188, there was fixed GRF offset configuration to set emac
and fixed DIV2 mac TX/RX clock. So, we need to easily set and fit to other
SoCs (RK3036) which maybe have different GRF offset, and need adjust mac
TX/RX clock.
Change-Id: Ic130da39af5cc585974c9231f80472fa2a15a29b
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
f4c9d3ee0334fd9c6c8f2c3a8bd7d0841880e127)
Xing Zheng [Fri, 8 Jan 2016 01:35:00 +0000 (09:35 +0800)]
UPSTREAM: net: ethernet: arc: Probe emac after set RMII clock
After enter arc_emac_probe, emac will get_phy_id, phy_poll_reset and
other connecting PHY via mdiobus_read, so we need to set correct
ref clock rate for emac before probe emac.
Change-Id: Iffaa7a60efcfcadded803df7c0b20e5a2422d646
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from commit
c9bca2fe3ca6d6dac2a27eb8619955648369efed)
Addy Ke [Fri, 22 Jan 2016 11:06:46 +0000 (19:06 +0800)]
BACKPORT: dmaengine: pl330: add quirk for broken no flushp
This patch add "arm,pl330-broken-no-flushp" quirk to avoid execute
DMAFLUSHP if Soc doesn't support it.
Conflicts:
drivers/dma/pl330.c
(Note: Instead of the order with
"dmaengine: pl330: support burst mode for dev-to-mem and mem-to-dev transmit")
Change-Id: Ibec534f102147bb9ab7fc62045d474ad548595df
Signed-off-by: Addy Ke <addy.ke@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
cc: Doug Anderson <dianders@chromium.org>
cc: Heiko Stuebner <heiko@sntech.de>
cc: Olof Johansson <olof@lixom.net>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
271e1b86e69140fe65718ae8a264284c46d3129d)
Heiko Stuebner [Mon, 14 Mar 2016 08:01:59 +0000 (16:01 +0800)]
UPSTREAM: clk: rockchip: associate SCLK_MAC_PLL and disable reparenting on rk3036
The emac needs constant and very specific rate but the possible PLL-sources
are very limited, so we expect the PLL source to be set manually on per
board and don't want it to get changed in an automatic way later.
So add the necessary clock-id and disable reparenting on set_rate calls.
Change-Id: I999ba51df51fef50075eb119e3b976b990fe714c
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from git.kernel.org next/linux-next.git master
commit
2c6fae2501d87ca94b5249df38797f02d4e39add)
Xing Zheng [Mon, 14 Mar 2016 08:01:57 +0000 (16:01 +0800)]
UPSTREAM: clk: rockchip: associate the rk3036 HCLK_EMAC clock-id
Associate the new clock id the clock.
Change-Id: Ib67b0a61a125564a8efd43dab0350826080367a5
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Xing Zheng <zhengxing@rock-chips.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from git.kernel.org next/linux-next.git master
commit
e764b93924b47cd53b818c1cf8708a35bdfbb83d)
Heiko Stuebner [Wed, 27 Jan 2016 20:38:37 +0000 (21:38 +0100)]
UPSTREAM: clk: rockchip: fix parent of hclk_vcodec on rk3036
hclk_vcodec is a child of aclk_vcodec with the fixed factor clock
hclk_vcodec_pre in between and not a child of hclk_disp_pre.
Change-Id: I0298d0a1adef3cc0f9aa6e759947c8f90c4c252f
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
aebe3ad801ebbcd90b3649c24ae0e90d2db8bde8)
Yakir Yang [Fri, 15 Jan 2016 11:54:14 +0000 (19:54 +0800)]
UPSTREAM: clk: rockchip: rk3036: enable the CLK_IGNORE_UNUSED flag for hclk_vio_bus
HCLK_VIO_BUS is the noc bus controller clock for display module,
due to it shouldn't belong to any driver, but we need it enabled,
so just mark it as the CLK_IGNORE_UNUSED flag.
Change-Id: I041bb98d71ad7d5f04e92b44a6fef850c8007c47
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
ee16bbd289a63e3036d31dcd809e411e9a5dbd5d)
Xing Zheng [Thu, 7 Jan 2016 12:17:36 +0000 (20:17 +0800)]
UPSTREAM: clk: rockchip: rk3036: rename emac ext source clock
There is only support rmii in the RK3036, so we should use the correct
ext clock name as described in the TRM.
Change-Id: Idf1ba727690f364f7705f15a8dac1b570c773044
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
[update dt-binding document as well]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
01b4557d30e95c64cfdc96025e75207647524ec2)
Xing Zheng [Thu, 7 Jan 2016 12:17:35 +0000 (20:17 +0800)]
UPSTREAM: clk: rockchip: rk3036: fix the div offset for emac clock
Due to reference to old version TRM, there are incorrect emac clock node.
The SEL_21_9 is used for the parent div, the SEL_21_4 is used for the
child div.
Change-Id: Iac08a99fc8c5420e31e68520f24875b179e3665a
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
c40519350e1d7db03e35e57509352c55948648ba)
Xing Zheng [Thu, 7 Jan 2016 12:17:34 +0000 (20:17 +0800)]
UPSTREAM: clk: rockchip: rk3036: fix uarts clock error
Due to a copy-paste error the uart1 and uart2 clock div set
incorrect, fix it.
Change-Id: Ia15ba135eec824bb2e0f79e3a40c4bbfab544f11
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
b29de2de5049e064d172862b1feeddeb650c3ee8)
Xing Zheng [Thu, 7 Jan 2016 12:17:33 +0000 (20:17 +0800)]
UPSTREAM: clk: rockchip: rk3036: fix the FLAGs for clock mux
The DFLAGS are used for the clock dividers, the CLKSEL_CON flags
of COMPOSITE_NODIV type should be MFLAGS.
Change-Id: Ieca6e3a982487799e546e3537ce1f94471f71738
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
(cherry picked from git.kernel.org next/linux-next.git master
commit
99222c9e4de7feb22c93b19a92b35fcdad73ed42)
Yakir Yang [Wed, 16 Dec 2015 08:27:18 +0000 (16:27 +0800)]
UPSTREAM: clk: rockchip: rk3036: enable the CLK_IGNORE_UNUSED flag for aclk_vio
ACLK_VIO is the noc bus clock for display module, display cann't
read data from ddr without this clock enabled.
Due to it shouldn't belong to any driver, but we need it enabled,
so just mark it as the CLK_IGNORE_UNUSED flag.
Change-Id: Icd9742e3741bb460e530a4704f1719837c8292bd
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org next/linux-next.git master
commit
2abc02fc494fa4c920a08a1d0beecabafbcb2104)
Xing Zheng [Mon, 14 Mar 2016 08:01:58 +0000 (16:01 +0800)]
UPSTREAM: clk: rockchip: add clock-id for rk3036 emac pll source clock
Suitable PLLs for the emac on the rk3036 are difficult to find
and one of them is the (continuously changing) APLL. So in most
cases it will be necessary to select a PLL manually.
So add a clock-id for it.
Change-Id: Ic7e1c870744342c282ba2d86ae61650476b336e1
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Xing Zheng <zhengxing@rock-chips.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from git.kernel.org next/linux-next.git master
commit
f7e180222b973a0b363564b281a314276cb2b594)
Xing Zheng [Mon, 14 Mar 2016 08:01:56 +0000 (16:01 +0800)]
UPSTREAM: clk: rockchip: add node-id for rk3036 emac hclk
Add the node-id for the emac hclk to the binding header.
Change-Id: I985b5eae1276f3393536fa59b1821eff6ccc154b
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Cc: Xing Zheng <zhengxing@rock-chips.com>
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from git.kernel.org next/linux-next.git master
commit
fb781c8e2a370d67acf7b8a8826e6f5e3ae1d7c6)
Caesar Wang [Mon, 30 May 2016 06:28:11 +0000 (14:28 +0800)]
ARM: dts: rk3036: remove the old rk3036 dts
The original rk3036.dtsi is suit for the kernel 3.10 develop,
So I should remove or rename it with insteading of upstream dts.
Change-Id: Ib45129573c5a6240a9f356be98186946a61b3f3f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
chenzhen [Thu, 14 Apr 2016 02:17:36 +0000 (10:17 +0800)]
MALI: rockchip: not to use sg_dma_len in midgard ddk r11p0-00rel0
When CONFIG_NEED_SG_DMA_LENGTH is enabled,
sg_dma_len is defined as follow :
"#define sg_dma_len(sg) ((sg)->dma_length)"
But, dma_length is not used by the framework indeed.
Change-Id: I51d1adf9f2738b1036fdaf6172ae932c007fac76
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
chenzhen [Tue, 5 Apr 2016 08:53:38 +0000 (16:53 +0800)]
MALI: rockchip: upgrade midgard DDK to r11p0-00rel0
Conflicts:
drivers/gpu/arm/midgard/mali_kbase_core_linux.c
drivers/gpu/arm/midgard/mali_kbase_jd.c
Change-Id: I9c910f2b08ffd2e9101fbe85958030ac7bca1642
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
chenzhen [Fri, 19 Feb 2016 08:58:15 +0000 (16:58 +0800)]
MALI: rockchip: upgrade midgard DDK to r9p0-05rel0
Conflicts:
drivers/gpu/arm/midgard/Kconfig
Change-Id: Ib7975ebe959624bedd92f126768987f2e2f0f84b
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
chenzhen [Mon, 30 May 2016 12:48:16 +0000 (20:48 +0800)]
ARM64: rockchip_cros_defconfig: remove Rogue of G6110 GPU
Change-Id: Idfb8c61a5734e36731f2c9ba192bbb160301e701
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
Shawn Lin [Fri, 27 May 2016 07:42:35 +0000 (15:42 +0800)]
mmc: dw_mmc: check card present before starting request
The main reason to add this check is to avoid unnecessary
mmc_request like the on-going cmd and the corresponding sbc
if the card is removed. Although we have already checked this in
dw_mci_handle_cd for runtime usage of sd card and dw_mci_init_slot
for noremovable devices, but there is a timing gap before it really
calls dw_mci_get_cd as mmc_detect_change needs some delay here.
Another gain here is that we could save some checkings of card status
after sd card been removed.
Change-Id: Iea741c1c72985fbe078f48da3796bddcab816e66
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Fri, 27 May 2016 07:40:08 +0000 (15:40 +0800)]
mmc: dw_mmc: remove redundant of set_bit and clear_bit
dw_mci_get_cd have already dealt with these for
both of internal card-detect and gpio card-detect.
Change-Id: I59eb591d2dace127bae3520d7920056d704ed1e6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Fri, 27 May 2016 07:37:21 +0000 (15:37 +0800)]
mmc: dw_mmc-rockchip: add MMC_CAP_CMD23 capabilities
Add MMC_CAP_CMD23 for dw_mmc-rockchip, otherwise
failing to create rpmb partition. With it, we can
get rpmb successfully:
mmc1: new HS200 MMC card at address 0001
mmcblk0: mmc1:0001 DS2016 14.7 GiB
mmcblk0boot0: mmc1:0001 DS2016 partition 1 4.00 MiB
mmcblk0boot1: mmc1:0001 DS2016 partition 2 4.00 MiB
mmcblk0rpmb: mmc1:0001 DS2016 partition 3 4.00 MiB
Change-Id: I19cdb2d31ee8c864125c2bd197e38cf21b84e25f
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Shawn Lin [Fri, 27 May 2016 07:35:40 +0000 (15:35 +0800)]
mmc: dw_mmc: Consider HLE errors to be data and command errors
The dw_mmc driver enables HLE errors as part of DW_MCI_ERROR_FLAGS but
nothing in the interrupt handler actually handles them and ACKs them.
That means that if we ever get an HLE error we'll just keep getting
interrupts and we'll wedge things.
We really don't expect HLE errors but if we ever get them we shouldn't
silently ignore them.
Note that I have seen HLE errors while constantly ejecting and
inserting cards (ejecting while inserting, etc).
Change-Id: I95fcc4e2d657572b365980794bb941ea39403699
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Fri, 27 May 2016 06:57:25 +0000 (14:57 +0800)]
mmc: core: Fix HS switch failure in mmc_select_hs400
We should change HS400 mode selection timing to meet JEDEC
specification. The JEDEC 5.1 said that change the frequency to <= 52MHZ
after HS_TIMING switch. Refer to section 6.6.2.3 "HS400" timing mode
selection:
Set the "Timing Interface" parameter in the HS_TIMING[185] field of the
Extended CSD register to 0x1 to switch to High Speed mode and then set
the clock frequency to a value not greater than 52MHZ.
Change-Id: Ia676b8e3ea4a66867372c9719d768a6d4405ff15
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Fri, 27 May 2016 06:54:50 +0000 (14:54 +0800)]
mmc: core: don't check card status when flushing cache
It's meaningless to check the card's status which execute
the on-going flush. As the status been responsed make no
any sense here.
Change-Id: I34197d1c93c01337dd2e68ec22e3ce8dd195c424
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Tue, 10 May 2016 04:11:16 +0000 (12:11 +0800)]
mmc: core: keep consistent with upstream
Manually merge hs400es from upstream to avoid
too much rework.
Change-Id: I69821c866ba38ead929f437a16618694d92d470c
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Elaine Zhang [Fri, 27 May 2016 10:35:09 +0000 (18:35 +0800)]
ARM64: dts: rk3399: pd: Add gpu pd nodes
Change-Id: I7f89e721f93a750676aab966e400a4b522992cfc
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Elaine Zhang [Fri, 27 May 2016 08:30:54 +0000 (16:30 +0800)]
ARM64: dts: rk3399: pd: Add vopl\vopb\mipi\hdmi pd nodes
Change-Id: Iff66cf997896d34111706f884a32e82f44e21d6f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Elaine Zhang [Fri, 27 May 2016 02:53:09 +0000 (10:53 +0800)]
ARM64: dts: rk3399: pd: enable the pd node by default
1 Remove pd_center because the ddr not allowed to power off the pd_center.
2 If the driver not used the pd. the pd will be offed after genpd init complete.
(pd disable unused)
Change-Id: I66db4df1835a48e3c0f96019bb727994e2516af9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Frank Wang [Tue, 3 May 2016 07:50:42 +0000 (15:50 +0800)]
ARM64: rockchip_defconfig: enable Rockchip Inno usb2phy driver
Change-Id: Ib756e79dac8be3b509f261818ce8e1dc5bd41309
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Frank Wang [Fri, 29 Apr 2016 03:37:01 +0000 (11:37 +0800)]
ARM64: dts: rockchip: rk3366: support for the usb2phy driver
Change-Id: I0f4b09a41d249997f4c881238101a94a48fd737d
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Frank Wang [Thu, 28 Apr 2016 07:43:16 +0000 (15:43 +0800)]
phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy
The newer SoCs (rk3366, rk3399) take a different usb-phy IP block (INNO)
than rk3288 and before, meanwhile, most of phy-related registers are also
different from the past, so a new phy driver is required necessarily.
Change-Id: I32320fd516af146ef9b7816d5b167e1b682a659b
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Frank Wang [Thu, 28 Apr 2016 06:31:30 +0000 (14:31 +0800)]
Documentation: bindings: add DT documentation for Rockchip USB2PHY
Change-Id: I67f4612e95279fabe30aa63f803cd83921b04bd7
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Huang, Tao [Mon, 30 May 2016 06:24:17 +0000 (14:24 +0800)]
Merge tag 'lsk-v4.4-16.05-android'
LSK 16.05 v4.4-android
Rocky Hao [Mon, 30 May 2016 01:53:29 +0000 (09:53 +0800)]
ARM64: dts: rockchip: enable tsadc node for rk3366-tb
Set status of tsadc node to "okay" to make tsadc work.
Change-Id: I741adc9ce611f6f0f279fbb351dfaa5fc947db06
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
Rocky Hao [Thu, 10 Mar 2016 10:51:27 +0000 (18:51 +0800)]
arm64: dts: rockchip: add tsadc node and the IPA parameters for rk3366 thermal
according to our testing results, added the ipa parameters for both cpu
and gpu.
for now,the gpu thermal zone is used only to get the gpu's temperature.
Change-Id: I14274c0b2d7645d08f37d918ddb415ac49ed0d9e
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
Xing Zheng [Wed, 25 May 2016 08:51:56 +0000 (16:51 +0800)]
UPSTREAM: clk: rockchip: add a dummy clock for the watchdog pclk on rk3399
Like rk3288, the pclk supplying the watchdog is controlled via the
SGRF register area. Additionally the SGRF isn't even writable in
every boot mode.
But still the clock control is available and in the future someone
might want to use it. Therefore define a simple clock for the time
being so that the watchdog driver can read its rate.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from commit git.kernel.org mmind/linux-rockchip.git
volatile-v4.8-clk/next
e3d86c1a2295184374cf25cdb525e68a93b0ff90)
Change-Id: I616846d389d324be529966c63820e8707c7d428f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Xing Zheng [Thu, 26 May 2016 13:49:08 +0000 (21:49 +0800)]
UPSTREAM: clk: rockchip: fix cpuclk registration error handling
It maybe due to a copy-paste error the error handing should be
cclk not clk when checking if the cpuclk registration succeeded.
Reported-by: Lin Huang <lin.huang@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git
v4.7-clk/fixes commit
df43cf8f1c116f26fcfd89ce9b1119929c732597)
Change-Id: I7d21808194c914e9117c498309e4b69861799318
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Rocky Hao [Thu, 26 May 2016 05:01:17 +0000 (13:01 +0800)]
ARM64: config: rockchip_defconfig: make ipa work as default config
Change-Id: Ib82b0102b9b14aeb1f44e60f12451cac32b75acc
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
Rocky Hao [Thu, 26 May 2016 04:48:33 +0000 (12:48 +0800)]
arm64: dts: rockchip: add the IPA needed parameters for rk3399 thermal
according to our testing results, added the ipa parameters for both cpu
big cores and cpu little cores, and updated the parameters for gpu.
for now,the gpu thermal zone is used only to get the gpu's temperature.
Change-Id: Ifc7708de9d880e0f9cd5da0bb71a135b0c381b45
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
David Wu [Thu, 26 May 2016 06:03:15 +0000 (14:03 +0800)]
ARM64: dts: rockchip: add pstore node for rk3366-tb
Change-Id: I7120fe883faa60d95ad1c93e6bbb774116bdcbef
Signed-off-by: David Wu <david.wu@rock-chips.com>
xuhuicong [Wed, 25 May 2016 11:15:27 +0000 (19:15 +0800)]
video: rockchip: hdmi: add power domain control
grf_soc_con20 will be reset when vio pd close, so we have to
set hdmi source everytime wake up
Change-Id: I84597265238c1d3057002aad63a0f9b64b99f704
Signed-off-by: xuhuicong <xhc@rock-chips.com>
xubilv [Tue, 24 May 2016 03:29:22 +0000 (11:29 +0800)]
video: rockchip: mipi: add dual mipi support
Change-Id: I03ad19d66dc2ee7bd926b01023425fed489ab944
Signed-off-by: xubilv <xbl@rock-chips.com>
Huang Jiachai [Wed, 30 Mar 2016 07:21:43 +0000 (15:21 +0800)]
video: rockchip: fb: add parse screen physical size
Change-Id: I98ad62b55d268150ff256407b6bdf06a8ad14a37
Signed-off-by: Huang Jiachai <hjc@rock-chips.com>
Elaine Zhang [Wed, 25 May 2016 06:35:42 +0000 (14:35 +0800)]
ARM64: dts: rk3399: clk: set armclkb 816M when clk init
set armclkb 816M to slove the crash,which reset core voltage below 0.85V.
So make sure the 0.8V voltage is enough for the init clk freq.
Change-Id: I4dba25fdfd610c0751f50ce09283c32a9b3f420f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Sugar Zhang [Tue, 24 May 2016 03:47:46 +0000 (11:47 +0800)]
UPSTREAM: ASoC: rockchip: i2s: rename I2S_CKR_TRCM_TX/RXSHARE to I2S_CKR_TRCM_TX/RXONLY
this patch make it more reasonable and readable, because when we chose
I2S_CKR_TRCM_TXONLY, we only output clk_lrck_tx, and hardware need to
confirm this signal is wired to external codec lrck_tx/rx at the same time.
for convenience, we just handle lrck_txonly if we enable symmetric_rates
in driver and dai_link. otherwise, we use the separate lrck_tx/rx.
Change-Id: I383c34d2337715148566f7e2ada367f2ee279cb5
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from git.kernel.org broonie/sound.git topic/rockchip
commit
7ec4a1c34a190297540626dfa240dc033beca196)
Huang, Tao [Tue, 24 May 2016 07:12:53 +0000 (15:12 +0800)]
ZhuangXiaoLiang [Tue, 24 May 2016 08:42:29 +0000 (16:42 +0800)]
ARM64: config: rockchip_defconfig remove Rogue of G6110 GPU.
Change-Id: Ib10daa86eb9e3aa2e33c2b5b4b9fdb3f66709b6a
Signed-off-by: ZhuangXiaoLiang <zhuangxl@rock-chips.com>
Jianqun Xu [Tue, 24 May 2016 08:06:43 +0000 (16:06 +0800)]
ARM64: dts: rk3399-evb: enable saradc node
Set status of saradc node to "okay", to support saradc.
Change-Id: Ic36e390097efbf564b5cbdc321086b6965cd54b0
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
David Wu [Mon, 23 May 2016 14:05:26 +0000 (22:05 +0800)]
ARM64: dts: rockchip: remove clk_ignore_unused bootarg for rk3366-tb
Change-Id: I9d3bbdb20cae6b572294ba5a7cf09dbc23278ccf
Signed-off-by: David Wu <david.wu@rock-chips.com>
Xubilv [Mon, 23 May 2016 08:53:01 +0000 (16:53 +0800)]
ARM64: dts: rk3399-android: mipi dsi host1 add grf
Change-Id: Ifa69588690c33da4d58c393f33f344101a4ea11d
Signed-off-by: Xubilv <xbl@rock-chips.com>
Wu Liang feng [Mon, 23 May 2016 06:51:10 +0000 (14:51 +0800)]
usb: gadget: accessory: add compat_ioctl
Add compat_ioctl for accessory to work on 64-bit platforms.
Change-Id: I805395c35017111bf0c462847f11765c7088d266
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
Rohith Seelaboyina [Wed, 5 Mar 2014 10:40:00 +0000 (16:10 +0530)]
usb: gadget: mtp: add new ioctl for compat
Define a new ioctl for MTP_SEND_EVENT, as its
ioctl numbers depends on the size of struct
mtp_event, which varies in ARCH32 and ARCH64.
Change-Id: I060604057ac6c55991118b3f61b187468b4ee0fd
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/377800
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
Wu Liang feng [Mon, 23 May 2016 03:07:18 +0000 (11:07 +0800)]
usb: gadget: mtp: add compat_ioctl
Add compat_ioctl for mtp to work on 64-bit platforms.
Change-Id: Icef0f42a554d770a83152c4185aca9e39e041165
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
Jianqun Xu [Wed, 18 May 2016 07:30:57 +0000 (15:30 +0800)]
ARM64: dts: rk3399: add node support for reboot-mode
Rockchip RK3399 SoCs support reboot with modes, such as recovery mode,
loader mode and normal mode.
Change-Id: I96ed872f849c2b3b06d236248995db18be070960
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Huang, Tao [Fri, 20 May 2016 09:05:24 +0000 (17:05 +0800)]
rk: remove cpuquiet
Change-Id: I1fde79829ebff9f74609c3c4aeb759c7db822b01
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Fri, 20 May 2016 07:19:12 +0000 (15:19 +0800)]
rk: force enable asm goto on android gcc
It seems than android gcc can't pass gcc-goto.sh check, but asm goto work.
So let's active it.
Change-Id: I75310af8cf3746a5c110daa564e96eeb1d7f1070
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Alex Shi [Fri, 20 May 2016 04:16:40 +0000 (12:16 +0800)]
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Alex Shi [Fri, 20 May 2016 04:16:37 +0000 (12:16 +0800)]
Merge tag 'v4.4.11' into linux-linaro-lsk-v4.4
This is the 4.4.11 stable release
Shawn Lin [Fri, 13 May 2016 02:41:07 +0000 (10:41 +0800)]
ARM64: dts: rk3399-evb: add more for pcie for evb board
Change-Id: If417c67b7a78898cd23c5a35411d4fe3724336c8
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Fri, 13 May 2016 02:39:40 +0000 (10:39 +0800)]
ARM64: dts: rk3399: add pcie support
Change-Id: I3defaf222ddba88fb92c556913c774d466f78456
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Fri, 13 May 2016 02:37:24 +0000 (10:37 +0800)]
pci: Add PCIe driver for Rockchip Soc
RK3399 has a PCIe controller which can be used as Root Complex.
This driver supports a PCIe controller as Root Complex mode.
Change-Id: Ifff7340bd90b7e9e17c9f500938bee7769785cb9
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Shawn Lin [Fri, 13 May 2016 02:34:18 +0000 (10:34 +0800)]
Documentation: add binding description of Rockchip PCIe controller
This patch add some required and optional properties for Rockchip
PCIe controller. Also we add a example for how to use it.
Change-Id: I69cfbc6290c97a9a55b50c531da6c4babefd8571
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Xubilv [Fri, 6 May 2016 07:19:19 +0000 (15:19 +0800)]
video: rockchip: mipi: free cmds buf in rockchip_lcd_mipi_remove
Change-Id: If805e7b6797841a92252a879526200da166141fd
Signed-off-by: Xubilv <xbl@rock-chips.com>
Huang, Tao [Wed, 18 May 2016 11:29:24 +0000 (19:29 +0800)]
ARM64: dts: rk3399: add rktimer device node
Select rktimer0 as broadcast timer.
Change-Id: I9a4142391f2ba88efa1c1098772a41179a6ead5d
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Wed, 18 May 2016 11:09:39 +0000 (19:09 +0800)]
clocksource: rockchip: add support for rk3399 SoC
The CONTROL register offset is different from old SoCs.
For Linux driver, there are not functional changes at all.
Let's call it v2.
Change-Id: I87ab0363fd6a13efe223717ffc6a0ba06ec25d72
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Wed, 18 May 2016 10:43:10 +0000 (18:43 +0800)]
dt-bindings: document rk3399 rk-timer bindings
Add compatible string for rk3399 because which timer is a little
different from older SoCs. So rename the file name from
rockchip,rk3288-timer.txt to rockchip,rk-timer.txt.
Clarify rockchip,rk3288-timer supported SoCs.
Change-Id: Ic39196352ebb4740d21c9e5bdf967084192c66d8
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Wed, 18 May 2016 10:22:31 +0000 (18:22 +0800)]
clocksource: rockchip: add dynamic irq flag to the timer
The rockchip timer is broadcast timer. Add CLOCK_EVT_FEAT_DYNIRQ
flag and set cpumask to all cpu to save power by avoid unnecessary
wakeups and IPIs.
Change-Id: Ie257972a4a42f6807aed22df695d8b3a4d715045
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Huang, Tao [Wed, 18 May 2016 09:28:07 +0000 (17:28 +0800)]
clocksource: rockchip: remove unnecessary clear irq before request_irq
rk_timer_interrupt_clear and rk_timer_disable is unnecessary before
request_irq. Timer should keep disabled before booting Linux.
Change-Id: I6de401ad156d620ac676e80de89ffd0bdaab3a36
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
Xubilv [Wed, 18 May 2016 10:01:17 +0000 (18:01 +0800)]
dtsi: screen-timing: lcd-LP097Qx2: for rk3399 mid prototype
Change-Id: Ia01ee063d5d3f5d7e26e6d0a2683e616eebd19f2
Signed-off-by: Xubilv <xbl@rock-chips.com>
Xubilv [Wed, 18 May 2016 09:53:40 +0000 (17:53 +0800)]
dtsi: screen-timing: lcd-ls055r1sx04-mipi: for rk3399 vr prototype
Change-Id: Iee299bfe2786ece1b7cc1d53a81e4a4c29a4bf0e
Signed-off-by: Xubilv <xbl@rock-chips.com>
Greg Kroah-Hartman [Thu, 19 May 2016 00:08:36 +0000 (17:08 -0700)]
Linux 4.4.11
Linus Torvalds [Sat, 14 May 2016 18:11:44 +0000 (11:11 -0700)]
nf_conntrack: avoid kernel pointer value leak in slab name
commit
31b0b385f69d8d5491a4bca288e25e63f1d945d0 upstream.
The slab name ends up being visible in the directory structure under
/sys, and even if you don't have access rights to the file you can see
the filenames.
Just use a 64-bit counter instead of the pointer to the 'net' structure
to generate a unique name.
This code will go away in 4.7 when the conntrack code moves to a single
kmemcache, but this is the backportable simple solution to avoiding
leaking kernel pointers to user space.
Fixes: 5b3501faa874 ("netfilter: nf_conntrack: per netns nf_conntrack_cachep")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arindam Nath [Wed, 4 May 2016 18:09:59 +0000 (23:39 +0530)]
drm/radeon: fix DP link training issue with second 4K monitor
commit
1a738347df2ee4977459a8776fe2c62196bdcb1b upstream.
There is an issue observed when we hotplug a second DP
4K monitor to the system. Sometimes, the link training
fails for the second monitor after HPD interrupt
generation.
The issue happens when some queued or deferred transactions
are already present on the AUX channel when we initiate
a new transcation to (say) get DPCD or during link training.
We set AUX_IGNORE_HPD_DISCON bit in the AUX_CONTROL
register so that we can ignore any such deferred
transactions when a new AUX transaction is initiated.
Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Imre Deak [Tue, 3 May 2016 12:54:19 +0000 (15:54 +0300)]
drm/i915/bdw: Add missing delay during L3 SQC credit programming
commit
d6a862fe8c48229ba342648bcd535b2404724603 upstream.
BSpec requires us to wait ~100 clocks before re-enabling clock gating,
so make sure we do this.
CC: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1462280061-1457-2-git-send-email-imre.deak@intel.com
(cherry picked from commit
48e5d68d28f00c0cadac5a830980ff3222781abb)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daniel Vetter [Tue, 3 May 2016 08:33:01 +0000 (10:33 +0200)]
drm/i915: Bail out of pipe config compute loop on LPT
commit
2700818ac9f935d8590715eecd7e8cadbca552b6 upstream.
LPT is pch, so might run into the fdi bandwidth constraint (especially
since it has only 2 lanes). But right now we just force pipe_bpp back
to 24, resulting in a nice loop (which we bail out with a loud
WARN_ON). Fix this.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=93477
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1462264381-7573-1-git-send-email-daniel.vetter@ffwll.ch
(cherry picked from commit
f58a1acc7e4a1f37d26124ce4c875c647fbcc61f)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lucas Stach [Thu, 5 May 2016 14:16:44 +0000 (10:16 -0400)]
drm/radeon: fix PLL sharing on DCE6.1 (v2)
commit
e3c00d87845ab375f90fa6e10a5e72a3a5778cd3 upstream.
On DCE6.1 PPLL2 is exclusively available to UNIPHYA, so it should not
be taken into consideration when looking for an already enabled PLL
to be shared with other outputs.
This fixes the broken VGA port (TRAVIS DP->VGA bridge) on my Richland
based laptop, where the internal display is connected to UNIPHYA through
a TRAVIS DP->LVDS bridge.
Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=78987
v2: agd: add check in radeon_get_shared_nondp_ppll as well, drop
extra parameter.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mauro Carvalho Chehab [Wed, 11 May 2016 16:09:34 +0000 (13:09 -0300)]
Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing"
commit
93f0750dcdaed083d6209b01e952e98ca730db66 upstream.
This patch causes a Kernel panic when called on a DVB driver.
This was also reported by David R <david@unsolicited.net>:
May 7 14:47:35 server kernel: [ 501.247123] BUG: unable to handle kernel NULL pointer dereference at
0000000000000004
May 7 14:47:35 server kernel: [ 501.247239] IP: [<
ffffffffa0222c71>] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2]
May 7 14:47:35 server kernel: [ 501.247354] PGD
cae6f067 PUD
ca99c067 PMD 0
May 7 14:47:35 server kernel: [ 501.247426] Oops: 0000 [#1] SMP
May 7 14:47:35 server kernel: [ 501.247482] Modules linked in: xfs tun xt_connmark xt_TCPMSS xt_tcpmss xt_owner xt_REDIRECT nf_nat_redirect xt_nat ipt_MASQUERADE nf_nat_masquerade_ipv4 ts_kmp ts_bm xt_string ipt_REJECT nf_reject_ipv4 xt_recent xt_conntrack xt_multiport xt_pkttype xt_tcpudp xt_mark nf_log_ipv4 nf_log_common xt_LOG xt_limit iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables ip6table_filter ip6_tables x_tables pppoe pppox dm_crypt ts2020 regmap_i2c ds3000 cx88_dvb dvb_pll cx88_vp3054_i2c mt352 videobuf2_dvb cx8800 cx8802 cx88xx pl2303 tveeprom videobuf2_dma_sg ppdev videobuf2_memops videobuf2_v4l2 videobuf2_core dvb_usb_digitv snd_hda_codec_via snd_hda_codec_hdmi snd_hda_codec_generic radeon dvb_usb snd_hda_intel amd64_edac_mod serio_raw snd_hda_codec edac_core fbcon k10temp bitblit softcursor snd_hda_core font snd_pcm_oss i2c_piix4 snd_mixer_oss tileblit drm_kms_helper syscopyarea snd_pcm snd_seq_dummy sysfillrect snd_seq_oss sysimgblt fb_sys_fops ttm snd_seq_midi r8169 snd_rawmidi drm snd_seq_midi_event e1000e snd_seq snd_seq_device snd_timer snd ptp pps_core i2c_algo_bit soundcore parport_pc ohci_pci shpchp tpm_tis tpm nfsd auth_rpcgss oid_registry hwmon_vid exportfs nfs_acl mii nfs bonding lockd grace lp sunrpc parport
May 7 14:47:35 server kernel: [ 501.249564] CPU: 1 PID: 6889 Comm: vb2-cx88[0] Not tainted 4.5.3 #3
May 7 14:47:35 server kernel: [ 501.249644] Hardware name: System manufacturer System Product Name/M4A785TD-V EVO, BIOS 0211 07/08/2009
May 7 14:47:35 server kernel: [ 501.249767] task:
ffff8800aebf3600 ti:
ffff8801e07a0000 task.ti:
ffff8801e07a0000
May 7 14:47:35 server kernel: [ 501.249861] RIP: 0010:[<
ffffffffa0222c71>] [<
ffffffffa0222c71>] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2]
May 7 14:47:35 server kernel: [ 501.250002] RSP: 0018:
ffff8801e07a3de8 EFLAGS:
00010086
May 7 14:47:35 server kernel: [ 501.250071] RAX:
0000000000000283 RBX:
ffff880210dc5000 RCX:
0000000000000283
May 7 14:47:35 server kernel: [ 501.250161] RDX:
ffffffffa0222cf0 RSI:
0000000000000000 RDI:
ffff880210dc5014
May 7 14:47:35 server kernel: [ 501.250251] RBP:
ffff8801e07a3df8 R08:
ffff8801e07a0000 R09:
0000000000000000
May 7 14:47:35 server kernel: [ 501.250348] R10:
0000000000000000 R11:
0000000000000001 R12:
ffff8800cda2a9d8
May 7 14:47:35 server kernel: [ 501.250438] R13:
ffff880210dc51b8 R14:
0000000000000000 R15:
ffff8800cda2a828
May 7 14:47:35 server kernel: [ 501.250528] FS:
00007f5b77fff700(0000) GS:
ffff88021fc40000(0000) knlGS:
00000000adaffb40
May 7 14:47:35 server kernel: [ 501.250631] CS: 0010 DS: 0000 ES: 0000 CR0:
000000008005003b
May 7 14:47:35 server kernel: [ 501.250704] CR2:
0000000000000004 CR3:
00000000ca19d000 CR4:
00000000000006e0
May 7 14:47:35 server kernel: [ 501.250794] Stack:
May 7 14:47:35 server kernel: [ 501.250822]
ffff8801e07a3df8 ffffffffa0222cfd ffff8801e07a3e70 ffffffffa0236beb
May 7 14:47:35 server kernel: [ 501.250937]
0000000000000283 ffff8801e07a3e94 0000000000000000 0000000000000000
May 7 14:47:35 server kernel: [ 501.251051]
ffff8800aebf3600 ffffffff8108d8e0 ffff8801e07a3e38 ffff8801e07a3e38
May 7 14:47:35 server kernel: [ 501.251165] Call Trace:
May 7 14:47:35 server kernel: [ 501.251200] [<
ffffffffa0222cfd>] ? __verify_planes_array_core+0xd/0x10 [videobuf2_v4l2]
May 7 14:47:35 server kernel: [ 501.251306] [<
ffffffffa0236beb>] vb2_core_dqbuf+0x2eb/0x4c0 [videobuf2_core]
May 7 14:47:35 server kernel: [ 501.251398] [<
ffffffff8108d8e0>] ? prepare_to_wait_event+0x100/0x100
May 7 14:47:35 server kernel: [ 501.251482] [<
ffffffffa023855b>] vb2_thread+0x1cb/0x220 [videobuf2_core]
May 7 14:47:35 server kernel: [ 501.251569] [<
ffffffffa0238390>] ? vb2_core_qbuf+0x230/0x230 [videobuf2_core]
May 7 14:47:35 server kernel: [ 501.251662] [<
ffffffffa0238390>] ? vb2_core_qbuf+0x230/0x230 [videobuf2_core]
May 7 14:47:35 server kernel: [ 501.255982] [<
ffffffff8106f984>] kthread+0xc4/0xe0
May 7 14:47:35 server kernel: [ 501.260292] [<
ffffffff8106f8c0>] ? kthread_park+0x50/0x50
May 7 14:47:35 server kernel: [ 501.264615] [<
ffffffff81697a5f>] ret_from_fork+0x3f/0x70
May 7 14:47:35 server kernel: [ 501.268962] [<
ffffffff8106f8c0>] ? kthread_park+0x50/0x50
May 7 14:47:35 server kernel: [ 501.273216] Code: 0d 01 74 16 48 8b 46 28 48 8b 56 30 48 89 87 d0 01 00 00 48 89 97 d8 01 00 00 5d c3 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 55 <8b> 46 04 48 89 e5 8d 50 f7 31 c0 83 fa 01 76 02 5d c3 48 83 7e
May 7 14:47:35 server kernel: [ 501.282146] RIP [<
ffffffffa0222c71>] __verify_planes_array.isra.3+0x1/0x80 [videobuf2_v4l2]
May 7 14:47:35 server kernel: [ 501.286391] RSP <
ffff8801e07a3de8>
May 7 14:47:35 server kernel: [ 501.290619] CR2:
0000000000000004
May 7 14:47:35 server kernel: [ 501.294786] ---[ end trace
b2b354153ccad110 ]---
This reverts commit
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab.
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Fixes: 2c1f6951a8a8 ("[media] videobuf2-v4l2: Verify planes array in buffer dequeueing")
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marek Szyprowski [Mon, 9 May 2016 16:31:47 +0000 (09:31 -0700)]
Input: max8997-haptic - fix NULL pointer dereference
commit
6ae645d5fa385f3787bf1723639cd907fe5865e7 upstream.
NULL pointer derefence happens when booting with DTB because the
platform data for haptic device is not set in supplied data from parent
MFD device.
The MFD device creates only platform data (from Device Tree) for itself,
not for haptic child.
Unable to handle kernel NULL pointer dereference at virtual address
0000009c
pgd =
c0004000
[
0000009c] *pgd=
00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
(max8997_haptic_probe) from [<
c03f9cec>] (platform_drv_probe+0x4c/0xb0)
(platform_drv_probe) from [<
c03f8440>] (driver_probe_device+0x214/0x2c0)
(driver_probe_device) from [<
c03f8598>] (__driver_attach+0xac/0xb0)
(__driver_attach) from [<
c03f67ac>] (bus_for_each_dev+0x68/0x9c)
(bus_for_each_dev) from [<
c03f7a38>] (bus_add_driver+0x1a0/0x218)
(bus_add_driver) from [<
c03f8db0>] (driver_register+0x78/0xf8)
(driver_register) from [<
c0101774>] (do_one_initcall+0x90/0x1d8)
(do_one_initcall) from [<
c0a00dbc>] (kernel_init_freeable+0x15c/0x1fc)
(kernel_init_freeable) from [<
c06bb5b4>] (kernel_init+0x8/0x114)
(kernel_init) from [<
c0107938>] (ret_from_fork+0x14/0x3c)
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes: 104594b01ce7 ("Input: add driver support for MAX8997-haptic")
[k.kozlowski: Write commit message, add CC-stable]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Al Viro [Thu, 5 May 2016 20:25:35 +0000 (16:25 -0400)]
get_rock_ridge_filename(): handle malformed NM entries
commit
99d825822eade8d827a1817357cbf3f889a552d6 upstream.
Payloads of NM entries are not supposed to contain NUL. When we run
into such, only the part prior to the first NUL goes into the
concatenation (i.e. the directory entry name being encoded by a bunch
of NM entries). We do stop when the amount collected so far + the
claimed amount in the current NM entry exceed 254. So far, so good,
but what we return as the total length is the sum of *claimed*
sizes, not the actual amount collected. And that can grow pretty
large - not unlimited, since you'd need to put CE entries in
between to be able to get more than the maximum that could be
contained in one isofs directory entry / continuation chunk and
we are stop once we'd encountered 32 CEs, but you can get about 8Kb
easily. And that's what will be passed to readdir callback as the
name length. 8Kb __copy_to_user() from a buffer allocated by
__get_free_page()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Steven Rostedt [Wed, 11 May 2016 19:09:36 +0000 (15:09 -0400)]
tools lib traceevent: Do not reassign parg after collapse_tree()
commit
106b816cb46ebd87408b4ed99a2e16203114daa6 upstream.
At the end of process_filter(), collapse_tree() was changed to update
the parg parameter, but the reassignment after the call wasn't removed.
What happens is that the "current_op" gets modified and freed and parg
is assigned to the new allocated argument. But after the call to
collapse_tree(), parg is assigned again to the just freed "current_op",
and this causes the tool to crash.
The current_op variable must also be assigned to NULL in case of error,
otherwise it will cause it to be free()ed twice.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Fixes: 42d6194d133c ("tools lib traceevent: Refactor process_filter()")
Link: http://lkml.kernel.org/r/20160511150936.678c18a1@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johannes Thumshirn [Wed, 27 Apr 2016 08:48:52 +0000 (10:48 +0200)]
qla1280: Don't allocate 512kb of host tags
commit
2bcbc81421c511ef117cadcf0bee9c4340e68db0 upstream.
The qla1280 driver sets the scsi_host_template's can_queue field to 0xfffff
which results in an allocation failure when allocating the block layer tags
for the driver's queues. This was introduced with the change for host wide
tags in commit
64d513ac31b - "scsi: use host wide tags by default".
Reduce can_queue to MAX_OUTSTANDING_COMMANDS (512) to solve the allocation
error.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Fixes: 64d513ac31b - "scsi: use host wide tags by default"
Cc: Laura Abbott <labbott@redhat.com>
Cc: Michael Reed <mdr@sgi.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Al Viro [Wed, 27 Apr 2016 05:11:55 +0000 (01:11 -0400)]
atomic_open(): fix the handling of create_error
commit
10c64cea04d3c75c306b3f990586ffb343b63287 upstream.
* if we have a hashed negative dentry and either CREAT|EXCL on
r/o filesystem, or CREAT|TRUNC on r/o filesystem, or CREAT|EXCL
with failing may_o_create(), we should fail with EROFS or the
error may_o_create() has returned, but not ENOENT. Which is what
the current code ends up returning.
* if we have CREAT|TRUNC hitting a regular file on a read-only
filesystem, we can't fail with EROFS here. At the very least,
not until we'd done follow_managed() - we might have a writable
file (or a device, for that matter) bound on top of that one.
Moreover, the code downstream will see that O_TRUNC and attempt
to grab the write access (*after* following possible mount), so
if we really should fail with EROFS, it will happen. No need
to do that inside atomic_open().
The real logics is much simpler than what the current code is
trying to do - if we decided to go for simple lookup, ended
up with a negative dentry *and* had create_error set, fail with
create_error. No matter whether we'd got that negative dentry
from lookup_real() or had found it in dcache.
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hans de Goede [Wed, 27 Apr 2016 13:59:27 +0000 (15:59 +0200)]
regulator: axp20x: Fix axp22x ldo_io voltage ranges
commit
a2262e5a12e05389ab4c7fc5cf60016b041dd8dc upstream.
The minium voltage of 1800mV is a copy and paste error from the axp20x
regulator info. The correct minimum voltage for the ldo_io regulators
on the axp22x is 700mV.
Fixes: 1b82b4e4f954 ("regulator: axp20x: Add support for AXP22X regulators")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Krzysztof Kozlowski [Mon, 28 Mar 2016 04:09:56 +0000 (13:09 +0900)]
regulator: s2mps11: Fix invalid selector mask and voltages for buck9
commit
3b672623079bb3e5685b8549e514f2dfaa564406 upstream.
The buck9 regulator of S2MPS11 PMIC had incorrect vsel_mask (0xff
instead of 0x1f) thus reading entire register as buck9's voltage. This
effectively caused regulator core to interpret values as higher voltages
than they were and then to set real voltage much lower than intended.
The buck9 provides power to other regulators, including LDO13
and LDO19 which supply the MMC2 (SD card). On Odroid XU3/XU4 the lower
voltage caused SD card detection errors on Odroid XU3/XU4:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD card
During driver probe the regulator core was checking whether initial
voltage matches the constraints. With incorrect vsel_mask of 0xff and
default value of 0x50, the core interpreted this as 5 V which is outside
of constraints (3-3.775 V). Then the regulator core was adjusting the
voltage to match the constraints. With incorrect vsel_mask this new
voltage mapped to a vere low voltage in the driver.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wanpeng Li [Wed, 11 May 2016 09:55:18 +0000 (17:55 +0800)]
workqueue: fix rebind bound workers warning
commit
f7c17d26f43d5cc1b7a6b896cd2fa24a079739b9 upstream.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 16 at kernel/workqueue.c:4559 rebind_workers+0x1c0/0x1d0
Modules linked in:
CPU: 0 PID: 16 Comm: cpuhp/0 Not tainted 4.6.0-rc4+ #31
Hardware name: IBM IBM System x3550 M4 Server -[7914IUW]-/00Y8603, BIOS -[D7E128FUS-1.40]- 07/23/2013
0000000000000000 ffff881037babb58 ffffffff8139d885 0000000000000010
0000000000000000 0000000000000000 0000000000000000 ffff881037babba8
ffffffff8108505d ffff881037ba0000 000011cf3e7d6e60 0000000000000046
Call Trace:
dump_stack+0x89/0xd4
__warn+0xfd/0x120
warn_slowpath_null+0x1d/0x20
rebind_workers+0x1c0/0x1d0
workqueue_cpu_up_callback+0xf5/0x1d0
notifier_call_chain+0x64/0x90
? trace_hardirqs_on_caller+0xf2/0x220
? notify_prepare+0x80/0x80
__raw_notifier_call_chain+0xe/0x10
__cpu_notify+0x35/0x50
notify_down_prepare+0x5e/0x80
? notify_prepare+0x80/0x80
cpuhp_invoke_callback+0x73/0x330
? __schedule+0x33e/0x8a0
cpuhp_down_callbacks+0x51/0xc0
cpuhp_thread_fun+0xc1/0xf0
smpboot_thread_fn+0x159/0x2a0
? smpboot_create_threads+0x80/0x80
kthread+0xef/0x110
? wait_for_completion+0xf0/0x120
? schedule_tail+0x35/0xf0
ret_from_fork+0x22/0x50
? __init_kthread_worker+0x70/0x70
---[ end trace
eb12ae47d2382d8f ]---
notify_down_prepare: attempt to take down CPU 0 failed
This bug can be reproduced by below config w/ nohz_full= all cpus:
CONFIG_BOOTPARAM_HOTPLUG_CPU0=y
CONFIG_DEBUG_HOTPLUG_CPU0=y
CONFIG_NO_HZ_FULL=y
As Thomas pointed out:
| If a down prepare callback fails, then DOWN_FAILED is invoked for all
| callbacks which have successfully executed DOWN_PREPARE.
|
| But, workqueue has actually two notifiers. One which handles
| UP/DOWN_FAILED/ONLINE and one which handles DOWN_PREPARE.
|
| Now look at the priorities of those callbacks:
|
| CPU_PRI_WORKQUEUE_UP = 5
| CPU_PRI_WORKQUEUE_DOWN = -5
|
| So the call order on DOWN_PREPARE is:
|
| CB 1
| CB ...
| CB workqueue_up() -> Ignores DOWN_PREPARE
| CB ...
| CB X ---> Fails
|
| So we call up to CB X with DOWN_FAILED
|
| CB 1
| CB ...
| CB workqueue_up() -> Handles DOWN_FAILED
| CB ...
| CB X-1
|
| So the problem is that the workqueue stuff handles DOWN_FAILED in the up
| callback, while it should do it in the down callback. Which is not a good idea
| either because it wants to be called early on rollback...
|
| Brilliant stuff, isn't it? The hotplug rework will solve this problem because
| the callbacks become symetric, but for the existing mess, we need some
| workaround in the workqueue code.
The boot CPU handles housekeeping duty(unbound timers, workqueues,
timekeeping, ...) on behalf of full dynticks CPUs. It must remain
online when nohz full is enabled. There is a priority set to every
notifier_blocks:
workqueue_cpu_up > tick_nohz_cpu_down > workqueue_cpu_down
So tick_nohz_cpu_down callback failed when down prepare cpu 0, and
notifier_blocks behind tick_nohz_cpu_down will not be called any
more, which leads to workers are actually not unbound. Then hotplug
state machine will fallback to undo and online cpu 0 again. Workers
will be rebound unconditionally even if they are not unbound and
trigger the warning in this progress.
This patch fix it by catching !DISASSOCIATED to avoid rebind bound
workers.
Cc: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Suggested-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Boris Brezillon [Wed, 11 May 2016 09:00:02 +0000 (11:00 +0200)]
ARM: dts: at91: sam9x5: Fix the memory range assigned to the PMC
commit
aab0a4c83ceb344d2327194bf354820e50607af6 upstream.
The memory range assigned to the PMC (Power Management Controller) was
not including the PMC_PCR register which are used to control peripheral
clocks.
This was working fine thanks to the page granularity of ioremap(), but
started to fail when we switched to syscon/regmap, because regmap is
making sure that all accesses are falling into the reserved range.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Richard Genoud <richard.genoud@gmail.com>
Tested-by: Richard Genoud <richard.genoud@gmail.com>
Fixes: 863a81c3be1d ("clk: at91: make use of syscon to share PMC registers in several drivers")
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miklos Szeredi [Tue, 10 May 2016 23:16:37 +0000 (01:16 +0200)]
vfs: rename: check backing inode being equal
commit
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca upstream.
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Overlayfs itself detects this condition and returns success without doing
anything, but then vfs_rename() will proceed as if this was a successful
rename (detach_mounts(), d_move()).
The correct thing to do is to detect this condition before even calling
into overlayfs. This patch does this by calling vfs_select_inode() to get
the underlying inodes.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Miklos Szeredi [Tue, 10 May 2016 23:16:37 +0000 (01:16 +0200)]
vfs: add vfs_select_inode() helper
commit
54d5ca871e72f2bb172ec9323497f01cd5091ec7 upstream.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Shishkin [Tue, 10 May 2016 13:18:33 +0000 (16:18 +0300)]
perf/core: Disable the event on a truncated AUX record
commit
9f448cd3cbcec8995935e60b27802ae56aac8cc0 upstream.
When the PMU driver reports a truncated AUX record, it effectively means
that there is no more usable room in the event's AUX buffer (even though
there may still be some room, so that perf_aux_output_begin() doesn't take
action). At this point the consumer still has to be woken up and the event
has to be disabled, otherwise the event will just keep spinning between
perf_aux_output_begin() and perf_aux_output_end() until its context gets
unscheduled.
Again, for cpu-wide events this means never, so once in this condition,
they will be forever losing data.
Fix this by disabling the event and waking up the consumer in case of a
truncated AUX record.
Reported-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: vince@deater.net
Link: http://lkml.kernel.org/r/1462886313-13660-3-git-send-email-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jack Pham [Fri, 15 Apr 2016 06:37:26 +0000 (23:37 -0700)]
regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
commit
dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 upstream.
Specifically for the case of reads that use the Extended Register
Read Long command, a multi-byte read operation is broken up into
8-byte chunks. However the call to spmi_ext_register_readl() is
incorrectly passing 'val_size', which if greater than 8 will
always fail. The argument should instead be 'len'.
Fixes: c9afbb05a9ff ("regmap: spmi: support base and extended register spaces")
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ludovic Desroches [Tue, 19 Apr 2016 14:03:45 +0000 (16:03 +0200)]
pinctrl: at91-pio4: fix pull-up/down logic
commit
5305a7b7e860bb40ab226bc7d58019416073948a upstream.
The default configuration of a pin is often with a value in the
pull-up/down field at chip reset. So, even if the internal logic of the
controller prevents writing a configuration with pull-up and pull-down at
the same time, we must ensure explicitly this condition before writing the
register.
This was leading to a pull-down condition not taken into account for
instance.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: 776180848b57 ("pinctrl: introduce driver for Atmel PIO4 controller")
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Hutchings [Tue, 12 Apr 2016 11:58:14 +0000 (12:58 +0100)]
spi: spi-ti-qspi: Handle truncated frames properly
commit
1ff7760ff66b98ef244bf0e5e2bd5310651205ad upstream.
We clamp frame_len_words to a maximum of 4096, but do not actually
limit the number of words written or read through the DATA registers
or the length added to spi_message::actual_length. This results in
silent data corruption for commands longer than this maximum.
Recalculate the length of each transfer, taking frame_len_words into
account. Use this length in qspi_{read,write}_msg(), and to increment
spi_message::actual_length.
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>