]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoMerge branches 'next/fixes-non-critical', 'next/dt', 'next/defconfig' and 'next/drive...
Arnd Bergmann [Fri, 9 Oct 2015 15:50:30 +0000 (17:50 +0200)]
Merge branches 'next/fixes-non-critical', 'next/dt', 'next/defconfig' and 'next/drivers' into for-next

* next/fixes-non-critical:
  soc: ti: reset irq affinity before freeing irq
  MAINTAINERS: add entry for the Broadcom Northstar Plus SoCs

* next/dt: (33 commits)
  ARM: dts: rockchip: add the support power-domain node on RK3288 SoCs
  ARM: dts: rockchip: add rk3288-firefly iodomains
  ARM: dts: rockchip: fixup firefly mmc supplies
  ARM: dts: rockchip: add rk3288-popmetal iodomains
  ARM: dts: rockchip: add rk3288-popmetal mmc supplies
  ARM: dts: rockchip: add rk3288-popmetal board to dtb list
  ARM: dts: rockchip: Add dtb for the Radxa Rock 2 Square board
  ARM: dts: rockchip: support highspeed sd-cards on rk3066a boards
  ARM: dts: rockchip: support highspeed sd-cards for rk3188-radxarock
  ARM: dts: rockchip: Add the hdmi-ddc pinctrl settings for rk3288
  ARM: dts: rockchip: Remove specific cts pullup from veyron
  ARM: dts: rockchip: pull up cts lines on rk3288
  ARM: dts: rockchip: add veyron-jaq board
  ARM: dts: rockchip: Add support for SD/MMC on MarsBoard-RK3066
  dt-bindings: add power-domain header for RK3288 SoCs
  ARM: dts: move aliases back to .dts in Cygnus
  ARM: dts: fix Cygnus nand device node
  ARM: dts: enable touchscreen support on Cygnus
  ARM: dts: Enable NAND support on bcm911360_entphn
  ARM: dts: Enable various peripherals on bcm958305k
  ...

* next/defconfig:
  arm64: defconfig: Enable devices for MSM8916

* next/drivers:
  soc: rockchip: power-domain: Add power domain driver
  dt-bindings: add document of Rockchip power domains
  PM / clk: Do not __clk_get passed in clock-references
  dt-bindings: add power-domain header for RK3288 SoCs

8 years agoMerge tag 'arm-soc/for-4.4/maintainers' of http://github.com/Broadcom/stblinux into...
Arnd Bergmann [Fri, 9 Oct 2015 15:23:33 +0000 (17:23 +0200)]
Merge tag 'arm-soc/for-4.4/maintainers' of http://github.com/Broadcom/stblinux into next/fixes-non-critical

Merge "Broadcom maintainers changes for v4.4" from Florian Fainelli:

This pull request contains the following changes to the MAINTAINERS file:

- Jon Mason lists the NorthStar Plus SoC under the existing Cygnus/iProc section, and by
  doing so, slightly rephrases the title to make it clear that it spans many more chips now

* tag 'arm-soc/for-4.4/maintainers' of http://github.com/Broadcom/stblinux:
  MAINTAINERS: add entry for the Broadcom Northstar Plus SoCs

8 years agoMerge tag 'arm-soc/for-4.4/devicetree' of http://github.com/Broadcom/stblinux into...
Arnd Bergmann [Fri, 9 Oct 2015 15:15:21 +0000 (17:15 +0200)]
Merge tag 'arm-soc/for-4.4/devicetree' of http://github.com/Broadcom/stblinux into next/dt

Merge "Broadcom devicetree changes for v4.4" from Florian Fainelli:

This pull requests contains the following Broadcom SoCs Device Tree changes:

- Brian Norris documents the BCM7445 SoCs Power Management controllers and
  hardware and updates the reference BCM7445 Device Tree with these nodes

- Florian Fainelli documents the BCM7xxx write-pairing feature in the top-level
  BCM7xxx binding document

- Hauke Merthens enables the NAND controller for the Asus RT-AC87U and adds the
  GPIO pin controlling the USB power supply on Netgear R6250

- Jon Mason adds support for the NorthStar Plus SoC by providing a top-level
  binding document and the minimalist device tree skeleton for these SoCs

- Rafal Milecki adds support for the Netgear R7000 (BCM5301x SoC)

- Ray Jui provides a set of Cygnus DT changes that make the Device Tree clearer
  and more correct with respect to how the hardware is designed. He also enables
  the NAND controller on the bcm911360_entphn design, enables a bunch of
  peripherals on the bcm958305k evaluation board, and adds a skeleton .dtsi file
  for the touchscreen extansion board(s)

* tag 'arm-soc/for-4.4/devicetree' of http://github.com/Broadcom/stblinux:
  ARM: dts: move aliases back to .dts in Cygnus
  ARM: dts: fix Cygnus nand device node
  ARM: dts: enable touchscreen support on Cygnus
  ARM: dts: Enable NAND support on bcm911360_entphn
  ARM: dts: Enable various peripherals on bcm958305k
  ARM: dts: Reorder Cygnus peripherals
  ARM: dts: Move all Cygnus peripherals into axi bus
  ARM: dts: Put Cygnus core components under core bus
  ARM: dts: Use label for device nodes in Cygnus dts
  ARM: dts: consolidate aliases for Cygnus dt files
  ARM: BCM5301X: Netgear R6250 add USB GPIO
  Documentation: bindings: brcmstb: Document write-pairing
  ARM: dts: brcmstb: add BCM7445 system PM DT nodes
  Documentation: dt: brcmstb: add system PM bindings
  ARM: BCM5301X: add NAND flash chip description for Asus RT-AC87U
  ARM: BCM5301X: Add DT for Netgear R7000
  ARM: NSP: add minimal Northstar Plus device tree
  dt-bindings: Create Documentation for NSP DT bindings

8 years agoarm64: defconfig: Enable devices for MSM8916
Andy Gross [Thu, 8 Oct 2015 20:37:08 +0000 (15:37 -0500)]
arm64: defconfig: Enable devices for MSM8916

This patch enables a number of devices currently supported by the MSM8916
boards.  These include I2C, SPI, DMA, SMEM, SMD, and SMD regulator support.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoMerge tag 'v4.4-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 9 Oct 2015 15:10:27 +0000 (17:10 +0200)]
Merge tag 'v4.4-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt

Merge "Rockchip dts32 changes for 4.4" from Heiko Stuebner:

DTS changes including one new Veyron-board and the Radxa Rock2
system-on-module as well as the square baseboard. On top of that
a lot of mmc-related changes to improve speeds on the Cortex-A9
socs and also setting up the supplies for rk3288 mmc-controllers
for the following mmc-tuning support. And of course the dts-part
of the rk3288 power-domains.

* tag 'v4.4-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: dts: rockchip: add the support power-domain node on RK3288 SoCs
  ARM: dts: rockchip: add rk3288-firefly iodomains
  ARM: dts: rockchip: fixup firefly mmc supplies
  ARM: dts: rockchip: add rk3288-popmetal iodomains
  ARM: dts: rockchip: add rk3288-popmetal mmc supplies
  ARM: dts: rockchip: add rk3288-popmetal board to dtb list
  ARM: dts: rockchip: Add dtb for the Radxa Rock 2 Square board
  ARM: dts: rockchip: support highspeed sd-cards on rk3066a boards
  ARM: dts: rockchip: support highspeed sd-cards for rk3188-radxarock
  ARM: dts: rockchip: Add the hdmi-ddc pinctrl settings for rk3288
  ARM: dts: rockchip: Remove specific cts pullup from veyron
  ARM: dts: rockchip: pull up cts lines on rk3288
  ARM: dts: rockchip: add veyron-jaq board
  ARM: dts: rockchip: Add support for SD/MMC on MarsBoard-RK3066
  dt-bindings: add power-domain header for RK3288 SoCs

8 years agoMerge tag 'v4.4-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 9 Oct 2015 15:08:28 +0000 (17:08 +0200)]
Merge tag 'v4.4-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/drivers

Merge "Rockchip power-domain drivers for 4.4" from Heiko Stuebner:

Add the power-domain base-driver which currently contains
support for the rk3288 powerdomain layout but can be easily
extended for the socs (including arm64) later on.
A big thanks to Ceasar Wang for pulling through on this
during 18 revisions.
Also included is a fix to the pm-clock handling in the generic
powerdomains to adapt it to the per-user clock handling we now
do, Acked by Rafael Wysocki.

* tag 'v4.4-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: power-domain: Add power domain driver
  dt-bindings: add document of Rockchip power domains
  PM / clk: Do not __clk_get passed in clock-references
  dt-bindings: add power-domain header for RK3288 SoCs

8 years agoARM: dts: rockchip: add the support power-domain node on RK3288 SoCs
Caesar Wang [Tue, 8 Sep 2015 06:18:23 +0000 (14:18 +0800)]
ARM: dts: rockchip: add the support power-domain node on RK3288 SoCs

We can add more domains node in the future.
This patch add the needed clocks into power-controller.
As the discuess about all the device clocks being listed in
the power-domains itself.

There are several reasons as follows:

Firstly, the clocks need be turned off to save power when
the system enter the suspend state. So we need to enumerate
the clocks in the dts. In order to power domain can turn on and off.

Secondly, the reset-circuit should reset be synchronous on RK3288,
then sync revoked. So we need to enable clocks of all devices.
In other words, we have to enable the clocks before you operate them
if all the device clocks are included in someone domians.

Thirdly, as the chip designs for PM hardhare. we need turn on the noc
clocks, if we are operating the "pd_vio" domain to enter the idle status.
The device's clock be included in domains that needed turn on if do that.

The clocks in the dts are needed to enable before you want to happy work.
At the moment, This patch is very good work for PM hardware.

Also, we can add these clocks in the future if we have some hidden clocks.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Michael Turquette <mturquette@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
[add necessary power-domain properties to keep drm subsys working]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoMerge branch 'v4.4-armsoc/pd-headers' into v4.4-armsoc/dts32
Heiko Stuebner [Thu, 8 Oct 2015 20:40:45 +0000 (22:40 +0200)]
Merge branch 'v4.4-armsoc/pd-headers' into v4.4-armsoc/dts32

8 years agoARM: dts: rockchip: add rk3288-firefly iodomains
Heiko Stuebner [Wed, 30 Sep 2015 19:10:00 +0000 (21:10 +0200)]
ARM: dts: rockchip: add rk3288-firefly iodomains

Add the iodomains node and reference the correct regulator for each
domain. This also includes adding the currently unused dvp regulators.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: fixup firefly mmc supplies
Heiko Stuebner [Wed, 30 Sep 2015 19:07:09 +0000 (21:07 +0200)]
ARM: dts: rockchip: fixup firefly mmc supplies

Fix some incorrect references to mmc regulators.
vccio_wl for example is the io-voltage supply not the core supply
of the wifi module itself, which is vbat_wl instead.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: add rk3288-popmetal iodomains
Heiko Stuebner [Wed, 30 Sep 2015 19:00:16 +0000 (21:00 +0200)]
ARM: dts: rockchip: add rk3288-popmetal iodomains

Add the iodomains node and reference the correct regulator for each
domain. This also includes adding the currently unused dvp regulators
and fixing up two regulators to follow the naming in the schematics.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: add rk3288-popmetal mmc supplies
Heiko Stuebner [Wed, 30 Sep 2015 18:58:53 +0000 (20:58 +0200)]
ARM: dts: rockchip: add rk3288-popmetal mmc supplies

Add missing regulators and supply properties to emmc and sdmmc nodes.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: add rk3288-popmetal board to dtb list
Heiko Stuebner [Wed, 30 Sep 2015 18:49:38 +0000 (20:49 +0200)]
ARM: dts: rockchip: add rk3288-popmetal board to dtb list

The popmetal board was not included in the list of Rockchip boards,
so was only built when explicitly called with make rk3288-popmetal.dtb
but not in a generic make dtbs, so add the missing entry.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: Add dtb for the Radxa Rock 2 Square board
Sjoerd Simons [Tue, 15 Sep 2015 06:57:21 +0000 (08:57 +0200)]
ARM: dts: rockchip: Add dtb for the Radxa Rock 2 Square board

The Radxa Rock 2 Square board is a combination of the Radxa Rock 2 SoM
with the Square baseboard. Add a dtsi for the SoM which can be included
into the dts for the various baseboards (e.g. full and square) and a dts
for the square board.

Currently supported are serial console, wired networking, hdmi output,
eMMC and SD storage and USB.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: support highspeed sd-cards on rk3066a boards
Shawn Lin [Sat, 12 Sep 2015 10:01:39 +0000 (18:01 +0800)]
ARM: dts: rockchip: support highspeed sd-cards on rk3066a boards

Add cap-sd-highspeed and cap-mmc-highspeed for rk3066a-bqcurie2
and rk3066a-rayeager boards to make sd cards run faster.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: support highspeed sd-cards for rk3188-radxarock
Shawn Lin [Sat, 12 Sep 2015 10:00:50 +0000 (18:00 +0800)]
ARM: dts: rockchip: support highspeed sd-cards for rk3188-radxarock

Add cap-sd-highspeed and cap-mmc-highspeed for rk3188-radxarock
board to make sd cards running faster.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: Add the hdmi-ddc pinctrl settings for rk3288
Douglas Anderson [Wed, 2 Sep 2015 21:54:22 +0000 (14:54 -0700)]
ARM: dts: rockchip: Add the hdmi-ddc pinctrl settings for rk3288

The pins for i2c5 can either be configured as "I2C5" which means that
they're controlled by the normal RK3288 I2C controller or as "EDP / HDMI
I2C".  It's unclear why EDP is referenced here since apparently setting
the mux to this position enables I2C communication using the dw_hdmi
block with a patch like <https://patchwork.kernel.org/patch/7098101/>.

There appear to be some reasons why using the builtin I2C controller in
dw_hdmi is better than using the normal RK3288 I2C controller, so boards
based on rk3288 might eventually want to use this pinmux if it's known
to work.

Once driver support in dw_hdmi lands, boards would use this by selecting
this pinctrl for the HDMI block and then _not_ specifying a ddc-i2c-bus
and _not_ setting the status to "okay" for i2c5 (which uses the same
pins).

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: Remove specific cts pullup from veyron
Alexandru M Stan [Wed, 2 Sep 2015 23:27:59 +0000 (16:27 -0700)]
ARM: dts: rockchip: Remove specific cts pullup from veyron

With the previous patch ("rk3288: pull up cts lines") this is redundant,
I sent that patch for the same reason this existed here, so the lines don't
wiggle randomly when disconnected.

Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: pull up cts lines on rk3288
Alexandru M Stan [Wed, 2 Sep 2015 23:27:58 +0000 (16:27 -0700)]
ARM: dts: rockchip: pull up cts lines on rk3288

The flow control lines from a user accessible UART are optional,
the user might not have anything connected to those pins.
In order to prevent random interrupts happening and noise affecting
the cts pin should be pulled up.

Note that the default state for that pin on the rk3288 is pulled up,
so this patch merely restores them.

This is similar to what we're already doing with the RX pin,
so it should be safe. At worst it might be a slightly higher power usage
(through ~50 kohms) when the cts is low.

Suggested-by: Neil Hendin <nhendin@chromium.org>
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: add veyron-jaq board
Brian Norris [Mon, 24 Aug 2015 22:58:03 +0000 (15:58 -0700)]
ARM: dts: rockchip: add veyron-jaq board

a.k.a. Haier Chromebook 11, and others

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoARM: dts: rockchip: Add support for SD/MMC on MarsBoard-RK3066
Romain Perier [Mon, 24 Aug 2015 16:04:41 +0000 (18:04 +0200)]
ARM: dts: rockchip: Add support for SD/MMC on MarsBoard-RK3066

This enables SDMMC0 on the board and gives a basic support for SD cards.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agosoc: ti: reset irq affinity before freeing irq
Murali Karicheri [Thu, 17 Sep 2015 16:02:14 +0000 (09:02 -0700)]
soc: ti: reset irq affinity before freeing irq

When using accumulator queue for rx side for network driver, following
warning is seen when doing a reboot command from Linux console. This
is because, affinity value is not reset before calling free_irq(). This
patch fixes this.

Deconfiguring network interfaces...
 ------------[ cut here ]-----------
 WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370
__free_irq+0x208/0x214
 Modules linked in:
 CPU: 0 PID: 2081 Comm: ifconfig Not tainted 4.1.5-00908-g1049e206-dirty #1
 Hardware name: Keystone
 Backtrace:
 [<c0012b98>] (dump_backtrace) from [<c0012dbc>] (show_stack+0x18/0x1c)
 r7:c005d0a8 r6:c06e2184 r5:c06e2184 r4:00000000
 [<c0012da4>] (show_stack) from [<c04e7168>] (dump_stack+0x8c/0xcc)
 [<c04e70dc>] (dump_stack) from [<c0025944>] (warn_slowpath_common+0x88/0xb8)
 r7:c005d0a8 r6:0000055a r5:00000009 r4:0000000
 [<c00258bc>] (warn_slowpath_common) from [<c0025a18>] (warn_slowpath_null+0x
24/0x2c)
 r8:0000006c r7:ee513f60 r6:ee513f00 r5:ee611010 r4:cc873a00
 (warn_slowpath_null) from [<c005d0a8>] (__free_irq+0x208/0x214)
 [<c005cea0>] (__free_irq) from [<c005d158>] (free_irq+0x54/0xac)
 r10:00000002 r9:00000000 r8:00000000 r7:ee611010
r6:0000006c r5:00000000
  r4:ee513f00 r3:00000000
  [<c005d104>] (free_irq) from [<c02a81b0>] (knav_range_setup_acc_irq+0xb0/0x1
28)
  r7:00000001 r6:0000006c r5:ee611010 r4:00000001
  [<c02a8100>] (knav_range_setup_acc_irq) from [<c02a8248>] (knav_acc_close_qu
eue+0x20/0x24)
  r8:edd1a4c8 r7:00001000 r6:eed89980 r5:ee616650 r4:edf9d990
  [<c02a8228>] (knav_acc_close_queue) from [<c02a6160>] (knav_queue_close+0xb4
/0xb8)
  [<c02a60ac>] (knav_queue_close) from [<c0336270>] (netcp_free_navigator_reso
urces+0x1d4/0x2c0)
 r5:edd1a480 r4:00000400
 [<c033609c>] (netcp_free_navigator_resources) from
 [<c033657c>] (netcp_ndo_stop+0x220/0x230)
 r10:00008914 r9:edf34400 r8:00000000 r7:edd1a5d8 r6:edd1a480 r5:00000400
 r4:edd1a000
 [<c033635c>] (netcp_ndo_stop) from [<c03d9c80> (__dev_close_many+0x90/0xd8)
 r7:00001003 r6:00001042 r5:edb0de20 r4:edd1a000
 [<c03d9bf0>] (__dev_close_many) from [<c03d9df4>] (__dev_close+0x30/0x48)
  r5:00000001 r4:edd1a000
 [<c03d9dc4>] (__dev_close) from [<c03e175c>] (__dev_change_flags+0x9c/0x14c)
 [<c03e16c0>] (__dev_change_flags) from [<c03e182c>] (dev_change_flags+0x20/0

  r9:edf34400 r8:00000000 r7:00000000 r6:00001003 r5:edd1a138 r4:edd1a000
 [<c03e180c>] (dev_change_flags) from [<c0446f94>] (devinet_ioctl+0x680/0x754

  r9:edf34400 r8:bef6af3c r7:00000000 r6:bef6ac64 r5:edf3440c r4:00000000
 [<c0446914>] (devinet_ioctl) from [<c0448760>] (inet_ioctl+0x1a8/0x1d0)
  r10:00000000 r9:edb0c000 r8:bef6ac64 r7:00000003 r6:bef6ac64 r5:bef6ac64
  r4:00008914
 [<c04485b8>] (inet_ioctl) from [<c03c72fc>] (sock_ioctl+0x1d0/0x2a8)
 [<c03c712c>] (sock_ioctl) from [<c00eb608>] (do_vfs_ioctl+0x414/0x604)
  r7:00000003 r6:ed8b60c0 r5:bef6ac64 r4:ccc88f20
 [<c00eb1f4>] (do_vfs_ioctl) from [<c00eb834>] (SyS_ioctl+0x3c/0x64)
  r9:edb0c000 r8:bef6ac64 r7:00008914 r6:ed8b60c0 r5:00000003 r4:ed8b60c0
 [<c00eb7f8>] (SyS_ioctl) from [<c000f780>] (ret_fast_syscall+0x0/0x3c)
  r9:edb0c000 r8:c000f924 r7:00000036 r6:0007e77c r5:bef6ac64 r4:0007e7d0
 ---[ end trace f565594c905af0b4 ]---

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoarm-soc: document merges
Arnd Bergmann [Thu, 8 Oct 2015 15:53:44 +0000 (17:53 +0200)]
arm-soc: document merges

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoMerge branches 'next/fixes-non-critical', 'next/soc', 'next/dt', 'next/defconfig...
Arnd Bergmann [Thu, 8 Oct 2015 15:50:28 +0000 (17:50 +0200)]
Merge branches 'next/fixes-non-critical', 'next/soc', 'next/dt', 'next/defconfig' and 'next/drivers' into for-next

* next/fixes-non-critical:
  ARM: cns3xxx: pci: avoid potential stack overflow
  ARM: davinci: clock: Correct return values for API functions
  ARM: davinci: re-use %*ph specifier

* next/soc:
  ARM: meson: Enable Meson8b SoCs

* next/dt: (35 commits)
  ARM: meson: Add DTS for Odroid-C1 and Tronfy MXQ boards
  of: documentation: add bindings documentation for Meson8b
  of: documentation: Add vendor prefix for Tronfy
  ARM: dts: keystone: Update SoC specific compatible flags
  ARM: keystone: Update compatible to have SoC specific matches
  Documentation: dt: keystone: provide SoC specific compatible flags
  ARM: shmobile: porter: add Ether DT support
  ARM: shmobile: fix SILK board name
  ARM: shmobile: r8a7794: add HS-USB DT support
  ARM: shmobile: dts: Add common file for AA121TD01 panel
  ARM: shmobile: r8a7794: link PCI USB devices to USB PHY
  ARM: shmobile: silk: enable USB PHY
  ARM: shmobile: r8a7794: add USB PHY DT support
  ARM: shmobile: porter: initial device tree
  ARM: shmobile: add Porter board DT bindings
  ARM: shmobile: silk: enable internal PCI
  ARM: shmobile: r8a7794: add internal PCI bridge nodes
  ARM: dts: keystone: Add ti,keystone-spi for SPI
  ARM: shmobile: r8a7790: lager: add pinmux for iic0
  ARM: shmobile: r8a7778: tidyup SSI resource region
  ...

* next/defconfig:
  ARM: configs: keystone: Add basic systemd related options
  ARM: configs: keystone: sync to savedefconfig

* next/drivers:
  misc: atmel_tclib: get and use slow clock
  clocksource: tcb_clksrc: fix setup_clkevents error path
  clocksource: atmel-st: get and use slow clock

8 years agoMerge tag 'keystone-config' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh...
Arnd Bergmann [Thu, 8 Oct 2015 15:31:52 +0000 (17:31 +0200)]
Merge tag 'keystone-config' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/defconfig

Merge "Couple of ARM Keystone config patches" from Santosh Shilimkar:
- Sync up the config with savedefconfig
- Add basic systemd options

* tag 'keystone-config' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  ARM: configs: keystone: Add basic systemd related options
  ARM: configs: keystone: sync to savedefconfig

8 years agoMerge tag 'keystone-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh...
Arnd Bergmann [Thu, 8 Oct 2015 15:30:23 +0000 (17:30 +0200)]
Merge tag 'keystone-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into next/dt

Merge "ARM Keystone DTS updates" from Santosh Shilimkar:
- Add SOC compatible along with EVMs for future board variations.
- Add SPI nodes

* tag 'keystone-dts' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
  ARM: dts: keystone: Update SoC specific compatible flags
  ARM: keystone: Update compatible to have SoC specific matches
  Documentation: dt: keystone: provide SoC specific compatible flags
  ARM: dts: keystone: Add ti,keystone-spi for SPI

8 years agoMerge tag 'at91-cleanup-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abellon...
Arnd Bergmann [Thu, 8 Oct 2015 15:26:27 +0000 (17:26 +0200)]
Merge tag 'at91-cleanup-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into next/drivers

Merge "First batch of cleanups for 4.4:" from Alexandre Belloni:
 - properly get the slow clock from timer-atmel-st, tcb_clksrc and pwm-atmel-tcb
 - small fix in an error path for tcb_clksrc

* tag 'at91-cleanup-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  misc: atmel_tclib: get and use slow clock
  clocksource: tcb_clksrc: fix setup_clkevents error path
  clocksource: atmel-st: get and use slow clock

8 years agoMerge tag 'davinci-for-v4.4/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Thu, 8 Oct 2015 15:24:08 +0000 (17:24 +0200)]
Merge tag 'davinci-for-v4.4/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/fixes-non-critical

Merge "DaVinci non-critical fixes for v4.4" from Sekhar Nori:

Fix for incorrect handling of NULL clk pointer in
DaVinci clock code. And a fix to use a more appropiate
format specifier in a debug message.

* tag 'davinci-for-v4.4/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
  ARM: davinci: clock: Correct return values for API functions
  ARM: davinci: re-use %*ph specifier

8 years agoARM: meson: Enable Meson8b SoCs
Carlo Caione [Wed, 7 Oct 2015 20:31:05 +0000 (22:31 +0200)]
ARM: meson: Enable Meson8b SoCs

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoARM: meson: Add DTS for Odroid-C1 and Tronfy MXQ boards
Carlo Caione [Wed, 7 Oct 2015 20:31:04 +0000 (22:31 +0200)]
ARM: meson: Add DTS for Odroid-C1 and Tronfy MXQ boards

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoof: documentation: add bindings documentation for Meson8b
Carlo Caione [Wed, 7 Oct 2015 20:31:03 +0000 (22:31 +0200)]
of: documentation: add bindings documentation for Meson8b

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoof: documentation: Add vendor prefix for Tronfy
Carlo Caione [Wed, 7 Oct 2015 20:31:02 +0000 (22:31 +0200)]
of: documentation: Add vendor prefix for Tronfy

Tronfy is an emerging brand in China specializing in Home Theater
solutions for the normal consumers.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoMerge tag 'renesas-dt-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Thu, 8 Oct 2015 15:20:25 +0000 (17:20 +0200)]
Merge tag 'renesas-dt-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt

Merge "Renesas ARM Based SoC DT Updates for v4.4" from Simon Horman:

* Add missing CPG/MSTP Clock Domain for sound on r8a779[01] SoCs
* Tidy up SCI resource region on r8a779[018] SoCs
* Add pinmux for iic0 on Lager board
* Use CCF for audio clock on Lager and Koelsch boards
* Use serial0 and 1 as serial ports on Marzen board
* Use adxl345-specific compatible property for KZM9G board
* Document compat string for Silk board
* Enable GPIO, I2C, PCI, QSPI, USB PHY and HS, and VIN support on r8a7794/Silk
* Add initial support for r8a7791/porter
* Add common file for AA121TD01 panel

* tag 'renesas-dt-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (28 commits)
  ARM: shmobile: porter: add Ether DT support
  ARM: shmobile: fix SILK board name
  ARM: shmobile: r8a7794: add HS-USB DT support
  ARM: shmobile: dts: Add common file for AA121TD01 panel
  ARM: shmobile: r8a7794: link PCI USB devices to USB PHY
  ARM: shmobile: silk: enable USB PHY
  ARM: shmobile: r8a7794: add USB PHY DT support
  ARM: shmobile: porter: initial device tree
  ARM: shmobile: add Porter board DT bindings
  ARM: shmobile: silk: enable internal PCI
  ARM: shmobile: r8a7794: add internal PCI bridge nodes
  ARM: shmobile: r8a7790: lager: add pinmux for iic0
  ARM: shmobile: r8a7778: tidyup SSI resource region
  ARM: shmobile: r8a7791: tidyup SSI resource region
  ARM: shmobile: r8a7790: tidyup SSI resource region
  ARM: shmobile: lager: use CCF for audio clock
  ARM: shmobile: koelsch: use CCF for audio clock
  ARM: shmobile: silk: add VIN0/ADV7180 DT support
  ARM: shmobile: r8a7794: add VIN DT support
  ARM: shmobile: silk: add I2C1 DT support
  ...

8 years agoMerge branch 'renesas/cleanup' into next/dt
Arnd Bergmann [Thu, 8 Oct 2015 15:20:09 +0000 (17:20 +0200)]
Merge branch 'renesas/cleanup' into next/dt

Dependency for renesas/dt

8 years agoARM: cns3xxx: pci: avoid potential stack overflow
Arnd Bergmann [Wed, 7 Oct 2015 20:05:49 +0000 (22:05 +0200)]
ARM: cns3xxx: pci: avoid potential stack overflow

The cns3xxx_pcie_hw_init function uses excessive kernel
stack space because of a hack that puts a fake struct
pci_sys_data and struct pci_bus on the stack in order to
call the generic pci_bus_read_config accessors, which causes
a warning in ARM allmodconfig builds:

arch/arm/mach-cns3xxx/pcie.c:266:1: warning: the frame size of 1080 bytes is larger than 1024 bytes

I've spent a few hours trying to find out what exactly this
code is wants to achieve here. The obvious part is setting
up the host_regs using config space accessors, and this can
simply be changed to use direct MMIO accesses, as I do
in this patch.

The second part is how the driver sets up the Max_Read_Request_Size
value for the first device/function on bus 1, i.e. the device
plugged directly into the PCIe root port.
For all I can tell, this is in fact incomplete, as it does not
perform the same setting on devices attached to a PCIe switch,
or multi-function devices.
The solution for this part fortunately is even easier: if we
just set the global pcie_bus_config variable to PCIE_BUS_PEER2PEER,
all PCIe devices in the system are limited to 128 byte MPS, which
in turn limits the MRRS to 128 bytes for all devices, and we
no longer even need to touch any devices.

With those two changes in place, we no longer need the fake
pci_sys_data/pci_bus structures for faking config space writes,
and the stack usage goes down as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
8 years agoARM: davinci: clock: Correct return values for API functions
Peter Ujfalusi [Mon, 14 Sep 2015 09:29:39 +0000 (12:29 +0300)]
ARM: davinci: clock: Correct return values for API functions

Fix the values returned by the publicly used functions.
These function should return 0 when they are called with clk == NULL in
similar manner as the clock API does to avoid different behavior in drivers
used by daVinci and other architectures.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
8 years agoARM: davinci: re-use %*ph specifier
Andy Shevchenko [Thu, 1 Oct 2015 13:13:05 +0000 (16:13 +0300)]
ARM: davinci: re-use %*ph specifier

%*ph specifier allows to dump data in hex format using the pointer
to a buffer. This is suitable to use here.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
8 years agoARM: dts: keystone: Update SoC specific compatible flags
Nishanth Menon [Sun, 4 Oct 2015 00:02:56 +0000 (17:02 -0700)]
ARM: dts: keystone: Update SoC specific compatible flags

Update the compatible flags to allow specific SoC identification.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
8 years agoARM: keystone: Update compatible to have SoC specific matches
Nishanth Menon [Sun, 4 Oct 2015 00:02:56 +0000 (17:02 -0700)]
ARM: keystone: Update compatible to have SoC specific matches

With future SoCs of keystone2 family, the generic compatible match
may not be sufficient to handle SoC specific handling. So introduce
matches based on SoC compatiblity.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
8 years agoDocumentation: dt: keystone: provide SoC specific compatible flags
Nishanth Menon [Sun, 4 Oct 2015 00:02:56 +0000 (17:02 -0700)]
Documentation: dt: keystone: provide SoC specific compatible flags

Keystone2 devices are used on more platforms than just Texas
Instruments reference evaluation platforms called EVMs. Providing a
generic compatible "ti,keystone" is not sufficient to differentiate
various SoC definitions possible on various platforms for the
following reasons:
a) Userspace applications have no way of knowing which SoC they are
functioning, providing the compatible matches provide a mechanism for
them to enable SoC specific functionality. Such userspace applications
are typically automated test framework or SoC custom hardware
acceleration entitlement from a common file system.
b) Provides an accurate hardware description. This allows
SoC specific logic to be run time handled based on
of_machine_is_compatible("ti,k2hk") or as needed for the dependent
processor instead of needing to use board dependent compatibles that
are needed now.

Hence, provide compatible matches for each SoC in the Keystone family.

Acked-By: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>
8 years agoarm-soc: document merges
Arnd Bergmann [Tue, 6 Oct 2015 15:14:05 +0000 (17:14 +0200)]
arm-soc: document merges

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoMerge branches 'next/cleanup', 'next/defconfig', 'next/dt', 'next/soc' and 'next...
Arnd Bergmann [Tue, 6 Oct 2015 14:49:04 +0000 (16:49 +0200)]
Merge branches 'next/cleanup', 'next/defconfig', 'next/dt', 'next/soc' and 'next/drivers' into for-next

* next/cleanup: (23 commits)
  ARM: shmobile: Remove legacy clock support leftovers
  ARM: shmobile: remove Makefile.boot
  ARM: shmobile: Kconfig: remove unused SHMOBILE_TIMER_HZ section
  ARM: shmobile: bockw: remove legacy DTB build target
  MAINTAINERS: remove references to dropped marzen and bockw defconfigs
  ARM: shmobile: bockw: remove legacy defconfig
  ARM: shmobile: remove ARCH_SHMOBILE_LEGACY option
  ARM: shmobile: r8a7778: remove legacy clock implementation
  ARM: shmobile: Kconfig: remove obsolete option ARCH_R8A7778
  ARM: shmobile: r8a7778: remove obsolete setup code
  ARM: shmobile: bockw: remove legacy board file and config
  ARM: shmobile: remove paragraph on DT reference platforms
  ARM: shmobile: bockw: remove "reference" board file and config
  ARM: shmobile: bockw: remove "reference" device tree
  ARM: shmobile: Remove obsolete twd_local_timer declaration
  ARM: shmobile: Remove obsolete earlytimer registration
  ARM: shmobile: Remove obsolete legacy PM Domain leftovers
  ARM: shmobile: Remove obsolete intc.h
  ARM: shmobile: Remove obsolete custom earlyprintk code
  ARM: shmobile: Remove obsolete sh-gpio.h
  ...

* next/defconfig:
  ARM: multi_v7_defconfig: Support RTC devices commonly used on Rockchip boards
  ARM: multi_v7_defconfig: Enable the Rockchip USB 2.0 phy
  ARM: multi_v7_defconfig: Enable Rockchip display support
  ARM: multi_v7_defconfig: Enable common regulators for rockchip boards
  ARM: multi_v7_defconfig: Enable common Rockchip devices/busses
  ARM: multi_v7_defconfig: Add missing QCOM APQ8064 configs
  ARM: multi_v7_defconfig: Add NSP to defconfig
  ARM: multi_v7_defconfig: Remove Marzen
  ARM: shmobile: Remove Marzen from shmobile_defconfig

* next/dt: (46 commits)
  arm64: dts: add all hi6220 uart nodes
  arm64: dts: Add base stratix 10 dtsi
  ARM: socfpga: dts: enable USB and I2C on Arria10 SoCDK
  ARM: socfpga: dts: add clock fields for I2C, UART and USB on Arria10
  ARM: STi: STiH407: Enable the 2 HW Random Number Generators for STiH4{07, 10}
  ARM: DT: STi: STiH418: Fix mmc0 clock configuration
  ARM: STi: DT: STiH407: Rename incorrect interrupt related binding
  ARM: STi: STiH407: Add spi default pinctrl groups.
  ARM: DT: STiH407: Add RMII pinctrl support
  ARM: DT: STiH407: Add pinconfig for IRB UHF and IRB TX
  ARM: DT: STiH407: Add SD pinctrl config for mmc0 controller
  ARM: DT: STiH407: Add systrace pin configuration
  ARM: DT: STiH407: Add NAND flash controller pin configuration
  ARM: DT: STiH407: Add SPI FSM (NOR Flash) Controller pin config
  ARM: DT: STiH407: Add serial3 pinctrl configuration
  ARM: DT: STiH407: Add SPI 3 wire and 4 wire pinctrl configs
  ARM: STi: DT: STiH407: Add i2c3 alternate pin configs
  ARM: STi: DT: STiH407: Add a cec0 pin definition
  ARM: dts: stih410: Enable USB2.0 and related PHY nodes at board level
  ARM: dts: stih407/410: Tidy up display nodes
  ...

* next/soc:
  ARM: at91: debug: use DEBUG_UART_PHYS
  ARM: at91: remove useless includes in platform_data/atmel.h
  MAINTAINERS: explicitly add Atmel SAMA5
  ARM: shmobile: R-Mobile: Use CPG/MSTP Clock Domain attach/detach helpers
  clk: shmobile: mstp: Consider "zb_clk" suitable for power management

* next/drivers:
  clk: shmobile: mstp: Consider "zb_clk" suitable for power management

8 years agoMerge tag 'v4.3-rc4' into for-next
Arnd Bergmann [Tue, 6 Oct 2015 14:49:00 +0000 (16:49 +0200)]
Merge tag 'v4.3-rc4' into for-next

Linux 4.3-rc4

8 years agoMerge tag 'renesas-clk-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 6 Oct 2015 14:46:41 +0000 (16:46 +0200)]
Merge tag 'renesas-clk-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers

Merge "Renesas ARM Based SoC Clk Updates for v4.4" from Simon Horman:

* Consider "zb_clk" suitable for power management

  This part of a multi-stage effort by Geert Uytterhoeven to add:

  "Clock Domain support to the Clock Pulse Generator (CPG) Module Stop
   (MSTP) Clocks driver using the generic PM Domain, to be used on shmobile
   SoCs without device power domains (R-Car Gen1 and Gen2, RZ).  This allows
   to power-manage the module clocks of SoC devices that are part of the
   CPG/MSTP Clock Domain using Runtime PM, or for system suspend/resume,
   similar to SoCs with device power domains (SH-Mobile and R-Mobile)."

* tag 'renesas-clk-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  clk: shmobile: mstp: Consider "zb_clk" suitable for power management

8 years agoMerge tag 'at91-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux...
Arnd Bergmann [Tue, 6 Oct 2015 14:43:25 +0000 (16:43 +0200)]
Merge tag 'at91-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/soc

Merge "First little batch of SoC changes for 4.4" from Nicolas Ferre:

- a MAINTAINER addition to cover SAMA5 SoCs
- removal of one unneeded header file
- for low-level serial output, use the DEBUG_UART_PHYS

* tag 'at91-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91: debug: use DEBUG_UART_PHYS
  ARM: at91: remove useless includes in platform_data/atmel.h
  MAINTAINERS: explicitly add Atmel SAMA5

8 years agoMerge tag 'renesas-soc-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 6 Oct 2015 14:42:07 +0000 (16:42 +0200)]
Merge tag 'renesas-soc-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

Merge "Renesas ARM Based SoC Updates for v4.4" from Simon Horman:

* ARM: shmobile: R-Mobile: Use CPG/MSTP Clock Domain attach/detach helpers

  This part of a multi-stage effort by Geert Uytterhoeven to add:

  "Clock Domain support to the Clock Pulse Generator (CPG) Module Stop
   (MSTP) Clocks driver using the generic PM Domain, to be used on shmobile
   SoCs without device power domains (R-Car Gen1 and Gen2, RZ).  This allows
   to power-manage the module clocks of SoC devices that are part of the
   CPG/MSTP Clock Domain using Runtime PM, or for system suspend/resume,
   similar to SoCs with device power domains (SH-Mobile and R-Mobile)."

* tag 'renesas-soc-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: R-Mobile: Use CPG/MSTP Clock Domain attach/detach helpers
  clk: shmobile: mstp: Consider "zb_clk" suitable for power management

8 years agoarm64: dts: add all hi6220 uart nodes
Tyler Baker [Thu, 1 Oct 2015 01:19:48 +0000 (18:19 -0700)]
arm64: dts: add all hi6220 uart nodes

This patch adds all UART nodes for the Hi6220 SoC. Recently a board[1] has
been developed to standardize UART access across all the 96boards consumer
edition boards. To use this hardware on HiKey we must configure and enable
UART3. However, to ensure backward compatibility we must keep UART0 enabled
as well.

I have removed the hard coded clock index values in favor of using the ones
already defined in include/dt-bindings/clock/hi6220-clock.h.

Since UART0 needs to be soldered, it has been suggested to use the UART3 as
the default console.

This patch was boot tested on top of next-20150930, with both UART
configurations.

[1] http://www.seeedstudio.com/depot/96Boards-UART-p-2525.html?ref=newInBazaar

Signed-off-by: Tyler Baker <tyler.baker@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoMerge tag 'socfpga_dts_for_v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 6 Oct 2015 14:31:17 +0000 (16:31 +0200)]
Merge tag 'socfpga_dts_for_v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt

Merge "SoCFPGA DTS updates for v4.4" from Dinh Nguyen:
- Add base arm64 dts for Statrix 10
- Peripheral updates for Arria10(USB,I2C,UART)

* tag 'socfpga_dts_for_v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  arm64: dts: Add base stratix 10 dtsi
  ARM: socfpga: dts: enable USB and I2C on Arria10 SoCDK
  ARM: socfpga: dts: add clock fields for I2C, UART and USB on Arria10

8 years agoMerge tag 'xgene-dts-for-v4.4-1' of https://github.com/AppliedMicro/xgene-next into...
Arnd Bergmann [Tue, 6 Oct 2015 14:28:37 +0000 (16:28 +0200)]
Merge tag 'xgene-dts-for-v4.4-1' of https://github.com/AppliedMicro/xgene-next into next/dt

Merge "X-Gene DTS changes queued for v4.4" from Duc Dang:

* tag 'xgene-dts-for-v4.4-1' of https://github.com/AppliedMicro/xgene-next:
  arm64: dts: Add poweroff device nodes for APM X-Gene 2 platform
  arm64: dts: Add APM X-Gene 2 standby GPIO controller DTS entries
  arm64: dts: Add PMU node for APM X-Gene Storm SOC
  Documentation: arm: pmu: Add Potenza PMU binding
  arm64: dts: Add X-Gene v2 reboot driver dts node
  arm64: dts: add APM Merlin Board device tree
  power: reset: Add syscon poweroff device node for APM X-Gene platform
  arm64: dts: Add X-Gene reboot driver dts node
  Documentation: arm64: add SCU dts binding documentation to linux kernel
  MAINTAINERS: Add Applied Micro (APM) X-Gene Device Tree maintainer

8 years agoMerge tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux...
Arnd Bergmann [Tue, 6 Oct 2015 14:26:38 +0000 (16:26 +0200)]
Merge tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/dt

Merge "First batch of DT changes for 4.4:" from Nicolas Ferre:

- some DT fixes: dma declaration, led labels
- disable some nodes: PMIC on sama5d3 Xplained, unused i2c1 on at91sam9n12ek
- add some others that were missing: touchscreen, cryto nodes, LCD panels or
  image capture properties on various boards
- as the new pinmux for sama5d2 was accepted, we can now add the definitions
  and the actual muxing for sama5d2 Xplained board

* tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91/dt: sama5d2 Xplained: add device pin muxing
  ARM: at91/dt: add sama5d2 pinmux
  ARM: at91/dt: ov2640: add hsync/vsync-active property
  ARM: at91/dt: sama5d4 xplained: enable the led D8
  ARM: at91/dt: sama5d4ek: Add support of QT1070 and Maxtouch
  ARM: at91/dt: sama5d4: enable crypto nodes
  ARM: at91/dt: sama5d4: add pioD pin mux mask and enable pioD
  ARM: at91/dt: sama5d3: update iio config for touchscreen
  ARM: at91/dt: sama5d3 xplained: disable pmic
  ARM: at91/dt: at91sam9x5: enable iio touchscreen for 9x5ek
  ARM: at91/dt: at91sam9n12ek: disable i2c1
  ARM: at91/dt: at91sam9n12ek: fix the led labels name
  ARM: at91/dt: corrections to i2c1 declaration to sama5d4

8 years agoMerge tag 'sti-dt-for-v4.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 6 Oct 2015 14:25:00 +0000 (16:25 +0200)]
Merge tag 'sti-dt-for-v4.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mcoquelin/sti into next/dt

Merge "STi DT changes for v4.4, round 1" from Maxime Coquelin:

Highlights:
-----------
 - Add multiple pinctrl configurations to STiH407
 - Enable devices using pins only at board level
 - Add HW RNG device nodes to STiH407 family
 - Fix MMC0 clock configuration on STiH418
 - Fix interrupt related bindings on STiH407

* tag 'sti-dt-for-v4.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mcoquelin/sti:
  ARM: STi: STiH407: Enable the 2 HW Random Number Generators for STiH4{07, 10}
  ARM: DT: STi: STiH418: Fix mmc0 clock configuration
  ARM: STi: DT: STiH407: Rename incorrect interrupt related binding
  ARM: STi: STiH407: Add spi default pinctrl groups.
  ARM: DT: STiH407: Add RMII pinctrl support
  ARM: DT: STiH407: Add pinconfig for IRB UHF and IRB TX
  ARM: DT: STiH407: Add SD pinctrl config for mmc0 controller
  ARM: DT: STiH407: Add systrace pin configuration
  ARM: DT: STiH407: Add NAND flash controller pin configuration
  ARM: DT: STiH407: Add SPI FSM (NOR Flash) Controller pin config
  ARM: DT: STiH407: Add serial3 pinctrl configuration
  ARM: DT: STiH407: Add SPI 3 wire and 4 wire pinctrl configs
  ARM: STi: DT: STiH407: Add i2c3 alternate pin configs
  ARM: STi: DT: STiH407: Add a cec0 pin definition
  ARM: dts: stih410: Enable USB2.0 and related PHY nodes at board level
  ARM: dts: stih407/410: Tidy up display nodes
  ARM: dts: stih407: Enable PWM nodes only board level

8 years agoMerge tag 'hip05-dt-for-4.3' of git://github.com/hisilicon/linux-hisi into next/dt
Arnd Bergmann [Tue, 6 Oct 2015 14:20:52 +0000 (16:20 +0200)]
Merge tag 'hip05-dt-for-4.3' of git://github.com/hisilicon/linux-hisi into next/dt

Merge "ARM64: DT: Hisilicon hip05 soc and D02 board updates for 4.3" from Wei Xu:

- Updated the hisilicon devicetree bindings document to support hip05-D02 board
- Added dts files for hip05 SoC and D02 board

* tag 'hip05-dt-for-4.3' of git://github.com/hisilicon/linux-hisi:
  arm64: dts: add dts files for Hisilicon Hip05-D02 Development Board
  arm64: hip05-d02: Document devicetree bindings for Hisilicon Hip05-D02 Board

8 years agoARM: multi_v7_defconfig: Support RTC devices commonly used on Rockchip boards
Sjoerd Simons [Thu, 24 Sep 2015 11:39:19 +0000 (13:39 +0200)]
ARM: multi_v7_defconfig: Support RTC devices commonly used on Rockchip boards

Similar to the power management situation on Rockchip boards, there are
two common RTC setups. For boards using the RK808 chip as a PMIC that
chip also serves as the RTC, while boards using the ACT8846 typically use
the Haoyu Microelectronics HYM8563 chip as their RTC.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoARM: multi_v7_defconfig: Enable the Rockchip USB 2.0 phy
Sjoerd Simons [Thu, 24 Sep 2015 11:39:18 +0000 (13:39 +0200)]
ARM: multi_v7_defconfig: Enable the Rockchip USB 2.0 phy

Most Rockchip SoCs have a DesignWare HS OTG USB 2.0 controller, enable
the driver for the Rockchip USB 2.0 PHY to make that functional.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoARM: multi_v7_defconfig: Enable Rockchip display support
Sjoerd Simons [Thu, 24 Sep 2015 11:39:17 +0000 (13:39 +0200)]
ARM: multi_v7_defconfig: Enable Rockchip display support

Enable options needed for HDMI out on rockchip: DRM driver, Rockchip
DesignWare HDMI glue and the rockchip IOMMU (dependency of the DRM
driver).

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoARM: multi_v7_defconfig: Enable common regulators for rockchip boards
Sjoerd Simons [Thu, 24 Sep 2015 11:39:16 +0000 (13:39 +0200)]
ARM: multi_v7_defconfig: Enable common regulators for rockchip boards

Rockchip boards seem to have two common regulator setups. Various board
used the Active Semi act8846 often in combination with Silergy syr82x
regulators (e.g. Radxa Rock Pro/Rock 2, Firefly, and Netxeon R89 etc),
while others use regulator part of the Rockchip RK808 chip (e.g. the
various Veyron based chromebooks, Chipspark Popmetal etc)

Enable all these regulators.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoARM: multi_v7_defconfig: Enable common Rockchip devices/busses
Sjoerd Simons [Thu, 24 Sep 2015 11:39:15 +0000 (13:39 +0200)]
ARM: multi_v7_defconfig: Enable common Rockchip devices/busses

Enable Rockchip I2C, SPI, PWM, thermal drivers.

Builtin are I2C (as it often required to control the pmic) and Thermal
drivers (to prevent thermal damage). SPI and PWM drivers configured as
modules

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoARM: multi_v7_defconfig: Add missing QCOM APQ8064 configs
Srinivas Kandagatla [Mon, 5 Oct 2015 09:12:22 +0000 (10:12 +0100)]
ARM: multi_v7_defconfig: Add missing QCOM APQ8064 configs

This patch adds few missing essential configs in the multi_v7_defconf,
absense of some configs like PINCTRL_APQ8064 would prevent the board from
getting access to serial.

cc: Kevin Hilman <khilman@kernel.org>
cc: Tyler Baker <tyler.baker@linaro.org>
Tested-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoMerge tag 'arm-soc/for-4.4/defconfig' of http://github.com/Broadcom/stblinux into...
Arnd Bergmann [Tue, 6 Oct 2015 14:03:48 +0000 (16:03 +0200)]
Merge tag 'arm-soc/for-4.4/defconfig' of http://github.com/Broadcom/stblinux into next/defconfig

Merge "Broadcom defconfig changes for v4.4" from Florian Fainelli:

This pull request contains the following changes for the multi_v7_defconfig:

- Jon adds support for the NorthStar Plus SocS to the multi_v7_defconfig file

* tag 'arm-soc/for-4.4/defconfig' of http://github.com/Broadcom/stblinux:
  ARM: multi_v7_defconfig: Add NSP to defconfig

8 years agoMerge tag 'renesas-defconfig-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 6 Oct 2015 14:02:34 +0000 (16:02 +0200)]
Merge tag 'renesas-defconfig-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/defconfig

Merge "Renesas ARM Based SoC Defconfig Updates for v4.4" from Simon Horman:

* Remove now non-existent MACH_MARZEN from defconfigs

* tag 'renesas-defconfig-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: multi_v7_defconfig: Remove Marzen
  ARM: shmobile: Remove Marzen from shmobile_defconfig

8 years agoMerge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next...
Arnd Bergmann [Tue, 6 Oct 2015 13:59:16 +0000 (15:59 +0200)]
Merge tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux into next/cleanup

Merge "efm32 cleanups for 4.4-rc1" from Uwe Kleine-Koenig:

These are just two followup cleanups for commits that are in v3.17-rc1 and
waited in my private tree for application since that time.

* tag 'efm32-for-4.4-rc1' of git://git.pengutronix.de/git/ukl/linux:
  ARM: efm32: switch to vendor,device compatible strings
  ARM: efm32: switch to properly namespaced location property

8 years agoMerge tag 'renesas-cleanup-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Tue, 6 Oct 2015 13:45:52 +0000 (15:45 +0200)]
Merge tag 'renesas-cleanup-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/cleanup

Merge "Renesas ARM Based SoC Cleanup for v4.4" from Simon Horman:

* Remove bockw/r8a7798 legacy board and SoC code
* Many cleanups relating to legacy board and SoC code removal

* tag 'renesas-cleanup-for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (21 commits)
  ARM: shmobile: Remove legacy clock support leftovers
  ARM: shmobile: remove Makefile.boot
  ARM: shmobile: Kconfig: remove unused SHMOBILE_TIMER_HZ section
  ARM: shmobile: bockw: remove legacy DTB build target
  MAINTAINERS: remove references to dropped marzen and bockw defconfigs
  ARM: shmobile: bockw: remove legacy defconfig
  ARM: shmobile: remove ARCH_SHMOBILE_LEGACY option
  ARM: shmobile: r8a7778: remove legacy clock implementation
  ARM: shmobile: Kconfig: remove obsolete option ARCH_R8A7778
  ARM: shmobile: r8a7778: remove obsolete setup code
  ARM: shmobile: bockw: remove legacy board file and config
  ARM: shmobile: remove paragraph on DT reference platforms
  ARM: shmobile: bockw: remove "reference" board file and config
  ARM: shmobile: bockw: remove "reference" device tree
  ARM: shmobile: Remove obsolete twd_local_timer declaration
  ARM: shmobile: Remove obsolete earlytimer registration
  ARM: shmobile: Remove obsolete legacy PM Domain leftovers
  ARM: shmobile: Remove obsolete intc.h
  ARM: shmobile: Remove obsolete custom earlyprintk code
  ARM: shmobile: Remove obsolete sh-gpio.h
  ...

8 years agoMerge branch 'fixes' into for-next
Arnd Bergmann [Tue, 6 Oct 2015 12:36:33 +0000 (14:36 +0200)]
Merge branch 'fixes' into for-next

* fixes:
  ARM: dts: Fix wrong clock binding for sysmmu_fimd1_1 on exynos5420
  ARM: dts: Fix bootup thermal issue on smdk5250
  ARM: shmobile: r8a7791 dtsi: Add CPG/MSTP Clock Domain for sound
  ARM: shmobile: r8a7790 dtsi: Add CPG/MSTP Clock Domain for sound
  ARM: dts: add suspend opp to exynos4412
  ARM: dts: Fix LEDs on exynos5422-odroidxu3
  ARM: EXYNOS: reset Little cores when cpu is up
  ARM: dts: Fix Makefile target for sun4i-a10-itead-iteaduino-plus
  ARM: dts: sunxi: Raise minimum CPU voltage for sun7i-a20 to meet SoC specifications

8 years agoMerge tag 'renesas-fixes-for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 6 Oct 2015 12:31:53 +0000 (14:31 +0200)]
Merge tag 'renesas-fixes-for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Merge "Renesas ARM Based SoC Fixes for v4.3" from Simon Horman

* Add Add CPG/MSTP Clock Domain for sound on r8a779[01] SoCs.
  This allows sound to work once again.

* tag 'renesas-fixes-for-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7791 dtsi: Add CPG/MSTP Clock Domain for sound
  ARM: shmobile: r8a7790 dtsi: Add CPG/MSTP Clock Domain for sound

8 years agoMerge tag 'sunxi-fixes-for-4.3' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Tue, 6 Oct 2015 12:30:14 +0000 (14:30 +0200)]
Merge tag 'sunxi-fixes-for-4.3' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes

Merge "Allwinner fixes for 4.3" from Maxime Ripard:

Two patches, one that fixes one of the DT build, and the other raising the
voltage of the lowest OPP of the A20 to remain within the SoC operating
boundaries

* tag 'sunxi-fixes-for-4.3' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  ARM: dts: Fix Makefile target for sun4i-a10-itead-iteaduino-plus
  ARM: dts: sunxi: Raise minimum CPU voltage for sun7i-a20 to meet SoC specifications

8 years agoMerge tag 'samsung-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
Arnd Bergmann [Tue, 6 Oct 2015 12:26:32 +0000 (14:26 +0200)]
Merge tag 'samsung-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes

Merge "Samsung fixes for v4.3" from Kukjin Kim:

- fix invalid clock used for FIMD IOMMU
- fix thermal boot issue smdk5250-smdk5250
- fix S2R on exynos4412 trats2 boards
- fix LEDs on exynos5422-odroidxu3-common
- fix booting of all 8 cores on exynos542x

* tag 'samsung-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: dts: Fix wrong clock binding for sysmmu_fimd1_1 on exynos5420
  ARM: dts: Fix bootup thermal issue on smdk5250
  ARM: dts: add suspend opp to exynos4412
  ARM: dts: Fix LEDs on exynos5422-odroidxu3
  ARM: EXYNOS: reset Little cores when cpu is up

8 years agomisc: atmel_tclib: get and use slow clock
Boris Brezillon [Sun, 16 Aug 2015 09:23:46 +0000 (11:23 +0200)]
misc: atmel_tclib: get and use slow clock

Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system
hang") added a workaround for the slow clock as it is not properly handled
by its users.

Get and use the slow clock as it is necessary for the timer counters.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
8 years agoclocksource: tcb_clksrc: fix setup_clkevents error path
Boris Brezillon [Sun, 16 Aug 2015 09:23:45 +0000 (11:23 +0200)]
clocksource: tcb_clksrc: fix setup_clkevents error path

t2_clk is already disabled before request_irq(), it must not be disabled
again.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
8 years agoclocksource: atmel-st: get and use slow clock
Alexandre Belloni [Sun, 16 Aug 2015 09:23:44 +0000 (11:23 +0200)]
clocksource: atmel-st: get and use slow clock

The current slow clock rate is hardcoded. Properly get the slow clock
and use its rate.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
8 years agoarm64: dts: Add base stratix 10 dtsi
Dinh Nguyen [Wed, 5 Aug 2015 04:25:50 +0000 (23:25 -0500)]
arm64: dts: Add base stratix 10 dtsi

Add the base DTS for Altera's SoCFPGA Stratix 10 platform.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
---
v4: Add a non-zero ranges property for /soc node
v3: change #address-cells and #size-cells to <2>
    change the GIC address to 0xfffc1000
    update the GIC virtual CPU reg length to 0x2000
v2: use interrupt-affinity for pmu node

8 years agoARM: socfpga: dts: enable USB and I2C on Arria10 SoCDK
Dinh Nguyen [Tue, 22 Sep 2015 19:50:37 +0000 (14:50 -0500)]
ARM: socfpga: dts: enable USB and I2C on Arria10 SoCDK

On the Arria10 Devkit, the I2C bus has a serial EEPROM and an RTC
hanging off it. Also, enable the USB node.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
8 years agoARM: socfpga: dts: add clock fields for I2C, UART and USB on Arria10
Dinh Nguyen [Tue, 22 Sep 2015 20:55:56 +0000 (15:55 -0500)]
ARM: socfpga: dts: add clock fields for I2C, UART and USB on Arria10

Add the required clock fields for all the I2C nodes. Also add missing clock
fields for UART0 and USB1.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
8 years agosoc: rockchip: power-domain: Add power domain driver
Caesar Wang [Tue, 8 Sep 2015 06:18:22 +0000 (14:18 +0800)]
soc: rockchip: power-domain: Add power domain driver

This driver is found on RK3288 SoCs.

In order to meet high performance and low power requirements, a power
management unit is designed or saving power when RK3288 in low power
mode.
The RK3288 PMU is dedicated for managing the power of the whole chip.

PMU can work in the Low Power Mode by setting bit[0] of PMU_PWRMODE_CON
register. After setting the register, PMU would enter the Low Power mode.
In the low power mode, pmu will auto power on/off the specified power
domain, send idle req to specified power domain, shut down/up pll and
so on. All of above are configurable by setting corresponding registers.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
[replace dsb() with dsb(sy) for arm64 buildability; sy is the default,
so no functional change; adapt to per-user clocks in genpd]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agodt-bindings: add document of Rockchip power domains
Caesar Wang [Tue, 8 Sep 2015 06:18:20 +0000 (14:18 +0800)]
dt-bindings: add document of Rockchip power domains

This add the necessary binding documentation for the power domains
found on Rockchip SoCs.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoMerge branch 'v4.4-armsoc/pd-headers' into v4.4-armsoc/drivers
Heiko Stuebner [Tue, 6 Oct 2015 07:47:26 +0000 (09:47 +0200)]
Merge branch 'v4.4-armsoc/pd-headers' into v4.4-armsoc/drivers

8 years agoPM / clk: Do not __clk_get passed in clock-references
Stephen Boyd [Thu, 1 Oct 2015 19:05:09 +0000 (21:05 +0200)]
PM / clk: Do not __clk_get passed in clock-references

Clock references are on a per-user basis now, so they are not supposed
to be refcounted by itself anymore. Therefore multiple cascaded get and
put calls will fail.

When a clock reference gets passed into pm_clk_add_clk we can assume
that the pm clock handling will take control of the clock reference,
so after this functions returns the caller should've given up control
of that handle.

So remove the additional call to __clk_get() in __pm_clk_add().

The only current user of pm_clk_add_clk is drivers/clk/shmobile/clk-mstp.c
which already follows this paradigm by only getting the clock but not
puting it after passing the reference into pm_clk_add_clk.

In the error case the caller is expected to clean up the clock, as it
may very well try to do something different if pm_clk_add_clk() fails.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
[add commit-message]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoARM: shmobile: porter: add Ether DT support
Sergei Shtylyov [Mon, 5 Oct 2015 22:51:01 +0000 (01:51 +0300)]
ARM: shmobile: porter: add Ether DT support

Define  the Porter board dependent part of the Ether device node.
Enable DHCP and NFS root for the kernel booting.

This  patch  is analogous to the commit 26b0d2cf73cb ("ARM: shmobile:
henninger: add Ether DT support") as there  are no differences between
those boards in this respect.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
8 years agoARM: shmobile: fix SILK board name
Sergei Shtylyov [Fri, 2 Oct 2015 21:53:38 +0000 (00:53 +0300)]
ARM: shmobile: fix SILK board name

Unfortunately, the SILK board bindings were not quite correct, as the  board
name should be all caps.  Fix that,  adding the board model #  in parens and
removing stray semicolon.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
8 years agoARM: shmobile: r8a7794: add HS-USB DT support
Sergei Shtylyov [Wed, 16 Sep 2015 23:53:58 +0000 (02:53 +0300)]
ARM: shmobile: r8a7794: add HS-USB DT support

Define the R8A7794 generic part of the HS-USB device node.
It is up to the board file to enable the device.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
8 years agoLinux 4.3-rc4 v4.3-rc4
Linus Torvalds [Sun, 4 Oct 2015 15:57:17 +0000 (16:57 +0100)]
Linux 4.3-rc4

8 years agoMerge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf...
Linus Torvalds [Sun, 4 Oct 2015 15:31:13 +0000 (16:31 +0100)]
Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull strscpy string copy function implementation from Chris Metcalf.

Chris sent this during the merge window, but I waffled back and forth on
the pull request, which is why it's going in only now.

The new "strscpy()" function is definitely easier to use and more secure
than either strncpy() or strlcpy(), both of which are horrible nasty
interfaces that have serious and irredeemable problems.

strncpy() has a useless return value, and doesn't NUL-terminate an
overlong result.  To make matters worse, it pads a short result with
zeroes, which is a performance disaster if you have big buffers.

strlcpy(), by contrast, is a mis-designed "fix" for strlcpy(), lacking
the insane NUL padding, but having a differently broken return value
which returns the original length of the source string.  Which means
that it will read characters past the count from the source buffer, and
you have to trust the source to be properly terminated.  It also makes
error handling fragile, since the test for overflow is unnecessarily
subtle.

strscpy() avoids both these problems, guaranteeing the NUL termination
(but not excessive padding) if the destination size wasn't zero, and
making the overflow condition very obvious by returning -E2BIG.  It also
doesn't read past the size of the source, and can thus be used for
untrusted source data too.

So why did I waffle about this for so long?

Every time we introduce a new-and-improved interface, people start doing
these interminable series of trivial conversion patches.

And every time that happens, somebody does some silly mistake, and the
conversion patch to the improved interface actually makes things worse.
Because the patch is mindnumbing and trivial, nobody has the attention
span to look at it carefully, and it's usually done over large swatches
of source code which means that not every conversion gets tested.

So I'm pulling the strscpy() support because it *is* a better interface.
But I will refuse to pull mindless conversion patches.  Use this in
places where it makes sense, but don't do trivial patches to fix things
that aren't actually known to be broken.

* 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: use global strscpy() rather than private copy
  string: provide strscpy()
  Make asm/word-at-a-time.h available on all architectures

8 years agoMerge tag 'md/4.3-fixes' of git://neil.brown.name/md
Linus Torvalds [Sun, 4 Oct 2015 10:47:28 +0000 (11:47 +0100)]
Merge tag 'md/4.3-fixes' of git://neil.brown.name/md

Pull md fixes from Neil Brown:
 "Assorted fixes for md in 4.3-rc.

  Two tagged for -stable, and one is really a cleanup to match and
  improve kmemcache interface.

* tag 'md/4.3-fixes' of git://neil.brown.name/md:
  md/bitmap: don't pass -1 to bitmap_storage_alloc.
  md/raid1: Avoid raid1 resync getting stuck
  md: drop null test before destroy functions
  md: clear CHANGE_PENDING in readonly array
  md/raid0: apply base queue limits *before* disk_stack_limits
  md/raid5: don't index beyond end of array in need_this_block().
  raid5: update analysis state for failed stripe
  md: wait for pending superblock updates before switching to read-only

8 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 4 Oct 2015 10:41:58 +0000 (11:41 +0100)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS updates from Ralf Baechle:
 "This week's round of MIPS fixes:
   - Fix JZ4740 build
   - Fix fallback to GFP_DMA
   - FP seccomp in case of ENOSYS
   - Fix bootmem panic
   - A number of FP and CPS fixes
   - Wire up new syscalls
   - Make sure BPF assembler objects can properly be disassembled
   - Fix BPF assembler code for MIPS I"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: scall: Always run the seccomp syscall filters
  MIPS: Octeon: Fix kernel panic on startup from memory corruption
  MIPS: Fix R2300 FP context switch handling
  MIPS: Fix octeon FP context switch handling
  MIPS: BPF: Fix load delay slots.
  MIPS: BPF: Do all exports of symbols with FEXPORT().
  MIPS: Fix the build on jz4740 after removing the custom gpio.h
  MIPS: CPS: #ifdef on CONFIG_MIPS_MT_SMP rather than CONFIG_MIPS_MT
  MIPS: CPS: Don't include MT code in non-MT kernels.
  MIPS: CPS: Stop dangling delay slot from has_mt.
  MIPS: dma-default: Fix 32-bit fall back to GFP_DMA
  MIPS: Wire up userfaultfd and membarrier syscalls.

8 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 4 Oct 2015 10:40:09 +0000 (11:40 +0100)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "This update contains:

   - Fix for a long standing race affecting /proc/irq/NNN

   - One line fix for ARM GICV3-ITS counting the wrong data

   - Warning silencing in ARM GICV3-ITS.  Another GCC trying to be
     overly clever issue"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gic-v3-its: Count additional LPIs for the aliased devices
  irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined
  genirq: Fix race in register_irq_proc()

8 years agoMIPS: scall: Always run the seccomp syscall filters
Markos Chandras [Fri, 25 Sep 2015 07:17:42 +0000 (08:17 +0100)]
MIPS: scall: Always run the seccomp syscall filters

The MIPS syscall handler code used to return -ENOSYS on invalid
syscalls. Whilst this is expected, it caused problems for seccomp
filters because the said filters never had the change to run since
the code returned -ENOSYS before triggering them. This caused
problems on the chromium testsuite for filters looking for invalid
syscalls. This has now changed and the seccomp filters are always
run even if the syscall is invalid. We return -ENOSYS once we
return from the seccomp filters. Moreover, similar codepaths have
been merged in the process which simplifies somewhat the overall
syscall code.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11236/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
8 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 3 Oct 2015 14:53:05 +0000 (10:53 -0400)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Fixes all around the map: W+X kernel mapping fix, WCHAN fixes, two
  build failure fixes for corner case configs, x32 header fix and a
  speling fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds
  x86/mm: Set NX on gap between __ex_table and rodata
  x86/kexec: Fix kexec crash in syscall kexec_file_load()
  x86/process: Unify 32bit and 64bit implementations of get_wchan()
  x86/process: Add proper bound checks in 64bit get_wchan()
  x86, efi, kasan: Fix build failure on !KASAN && KMEMCHECK=y kernels
  x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case
  x86/cpufeatures: Correct spelling of the HWP_NOTIFY flag

8 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 3 Oct 2015 14:51:41 +0000 (10:51 -0400)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Ingo Molnar:
 "An abs64() fix in the watchdog driver, and two clocksource driver
  NO_IRQ assumption fixes"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: Fix abs() usage w/ 64bit values
  clocksource/drivers/keystone: Fix bad NO_IRQ usage
  clocksource/drivers/rockchip: Fix bad NO_IRQ usage

8 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 3 Oct 2015 14:46:41 +0000 (10:46 -0400)]
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fixes from Ingo Molnar:
 "Two EFI fixes: one for x86, one for ARM, fixing a boot crash bug that
  can trigger under newer EFI firmware"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  arm64/efi: Fix boot crash by not padding between EFI_MEMORY_RUNTIME regions
  x86/efi: Fix boot crash by mapping EFI memmap entries bottom-up at runtime, instead of top-down

8 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sat, 3 Oct 2015 14:39:31 +0000 (10:39 -0400)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Bunch of fixes all over the place, all pretty small: amdgpu, i915,
  exynos, one qxl and one vmwgfx.

  There is also a bunch of mst fixes, I left some cleanups in the series
  as I didn't think it was worth splitting up the tested series"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (37 commits)
  drm/dp/mst: add some defines for logical/physical ports
  drm/dp/mst: drop cancel work sync in the mstb destroy path (v2)
  drm/dp/mst: split connector registration into two parts (v2)
  drm/dp/mst: update the link_address_sent before sending the link address (v3)
  drm/dp/mst: fixup handling hotplug on port removal.
  drm/dp/mst: don't pass port into the path builder function
  drm/radeon: drop radeon_fb_helper_set_par
  drm: handle cursor_set2 in restore_fbdev_mode
  drm/exynos: Staticize local function in exynos_drm_gem.c
  drm/exynos: fimd: actually disable dp clock
  drm/exynos: dp: remove suspend/resume functions
  drm/qxl: recreate the primary surface when the bo is not primary
  drm/amdgpu: only print meaningful VM faults
  drm/amdgpu/cgs: remove import_gpu_mem
  drm/i915: Call non-locking version of drm_kms_helper_poll_enable(), v2
  drm: Add a non-locking version of drm_kms_helper_poll_enable(), v2
  drm/vmwgfx: Fix a command submission hang regression
  drm/exynos: remove unused mode_fixup() code
  drm/exynos: remove decon_mode_fixup()
  drm/exynos: remove fimd_mode_fixup()
  ...

8 years agodt-bindings: add power-domain header for RK3288 SoCs
Caesar Wang [Tue, 8 Sep 2015 06:18:21 +0000 (14:18 +0800)]
dt-bindings: add power-domain header for RK3288 SoCs

According to a description from TRM, add all the power domains.

At the moment, we can support some domains on RK3288.
We can add more types on RK3288 in the future, that's need to do.

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 2 Oct 2015 21:53:25 +0000 (17:53 -0400)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input layer fixes from Dmitry Torokhov:
 "Fixes for two recent regressions (in Synaptics PS/2 and uinput
  drivers) and some more driver fixups"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Revert "Input: synaptics - fix handling of disabling gesture mode"
  Input: psmouse - fix data race in __ps2_command
  Input: elan_i2c - add all valid ic type for i2c/smbus
  Input: zhenhua - ensure we have BITREVERSE
  Input: omap4-keypad - fix memory leak
  Input: serio - fix blocking of parport
  Input: uinput - fix crash when using ABS events
  Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFF
  Input: elan_i2c - add ic type 0x03
  Input: elan_i2c - don't require known iap version
  Input: imx6ul_tsc - fix controller name
  Input: imx6ul_tsc - use the preferred method for kzalloc()
  Input: imx6ul_tsc - check for negative return value
  Input: imx6ul_tsc - propagate the errors
  Input: walkera0701 - fix abs() calculations on 64 bit values
  Input: mms114 - remove unneded semicolons
  Input: pm8941-pwrkey - remove unneded semicolon
  Input: fix typo in MT documentation
  Input: cyapa - fix address of Gen3 devices in device tree documentation

8 years agoclocksource: Fix abs() usage w/ 64bit values
John Stultz [Tue, 15 Sep 2015 01:05:20 +0000 (18:05 -0700)]
clocksource: Fix abs() usage w/ 64bit values

This patch fixes one cases where abs() was being used with 64-bit
nanosecond values, where the result may be capped at 32-bits.

This potentially could cause watchdog false negatives on 32-bit
systems, so this patch addresses the issue by using abs64().

Signed-off-by: John Stultz <john.stultz@linaro.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1442279124-7309-2-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agoMerge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Linus Torvalds [Fri, 2 Oct 2015 18:54:16 +0000 (14:54 -0400)]
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Catalin Marinas:

 - Fix for transparent huge page change_protection() logic which was
   inadvertently changing a huge pmd page into a pmd table entry.

 - Function graph tracer panic fix caused by the return_to_handler code
   corrupting the multi-regs function return value (composite types).

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: ftrace: fix function_graph tracer panic
  arm64: Fix THP protection change logic

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Fri, 2 Oct 2015 18:51:46 +0000 (14:51 -0400)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

Pull m68k updates from Geert Uytterhoeven:
 "Summary:
   - Fix for accidental modification of arguments of syscall functions
   - Wire up new syscalls
   - Update defconfigs"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k/defconfig: Update defconfigs for v4.3-rc1
  m68k: Define asmlinkage_protect
  m68k: Wire up membarrier
  m68k: Wire up userfaultfd
  m68k: Wire up direct socket calls

8 years agoirqchip/gic-v3-its: Count additional LPIs for the aliased devices
Marc Zyngier [Fri, 2 Oct 2015 15:44:06 +0000 (16:44 +0100)]
irqchip/gic-v3-its: Count additional LPIs for the aliased devices

When configuring the interrupt mapping for a new device, we
iterate over all the possible aliases to account for their
maximum MSI allocation. This was introduced by e8137f4f5088
("irqchip: gicv3-its: Iterate over PCI aliases to generate ITS configuration").

Turns out that the code doing that is a bit braindead, and repeatedly
accounts for the same device over and over.

Fix this by counting the actual alias that is passed to us by the
core code.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Alex Shi <alex.shi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: David Daney <ddaney.cavm@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1443800646-8074-3-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agoirqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined
Marc Zyngier [Fri, 2 Oct 2015 15:44:05 +0000 (16:44 +0100)]
irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined

More agressive inlining in recent versions of GCC have uncovered
a new set of warnings:

 drivers/irqchip/irq-gic-v3-its.c: In function its_msi_prepare:
  drivers/irqchip/irq-gic-v3-its.c:1148:26: warning: lpi_base may be used
    uninitialized in this function [-Wmaybe-uninitialized]
     dev->event_map.lpi_base = lpi_base;
                          ^
 drivers/irqchip/irq-gic-v3-its.c:1116:6: note: lpi_base was declared here
  int lpi_base;
      ^
 drivers/irqchip/irq-gic-v3-its.c:1149:25: warning: nr_lpis may be used
  uninitialized in this function [-Wmaybe-uninitialized]
   dev->event_map.nr_lpis = nr_lpis;
                         ^
 drivers/irqchip/irq-gic-v3-its.c:1117:6: note: nr_lpis was declared here
  int nr_lpis;
      ^
The warning is fairly benign (there is no code path that could
actually use uninitialized variables), but let's silence it anyway
by zeroing the variables on the error path.

Reported-by: Alex Shi <alex.shi@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: David Daney <ddaney.cavm@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1443800646-8074-2-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agoMerge tag 'dmaengine-fix-4.3-rc4' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Fri, 2 Oct 2015 18:46:15 +0000 (14:46 -0400)]
Merge tag 'dmaengine-fix-4.3-rc4' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
 "This contains fixes spread throughout the drivers, and also fixes one
  more instance of privatecnt in dmaengine.

  Driver fixes summary:
   - bunch of pxa_dma fixes for reuse of descriptor issue, residue and
     no-requestor
   - odd fixes in xgene, idma, sun4i and zxdma
   - at_xdmac fixes for cleaning descriptor and block addr mode"

* tag 'dmaengine-fix-4.3-rc4' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: pxa_dma: fix residue corner case
  dmaengine: pxa_dma: fix the no-requestor case
  dmaengine: zxdma: Fix off-by-one for testing valid pchan request
  dmaengine: at_xdmac: clean used descriptor
  dmaengine: at_xdmac: change block increment addressing mode
  dmaengine: dw: properly read DWC_PARAMS register
  dmaengine: xgene-dma: Fix overwritting DMA tx ring
  dmaengine: fix balance of privatecnt
  dmaengine: sun4i: fix unsafe list iteration
  dmaengine: idma64: improve residue estimation
  dmaengine: xgene-dma: fix handling xgene_dma_get_ring_size result
  dmaengine: pxa_dma: fix initial list move

8 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 2 Oct 2015 18:40:57 +0000 (14:40 -0400)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Another week, another round of fixes.

  These have been brewing for a bit and in various iterations, but I
  feel pretty comfortable about the quality of them.  They fix real
  issues.  The pull request is mostly blk-mq related, and the only one
  not fixing a real bug, is the tag iterator abstraction from Christoph.
  But it's pretty trivial, and we'll need it for another fix soon.

  Apart from the blk-mq fixes, there's an NVMe affinity fix from Keith,
  and a single fix for xen-blkback from Roger fixing failure to free
  requests on disconnect"

* 'for-linus' of git://git.kernel.dk/linux-block:
  blk-mq: factor out a helper to iterate all tags for a request_queue
  blk-mq: fix racy updates of rq->errors
  blk-mq: fix deadlock when reading cpu_list
  blk-mq: avoid inserting requests before establishing new mapping
  blk-mq: fix q->mq_usage_counter access race
  blk-mq: Fix use after of free q->mq_map
  blk-mq: fix sysfs registration/unregistration race
  blk-mq: avoid setting hctx->tags->cpumask before allocation
  NVMe: Set affinity after allocating request queues
  xen/blkback: free requests on disconnection

8 years agoRevert "Input: synaptics - fix handling of disabling gesture mode"
Dmitry Torokhov [Fri, 2 Oct 2015 17:31:32 +0000 (10:31 -0700)]
Revert "Input: synaptics - fix handling of disabling gesture mode"

This reverts commit e51e38494a8ecc18650efb0c840600637891de2c: we
actually do want the device to work in extended W mode, as this is the
mode that allows us receiving multiple contact information.

Cc: stable@vger.kernel.org
8 years agoMIPS: Octeon: Fix kernel panic on startup from memory corruption
Matt Bennett [Wed, 30 Sep 2015 04:40:42 +0000 (17:40 +1300)]
MIPS: Octeon: Fix kernel panic on startup from memory corruption

During development it was found that a number of builds would panic
during the kernel init process, more specifically in 'delayed_fput()'.
The panic showed the kernel trying to access a memory address of
'0xb7fdc00' while traversing the 'delayed_fput_list' structure.
Comparing this memory address to the value of the pointer used on
builds that did not panic confirmed that the pointer on crashing
builds must have been corrupted at some stage earlier in the init
process.

By traversing the list earlier and earlier in the code it was found
that 'plat_mem_setup()' was responsible for corrupting the list.
Specifically the line:

    memory = cvmx_bootmem_phy_alloc(mem_alloc_size,
__pa_symbol(&__init_end), -1,
0x100000,
CVMX_BOOTMEM_FLAG_NO_LOCKING);

Which would eventually call:

    cvmx_bootmem_phy_set_size(new_ent_addr,
cvmx_bootmem_phy_get_size
(ent_addr) -
(desired_min_addr -
ent_addr));

Where 'new_ent_addr'=0x4800000 (the address of 'delayed_fput_list')
and the second argument (size)=0xb7fdc00 (the address causing the
kernel panic). The job of this part of 'plat_mem_setup()' is to
allocate chunks of memory for the kernel to use. At the start of
each chunk of memory the size of the chunk is written, hence the
value 0xb7fdc00 is written onto memory at 0x4800000, therefore the
kernel panics when it goes back to access 'delayed_fput_list' later
on in the initialisation process.

On builds that were not crashing it was found that the compiler had
placed 'delayed_fput_list' at 0x4800008, meaning it wasn't corrupted
(but something else in memory was overwritten).

As can be seen in the first function call above the code begins to
allocate chunks of memory beginning from the symbol '__init_end'.
The MIPS linker script (vmlinux.lds.S) however defines the .bss
section to begin after '__init_end'. Therefore memory within the
.bss section is allocated to the kernel to use (System.map shows
'delayed_fput_list' and other kernel structures to be in .bss).

To stop the kernel panic (and the .bss section being corrupted)
memory should begin being allocated from the symbol '_end'.

Signed-off-by: Matt Bennett <matt.bennett@alliedtelesis.co.nz>
Acked-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: aleksey.makarov@auriga.com
Patchwork: https://patchwork.linux-mips.org/patch/11251/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>