]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoMerge branch 'v4.1-next/mach-samsung' into for-next
Kukjin Kim [Thu, 26 Mar 2015 17:15:04 +0000 (02:15 +0900)]
Merge branch 'v4.1-next/mach-samsung' into for-next

9 years agoMerge branch 'v4.1-next/dt64-samsung' into for-next
Kukjin Kim [Thu, 26 Mar 2015 17:14:58 +0000 (02:14 +0900)]
Merge branch 'v4.1-next/dt64-samsung' into for-next

9 years agoMerge branch 'v4.1-next/dt-samsung' into for-next
Kukjin Kim [Thu, 26 Mar 2015 17:14:51 +0000 (02:14 +0900)]
Merge branch 'v4.1-next/dt-samsung' into for-next

9 years agoMerge branch 'v4.1-next/defconfig-samsung' into for-next
Kukjin Kim [Thu, 26 Mar 2015 17:14:44 +0000 (02:14 +0900)]
Merge branch 'v4.1-next/defconfig-samsung' into for-next

9 years agoarm64: dts: Add thermal-zones dt node for exynos5433
Chanwoo Choi [Thu, 26 Mar 2015 17:13:43 +0000 (02:13 +0900)]
arm64: dts: Add thermal-zones dt node for exynos5433

This patch adds the thermal-zones devicetree node for Exynos5433 SoC.
The thermal-zones has five thermal-zones and then each thermal-zone
contains each thermal-sensor to monitor the temperature of own IP.
The {atlas0|apollo}_ thermal zone have the eight trip-points for
interrupt method to detect the over-temperature.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add TMU sensor dt node for exynos5433
Chanwoo Choi [Thu, 26 Mar 2015 17:13:43 +0000 (02:13 +0900)]
arm64: dts: Add TMU sensor dt node for exynos5433

This patch adds the TMU (Thermal Management Unit) sensor devicetree
node for Exynos5433. The Exynos5433 includes the five temperature
sensors as following:

- two temperature sensor for Cortex-A57 (ATLAS)
- one temperature sensor for Cortex-A53 (APOLLO)
- one temperature sensor for G3D IP
- one temperature sensor for ISP IP

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add I2S dt node for exynos5433
Inha Song [Thu, 26 Mar 2015 17:13:43 +0000 (02:13 +0900)]
arm64: dts: Add I2S dt node for exynos5433

This patch adds I2S device tree node for Exynos5433 SoC.
In Exynos5433 SoC, I2S0 is used for audio interface.

Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add ADMA dt node for exynos5433
Inha Song [Thu, 26 Mar 2015 17:13:43 +0000 (02:13 +0900)]
arm64: dts: Add ADMA dt node for exynos5433

This patch adds ADMA (Advanced DMA) device tree node for Exynos5433
SoC. In Exynos5433 SoC, ADMA is used for I2S audio interface.

Signed-off-by: Inha Song <ideal.song@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add RTC and ADC dt node for exynos5433
Chanwoo Choi [Thu, 26 Mar 2015 17:13:43 +0000 (02:13 +0900)]
arm64: dts: Add RTC and ADC dt node for exynos5433

This patch adds RTC (Real Time Clock) dt node for Exynos5433 SoC and
adds ADC dt node for Exynos5433 SoC. The commit c1b501564c98 ("iio:
adc: exynos_adc: Add support for exynos7") commit supports the ADC
for Exynos7. Exynos5433's ADC IP is the same with Exynos7's ADC IP.
Exynos5433 has a little different from ADCv2 on ADC_CON2 register.
Exynos5433 doesn't contain OSEL/ESEL /HIGHF of ADC_CON2.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add PMU dt node for exynos5433
Chanwoo Choi [Thu, 26 Mar 2015 17:13:42 +0000 (02:13 +0900)]
arm64: dts: Add PMU dt node for exynos5433

This patch adds PMU (Power Management Unit) dt node for Exynos5433
SoC and set the source clock for CLKOUT register as xxti.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[ideal.song: Add the setting of CLKOUT register]
Signed-off-by: Inha Song <ideal.song@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add SPI/PDMA dt node for exynos5433
Chanwoo Choi [Thu, 26 Mar 2015 17:13:42 +0000 (02:13 +0900)]
arm64: dts: Add SPI/PDMA dt node for exynos5433

This patch adds SPI (Serial Peripheral Interface) dt node for Exynos5433
SoC. SPI transfers serial data by using various peripherals. SPI includes
8-bit/16-bit/32-bit shift registers to transmit and receive data. PDMA is
used for SPI communication.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add MSHC dt node for exynos5433
Jaehoon Chung [Thu, 26 Mar 2015 17:13:42 +0000 (02:13 +0900)]
arm64: dts: Add MSHC dt node for exynos5433

This patch adds MSHC (Mobile Storage Host Controller) dt node for Exynos5433
SoC. MSHC is an interface between the system the SD/MMC card.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoarm64: dts: Add dts files for 64-bit Exynos5433 SoC
Chanwoo Choi [Thu, 26 Mar 2015 17:13:42 +0000 (02:13 +0900)]
arm64: dts: Add dts files for 64-bit Exynos5433 SoC

This patch adds new Exynos5433 dtsi to support 64-bit Exynos5433 SoC
based on Octal core CPUs (quad Cortex-A57 and quad Cortex-A53). And
Exynos5433 supports PSCI (Power State Coordination Interface) v0.1.

This patch includes following dt node to support Exynos5433 SoC:
1. Octa core for big.LITTLE architecture
- Cortex-A53 LITTLE Quad-core
- Cortex-A57 big Quad-core
- Support PSCI v0.1

2. clock controller node:
- CMU_TOP   : clocks for IMEM/FSYS/G3D/GSCL/HEVC/MSCL/G2D/MFC/PERIC/PERIS
- CMU_CPIF  : clocks for LLI (Low Latency Interface)
- CMU_MIF   : clocks for DRAM Memory Controller
- CMU_PERIC : clocks for UART/I2C/SPI/I2S/PCM/SPDIF/PWM/SLIMBUS
- CMU_PERIS : clocks for PMU/TMU/MCT/WDT/RTC/SECKEY/TZPC
- CMU_FSYS  : clocks for USB/UFS/SDMMC/TSI/PDMA
- CMU_G2D   : clocks for G2D/MDMA
- CMU_DISP  : clocks for DECON/HDMI/DSIM/MIXER
- CMU_AUD   : clocks for Cortex-A5/BUS/AUDIO
- CMU_BUS{0|1|2} : clocks for global data buses and global peripheral buses
- CMU_G3D   : clocks for 3D Graphics Engine
- CMU_GSCL  : clocks for GSCALER
- CMU_APOLLO: clocks for Cortex-A53 Quad-core processor.
- CMU_ATLAS : clocks for Cortex-A57 Quad-core processor,
              CoreSight and L2 cache controller.
- CMU_MSCL  : clocks for M2M (Memory to Memory) scaler and JPEG IPs.
- CMU_MFC   : clocks for MFC (Multi-Format Codec) IP.
- CMU_HEVC  : clocks for HEVC(High Efficiency Video Codec) decoder IP.
- CMU_ISP   : clocks for FIMC-ISP/DRC/SCLC/DIS/3DNR IPs.
- CMU_CAM0  : clocks for MIPI_CSIS{0|1}/FIMC_LITE_{A|B|D}/FIMC_3AA{0|1} IPs.
- CMU_CAM1  : clocks for COrtex-A5/MIPI_CSIS2/FIMC_LITE_C/FIMC-FD IPs.

3. pinctrl node for GPIO:
- alive/aud/cpif/ese/finger/fsys/imem/nfc/peric/touch pad

4. HS (High-Speed) I2C device
5. Serial device
6. ARCH timer (arm,armv8-timer)
7. Interrupt controller (arm,gic-400)

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Enable HDMI support
Javier Martinez Canillas [Thu, 26 Mar 2015 17:00:09 +0000 (02:00 +0900)]
ARM: exynos_defconfig: Enable HDMI support

Many Exynos boards have an HDMI port so enable Exynos DRM HDMI
support.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C64XX: Use fixed IRQ bases to avoid conflicts on Cragganmore
Charles Keepax [Thu, 26 Mar 2015 16:58:08 +0000 (01:58 +0900)]
ARM: S3C64XX: Use fixed IRQ bases to avoid conflicts on Cragganmore

There are two PMICs on Cragganmore, currently one dynamically assign
its IRQ base and the other uses a fixed base. It is possible for the
statically assigned PMIC to fail if its IRQ is taken by the dynamically
assigned one. Fix this by statically assigning both the IRQ bases.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Fixed typo interrupt-cells for exynos5420 and exynos5250
Anand Moon [Thu, 26 Mar 2015 16:55:10 +0000 (01:55 +0900)]
ARM: dts: Fixed typo interrupt-cells for exynos5420 and exynos5250

Changes fixes the misspelled of #interrups-cell.

arch/arm/boot/dts/exynos5420.dtsi:224: WARNING: 'interrups'
 may be misspelled - perhaps 'interrupts'?

Tested on OdroidXU3 board.

Signed-off-by: Anand Moon <linux.amoon@gmail.com>
[kgene@kernel.org: added fixing same typo in exynos5250]
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Add HS400 support for exynos5420 and exynos5800
Seungwon Jeon [Thu, 26 Mar 2015 16:52:02 +0000 (01:52 +0900)]
ARM: dts: Add HS400 support for exynos5420 and exynos5800

HS400 timing values are added for SMDK5420, exynos5420-peach-pit
and exynos5800-peach-pi boards. This also adds RCLK GPIO line,
this gpio should be in pull-down state.
This also enables HS400 on peach-pi and this updates the clock
frequency to 800MHz to be set as input clock to controller.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
[alim.akhtar@samsung.com: addressed review comments]
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Enable options to mount a rootfs via NFS
Javier Martinez Canillas [Thu, 26 Mar 2015 16:50:16 +0000 (01:50 +0900)]
ARM: exynos_defconfig: Enable options to mount a rootfs via NFS

This patch enables the options to mount a rootfs over NFS and also
support for automatic configuration of IP addresses during boot as
needed by NFS.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoMerge branch 'v4.0-samsung-fixes-2' into for-next
Kukjin Kim [Tue, 17 Mar 2015 18:27:15 +0000 (03:27 +0900)]
Merge branch 'v4.0-samsung-fixes-2' into for-next

9 years agoARM: EXYNOS: Fix build breakage cpuidle on !SMP
Bartlomiej Zolnierkiewicz [Tue, 17 Mar 2015 18:26:11 +0000 (03:26 +0900)]
ARM: EXYNOS: Fix build breakage cpuidle on !SMP

The Exynos cpuidle driver has coupled cpuidle built-in so it cannot be
built without SMP:

arch/arm/mach-exynos/pm.c: In function 'exynos_cpu0_enter_aftr':
arch/arm/mach-exynos/pm.c:246:4: error: implicit declaration of function 'arch_send_wakeup_ipi_mask' [-Werror=implicit-function-declaration]
arch/arm/mach-exynos/built-in.o: In function 'exynos_pre_enter_aftr':
../arch/arm/mach-exynos/pm.c:300: undefined reference to 'cpu_boot_reg_base'
arch/arm/mach-exynos/built-in.o: In function 'exynos_cpu1_powerdown':
../arch/arm/mach-exynos/pm.c:282: undefined reference to 'exynos_cpu_power_down'

Fix it by adding missing checks for SMP.

Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoMerge branch 'v4.1-next/mach-samsung' into for-next
Kukjin Kim [Tue, 17 Mar 2015 18:06:54 +0000 (03:06 +0900)]
Merge branch 'v4.1-next/mach-samsung' into for-next

9 years agoARM: EXYNOS: Remove left over 'extra_save'
Krzysztof Kozlowski [Tue, 17 Mar 2015 17:34:38 +0000 (02:34 +0900)]
ARM: EXYNOS: Remove left over 'extra_save'

Since 32b0aa9aaeb4 ("ARM: EXYNOS: Remove i2c sys configuration related
code") the Exynos 5250 no longer saves additional registers under
'exynos_pm_data.extra_save' field.

No one else uses this code so get rid of it making also 'exynos_pm_data'
const everywhere.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: EXYNOS: Constify exynos_pm_data array
Krzysztof Kozlowski [Tue, 17 Mar 2015 17:34:37 +0000 (02:34 +0900)]
ARM: EXYNOS: Constify exynos_pm_data array

The 'exynos5420_pm_data' is not modified and can be made const.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: EXYNOS: use static in suspend.c
Krzysztof Kozlowski [Tue, 17 Mar 2015 17:32:40 +0000 (02:32 +0900)]
ARM: EXYNOS: use static in suspend.c

The 'pm_data', 'exynos_release_ret_regs', 'exynos3250_release_ret_regs'
and 'exynos5420_release_ret_regs' are not exported nor used outside of
suspend.c file. Make them static.

This fixes following sparse warnings:
arch/arm/mach-exynos/suspend.c:83:23: warning: symbol 'pm_data' was not declared. Should it be static?
arch/arm/mach-exynos/suspend.c:106:14: warning: symbol 'exynos_release_ret_regs' was not declared. Should it be static?
arch/arm/mach-exynos/suspend.c:117:14: warning: symbol 'exynos5420_release_ret_regs' was not declared. Should it be static?

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Pankaj Dubey <pankaj.dubey@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoMerge branch 'v4.1-next/mach-samsung' into for-next
Kukjin Kim [Tue, 17 Mar 2015 17:23:10 +0000 (02:23 +0900)]
Merge branch 'v4.1-next/mach-samsung' into for-next

9 years agoMerge branch 'v4.1-next/dt-samsung' into for-next
Kukjin Kim [Tue, 17 Mar 2015 17:23:01 +0000 (02:23 +0900)]
Merge branch 'v4.1-next/dt-samsung' into for-next

Conflicts:
Documentation/devicetree/bindings/arm/exynos/power_domain.txt

9 years agoMerge branch 'v4.0-samsung-defconfig' into for-next
Kukjin Kim [Tue, 17 Mar 2015 17:22:28 +0000 (02:22 +0900)]
Merge branch 'v4.0-samsung-defconfig' into for-next

9 years agoARM: EXYNOS: Use platform device name as power domain name
Krzysztof Kozlowski [Tue, 17 Mar 2015 17:19:24 +0000 (02:19 +0900)]
ARM: EXYNOS: Use platform device name as power domain name

The power domain nodes in DTS may be very generic (e.g. "power-domain"
for Exynos 5420) making it very hard to debug:

$ cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
    domain                      status         slaves
power-domain                    on

Use platform device name instead so the names will be a little more
user friendly:
    domain                      status         slaves
100440e0.power-domain           on

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Suggested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Suggested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Enable ChromeOS EC chardev driver
Javier Martinez Canillas [Tue, 17 Mar 2015 17:16:42 +0000 (02:16 +0900)]
ARM: exynos_defconfig: Enable ChromeOS EC chardev driver

Exynos Chromebooks have an Embedded Controller known as the ChromeOS EC
Enable the driver that provides an interface to access from user-space.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add async-bridge clocks to gsc power domain for exynos5420
Andrzej Hajda [Tue, 17 Mar 2015 17:14:07 +0000 (02:14 +0900)]
ARM: dts: add async-bridge clocks to gsc power domain for exynos5420

Both GSCALER IPs in gsc power domain have async-bridges (to FIMD and MIXER),
therefore their clocks should be enabled during power domain switch.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add async-bridge clocks to disp1 power domain for exynos5420
Andrzej Hajda [Tue, 17 Mar 2015 17:14:07 +0000 (02:14 +0900)]
ARM: dts: add async-bridge clocks to disp1 power domain for exynos5420

FIMD and MIXER IPs in disp1 power domain have async-bridges (to GSCALER),
therefore their clocks should be enabled during power domain switch.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agodt-bindings: add asynchronous bridge clock for exynos
Andrzej Hajda [Tue, 17 Mar 2015 17:14:07 +0000 (02:14 +0900)]
dt-bindings: add asynchronous bridge clock for exynos

The patch adds bindings for clocks required by async-bridges
present in the particular power domain.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: EXYNOS: add support for async-bridge clocks for pm_domains
Andrzej Hajda [Tue, 17 Mar 2015 17:12:23 +0000 (02:12 +0900)]
ARM: EXYNOS: add support for async-bridge clocks for pm_domains

Since Exynos5420 there are async-bridges (ASB) between different IPs. These
bridges must be operational during power domain on/off, ie. clocks used
by these bridges should be enabled.
This patch enabled these clocks during domain on/off.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoMerge branch 'v4.0-samsung-fixes-2' into for-next
Kukjin Kim [Tue, 17 Mar 2015 16:34:11 +0000 (01:34 +0900)]
Merge branch 'v4.0-samsung-fixes-2' into for-next

9 years agoARM: dts: fix lid and power pin-functions for exynos5250-spring
Andreas Faerber [Tue, 17 Mar 2015 16:32:02 +0000 (01:32 +0900)]
ARM: dts: fix lid and power pin-functions for exynos5250-spring

Configure the pins in external interrupt mode, as done for Snow in
e5e5c6d14e39 ("ARM: dts: Add power and lid GPIO keys pinctrl for
exynos5250-snow").

Reported-by: Kukjin Kim <kgene@kernel.org>
Suggested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Fixes: 53dd4138bb0a ("ARM: dts: Add exynos5250-spring device tree")
Signed-off-by: Andreas Faerber <afaerber@suse.de>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: fix mmc node updates for exynos5250-spring
Andreas Faerber [Tue, 17 Mar 2015 16:25:18 +0000 (01:25 +0900)]
ARM: dts: fix mmc node updates for exynos5250-spring

Resolve a merge conflict with mmc refactoring aaa25a5a33cb ("ARM: dts:
unuse the slot-node and deprecate the supports-highspeed for dw-mmc in
exynos") by dropping the slot@0 nodes, moving its bus-width property to
the mmc node and replacing supports-highspeed with cap-{mmc,sd}-highspeed,
matching exynos5250-snow.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Fixes: 53dd4138bb0a ("ARM: dts: Add exynos5250-spring device tree")
Signed-off-by: Andreas Faerber <afaerber@suse.de>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Cc: <stable@vger.kernel.org> [3.19+]
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoMerge branch 'v4.1-next/dt-samsung' into for-next
Kukjin Kim [Tue, 17 Mar 2015 15:45:35 +0000 (00:45 +0900)]
Merge branch 'v4.1-next/dt-samsung' into for-next

9 years agoMerge branch 'v4.1-next/non-critical-fixes' into for-next
Kukjin Kim [Tue, 17 Mar 2015 15:45:26 +0000 (00:45 +0900)]
Merge branch 'v4.1-next/non-critical-fixes' into for-next

9 years agoMerge branch 'v4.0-samsung-defconfig' into for-next
Kukjin Kim [Tue, 17 Mar 2015 15:45:18 +0000 (00:45 +0900)]
Merge branch 'v4.0-samsung-defconfig' into for-next

9 years agoMerge branch 'v4.0-samsung-fixes' into for-next
Kukjin Kim [Tue, 17 Mar 2015 15:45:09 +0000 (00:45 +0900)]
Merge branch 'v4.0-samsung-fixes' into for-next

9 years agoARM: exynos_defconfig: Enable CPU idle
Krzysztof Kozlowski [Tue, 17 Mar 2015 15:43:43 +0000 (00:43 +0900)]
ARM: exynos_defconfig: Enable CPU idle

Current Exynos CPU idle driver supports entering AFTR (Arm Off, Top
Running) mode on Exynos 4210 (coupled), Exynos 4x12 and Exynos 5250.
Enable it in default configuration to reduce energy consumption.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Enable Marvell WiFi-Ex support
Javier Martinez Canillas [Tue, 17 Mar 2015 15:42:17 +0000 (00:42 +0900)]
ARM: exynos_defconfig: Enable Marvell WiFi-Ex support

Exynos5420 Peach Pit and Exynos5800 Peach Pi boards have a MMC/SDIO
Marvell WiFi-Ex chip. This patch enables wireless support and the
mwifiex driver.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Define stdout-path property for exynos5250-spring
Javier Martinez Canillas [Tue, 17 Mar 2015 15:31:33 +0000 (00:31 +0900)]
ARM: dts: Define stdout-path property for exynos5250-spring

The kernel can use as the default console a serial port if is defined
as stdout device in the Device Tree.

This allows a board to be booted without the need of having a console
parameter in the kernel command line.

Currently the Spring DTS has bootargs in the /chosen node and this is
kept since users that don't have a serial console on this board might
be using it to have the boot log shown in the display. This will have
more precedence than the stdout-path but it's fine since is only used
when CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is enabled.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Define stdout-path property for exynos5250-snow
Javier Martinez Canillas [Tue, 17 Mar 2015 15:31:27 +0000 (00:31 +0900)]
ARM: dts: Define stdout-path property for exynos5250-snow

The kernel can use as the default console a serial port if is defined
as stdout device in the Device Tree.

This allows a board to be booted without the need of having a console
parameter in the kernel command line.

Currently the Snow DTS has a bootargs in the /chosen node and this is
kept since users that don't have a serial console on this board might
be using it to have the boot log shown in the display. This will have
more precedence than the stdout-path but it's fine since is only used
when CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is enabled.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Define stdout-path property for Peach boards
Javier Martinez Canillas [Tue, 17 Mar 2015 15:31:22 +0000 (00:31 +0900)]
ARM: dts: Define stdout-path property for Peach boards

The kernel can use as the default console a serial port if is defined
as stdout device in the Device Tree.

This allows a board to be booted without the need of having a console
parameter in the kernel command line.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Add assigned clock parents to CMU node for exynos3250
Beata Michalska [Tue, 17 Mar 2015 15:21:46 +0000 (00:21 +0900)]
ARM: dts: Add assigned clock parents to CMU node for exynos3250

Use assigned-clocks/assigned-clock-parents properties for
CMU clock controller DT node to secure proper clock setup:
switching the two muxes to root oscillator clock is not only
required for proper powering down the ISP power domain,
but it also reduces the risk of accessing the ISP CMU
registers while the ISP power domain remains turned off
(i.e. through the common clock framework by clk_summary)

Signed-off-by: Beata Michalska <b.michalska@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Disable IOMMU support
Javier Martinez Canillas [Mon, 2 Mar 2015 19:45:01 +0000 (04:45 +0900)]
ARM: exynos_defconfig: Disable IOMMU support

Enabling Exynos DRM IOMMU support for Exynos is currently broken and
causes a BUG on exynos-iommu driver. This was not an issue since the
options was disabled in exynos_defconfig but after commit 8dcc14f82f06
("drm/exynos: IOMMU support should not be selectable by user"), it is
selected if EXYNOS_IOMMU is enabled which is in exynos_defconfig.

So a kernel built using exynos_defconfig after the mentioned commit
fails to boot [0]. Disable IOMMU support in Exynos defconfig until
things get sorted out.

[0]:
[    1.242183] ------------[ cut here ]------------
[    1.246191] kernel BUG at drivers/iommu/exynos-iommu.c:481!
[    1.251747] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[    1.257561] Modules linked in:
[    1.260603] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 3.19.0-07478-g796e1c55717e #490
[    1.268412] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[    1.274489] task: ee06c000 ti: ee05a000 task.ti: ee05a000
[    1.279874] PC is at __exynos_sysmmu_enable+0x184/0x190
[    1.285080] LR is at exynos_iommu_attach_device+0x44/0xb0
[    1.290461] pc : [<c0254a14>]    lr : [<c0254a64>]    psr: 60000193
[    1.290461] sp : ee05bcf8  ip : 00000000  fp : ed84aa40
[    1.301916] r10: ed84a890  r9 : a0000113  r8 : 6db30000
[    1.307125] r7 : ed84aa40  r6 : 00000000  r5 : 00000000  r4 : ee174e10
[    1.313635] r3 : 6db30000  r2 : ed84aa40  r1 : 6db30000  r0 : ee174e10
[    1.320147] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    1.327524] Control: 10c5387d  Table: 4000406a  DAC: 00000015
[    1.333252] Process swapper/0 (pid: 1, stack limit = 0xee05a210)
[    1.339241] Stack: (0xee05bcf8 to 0xee05c000)
[    1.343581] bce0:                                                       6db30000 ee174e10
[    1.351741] bd00: ed84a880 00000000 ed84aa40 ee174e10 a0000113 ed84a890 00000000 c0254a64
[    1.359900] bd20: 00000000 6db30000 ee174e10 ed84adc0 00000005 00000034 00000001 c0692c1c
[    1.368059] bd40: 00000097 c02526c8 ee29f050 c0017210 ee29f050 ee174e10 edab6810 c0282558
[    1.376219] bd60: edab6a10 ee1cb000 00000005 c0283520 ee29f240 c028f210 edab6810 ee2ef280
[    1.384378] bd80: edb24680 ed84a680 ee1cb000 c02883f8 edab6810 ee1cb000 ee1cb000 00000000
[    1.392537] bda0: ed84a680 ee2ef450 00000000 c027e968 ee1cb000 00000000 00000000 c0268fd4
[    1.400696] bdc0: edab6800 c06b0de4 ee1cb000 c026a8bc ee2ef0c0 c028f210 00000002 ee2ef460
[    1.408855] bde0: ee2ef460 00000002 ee2ef280 c0288728 c04af5d0 edab6810 ee2ef280 00000000
[    1.417014] be00: c06b1348 c0288918 c06b0f00 c06b0f00 edab6810 00000001 c06b0da0 c027eaf4
[    1.425173] be20: c070334c edaee190 00000000 edab6810 ffffffed c06b0da0 00000000 c028da1c
[    1.433332] be40: edab6810 c070334c 00000000 c028c5f8 edab6810 c06b0da0 edab6844 00000000
[    1.441492] be60: eda3c740 c028c7a4 c06b0da0 00000000 c028c718 c028af74 ee005274 ee3b7b40
[    1.449652] be80: c06b0da0 ee3b7680 c06b1540 c028bde4 c05b6990 c06b0da0 c0703324 c06b0da0
[    1.457811] bea0: c0703324 00000000 c069ab18 c028cdc4 00000000 00000000 c0703324 c027ebd8
[    1.465970] bec0: 00000000 c05b6990 ffffffff 00000000 00000000 00000000 00000000 c00c4574
[    1.474129] bee0: 00000000 00000000 c069ab18 c027eb1c 00000000 c069ab18 c069ab18 c0008944
[    1.482288] bf00: 00000036 c04770e8 ee049800 c06eace0 ee06c000 60000113 c069eab0 00000000
[    1.490447] bf20: 00000000 c069eab0 60000113 00000000 ef7fcabc ef7fcaae c061c594 c0038640
[    1.498607] bf40: c05cb1d0 c061bc24 00000006 00000006 c069ea50 c06724d4 00000006 c06724b4
[    1.506766] bf60: c06c7600 c0647588 c0692c1c 00000097 00000000 c0647d40 00000006 00000006
[    1.514925] bf80: c0647588 c003d2d8 00000000 c046921c 00000000 00000000 00000000 00000000
[    1.523084] bfa0: 00000000 c0469224 00000000 c000e680 00000000 00000000 00000000 00000000
[    1.531243] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.539402] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[    1.547567] [<c0254a14>] (__exynos_sysmmu_enable) from [<c0254a64>] (exynos_iommu_attach_device+0x44/0xb0)
[    1.557199] [<c0254a64>] (exynos_iommu_attach_device) from [<c02526c8>] (iommu_attach_device+0x18/0x24)
[    1.566576] [<c02526c8>] (iommu_attach_device) from [<c0017210>] (arm_iommu_attach_device+0x18/0x50)
[    1.575690] [<c0017210>] (arm_iommu_attach_device) from [<c0282558>] (drm_iommu_attach_device+0x50/0xb4)
[    1.585150] [<c0282558>] (drm_iommu_attach_device) from [<c0283520>] (fimd_bind+0x94/0x1b8)
[    1.593483] [<c0283520>] (fimd_bind) from [<c02883f8>] (component_bind_all+0xb4/0x214)
[    1.601380] [<c02883f8>] (component_bind_all) from [<c027e968>] (exynos_drm_load+0x9c/0x13c)
[    1.609802] [<c027e968>] (exynos_drm_load) from [<c0268fd4>] (drm_dev_register+0xa0/0xf4)
[    1.617960] [<c0268fd4>] (drm_dev_register) from [<c026a8bc>] (drm_platform_init+0x44/0xcc)
[    1.626293] [<c026a8bc>] (drm_platform_init) from [<c0288728>] (try_to_bring_up_master.part.3+0xc8/0x104)
[    1.635839] [<c0288728>] (try_to_bring_up_master.part.3) from [<c0288918>] (component_master_add_with_match+0xcc/0x114)
[    1.646602] [<c0288918>] (component_master_add_with_match) from [<c027eaf4>] (exynos_drm_platform_probe+0xec/0x114)
[    1.657019] [<c027eaf4>] (exynos_drm_platform_probe) from [<c028da1c>] (platform_drv_probe+0x48/0x98)
[    1.666221] [<c028da1c>] (platform_drv_probe) from [<c028c5f8>] (driver_probe_device+0x114/0x234)
[    1.675075] [<c028c5f8>] (driver_probe_device) from [<c028c7a4>] (__driver_attach+0x8c/0x90)
[    1.683494] [<c028c7a4>] (__driver_attach) from [<c028af74>] (bus_for_each_dev+0x54/0x88)
[    1.691653] [<c028af74>] (bus_for_each_dev) from [<c028bde4>] (bus_add_driver+0xd8/0x1cc)
[    1.699812] [<c028bde4>] (bus_add_driver) from [<c028cdc4>] (driver_register+0x78/0xf4)
[    1.707797] [<c028cdc4>] (driver_register) from [<c027ebd8>] (exynos_drm_init+0xbc/0x110)
[    1.715956] [<c027ebd8>] (exynos_drm_init) from [<c0008944>] (do_one_initcall+0x80/0x1d0)
[    1.724117] [<c0008944>] (do_one_initcall) from [<c0647d40>] (kernel_init_freeable+0x108/0x1d4)
[    1.732796] [<c0647d40>] (kernel_init_freeable) from [<c0469224>] (kernel_init+0x8/0xe4)
[    1.740869] [<c0469224>] (kernel_init) from [<c000e680>] (ret_from_fork+0x14/0x34)
[    1.748419] Code: e3403110 11a02001 01a02003 eaffffe4 (e7f001f2)
[    1.754502] ---[ end trace f58ad362326928d7 ]---

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Add mclk entry for Peach boards
Tushar Behera [Thu, 26 Feb 2015 21:08:52 +0000 (06:08 +0900)]
ARM: dts: Add mclk entry for Peach boards

On Peach Pit and Pi boards, the Exynos SoC XCLKOUT pin provides
master clock (mclk) to the codec. So make it a clock consumer.

Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Add WiFi module support for Peach boards
Javier Martinez Canillas [Thu, 26 Feb 2015 21:08:51 +0000 (06:08 +0900)]
ARM: dts: Add WiFi module support for Peach boards

Peach Pit and Pi boards have a WiFi module that is always powered
but needs toggling an enable pin and ungating a 32kHz reference
clock as part of their power sequencing.

Add a dev node for the SDIO slot and a MMC power sequence provider.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Mux XMMCnDATA[0] pad correctly for Exynos5420 boards
Javier Martinez Canillas [Thu, 26 Feb 2015 21:08:51 +0000 (06:08 +0900)]
ARM: dts: Mux XMMCnDATA[0] pad correctly for Exynos5420 boards

The Exynos5420 SoC has 3 sets of 8 pads used as data lines for the 3
MMC/SD/SDIO slots. These needs to be muxed as SD_n_DATA instead of a
GPIO or external interrupt to allow the MMC controller to communicate
with the attached cards or SDIO devices.

Which data lines needs to be muxed as SD_n_DATA depends on the bus
width used for data transfer:

* bus-width = <1> needs SD_n_DATA[0]
* bus-width = <4> needs SD_n_DATA[0-3]
* bus-width = <8> needs SD_n_DATA[0-7]

The Exynos5250-pinctrl.dtsi file that defines the groups of pins has
SD_n_DATA[0] muxed for both sdn_bus1 and sdn_bus4 so just one of them
needs to be included in the device node's pinctrl property.

But Exynos5420-pinctrl has a different definition and only includes
SD_n_DATA[1-3] for sdn_bus4. So for a bus-width = <4>, both sdn_bus1
and sdn_bus4 have to be in the dev pinctrl to mux all the needed pads.

It seems all Exynos5420 boards had just cargo cult the pinctrl lines
assuming that sdn_bus4 also included SD_n_DATA[0] and it only works
because the bootloader muxes the pads correctly. But that is not the
case for the devices not used by the bootloader such as WiFi modules.

Add sdn_bus1 too in the nodes pinctrl to not rely on the bootloader.

Suggested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: EXYNOS: Fix wrong hwirq of RTC interrupt for Exynos3250 SoC
Chanwoo Choi [Thu, 26 Feb 2015 20:58:12 +0000 (05:58 +0900)]
ARM: EXYNOS: Fix wrong hwirq of RTC interrupt for Exynos3250 SoC

This patch fixes wrong hwirq of RTC irq for Exynos3250 SoC. When entering
suspend state, 'enable_irq_wake fail' happen because of the mismatch of RTC hwirq.

[  429.200937] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  429.203383] Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
[  429.209914] Suspending console(s) (use no_console_suspend to debug)
[  429.370685] wake enabled for irq 65
[  429.370837] wake enabled for irq 64
[  429.370868] wake enabled for irq 79
...
[  429.372120] s3c-rtc 10070000.rtc: enable_irq_wake failed

Fixes: a4f582f5c5fe3 (ARM: EXYNOS: Add exynos3250 suspend-to-ram support)
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency
Krzysztof Kozlowski [Thu, 26 Feb 2015 20:50:41 +0000 (05:50 +0900)]
ARM: EXYNOS: Don't use LDREX and STREX after disabling cache coherency

During CPU shutdown the exynos_cpu_power_down() is called after
disabling cache coherency and it uses LDREX and STREX instructions (by
calling of_machine_is_compatible() -> kobject_get() -> kref_get()).

The LDREX and STREX should not be used after disabling the cache
coherency so just use soc_is_exynos().

Fixes: adc548d77c22 ("ARM: EXYNOS: Use MCPM call-backs to support S2R
on exynos5420")

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C24XX: avoid a Kconfig warning
Arnd Bergmann [Thu, 26 Feb 2015 20:50:25 +0000 (05:50 +0900)]
ARM: S3C24XX: avoid a Kconfig warning

The PM_H1940 symbol is used by two platforms: RX3715 and RX1950. However,
it is hidden inside of the the CPU_S3C2410 conditional, which is only
set by one of them, so we get a lot of randconfig warnings like

warning: (MACH_RX3715 && MACH_RX1950) selects PM_H1940 which has unmet direct dependencies (ARCH_S3C24XX && CPU_S3C2410)

This moves it outside of the conditional to remove the warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C24XX: fix header file inclusions
Arnd Bergmann [Thu, 26 Feb 2015 20:50:23 +0000 (05:50 +0900)]
ARM: S3C24XX: fix header file inclusions

The pm-core.h file does not include all the necessary headers,
and has a static declaration for a function that is not
defined in the same file, causing SAMSUNG_PM_DEBUG to
break on s3c24xx:

arch/arm/mach-s3c24xx/include/mach/pm-core.h:50:91: warning: 's3c_pm_show_resume_irqs' used but never defined
arch/arm/mach-s3c24xx/include/mach/pm-core.h: In function 's3c_pm_debug_init_uart':
arch/arm/mach-s3c24xx/include/mach/pm-core.h:16:34: error: 'S3C2410_CLKCON' undeclared (first use in this function)
  unsigned long tmp = __raw_readl(S3C2410_CLKCON);
                                  ^

This moves the code around slightly to avoid the errors.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C24XX: fix building without PM_SLEEP
Arnd Bergmann [Thu, 26 Feb 2015 20:50:22 +0000 (05:50 +0900)]
ARM: S3C24XX: fix building without PM_SLEEP

We get lots of link errors based on the assumption that
any s3c24xx kernel would enable CONFIG_PM_SLEEP if it
enables CONFIG_PM. This tries to clean that up.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C24XX: use SAMSUNG_WAKEMASK for s3c2416
Arnd Bergmann [Thu, 26 Feb 2015 20:50:22 +0000 (05:50 +0900)]
ARM: S3C24XX: use SAMSUNG_WAKEMASK for s3c2416

Both s3c2412 and s3c2416 use the s3c2412_pm_prepare code, which
depends on the common wakemask code, but only s3c2412 currently
selects the code, leading to a build error for an s3c2416-only
kernel.

arch/arm/mach-s3c24xx/built-in.o: In function `s3c2412_pm_prepare':
:(.text+0x240): undefined reference to `samsung_sync_wakemask'
arch/arm/mach-s3c24xx/built-in.o:(.data+0xeb0): undefined reference to `s3c2412_subsys'

This adds the missing select.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C64XX: fix __initdata section mismatch
Arnd Bergmann [Thu, 26 Feb 2015 20:50:22 +0000 (05:50 +0900)]
ARM: S3C64XX: fix __initdata section mismatch

smdk6410_b_pwr_5v_data is marked as __initdata, but referenced
from a structure that is not:

WARNING: arch/arm/mach-s3c64xx/built-in.o(.data+0x4c5c): Section mismatch in reference from the variable smdk6410_b_pwr_5v_data to the (unknown reference) .init.data:(unknown)

This removes the annotation to avoid an invalid pointer access
when the regulator driver accesses this variable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C64XX: fix building without CONFIG_PM_SLEEP
Arnd Bergmann [Thu, 26 Feb 2015 20:50:22 +0000 (05:50 +0900)]
ARM: S3C64XX: fix building without CONFIG_PM_SLEEP

arch/arm/mach-s3c64xx/built-in.o: In function `s3c_pm_restore_core':
:(.text+0x5d0): undefined reference to `s3c_pm_do_restore_core'
:(.text+0x5d4): undefined reference to `s3c_pm_do_restore'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c_pm_save_core':
:(.text+0x60c): undefined reference to `s3c_pm_do_save'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c64xx_irq_pm_resume':
:(.text+0x670): undefined reference to `s3c_pm_do_restore'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c64xx_irq_pm_suspend':
:(.text+0x6d8): undefined reference to `s3c_pm_do_save'
arch/arm/mach-s3c64xx/built-in.o: In function `s3c_cpu_resume':
:(.text+0x71c): undefined reference to `cpu_resume'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: S3C64XX: add I2C dependencies where needed
Arnd Bergmann [Thu, 26 Feb 2015 20:50:21 +0000 (05:50 +0900)]
ARM: S3C64XX: add I2C dependencies where needed

The SMDK6410_WM1190_EV1 and SMDK6410_WM1192_EV1 add-on
cards select MFD_WM*_I2C, but they ignore the fact that I2C
may be compiled as a loadable module.

This patch adds a dependency on I2C, which means we avoid
the build errors, but can end up in a case where the options
are hidden from the user when I2C is turned off.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add display power domain for exynos5250
Andrzej Hajda [Wed, 4 Feb 2015 14:44:16 +0000 (23:44 +0900)]
ARM: dts: add display power domain for exynos5250

The patch adds domain definition and references to it in appropriate devices.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
[mszyprow: rebased onto generic power domains dt bindings]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add 'hdmi' clock to mixer nodes for exynos5250 and exynos5420
Marek Szyprowski [Wed, 4 Feb 2015 14:44:16 +0000 (23:44 +0900)]
ARM: dts: add 'hdmi' clock to mixer nodes for exynos5250 and exynos5420

Mixed block needs to control hdmi clock to properly perform power on/off
operation, so add 'hdmi' clock also to mixer nodes.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: enable hdmi support for exynos4210-universal_c210
Tomasz Stanislawski [Wed, 4 Feb 2015 14:44:16 +0000 (23:44 +0900)]
ARM: dts: enable hdmi support for exynos4210-universal_c210

This patch adds configuration of hw modules required to enable HDMI
support on Universal C210 board.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: enable hdmi support for exynos4412-odroid-common
Marek Szyprowski [Wed, 4 Feb 2015 14:44:15 +0000 (23:44 +0900)]
ARM: dts: enable hdmi support for exynos4412-odroid-common

This patch adds nodes specific to Exynos4412 based Odroid X/X2/U2/U3
boards required for enabling HDMI display.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add dependency between TV and LCD0 power domains for exynos4
Marek Szyprowski [Wed, 4 Feb 2015 14:44:15 +0000 (23:44 +0900)]
ARM: dts: add dependency between TV and LCD0 power domains for exynos4

TV Mixer needs both TV and LCD0 domains enabled to be fully operational.
This dependency is modelled by making TV power domains a sub-domain of
LCD0 power domain.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add hdmi related nodes for exynos4 SoCs
Marek Szyprowski [Wed, 4 Feb 2015 14:44:16 +0000 (23:44 +0900)]
ARM: dts: add hdmi related nodes for exynos4 SoCs

This patch adds entries for HDMI, Mixer and i2c with hdmi-phy modules
found in Exynos 4210 and 4x12 SoCs.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: EXYNOS: add support for sub-power domains
Marek Szyprowski [Wed, 4 Feb 2015 14:44:15 +0000 (23:44 +0900)]
ARM: EXYNOS: add support for sub-power domains

This patch adds support for making one power domain a sub-domain of
other domain. This is useful for modeling power dependences for devices
like TV Mixer or Camera ISP, which needs to have more than one power
domain enabled to be operational.

Based on previous work by Amit Daniel Kachhap <amit.daniel@samsung.com>.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agodt-bindings: document a note about power domain subdomains
Marek Szyprowski [Wed, 4 Feb 2015 14:44:15 +0000 (23:44 +0900)]
dt-bindings: document a note about power domain subdomains

This patch adds a note on defining subdomains to generic PM domain
binding documentation to let power domain providers use common approach
for defining power domain hierarchy.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Provide dt bindings identical for Exynos TMU
Lukasz Majewski [Thu, 29 Jan 2015 23:26:03 +0000 (08:26 +0900)]
ARM: dts: Provide dt bindings identical for Exynos TMU

Presented device tree bindings provide data already hardcoded in the
exynos_tmu_data.c file.
After this commit, it should be possible to reuse common thermal core
framework in Exynos SoCs.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Trip points and sensor configuration data for exynos5440
Lukasz Majewski [Thu, 29 Jan 2015 23:26:03 +0000 (08:26 +0900)]
ARM: dts: Trip points and sensor configuration data for exynos5440

This commit provides information about Exynos5440 device configuration.
Previously this information was available in exynos_tmu_data.c file.
Now it is available in the device tree.
Such approach allows reusing some common code for thermal.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: define default thermal-zones for exynos4
Lukasz Majewski [Thu, 29 Jan 2015 23:26:03 +0000 (08:26 +0900)]
ARM: dts: define default thermal-zones for exynos4

Trip points corresponding to the one defined in the exynos_tmu_data.c
for Exynos4 have been included.
This thermal-zones attribute is afterwards reused for Exynos4210,
Exynos4412 and Exynos5250.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: default trip points definition for exynos5420
Lukasz Majewski [Thu, 29 Jan 2015 23:26:03 +0000 (08:26 +0900)]
ARM: dts: default trip points definition for exynos5420

This code groups in one place default settings of trip points.
It is used in SoCs with multiple instances of TMU sensor.

Separate device tree file prevents from multiple copying of the
same data.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add TMU default definitions for exynos4412
Lukasz Majewski [Thu, 29 Jan 2015 23:26:03 +0000 (08:26 +0900)]
ARM: dts: add TMU default definitions for exynos4412

Exynos 4 and 5 family of SoCs uses almost identical TMU sensor to
measure the on chip temperature. For this reason it is possible to
group TMU configuration parameters in one dts file.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Adding CPU cooling binding for Exynos SoCs
Lukasz Majewski [Thu, 29 Jan 2015 23:26:02 +0000 (08:26 +0900)]
ARM: dts: Adding CPU cooling binding for Exynos SoCs

Presented patch aims to move data necessary for correct CPU cooling device
configuration from exynos_tmu_data.c to device tree.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Enable TMU for exynos4412-odriod-common
Lukasz Majewski [Thu, 29 Jan 2015 23:26:02 +0000 (08:26 +0900)]
ARM: dts: Enable TMU for exynos4412-odriod-common

This commit enables TMU IP block on the Exynos4412 Odroid based
devices such as Odroid U3.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Add LDO10 for TMU for exynos4412-odroid-common
Lukasz Majewski [Thu, 29 Jan 2015 23:26:02 +0000 (08:26 +0900)]
ARM: dts: Add LDO10 for TMU for exynos4412-odroid-common

This patch adds LDO10 regulator node for TMU.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Enable TMU for exynos4210-trats
Lukasz Majewski [Thu, 29 Jan 2015 23:26:02 +0000 (08:26 +0900)]
ARM: dts: Enable TMU for exynos4210-trats

The thermal IP block (Thermal Management Unit) called TMU has been
enabled in this device.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Enable support for cpufreq on Exynos SoCs
Lukasz Majewski [Wed, 4 Feb 2015 14:54:01 +0000 (23:54 +0900)]
ARM: exynos_defconfig: Enable support for cpufreq on Exynos SoCs

This commit enables the cpufreq subsystem. Moreover, support
for using CPU as a cooling device is provided.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Enable thermal emulation for Exynos TMU
Lukasz Majewski [Wed, 4 Feb 2015 14:54:01 +0000 (23:54 +0900)]
ARM: exynos_defconfig: Enable thermal emulation for Exynos TMU

Enabling thermal emulation on Exynos SoCs. New sysfs attribute
- emul_temp is created.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: exynos_defconfig: Remove CONFIG_EXYNOS_THERMAL_CORE define
Lukasz Majewski [Wed, 4 Feb 2015 14:54:01 +0000 (23:54 +0900)]
ARM: exynos_defconfig: Remove CONFIG_EXYNOS_THERMAL_CORE define

After Exynos TMU rework to use device tree for configuration
this flag can be removed. It is not used anymore.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add eMMC reset line for exynos5422-odroidxu3
Marek Szyprowski [Wed, 4 Feb 2015 15:35:58 +0000 (00:35 +0900)]
ARM: dts: add eMMC reset line for exynos5422-odroidxu3

This patch adds reset-gpios property to the eMMC slot, so the MMC driver
is able to properly reset eMMC card on system restart and thus fixes
system hang on software reboot.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: add eMMC reset line for exynos4412-odroid-common
Marek Szyprowski [Wed, 4 Feb 2015 15:35:58 +0000 (00:35 +0900)]
ARM: dts: add eMMC reset line for exynos4412-odroid-common

This patch adds reset-gpios property to the eMMC slot, so the MMC driver
is able to properly reset eMMC card on system restart and thus fixes
system hang on software reboot.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: represent bridge and panel connection for exynos5420-peach-pit
Ajay Kumar [Wed, 4 Feb 2015 15:29:56 +0000 (00:29 +0900)]
ARM: dts: represent bridge and panel connection for exynos5420-peach-pit

Define videoports and use endpoints to describe the connection between
the encoder, bridge and the panel, instead of using phandles.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: represent bridge and panel connection for exynos5250-snow
Ajay Kumar [Wed, 4 Feb 2015 15:29:06 +0000 (00:29 +0900)]
ARM: dts: represent bridge and panel connection for exynos5250-snow

Define videoports and use endpoints to describe the connection between
the encoder, bridge and the panel, instead of using phandles.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Add cap-sdio-irq to wifi mmc node for exynos5250-snow
Javier Martinez Canillas [Wed, 4 Feb 2015 15:22:02 +0000 (00:22 +0900)]
ARM: dts: Add cap-sdio-irq to wifi mmc node for exynos5250-snow

Enabling SDIO IRQ signalling for the wifi MMC/SDIO slot
doubles the transmission transfer rate.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoARM: dts: Enable wifi power-on for exynos5250-snow
Javier Martinez Canillas [Wed, 4 Feb 2015 15:22:02 +0000 (00:22 +0900)]
ARM: dts: Enable wifi power-on for exynos5250-snow

The Snow board has a MMC/SDIO wifi chip that is always powered but it
needs a power sequence involving a reset (active low) and an enable
(active high) pins. Both pins are marked as active low since the MMC
simple power sequence driver asserts the pins prior to the card power
up procedure and de-asserts the pins after the card has been powered.

So the reset line will be left de-asserted and the enable pin will be
left asserted.

The chip also needs an external 32kHz reference clock to be operational
that is by the MAX77686 PMIC clock.

Add a simple MMC power sequence provider for the wifi MMC/SDIO slot.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
9 years agoLinux 4.0-rc1 v4.0-rc1
Linus Torvalds [Mon, 23 Feb 2015 02:21:14 +0000 (18:21 -0800)]
Linux 4.0-rc1

.. after extensive statistical analysis of my G+ polling, I've come to
the inescapable conclusion that internet polls are bad.

Big surprise.

But "Hurr durr I'ma sheep" trounced "I like online polls" by a 62-to-38%
margin, in a poll that people weren't even supposed to participate in.
Who can argue with solid numbers like that? 5,796 votes from people who
can't even follow the most basic directions?

In contrast, "v4.0" beat out "v3.20" by a slimmer margin of 56-to-44%,
but with a total of 29,110 votes right now.

Now, arguably, that vote spread is only about 3,200 votes, which is less
than the almost six thousand votes that the "please ignore" poll got, so
it could be considered noise.

But hey, I asked, so I'll honor the votes.

9 years agoMerge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Mon, 23 Feb 2015 02:05:13 +0000 (18:05 -0800)]
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:
 "Ext4 bug fixes.

  We also reserved code points for encryption and read-only images (for
  which the implementation is mostly just the reserved code point for a
  read-only feature :-)"

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix indirect punch hole corruption
  ext4: ignore journal checksum on remount; don't fail
  ext4: remove duplicate remount check for JOURNAL_CHECKSUM change
  ext4: fix mmap data corruption in nodelalloc mode when blocksize < pagesize
  ext4: support read-only images
  ext4: change to use setup_timer() instead of init_timer()
  ext4: reserve codepoints used by the ext4 encryption feature
  jbd2: complain about descriptor block checksum errors

9 years agoMerge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Mon, 23 Feb 2015 01:42:14 +0000 (17:42 -0800)]
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull more vfs updates from Al Viro:
 "Assorted stuff from this cycle.  The big ones here are multilayer
  overlayfs from Miklos and beginning of sorting ->d_inode accesses out
  from David"

* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (51 commits)
  autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
  procfs: fix race between symlink removals and traversals
  debugfs: leave freeing a symlink body until inode eviction
  Documentation/filesystems/Locking: ->get_sb() is long gone
  trylock_super(): replacement for grab_super_passive()
  fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
  Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
  VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
  SELinux: Use d_is_positive() rather than testing dentry->d_inode
  Smack: Use d_is_positive() rather than testing dentry->d_inode
  TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
  Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode
  Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb
  VFS: Split DCACHE_FILE_TYPE into regular and special types
  VFS: Add a fallthrough flag for marking virtual dentries
  VFS: Add a whiteout dentry type
  VFS: Introduce inode-getting helpers for layered/unioned fs environments
  Infiniband: Fix potential NULL d_inode dereference
  posix_acl: fix reference leaks in posix_acl_create
  autofs4: Wrong format for printing dentry
  ...

9 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 22 Feb 2015 17:57:16 +0000 (09:57 -0800)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fix from Russell King:
 "Just one fix this time around.  __iommu_alloc_buffer() can cause a
  BUG() if dma_alloc_coherent() is called with either __GFP_DMA32 or
  __GFP_HIGHMEM set.  The patch from Alexandre addresses this"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer()

9 years agoautofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
Al Viro [Sun, 22 Feb 2015 03:19:57 +0000 (22:19 -0500)]
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation

X-Coverup: just ask spender
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoprocfs: fix race between symlink removals and traversals
Al Viro [Sun, 22 Feb 2015 03:16:11 +0000 (22:16 -0500)]
procfs: fix race between symlink removals and traversals

use_pde()/unuse_pde() in ->follow_link()/->put_link() resp.

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agodebugfs: leave freeing a symlink body until inode eviction
Al Viro [Sun, 22 Feb 2015 03:05:11 +0000 (22:05 -0500)]
debugfs: leave freeing a symlink body until inode eviction

As it is, we have debugfs_remove() racing with symlink traversals.
Supply ->evict_inode() and do freeing there - inode will remain
pinned until we are done with the symlink body.

And rip the idiocy with checking if dentry is positive right after
we'd verified debugfs_positive(), which is a stronger check...

Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoDocumentation/filesystems/Locking: ->get_sb() is long gone
Al Viro [Sat, 21 Feb 2015 09:59:02 +0000 (04:59 -0500)]
Documentation/filesystems/Locking: ->get_sb() is long gone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agotrylock_super(): replacement for grab_super_passive()
Konstantin Khlebnikov [Thu, 19 Feb 2015 17:19:35 +0000 (20:19 +0300)]
trylock_super(): replacement for grab_super_passive()

I've noticed significant locking contention in memory reclaimer around
sb_lock inside grab_super_passive(). Grab_super_passive() is called from
two places: in icache/dcache shrinkers (function super_cache_scan) and
from writeback (function __writeback_inodes_wb). Both are required for
progress in memory allocator.

Grab_super_passive() acquires sb_lock to increment sb->s_count and check
sb->s_instances. It seems sb->s_umount locked for read is enough here:
super-block deactivation always runs under sb->s_umount locked for write.
Protecting super-block itself isn't a problem: in super_cache_scan() sb
is protected by shrinker_rwsem: it cannot be freed if its slab shrinkers
are still active. Inside writeback super-block comes from inode from bdi
writeback list under wb->list_lock.

This patch removes locking sb_lock and checks s_instances under s_umount:
generic_shutdown_super() unlinks it under sb->s_umount locked for write.
New variant is called trylock_super() and since it only locks semaphore,
callers must call up_read(&sb->s_umount) instead of drop_super(sb) when
they're done.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agofanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
David Howells [Thu, 29 Jan 2015 12:02:36 +0000 (12:02 +0000)]
fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions

Fanotify probably doesn't want to watch autodirs so make it use d_can_lookup()
rather than d_is_dir() when checking a dir watch and give an error on fake
directories.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoCachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions
David Howells [Thu, 29 Jan 2015 12:02:36 +0000 (12:02 +0000)]
Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions

Fix up the following scripted S_ISDIR/S_ISREG/S_ISLNK conversions (or lack
thereof) in cachefiles:

 (1) Cachefiles mostly wants to use d_can_lookup() rather than d_is_dir() as
     it doesn't want to deal with automounts in its cache.

 (2) Coccinelle didn't find S_IS* expressions in ASSERT() statements in
     cachefiles.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoVFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
David Howells [Thu, 29 Jan 2015 12:02:35 +0000 (12:02 +0000)]
VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)

Convert the following where appropriate:

 (1) S_ISLNK(dentry->d_inode) to d_is_symlink(dentry).

 (2) S_ISREG(dentry->d_inode) to d_is_reg(dentry).

 (3) S_ISDIR(dentry->d_inode) to d_is_dir(dentry).  This is actually more
     complicated than it appears as some calls should be converted to
     d_can_lookup() instead.  The difference is whether the directory in
     question is a real dir with a ->lookup op or whether it's a fake dir with
     a ->d_automount op.

In some circumstances, we can subsume checks for dentry->d_inode not being
NULL into this, provided we the code isn't in a filesystem that expects
d_inode to be NULL if the dirent really *is* negative (ie. if we're going to
use d_inode() rather than d_backing_inode() to get the inode pointer).

Note that the dentry type field may be set to something other than
DCACHE_MISS_TYPE when d_inode is NULL in the case of unionmount, where the VFS
manages the fall-through from a negative dentry to a lower layer.  In such a
case, the dentry type of the negative union dentry is set to the same as the
type of the lower dentry.

However, if you know d_inode is not NULL at the call site, then you can use
the d_is_xxx() functions even in a filesystem.

There is one further complication: a 0,0 chardev dentry may be labelled
DCACHE_WHITEOUT_TYPE rather than DCACHE_SPECIAL_TYPE.  Strictly, this was
intended for special directory entry types that don't have attached inodes.

The following perl+coccinelle script was used:

use strict;

my @callers;
open($fd, 'git grep -l \'S_IS[A-Z].*->d_inode\' |') ||
    die "Can't grep for S_ISDIR and co. callers";
@callers = <$fd>;
close($fd);
unless (@callers) {
    print "No matches\n";
    exit(0);
}

my @cocci = (
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISLNK(E->d_inode->i_mode)',
    '+ d_is_symlink(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISDIR(E->d_inode->i_mode)',
    '+ d_is_dir(E)',
    '',
    '@@',
    'expression E;',
    '@@',
    '',
    '- S_ISREG(E->d_inode->i_mode)',
    '+ d_is_reg(E)' );

my $coccifile = "tmp.sp.cocci";
open($fd, ">$coccifile") || die $coccifile;
print($fd "$_\n") || die $coccifile foreach (@cocci);
close($fd);

foreach my $file (@callers) {
    chomp $file;
    print "Processing ", $file, "\n";
    system("spatch", "--sp-file", $coccifile, $file, "--in-place", "--no-show-diff") == 0 ||
die "spatch failed";
}

[AV: overlayfs parts skipped]

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoSELinux: Use d_is_positive() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:33 +0000 (12:02 +0000)]
SELinux: Use d_is_positive() rather than testing dentry->d_inode

Use d_is_positive() rather than testing dentry->d_inode in SELinux to get rid
of direct references to d_inode outside of the VFS.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoSmack: Use d_is_positive() rather than testing dentry->d_inode
David Howells [Thu, 29 Jan 2015 12:02:32 +0000 (12:02 +0000)]
Smack: Use d_is_positive() rather than testing dentry->d_inode

Use d_is_positive() rather than testing dentry->d_inode in Smack to get rid of
direct references to d_inode outside of the VFS.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
9 years agoTOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()
David Howells [Thu, 29 Jan 2015 12:02:32 +0000 (12:02 +0000)]
TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR()

Use d_is_dir() rather than d_inode and S_ISDIR().  Note that this will include
fake directories such as automount triggers.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>