Commit graph

561221 commits

Author SHA1 Message Date
Timo Sigurdsson 694341cf20 ARM: Fix broken USB support in sunxi_defconfig
Commit 69fb4dcada ("power: Add an axp20x-usb-power driver") introduced a new
driver for the USB power supply used on various Allwinner based SBCs. However,
the driver was not added to sunxi_defconfig which breaks USB support for some
boards (e.g. LeMaker BananaPi) as the kernel will now turn off the USB power
supply during boot by default if the driver isn't present. (This was not the
case in linux 4.3 or lower where the USB power was always left on.)

Hence, add the driver to sunxi_defconfig in order to keep USB support working
on those boards that require it.

Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
Reported-by: David Tulloh <david@tulloh.id.au>
Tested-by: David Tulloh <david@tulloh.id.au>
Tested-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2015-12-31 17:01:59 +01:00
Jon Hunter 80373d37be ARM: tegra: Fix suspend hang on Tegra124 Chromebooks
Enabling CPUFreq support for Tegra124 Chromebooks is causing the Tegra124
to hang when resuming from suspend.

When CPUFreq is enabled, the CPU clock is changed from the PLLX clock to
the DFLL clock during kernel boot. When resuming from suspend the CPU
clock is temporarily changed back to the PLLX clock before switching back
to the DFLL. If the DFLL is operating at a much lower frequency than the
PLLX when we enter suspend, and so the CPU voltage rail is at a voltage
too low for the CPUs to operate at the PLLX frequency, then the device
will hang.

Please note that the PLLX is used in the resume sequence to switch the CPU
clock from the very slow 32K clock to a faster clock during early resume
to speed up the resume sequence before the DFLL is resumed.

Ideally, we should fix this by setting the suspend frequency so that it
matches the PLLX frequency, however, that would be a bigger change. For
now simply disable CPUFreq support for Tegra124 Chromebooks to avoid the
hang when resuming from suspend.

Fixes: 9a0baee960 ("ARM: tegra: Enable CPUFreq support for Tegra124
		      Chromebooks")

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 15:41:37 -08:00
Olof Johansson 741db4a72a Few fixes for omaps to allow am437x only builds to boot properly with
CPU_IDLE and ARM TWD timer. This is probably a common configuration setup
 for people making products with these SoCs so let's make sure it works.
 
 Also a wakeirq fix for duovero parlor making my life a bit easier as that
 allows me to run basic PM regression tests on it.
 
 It would be nice to have these in v4.4, but if it gets too late for that
 because of the holidays, it is not super critical if these get merged for
 v4.5.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWeGJhAAoJEBvUPslcq6VzU4wQAJqyWnzl5+frGf8TeTJTwAD2
 yDXbiTDYAZAZ4ajFY5aocrAvQfd/z9zU4ar6liylfAMzOM3S4HRDTaUYc2jbr42s
 +uNNRY3EGMRzbLuRfyZZRgui0aImBpIDXhBhK1njQoYWt9wWIVxNCv2I9pImWm+n
 kyZBDK7xIunQTndgMIMTk8MPVQ5tbPrFbkOWUAZT2bIOmhhhjf/fdMpVL47tbssc
 5XuS5YmyglT3spdaYzrAfZbxf19+CMVmTh2KD9FZOCv4OZPXvPOJ3JkqrJeARvPI
 Idt6DjitznShJ7wQuIuRH+uS7N2fEDviZR3Of1kZBawBxt7ig58O7TizZLRUtTk+
 Uj2QuXfccw8qu122chdpCI1eV5oOok157V3Yhsm7Oyi12H/eu5WMee2boJh6cz9R
 KIih+5/FX6yUCgfHow7XR6vpQ2A50BJoU55+EB3yb81hsy/t4eHxbFaJfUcs7DNg
 yLjtAxL1tO96VNFF+Kdgps69AOaHbo7/rNYgRvRZ4uxdSkE+YJhnHfcu6m59lFSR
 k7Ybw+CCvZ+jH3IE+aGLumPguL10ntytv16G2UDwCzuvCaq59fUPUOCdxuBf+RNB
 3Bd1NCkcsi8xPSypf7YXa3AfNM2XkNprHVZJadM57EBE3bVZ19+1OiBtf2gn+YAE
 72gzwGGPixUNr8OjZNX0
 =tGjX
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.4/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Few fixes for omaps to allow am437x only builds to boot properly with
CPU_IDLE and ARM TWD timer. This is probably a common configuration setup
for people making products with these SoCs so let's make sure it works.

Also a wakeirq fix for duovero parlor making my life a bit easier as that
allows me to run basic PM regression tests on it.

It would be nice to have these in v4.4, but if it gets too late for that
because of the holidays, it is not super critical if these get merged for
v4.5.

* tag 'omap-for-v4.4/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: Fix UART wakeirq for omap4 duovero parlor
  ARM: OMAP2+: AM43xx: select ARM TWD timer
  ARM: OMAP2+: am43xx: enable GENERIC_CLOCKEVENTS_BROADCAST

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 13:24:29 -08:00
Olof Johansson 8b9c13347a The i.MX fixes for 4.4, 3rd round:
- Fix Ethernet PHY mode on i.MX6 Ventana boards, which can result in
   a non-functional Ethernet when Marvell phy driver rather than generic
   phy driver is selected.
 - Fix an assigned-clock configuration bug on imx6qdl-sabreauto board
   which was introduced by commit ed339363de ("ARM: dts:
   imx6qdl-sabreauto: Allow HDMI and LVDS to work simultaneously").
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWcnPzAAoJEFBXWFqHsHzOvfAIALZo+lVpA3c89ZuDJn0bKfsI
 hsV2wfMW1N5BhLN0AGjNIk/nk/YWhZ57gZyQ8miMdz2VeQRSgcjRaFFfEGRGOGop
 OrrKpgmRKmUNxMrvztLlMmb1hGxpHOO7z/CXO3UrzDRIiw9lzxYymt0Re2UHiE1u
 +tekMe7xBdimfMVmcM8RX/FOZC81tUjH3W8fyPbbzTTgrAnLPmXcfjtHkXy2VPw0
 5ikWCJhFWB9ODnmKHbdA7YsNh52JAe5BieWiLXzLj33XJNDBbiFBbBltbo+BJZnp
 ZaIek/fGHbq7ouCSLdRq7SEQn6ZbjpHhlic/okqNX0ux29QpY2GKTbiq8fLmcLU=
 =wMKP
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

The i.MX fixes for 4.4, 3rd round:
- Fix Ethernet PHY mode on i.MX6 Ventana boards, which can result in
  a non-functional Ethernet when Marvell phy driver rather than generic
  phy driver is selected.
- Fix an assigned-clock configuration bug on imx6qdl-sabreauto board
  which was introduced by commit ed339363de ("ARM: dts:
  imx6qdl-sabreauto: Allow HDMI and LVDS to work simultaneously").

* tag 'imx-fixes-4.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: imx6: Fix Ethernet PHY mode on Ventana boards
  ARM: dts: imx: Fix the assigned-clock mismatch issue on imx6q/dl
2015-12-22 11:49:21 -08:00
Chen-Yu Tsai bccd240fc8 bus: sunxi-rsb: Fix peripheral IC mapping runtime address
0x4e is the runtime address normally associated with perihperal ICs.
0x45 is not a valid runtime address.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:42:30 -08:00
Chen-Yu Tsai 427d6e4812 bus: sunxi-rsb: Fix primary PMIC mapping hardware address
The primary PMICs use 0x3a3 as their hardware address, not 0x3e3.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-12-22 11:42:26 -08:00
Tony Lindgren 0b4d6972d7 ARM: dts: Fix UART wakeirq for omap4 duovero parlor
Looks like we're missing the wakeirq for the console uart for
duovero parlor. Let's add that as without it console acess just
hangs with PM enabled.

Cc: Arun Bharadwaj <arun@gumstix.com>
Cc: Ash Charles <ash@gumstix.com>
Cc: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-12-18 16:43:22 -08:00
Felipe Balbi 54011103fb ARM: OMAP2+: AM43xx: select ARM TWD timer
Make sure to tell the kernel that AM437x devices have ARM TWD timer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
[grygorii.strashko@ti.com: drop ARM Global timer selection, because
 it's incompatible with PM (cpuidle/cpufreq). So, it's unsafe to enable
 it unconditionally]
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-12-17 10:54:13 -08:00
Grygorii Strashko 0b3e6fca4d ARM: OMAP2+: am43xx: enable GENERIC_CLOCKEVENTS_BROADCAST
System will misbehave in the following case:
- AM43XX only build (UP);
- CONFIG_CPU_IDLE=y
- ARM TWD timer enabled and selected as clockevent device.

In the above case, It's expected that broadcast timer will be used as
backup timer when CPUIdle will put MPU in low power states where ARM
TWD will stop and lose its context. But, the CONFIG_SMP might not be
selected when kernel is built for AM43XX SoC only and, as result,
GENERIC_CLOCKEVENTS_BROADCAST option will not be selected also. This
will break CPUIdle and System will stuck in low power states.

Hence, fix it by selecting GENERIC_CLOCKEVENTS_BROADCAST option for
AM43XX SoCs always and add empty tick_broadcast() function
implementation - no need to send any IPI on UP. After this change
timer1 will be selected as broadcast timer the same way as for SMP,
and CPUIdle will work properly.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-12-17 10:53:28 -08:00
Lijun Pan c4aa1937b7 fsl-ifc: add missing include on ARM64
Need to include sched.h to fix the following compilation error
if FSL_IFC is enabled on ARM64 machine.

In file included from include/linux/mmzone.h:9:0,
                 from include/linux/gfp.h:5,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from drivers/memory/fsl_ifc.c:22:
drivers/memory/fsl_ifc.c: In function ‘check_nand_stat’:
include/linux/wait.h:165:35: error: ‘TASK_NORMAL’ undeclared (first use in this function)
 #define wake_up(x)   __wake_up(x, TASK_NORMAL, 1, NULL)
                                   ^
drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’
   wake_up(&ctrl->nand_wait);
   ^
include/linux/wait.h:165:35: note: each undeclared identifier is reported only once for each function it appears in
 #define wake_up(x)   __wake_up(x, TASK_NORMAL, 1, NULL)
                                   ^
drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’
   wake_up(&ctrl->nand_wait);
   ^

Analysis is as follows:
I put some instrumental code and get the
following .h files inclusion sequence:

In file included from ./arch/arm64/include/asm/compat.h:25:0,
                 from ./arch/arm64/include/asm/stat.h:23,
                 from include/linux/stat.h:5,
                 from include/linux/module.h:10,
                 from drivers/memory/fsl_ifc.c:23:
include/linux/sched.h:113:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
 struct sched_attr {
 ^

CONFIG_COMPAT=y is enabled while 39 and 48 bit VA is selected.
When 42 bit VA is selected, it does not enable CONFIG_COMPAT=y

In ./arch/arm64/include/asm/stat.h:23, it has
"#ifdef CONFIG_COMPAT"
"#include <asm/compat.h>"
"..."
"#endif"

Since ./arch/arm64/include/asm/stat.h does not
include ./arch/arm64/include/asm/compat.h,
then it will not include include/linux/sched.h
Hence we have to manually add "#include <linux/sched.h>"
in drivers/memory/fsl_ifc.c

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-12-16 00:16:58 +01:00
Krzysztof Hałasa 3a35e470bc ARM: dts: imx6: Fix Ethernet PHY mode on Ventana boards
Gateworks Ventana boards seem to need "RGMII-ID" (internal delay)
PHY mode, instead of simple "RGMII", for their Marvell 88E1510
transceiver. Otherwise, the Ethernet MAC doesn't work with Marvell PHY
driver (TX doesn't seem to work correctly).

Tested on GW5400 rev. C.

This bug affects ARM Fedora 23.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Acked-by: Tim Harvey <tharvey@gateworks.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2015-12-15 16:53:15 +08:00
Bai Ping 13fdae1ae5 ARM: dts: imx: Fix the assigned-clock mismatch issue on imx6q/dl
The 'assigned-clock-parents' and 'assigned-clock-rates' list
should corresponding to the 'assigned-clocks' property clock list.

Signed-off-by: Bai Ping <b51503@freescale.com>
Fixes: ed339363de ("ARM: dts: imx6qdl-sabreauto: Allow HDMI and LVDS to work simultaneously")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2015-12-15 16:48:56 +08:00
Kevin Hilman 8fcacc0344 Allwinner fixes for 4.4
Two patches, one to fix the touchscreen axis on one Allwinner board, and
 the other one fixing a mutex unlocking issue on one error path in the RSB
 driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWbpHVAAoJEBx+YmzsjxAgbEQQALWoDBtYUwlUfWPL9hHIShbv
 HHkelqcxZgQB2LtNQMufwitmoLH8lhf5C0ILZuLiiA0EZM1V+PrsGLKRKHGeQxYO
 K6g3TVZp3v+Q+vb8T3FsGSbP1dtAm+IXIfknQBT+FLHnp84d0wRa29Kx4e3QFUmi
 8UieBQG4dd45ghv08w1jSa2D1nUEfuAMYG1jZIrTw/ZWTB3siZxKBKEaPccvDFF6
 1WgTwoYoHj05ldLG6W2/MPbW1eosVqZTPvdb+QEAvdDVQsKMOyCqc6O8+khbxoV/
 S5RGGh6tJ6xBbsOnzvqjNjSMCeL7SyiYAxMc5y3rEBfexdMUiJi0Laj1dYVcpuNT
 LERGmxw7FIJB2HNsMqjMa4+GB1+DZBplu3RwYZqplnGe1lT9Rk7Irj6muUuH5cBf
 Ubh0RN2Mo5QNAhkwo4TDqy7xzrYRjC/XOQeQx9SSbFHPGl/raTCm0yd31vUdrZXT
 BTW9V7hIJU6vt6+RKXOqtgjAOqcBLi3npeCrUVY11hrCylKP2gEtQ4dFFGNgUSBu
 eOzDvlrtxVavoQB+XQQ+Js5hZlnXNWYLxR3Bher1xc5NXCI/aHM4pmymSzHjrQmU
 aBfmsJYdWDL9fW18cR9vCgdS1sBIqdz9zu9GW5A8MVVf6s7KoM3vEDX7tzFrghfi
 +mxUdfjbuWHgUxmHMN8J
 =9lSI
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-4.4' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes

Merge "Allwinner fixes for 4.4" from Maxime Ripard:

Allwinner fixes for 4.4

Two patches, one to fix the touchscreen axis on one Allwinner board, and
the other one fixing a mutex unlocking issue on one error path in the RSB
driver.

* tag 'sunxi-fixes-for-4.4' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux:
  bus: sunxi-rsb: unlock on error in sunxi_rsb_read()
  ARM: dts: sunxi: sun6i-a31s-primo81.dts: add touchscreen axis swapping property
2015-12-14 16:59:40 -08:00
Kevin Hilman 7f4c977849 The i.MX fixes for 4.4, 2nd round:
- Fix vf610 SAI clock configuration bug which is discovered by the newly
   added master mode support in SAI audio driver.
 - Fix buggy L2 cache latency values in vf610 device trees, which may
   cause system hang when cpu runs at a higher frequency.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWatW3AAoJEFBXWFqHsHzOV1UH/2g3U77HC19JcBWNmEObND81
 ygLocM5cwwSDmVoFTKt7GK4fBrC/n57Pl0z2LZg1wE2Nd+jJ3GjknPrICgOnOn1Y
 bYXBJW4bm9eJZC2OJhMcW1PygaQOe64+F7iptcrrodkbg62A+AGXMq+g24rNupOe
 IAg87RSLkLQFxZr7B1P8dLgSCYTjRsgUHGkeGQ3CfrXckWa1m5LG2uCUD2HiPsfF
 i1y4xN/Hfpj4RPV+6Hj7QoTUpK3CXqJruMPf+OkhFYhJmSRkDZdAzAAC93xVJO1w
 KWc77rN7LZzaYBajamygbC3LY7ygAw5YxsJrSObyc4XPCBVdb2dVk9Se26FzWhw=
 =QZJM
 -----END PGP SIGNATURE-----

Merge tag 'imx-fixes-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes

Merge "ARM: imx: fixes for 4.4, 2nd round" from Shawn Guo:

The i.MX fixes for 4.4, 2nd round:
- Fix vf610 SAI clock configuration bug which is discovered by the newly
  added master mode support in SAI audio driver.
- Fix buggy L2 cache latency values in vf610 device trees, which may
  cause system hang when cpu runs at a higher frequency.

* tag 'imx-fixes-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: dts: vf610: use reset values for L2 cache latencies
  ARM: dts: vf610: fix clock definition for SAI2
  ARM: imx: clk-vf610: fix SAI clock tree
2015-12-11 16:14:34 -08:00
Liu Gang 6534778371 ls2080a/dts: Add little endian property for GPIO IP block
The GPIO block for ls2080a platform has little endian registers,
the GPIO driver needs this property to read/write registers by
right interface.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-12-11 16:13:03 -08:00
Li Yang edb70e29f3 dt-bindings: define little-endian property for QorIQ GPIO
The GPIO block on different QorIQ chips could have registers in different
endianess.  Define the property to specify which endian is used by the
hardware.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-12-11 16:13:02 -08:00
yangbo lu 2dd2e4d1ea ARM64: dts: ls2080a: fix eSDHC endianness
Add the "little-endian" property to fix the issue that eSDHC
is not working and dumping out "mmc0: Controller never released
inhibit bit(s)." error messages constantly.

Fixes: 5461597f6c ("dts/ls2080a: Update DTSI to add support of various peripherals")
Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
2015-12-11 16:13:02 -08:00
Stefan Agner 9c17190595 ARM: dts: vf610: use reset values for L2 cache latencies
Linux on Vybrid used several different L2 latencies so far, none
of them seem to be the right ones. According to the application note
AN4947 ("Understanding Vybrid Architecture"), the tag portion runs
on CPU clock and is inside the L2 cache controller, whereas the data
portion is stored in the external SRAM running on platform clock.
Hence it is likely that the correct value requires a higher data
latency then tag latency.

These are the values which have been used so far:
- The mainline values:
  arm,data-latency = <1 1 1>;
  arm,tag-latency = <2 2 2>;
  Those values have lead to problems on higher clocks. They look
  like a poor translation from the reset values (missing +1 offset
  and a mix up between tag/latency values).
- The Linux 3.0 (SoC vendor BSP) values (converted to DT notation):
  arm,data-latency = <4 2 3>
  arm,tag-latency = <4 2 3>
  The cache initialization function along with the value matches the
  i.MX6 code from the same kernel, so it seems that those values have
  just been copied.
- The Colibri values:
  arm,data-latency = <2 1 2>;
  arm,tag-latency = <3 2 3>;
  Those were a mix between the values of the Linux 3.0 based BSP and
  the mainline values above.
- The SoC Reset values (converted to DT notation):
  arm,data-latency = <3 3 3>;
  arm,tag-latency = <2 2 2>;

So far there is no official statement on what the correct values are.
See also the related Freescale community thread:
https://community.freescale.com/message/579785#579785

For now, the reset values seem to be the best bet. Remove all other
"bogus" values and use the reset value on vf610.dtsi level.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2015-12-11 21:32:47 +08:00
Arnd Bergmann dde8fdcf66 Few fixes for omaps for v4.4-rc cycle:
- Fix clock source for ARM TWD and global timers on am437x
 
 - Always select REGULATOR_FIXED_VOLTAGE for omap2+ instead of
   when MACH_OMAP3_PANDORA is selected
 
 - Fix SPI DMA handles for dm816x as only some were mapped
 
 - Fix up mbox cells for dm816x to make mailbox usable
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWagyXAAoJEBvUPslcq6VzgtMQALtMaX5bGf7HBi8LEQ1M1dAk
 PPwC7OihDrVFsLccfLs3uVrLgpiqQfAF97OHMdoN5LZf37au52WMGKMwZyncHjSZ
 MCtFbs7LpxCsly0CPq1Gy28cy3YIxJtdxN2T9acxt73zLDvYRHw9VYnRNdo1mQYZ
 rsPu1WKDA6vPPZkDF2nmGcrGdKYvTQywfe3TddnF02/1UvJcE01rO4mSIJ4UGPqz
 P4pggFbSMVeW/UFwyGIcXtC6Cp56o5A74WMb8GMzBNT9bHPAJiUyXkWqTT7T27JE
 BsMKlIG5Sn6qu6M7AbZgKOdA4DmvFZP3IZADQimOyOGegYjQnQ2P84rYt419BBs5
 ji8jlsFGExO8cklAaZjBhgshxqC2WyQC+k7W2xQ8+X1hmKdh1cZtl8AcriD7wUIm
 DBp8JzY5cFbPByMMEg16WUBaE6Uar97vlH+Vxq+pw29oGb9V0Z5WvDUW903LQDJZ
 G5pPugN85I4TGUrAw90/rUHINaHDVYsFZvKIO3pndMTZx86lzZrx0TRRMchJ7MVe
 w7LRzugxda9ENTSY9aipBbRYLMmKzhBTzTJPrQVqBS/Choqk9CFkAW005BKPJRos
 Pc+VrfduL8zXwSO6MlAr4l5E3MyGTqGs6rGBzxk5MWnNdkqfPXakh+SMzxSWLYAa
 AYSRB/dZthSdAh8Cw/Q3
 =2YO/
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.4/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Merge "omap fixes against v4.4-rc4" from Tony Lindgren

Few fixes for omaps for v4.4-rc cycle:

- Fix clock source for ARM TWD and global timers on am437x

- Always select REGULATOR_FIXED_VOLTAGE for omap2+ instead of
  when MACH_OMAP3_PANDORA is selected

- Fix SPI DMA handles for dm816x as only some were mapped

- Fix up mbox cells for dm816x to make mailbox usable

* tag 'omap-for-v4.4/fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: am4372: fix clock source for arm twd and global timers
  ARM: OMAP2+: enable REGULATOR_FIXED_VOLTAGE
  ARM: dts: add dm816x missing spi DT dma handles
  ARM: dts: add dm816x missing #mbox-cells
2015-12-11 00:42:38 +01:00
Arnd Bergmann ddd47fbcf6 ARM: pxa: use PWM lookup table for all machines
The recent change to use a pwm lookup table for the ezx machines
was incomplete and only changed the a780 model, but not the
other ones in the same file.

This adds the missing calls to pwm_add_table().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: c332202289 ("ARM: pxa: ezx: Use PWM lookup table")
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
2015-12-11 00:27:58 +01:00
Arnd Bergmann e229213dd0 Marvell Berlin fixes for 4.4-rc1 (round 1)
- fix wrong SDIO DT clocks on BG2Q
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWads3AAoJEN2kpao7fSL41wMP/RNq6+7zbCVhmvNenbRS6Y76
 F/rlorhNf3RVSkuhH1EyDhWv9z1Dzbf9vB1ylMdHzjSRU+sj3UF1HMNFshiTX2yG
 cFQD2zUaYhgqa2nYay3m4vsNVTkzGNEAGe4ZDQQq/4RJqsY7fmjx1KSrEhC3dihU
 1f61mLSHD+nWxXZn/E8yYf32z+F6PLLqrcoOBzBeJSoGMp9avVgjsFTbYAcghbjC
 zfYQ2VL1VCXakRrzDas1h8/W6JzcrdNDIezFDGdmQK6frCGkfveCh6mh3Cy4fZY5
 ILqJhg+l5f//ProbpoJXDArUfekLcTuE569RFPPXhQSqbrDOTvGZx0gWUYTm0f7g
 NkqkOAJJt9gY5vfZ0EwC5Lxz3GT4z2ULQ3pgpng+9YHUsVx8AlgGbVxPadUPV5Fl
 aloRGaKIYnmqFWx5DiJrT/jHuIb/VAvUBJPHrdxa9+ol36qiSpPPiuW7oS1ivvhr
 rW13LMfw8tkjTu2ddPem2m8An6gvvzwaKooHwa3OIDpEdAw9oqXiKHrzZUeKPdMJ
 1OaCPsn0rnUpxVh6zxgJyKe8CIjiys7AeG71oavPL9SGSpsHRShBTnzmvRjBXsg+
 JeZTg2dDu1IQW9NkU3v1R2IKIeT00RDO8thMixDMBxibRJf+ERN/+tlUTUB7drn9
 4melDsVJnpXsLWlOC9a6
 =TWl9
 -----END PGP SIGNATURE-----

Merge tag 'berlin-fixes-for-4.4-rc1-1' of git://git.infradead.org/users/hesselba/linux-berlin into fixes

Merge "Marvell Berlin fixes for 4.4-rc1 (round 1)" from Sebastian Hesselbarth:

- fix wrong SDIO DT clocks on BG2Q

* tag 'berlin-fixes-for-4.4-rc1-1' of git://git.infradead.org/users/hesselba/linux-berlin:
  ARM: dts: berlin: add 2nd clock for BG2Q sdhci0 and sdhci1
  ARM: dts: berlin: correct BG2Q's sdhci2 2nd clock
2015-12-11 00:24:38 +01:00
Arnd Bergmann 9421a14597 Second fixes for 4.4:
- fix of a hardware setup that prevents the sd/mmc interface to show up on
   sama5d2.
 - proper selection of pinctrl drivers. PIO4 is necessary for the sama5d2 to
   boot.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWZLDzAAoJEKbNnwlvZCyzZnsP/0LnaHnd/AQgukmJDHG5L+oY
 trhwUctcLxV5T6SMTqkdFJ64im7j9Q9VNs5hFOtm4FiNBUjWNuGGhBIqSUIYIZTp
 dRNXs2yIJXXwUl37mQzQPqrt8fKRC2QMgFn2fMLBaPmxOTDgTvZ9aks/DWOCO1Kk
 2xZ+7OeyTFZDMEHM7Xb4RpAgAQxaipWfH2+pYoLaPvhPqUDWGrDWdRPNtd/hwvxA
 UM4+hGRhcEGdrzDkbC3sno8dvSUH9vwBaHKgLiJ3ZD3atE23w/Xs4HCNtbqtKj/5
 Y6LP6067Zr5drb9xt9zV5ghQnoh+u14qcOo4r9F9wwRQs1LYrHiu6T9sntYOhXWN
 jLi4fuLF8DVTyDPn0mmd3dVyTe+mDrzk0guJ3B1RkEEgV1/uY7obSFBLyprcPK18
 CDq2wEeOuiEaZJrIq6tqHnamKRiq43RcRijx7zs3UlcoUZ7TXCpou/FvPXdoK0OX
 8/FOaZueYmK1Hdsit29ibBkrmQ07b+Hajxk10/fWU049hQm5O05rK6XLTQ6doZap
 AUbARY7jGcd3uB/TWrYmE0bdAoGhKGOtRVSnWG6qoWdBNzS2q5dJD1m6rPtrNwcj
 T2wHei6jRFzc4FOKn9vjOSvbY19LmvkqeWYwlTytcUknqG5hy7Eoo4KGTjo6jGME
 jhGnEukaGy7gXoZQAlSv
 =Nvkl
 -----END PGP SIGNATURE-----

Merge tag 'at91-4.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux into fixes

Merge "Second fixes for 4.4" from Alexandre Belloni:

- fix of a hardware setup that prevents the sd/mmc interface to show up on
  sama5d2.
- proper selection of pinctrl drivers. PIO4 is necessary for the sama5d2 to
  boot.

* tag 'at91-4.4-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  ARM: at91: fix pinctrl driver selection
  ARM: at91/dt: add always-on to 1.8V regulator
2015-12-11 00:22:11 +01:00
Arnd Bergmann 789d73b384 Fixes for Exynos:
1. Fix potential NULL pointer dereference in Exynos PMU driver.
 2. Remove incorrect __init annotation from s3c24xx cpufreq driver
    structures.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWV66yAAoJEME3ZuaGi4PXxdkP/jHTVeUGKt0NmDuAQ8oHLXsL
 AGAFF0KdkrWvAcjiLBfyNw4DTQwZu6pyF4E+PFffhXRjJFp3ku7pKcGcf2+vvrdt
 mc5Sg9dvICoqqQiJmnyMymG+dKXWGEK5NF8HPZSATAl+7DrTsACRWU4UPMLlOjmQ
 /U2KABSJFcwuAPBd0wKL6B5Wbx7ijWaUI1xnNxqpuZW6YsXEqz4GYxJ41UWqNrN/
 htoOgYCDTh9aATWpJeDRUALEYiIPS+pAjdCYaiZzrmJerCDiNO8RdMKqVX2LG+sk
 tqBem2cy9TlCuJFdZX50Y700nK6G+iniTVaGoJO93w4XLRwTKAJROr/+7uNGqWqq
 Q/Ofkh6SEJpOiNunREqf7zCLOwUs6d2bQSTp6FilAsSxQCeRVSvXkTfTv388UWOk
 vD3TtfCPPokPwyWubtPeRYn6lDTfXUZr8cVkh1+/lcTCXEMvlK9AyDp3BsKDQHyQ
 zG5yZuZ6VQ2bmhE4B43yCMdqxFTLe+vf+GetJl4aDSAQNMuBdXZ84tyLwQqAMpvK
 PXTjL9RqgA78YurlS5LamqChQEI4abVnWvwBk5rTxwaqL5B5BC9i7U5Q8DuOFPv2
 W52GcBCdYriFmPhpXSVLDn47s1eyE360mBknUh2V0p6+GQzaAjzyjiTxU9/suoHQ
 IPGSkgxOfIiBMiHYPG0O
 =jNcR
 -----END PGP SIGNATURE-----

Merge tag 'samsung-fixes-4.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into fixes

Merge "Fixes for Exynos" from Krzysztof Kozlowski:

1. Fix potential NULL pointer dereference in Exynos PMU driver.
2. Remove incorrect __init annotation from s3c24xx cpufreq driver
   structures.

* tag 'samsung-fixes-4.4' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  cpufreq: s3c24xx: Do not mark s3c2410_plls_add as __init
  ARM: EXYNOS: Fix potential NULL pointer access in exynos_sys_powerdown_conf
2015-12-11 00:19:37 +01:00
Jisheng Zhang b5010d2081 ARM: dts: berlin: add 2nd clock for BG2Q sdhci0 and sdhci1
We removed CLK_IGNORE_UNUSED from CLKID_SDIO's flag, so the sdhci0 and
sdhci1 don't work. We fix this by adding the optional 2nd clock for
BG2Q's sdhci0 and sdhci1. This patch brings another benefit: the 2nd
clock can be disabled during runtime pm, so saves power a bit.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-12-10 21:00:24 +01:00
Jisheng Zhang 5d756147f7 ARM: dts: berlin: correct BG2Q's sdhci2 2nd clock
The optional 2nd clock is CLKID_SDIO. We removed CLK_IGNORE_UNUSED
from CLKID_SDIO's flag, so the sdhci2 doesn't work. This patch fixes
this issue by correcting the sdhci2's 2nd clock.

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-12-10 21:00:16 +01:00
Grygorii Strashko 14054fb1da ARM: dts: am4372: fix clock source for arm twd and global timers
ARM TWD and Global timer are clocked by PERIPHCLK which is MPU_CLK/2.
But now they are clocked by dpll_mpu_m2_ck == MPU_CLK and, as result.
Timekeeping core misbehaves. For example, execution of command
"sleep 5" will take 10 sec instead of 5.

Hence, fix it by adding mpu_periphclk ("fixed-factor-clock") and use
it for clocking ARM TWD and Global timer (same way as on OMAP4).

Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Fixes:commit 8cbd4c2f6a ("arm: boot: dts: am4372: add ARM timers and SCU nodes")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-12-09 16:46:25 -08:00
Ludovic Desroches 8423536fe4 ARM: at91: fix pinctrl driver selection
Move the selection of the pinctrl driver to SoC family level since we
have two pinctrl drivers. It is useless to select one which is not
compatible with the SoC.

[abelloni: fixed pm.c when only sama2d2 is selected]
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-12-04 18:54:53 +01:00
Nicolas Ferre 863c1ca73f ARM: at91/dt: add always-on to 1.8V regulator
As the SDHCI controller needs the 1.8V line to be always enabled for some eMMC
configurations, set the proper "regulator-always-on" property to the board DTS
files.
Note that the sdhci classical regulator definitions doesn't suit our controller
for this 1.8V purpose.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2015-12-04 18:15:59 +01:00
Stefan Agner 531ee1f4ea ARM: dts: vf610: fix clock definition for SAI2
So far, only the bus clock has been assigned, but in reality the
SAI IP has for clock inputs. The driver has been updated to
make use of the additional clock inputs by c3ecef21c3 ("ASoC:
fsl_sai: add sai master mode support"). Due to a bug in the
clock tree, the audio clock has been enabled none the less by
the specified bus clock (see "ARM: imx: clk-vf610: fix SAI
clock tree"), which made master mode even without the proper
clock assigned working.

This patch completes the clock definition for SAI2. On Vybrid,
only two MCLK out of the four options are available (the first
being the bus clock itself). See chapter 8.10.1.2.3 of the
Vybrid Reference manual ("SAI transmitter and receiver options
for MCLK selection"). Note: The audio clocks are only required
in master mode.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2015-12-02 09:46:59 +08:00
Stefan Agner 3b60a26fdc ARM: imx: clk-vf610: fix SAI clock tree
The Synchronous Audio Interface (SAI) instances are clocked by
independent clocks: The bus clock and the audio clock (as shown in
Figure 51-1 in the Vybrid Reference Manual). The clock gates in
CCGR0/CCGR1 for SAI0 through SAI3 are bus clock gates, as access
tests to the registers with/without gating those clocks have shown.
The audio clock is gated by the SAIx_EN gates in CCM_CSCDR1,
followed by a clock divider (SAIx_DIV). Currently, the parent of
the bus clock gates has been assigned to SAIx_DIV, which is not
involved in the bus clock path for the SAI instances (see chapter
9.10.12, SAI clocking in the Vybrid Reference Manual).

Fix this by define the parent clock of VF610_CLK_SAIx to be the bus
clock.

If the driver needs the audio clock (when used in master mode), a
fixed device tree is required which assign the audio clock properly
to VF610_CLK_SAIx_DIV.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
2015-12-02 09:46:26 +08:00
Arnd Bergmann d66e5139ae ARM: ixp4xx: fix read{b,w,l} return types
On ixp4xx, the readl() function returns an 'unsigned long' output
when indirect I/O is used. This is unlike any other platform, and
it causes lots of harmless compiler warnings, such as:

drivers/ata/libahci.c: In function 'ahci_show_host_version':
drivers/ata/libahci.c:254:22: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
drivers/block/mtip32xx/mtip32xx.c: In function 'mtip_hw_read_registers':
drivers/block/mtip32xx/mtip32xx.c:2602:31: warning: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
drivers/block/cciss.c: In function 'print_cfg_table':
drivers/block/cciss.c:3845:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'long unsigned int' [-Wformat=]

This changes all six of the ixp4xx specific I/O read functions
to return the same types that we have in the normal asm/io.h,
to avoid the warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
2015-12-01 23:45:30 +01:00
Guillaume Delbergue d5d4fdd86f irqchip/versatile-fpga: Fix PCI IRQ mapping on Versatile PB
This patch is specifically for PCI support on the Versatile PB board using
a DT. Currently, the dynamic IRQ mapping is broken when using DTs. For
example, on QEMU, the SCSI driver is unable to request the IRQ. To fix
this issue, this patch replaces the current dynamic mechanism with a
static value as is done in the non-DT case.

Signed-off-by: Guillaume Delbergue <guillaume.delbergue@greensocs.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org
2015-12-01 22:50:16 +01:00
Grygorii Strashko fc82792851 ARM: OMAP2+: enable REGULATOR_FIXED_VOLTAGE
Enable REGULATOR_FIXED_VOLTAGE for all OMAP2+ platforms
otherwise system can't boot from SD-card when kernel is
built for single SoC (for example, with CONFIG_SOC_DRA7XX=y only).

It's also required for almost all TI SoC's platforms.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-11-30 14:38:05 -08:00
Neil Armstrong f1b2e7c29a ARM: dts: add dm816x missing spi DT dma handles
Add the missing SPI controller DMA handler in the dm816x DT
node, only properties for the two channels on four were present.

Cc: Brian Hutchinson <b.hutchman@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-11-30 10:21:17 -08:00
Neil Armstrong d3e41a9fc0 ARM: dts: add dm816x missing #mbox-cells
Add missing #mbox-cells for dm816x mbox DT node.

Cc: Brian Hutchinson <b.hutchman@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-11-30 10:20:31 -08:00
Linus Torvalds 31ade3b83e Linux 4.4-rc3 2015-11-29 18:58:26 -08:00
Linus Torvalds c5bc1c9305 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull nouveau and radeon fixes from Dave Airlie:
 "Just some nouveau and radeon/amdgpu fixes.

  The nouveau fixes look large as the firmware context files are
  regenerated, but the actual change is quite small"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: make some dpm errors debug only
  drm/nouveau/volt/pwm/gk104: fix an off-by-one resulting in the voltage not being set
  drm/nouveau/nvif: allow userspace access to its own client object
  drm/nouveau/gr/gf100-: fix oops when calling zbc methods
  drm/nouveau/gr/gf117-: assume no PPC if NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK is zero
  drm/nouveau/gr/gf117-: read NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK from correct GPC
  drm/nouveau/gr/gf100-: split out per-gpc address calculation macro
  drm/nouveau/bios: return actual size of the buffer retrieved via _ROM
  drm/nouveau/instmem: protect instobj list with a spinlock
  drm/nouveau/pci: enable c800 magic for some unknown Samsung laptop
  drm/nouveau/pci: enable c800 magic for Clevo P157SM
  drm/radeon: make rv770_set_sw_state failures non-fatal
  drm/amdgpu: move dependency handling out of atomic section v2
  drm/amdgpu: optimize scheduler fence handling
  drm/amdgpu: remove vm->mutex
  drm/amdgpu: add mutex for ba_va->valids/invalids
  drm/amdgpu: adapt vce session create interface changes
  drm/amdgpu: vce use multiple cache surface starting from stoney
  drm/amdgpu: reset vce trap interrupt flag
2015-11-29 17:38:08 -08:00
Linus Torvalds 818aba30b3 RTC fixes for 4.4
Two fixes for the ds1307 alarm and wakeup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJWW0BzAAoJEKbNnwlvZCyziZ8P/3cvV1g8TAOsORZfHt8D5S6u
 IWQrfkTtdfGKvPCAnY4TF/dKTeIZs3hI0/cG9RekciFOmEQ5Vmj9KlyZxzJB5aaI
 FGJIFSBIYFVbZGyE8TKsayjrlB2D8/cr9OlrlsIcgqYmsVi8izwzWWfJKj89pVu3
 qFptHRHRhTdSimmeyaJ9pmfCJy59jiueTG9sOHLJBPj98vOFWJPwTN0fABRHBbd4
 R7KC6N5EjEXJFLXTsyFcu+cNAx/gmTRXJwo9jFpBTFGdSUZDddir9oXXhsrk+86j
 4NO/Xa1VawQIz/nStgiZ2FV2L3Y9Hl9wtoz1s8dtG0syqrgbn6yaId7QFrrtHX48
 q6aVT6vVBwx/Im2B/4bcw/XF0aSw3NYlVFxHZszIeWTuNfm7KkcQAGeLa47jzTGl
 GOJOpdtldPQECii6jlYoURd5pH8FANpzRXQ8AYyVsl6gnNwjf8OBBhDEfv7O4wW9
 1yeg0E/5XoaGJ6NdniRcHW3Wixf9b72htytOB/+r1nSJljA4cN0ojczVIpAoQSxt
 sNKbE/Eo96v3qrxvDZ1z41J+V2CxKxary1DLlXvMAFnqMFOnF8rK5wI8jow8Xjsf
 CACPFDCB0KxoLC5hgbbhBGkZd7eTIq30F1FjP8v0ypc8see/8g4H8+SIKy3R5EqV
 wyyt+revuVKibz2NB7Ik
 =6IeZ
 -----END PGP SIGNATURE-----

Merge tag 'rtc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux

Pull RTC fixes from Alexandre Belloni:
 "Two fixes for the ds1307 alarm and wakeup"

* tag 'rtc-4.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
  rtc: ds1307: fix alarm reading at probe time
  rtc: ds1307: fix kernel splat due to wakeup irq handling
2015-11-29 17:30:41 -08:00
Linus Torvalds 00fd6a7194 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fix from Ralf Baechle:
 "Just a fix for empty loops that may be removed by non-antique GCC"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: Fix delay loops which may be removed by GCC.
2015-11-29 17:24:35 -08:00
Linus Torvalds d72aee78e9 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k fixes from Geert Uytterhoeven:
 "Summary:

   - Add missing initialization of max_pfn, which is needed to make
     selftests/vm/mlock2-tests succeed,

   - Wire up new mlock2 syscall"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Wire up mlock2
  m68knommu: Add missing initialization of max_pfn and {min,max}_low_pfn
  m68k/mm: sun3 - Add missing initialization of max_pfn and {min,max}_low_pfn
  m68k/mm: m54xx - Add missing initialization of max_pfn
  m68k/mm: motorola - Add missing initialization of max_pfn
2015-11-29 17:18:41 -08:00
Linus Torvalds 04527fdafe Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
 "Just two changes this time around:

   - wire up the new mlock2 syscall added during the last merge window

   - fix a build problem with certain configurations provoked by making
     CONFIG_OF user selectable"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8454/1: OF implies OF_FLATTREE
  ARM: wire up mlock2 syscall
2015-11-29 17:13:07 -08:00
Linus Torvalds 36511e8607 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
 - fix tcm-user backend driver expired cmd time processing (agrover)
 - eliminate kref_put_spinlock_irqsave() for I/O completion (bart)
 - fix iscsi login kthread failure case hung task regression (nab)
 - fix COMPARE_AND_WRITE completion use-after-free race (nab)
 - fix COMPARE_AND_WRITE with SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC non zero
   SGL offset data corruption.  (Jan + Doug)
 - fix >= v4.4-rc1 regression for tcm_qla2xxx enable configfs attribute
   (Himanshu + HCH)

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target/stat: print full t10_wwn.model buffer
  target: fix COMPARE_AND_WRITE non zero SGL offset data corruption
  qla2xxx: Fix regression introduced by target configFS changes
  kref: Remove kref_put_spinlock_irqsave()
  target: Invoke release_cmd() callback without holding a spinlock
  target: Fix race for SCF_COMPARE_AND_WRITE_POST checking
  iscsi-target: Fix rx_login_comp hang after login failure
  iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc()
  target/user: Do not set unused fields in tcmu_ops
  target/user: Fix time calc in expired cmd processing
2015-11-29 09:03:57 -08:00
Linus Torvalds 75a29ec1e8 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management fixes from Zhang Rui:
 "Specifics:

 - several fixes and cleanups on Rockchip thermal drivers.

 - add the missing support of RK3368 SoCs in Rockchip driver.

 - small fixes on of-thermal, power_allocator, rcar driver, IMX, and
   QCOM drivers, and also compilation fixes, on thermal.h, when thermal
   is not selected"

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  imx: thermal: use CPU temperature grade info for thresholds
  thermal: fix thermal_zone_bind_cooling_device prototype
  Revert "thermal: qcom_spmi: allow compile test"
  thermal: rcar_thermal: remove redundant operation
  thermal: of-thermal: Reduce log level for message when can't fine thermal zone
  thermal: power_allocator: Use temperature reading from tz
  thermal: rockchip: Support the RK3368 SoCs in thermal driver
  thermal: rockchip: consistently use int for temperatures
  thermal: rockchip: Add the sort mode for adc value increment or decrement
  thermal: rockchip: improve the conversion function
  thermal: rockchip: trivial: fix typo in commit
  thermal: rockchip: better to compatible the driver for different SoCs
  dt-bindings: rockchip-thermal: Support the RK3368 SoCs compatible
2015-11-29 08:58:48 -08:00
David Disseldorp 8f90353950 target/stat: print full t10_wwn.model buffer
Cut 'n paste error saw it only process sizeof(t10_wwn.vendor) characters.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-11-28 21:23:13 -08:00
Jan Engelhardt d94e5a6135 target: fix COMPARE_AND_WRITE non zero SGL offset data corruption
target_core_sbc's compare_and_write functionality suffers from taking
data at the wrong memory location when writing a CAW request to disk
when a SGL offset is non-zero.

This can happen with loopback and vhost-scsi fabric drivers when
SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC is used to map existing user-space
SGL memory into COMPARE_AND_WRITE READ/WRITE payload buffers.

Given the following sample LIO subtopology,

% targetcli ls /loopback/
o- loopback ................................. [1 Target]
  o- naa.6001405ebb8df14a ....... [naa.60014059143ed2b3]
    o- luns ................................... [2 LUNs]
      o- lun0 ................ [iblock/ram0 (/dev/ram0)]
      o- lun1 ................ [iblock/ram1 (/dev/ram1)]
% lsscsi -g
[3:0:1:0]    disk    LIO-ORG  IBLOCK           4.0   /dev/sdc   /dev/sg3
[3:0:1:1]    disk    LIO-ORG  IBLOCK           4.0   /dev/sdd   /dev/sg4

the following bug can be observed in Linux 4.3 and 4.4~rc1:

% perl -e 'print chr$_ for 0..255,reverse 0..255' >rand
% perl -e 'print "\0" x 512' >zero
% cat rand >/dev/sdd
% sg_compare_and_write -i rand -D zero --lba 0 /dev/sdd
% sg_compare_and_write -i zero -D rand --lba 0 /dev/sdd
Miscompare reported
% hexdump -Cn 512 /dev/sdd
00000000  0f 0e 0d 0c 0b 0a 09 08  07 06 05 04 03 02 01 00
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
*
00000200

Rather than writing all-zeroes as instructed with the -D file, it
corrupts the data in the sector by splicing some of the original
bytes in. The page of the first entry of cmd->t_data_sg includes the
CDB, and sg->offset is set to a position past the CDB. I presume that
sg->offset is also the right choice to use for subsequent sglist
members.

Signed-off-by: Jan Engelhardt <jengelh@netitwork.de>
Tested-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: <stable@vger.kernel.org> # v3.12+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-11-28 21:22:56 -08:00
Himanshu Madhani 3786dc454f qla2xxx: Fix regression introduced by target configFS changes
this patch fixes following regression

 # targetcli
 [Errno 13] Permission denied: '/sys/kernel/config/target/qla2xxx/21:00:00:0e:1e:08:c7:20/tpgt_1/enable'

Fixes: 2eafd72939 ("target: use per-attribute show and store methods")
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-11-28 19:52:10 -08:00
Bart Van Assche 3a66d7dca1 kref: Remove kref_put_spinlock_irqsave()
The last user is gone. Hence remove this function.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-11-28 19:33:29 -08:00
Bart Van Assche 9ff9d15edd target: Invoke release_cmd() callback without holding a spinlock
This patch fixes the following kernel warning because it avoids that
IRQs are disabled while ft_release_cmd() is invoked (fc_seq_set_resp()
invokes spin_unlock_bh()):

WARNING: CPU: 3 PID: 117 at kernel/softirq.c:150 __local_bh_enable_ip+0xaa/0x110()
Call Trace:
 [<ffffffff814f71eb>] dump_stack+0x4f/0x7b
 [<ffffffff8105e56a>] warn_slowpath_common+0x8a/0xc0
 [<ffffffff8105e65a>] warn_slowpath_null+0x1a/0x20
 [<ffffffff81062b2a>] __local_bh_enable_ip+0xaa/0x110
 [<ffffffff814ff229>] _raw_spin_unlock_bh+0x39/0x40
 [<ffffffffa03a7f94>] fc_seq_set_resp+0xe4/0x100 [libfc]
 [<ffffffffa02e604a>] ft_free_cmd+0x4a/0x90 [tcm_fc]
 [<ffffffffa02e6972>] ft_release_cmd+0x12/0x20 [tcm_fc]
 [<ffffffffa042bd66>] target_release_cmd_kref+0x56/0x90 [target_core_mod]
 [<ffffffffa042caf0>] target_put_sess_cmd+0xc0/0x110 [target_core_mod]
 [<ffffffffa042cb81>] transport_release_cmd+0x41/0x70 [target_core_mod]
 [<ffffffffa042d975>] transport_generic_free_cmd+0x35/0x420 [target_core_mod]

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Joern Engel <joern@logfs.org>
Reviewed-by: Andy Grover <agrover@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-11-28 19:33:23 -08:00
Nicholas Bellinger 057085e522 target: Fix race for SCF_COMPARE_AND_WRITE_POST checking
This patch addresses a race + use after free where the first
stage of COMPARE_AND_WRITE in compare_and_write_callback()
is rescheduled after the backend sends the secondary WRITE,
resulting in second stage compare_and_write_post() callback
completing in target_complete_ok_work() before the first
can return.

Because current code depends on checking se_cmd->se_cmd_flags
after return from se_cmd->transport_complete_callback(),
this results in first stage having SCF_COMPARE_AND_WRITE_POST
set, which incorrectly falls through into second stage CAW
processing code, eventually triggering a NULL pointer
dereference due to use after free.

To address this bug, pass in a new *post_ret parameter into
se_cmd->transport_complete_callback(), and depend upon this
value instead of ->se_cmd_flags to determine when to return
or fall through into ->queue_status() code for CAW.

Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: <stable@vger.kernel.org> # v3.12+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-11-28 19:33:15 -08:00
Nicholas Bellinger ca82c2bded iscsi-target: Fix rx_login_comp hang after login failure
This patch addresses a case where iscsi_target_do_tx_login_io()
fails sending the last login response PDU, after the RX/TX
threads have already been started.

The case centers around iscsi_target_rx_thread() not invoking
allow_signal(SIGINT) before the send_sig(SIGINT, ...) occurs
from the failure path, resulting in RX thread hanging
indefinately on iscsi_conn->rx_login_comp.

Note this bug is a regression introduced by:

  commit e54198657b
  Author: Nicholas Bellinger <nab@linux-iscsi.org>
  Date:   Wed Jul 22 23:14:19 2015 -0700

      iscsi-target: Fix iscsit_start_kthreads failure OOPs

To address this bug, complete ->rx_login_complete for good
measure in the failure path, and immediately return from
RX thread context if connection state did not actually reach
full feature phase (TARG_CONN_STATE_LOGGED_IN).

Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-11-28 19:33:08 -08:00