platform/kernel/linux-exynos.git
7 years agolocal / arm: dts: exynos4: Add sysmmu node
Hyungwon Hwang [Mon, 16 Mar 2015 06:52:18 +0000 (15:52 +0900)]
local / arm: dts: exynos4: Add sysmmu node

From the commit "iommu/exynos: Play nice in multi-platform builds"
(a7b67cd5d9afb94fdcacb71b43066b8d70d1d218). Sysmmu node become
mandatory to enable it. This patch adds the node for exynos4.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agolocal / arm: dts: exynos3250: Add sysmmu node
Hyungwon Hwang [Mon, 16 Mar 2015 06:46:50 +0000 (15:46 +0900)]
local / arm: dts: exynos3250: Add sysmmu node

From the commit "iommu/exynos: Play nice in multi-platform builds"
(a7b67cd5d9afb94fdcacb71b43066b8d70d1d218). Sysmmu node become
mandatory to enable it. This patch adds the node for exynos3250.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agoreview / arm: dts: set panel clock properly for {trats2/rinato} board
Hyungwon Hwang [Mon, 23 Feb 2015 11:59:20 +0000 (20:59 +0900)]
review / arm: dts: set panel clock properly for {trats2/rinato} board

Since commit abc0b1447d4974963548777a5ba4a4457c82c426 ("drm: Perform
basic sanity checks on probed modes"), it became mandatory to set
the pixel clock of the panel. This patch sets the pixel clock properly.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoreview / drm/panel: s6e8aa0: set refresh rate
Hyungwon Hwang [Tue, 24 Feb 2015 10:21:23 +0000 (19:21 +0900)]
review / drm/panel: s6e8aa0: set refresh rate

This patch sets refresh rate for s6e8aa0 panel.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agoreview / drm/panel: set refresh rate for s6e3ha2
Hyungwon Hwang [Tue, 24 Feb 2015 09:04:16 +0000 (18:04 +0900)]
review / drm/panel: set refresh rate for s6e3ha2

This patch sets refresh rate for s6e3ha2 panel.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agoreview / drm/panel: set refresh rate for s6e63j0x03
Hyungwon Hwang [Tue, 24 Feb 2015 05:22:43 +0000 (14:22 +0900)]
review / drm/panel: set refresh rate for s6e63j0x03

This patch sets refresh rate for s6e63j0x03 properly.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agolocal / arm: dts: exynos3250: add gpu node for rinato board
Hyungwon Hwang [Tue, 24 Feb 2015 07:57:43 +0000 (16:57 +0900)]
local / arm: dts: exynos3250: add gpu node for rinato board

This patch adds gpu node for rinato board to enable mali400.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agolocal / arm: dts: exynos4x12: Add gpu node for arm mali 400
Seung-Woo Kim [Thu, 5 Feb 2015 10:04:29 +0000 (19:04 +0900)]
local / arm: dts: exynos4x12: Add gpu node for arm mali 400

This patch adds gpu node to exynos4x12 dtsi.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agolocal / gpu: arm : add mali400 r3p2 and r4p0-rel0 drivers
Seung-Woo Kim [Thu, 5 Feb 2015 07:10:42 +0000 (16:10 +0900)]
local / gpu: arm : add mali400 r3p2 and r4p0-rel0 drivers

This patch adds mali400 r3p2 driver and r4p0-rel0 drivers with
exynos4 soc platform support.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agoreview / drm/exynos: add more condition to check iommu support
Hyungwon Hwang [Mon, 23 Feb 2015 12:01:16 +0000 (21:01 +0900)]
review / drm/exynos: add more condition to check iommu support

Mapping is not enough for checking whether iommu is supported or not.
Even though there is mapping, the kernel is going to be panicked without
setting the iommu properly. So this patch adds the additional condition
to check whether iommu is really supported or not.

[    0.960859] [drm] Initialized drm 1.1.0 20060810
[    1.016344] ------------[ cut here ]------------
[    1.016453] kernel BUG at drivers/iommu/exynos-iommu.c:481!
[    1.020877] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[    1.026693] Modules linked in:
[    1.029736] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.0.0-rc1-00089-gb7abcc2-dirty #13
[    1.037802] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[    1.043880] task: db0c0000 ti: db0a6000 task.ti: db0a6000
[    1.049268] PC is at __exynos_sysmmu_enable+0x188/0x214
[    1.054470] LR is at exynos_iommu_attach_device+0x44/0x118
[    1.059940] pc : [<c02bf0d0>]    lr : [<c02bf1a0>]    psr: 60000193
[    1.059940] sp : db0a7cd8  ip : 00000000  fp : 00000000
[    1.071394] r10: a0000113  r9 : 00000000  r8 : db355f90
[    1.076603] r7 : db25b210  r6 : db355640  r5 : 00000000  r4 : 00000000
[    1.083113] r3 : 00000000  r2 : db355640  r1 : 5b244000  r0 : db25b210
[    1.089624] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    1.097001] Control: 10c5387d  Table: 4000406a  DAC: 00000015
[    1.102729] Process swapper/0 (pid: 1, stack limit = 0xdb0a6210)
[    1.108719] Stack: (0xdb0a7cd8 to 0xdb0a8000)
[    1.113060] 7cc0:                                                       00000000 db355f80
[    1.121223] 7ce0: 00000000 db355640 db25b210 db355f90 00000000 a0000113 00000000 c02bf1a0
[    1.129383] 7d00: a0000113 c0115974 00200200 5b244000 db25b210 db25b210 da822c10 db157800
[    1.137542] 7d20: c0846540 00000000 c07ea3f4 c02bc8e8 db25b210 db278b40 da822c10 c001eb48
[    1.145701] 7d40: da822e10 db25b210 da822c10 c02ef444 da822e10 00000001 00000001 c02f0af4
[    1.153860] 7d60: da822e10 db2b0640 db2b25c0 db2b0640 00000000 c02f3850 db157800 00000000
[    1.162019] 7d80: db157800 00000000 00000000 db278900 00000000 c02eb7d8 db157800 00000000
[    1.170179] 7da0: 00000000 c08267b8 00000000 c02d4a44 c08e69f4 da822c00 db157800 c02d62c4
[    1.178337] 7dc0: 00000000 c07ea3f4 00000000 c02faf6c db2b07e0 db2b07e0 00000002 db2b0640
[    1.186497] 7de0: db2b07d0 c02f33f0 db2b0640 00000000 c0827130 c05a5230 da822c10 c02f34dc
[    1.194656] 7e00: c08268c8 da822c10 00000001 c08268c8 c0826774 c02eb97c da822c10 da8c0cd0
[    1.202815] 7e20: 00000000 c08e6ab0 da822c10 c0826774 fffffdfb c02f9acc c08e6ab0 da822c10
[    1.210974] 7e40: c08466d8 00000000 c0826774 c02f7ea4 db2b8f80 c02491a0 db2b7a80 da822c10
[    1.219134] 7e60: c0826774 da822c44 c0827458 db2b7a80 0000007d c02f81cc 00000000 c0826774
[    1.227293] 7e80: c02f8140 c02f61b0 db11205c db2b93b4 c0826774 db2b8f80 00000000 c02f7540
[    1.235452] 7ea0: c070a3ac 00000000 c08e6a84 c0826774 00000000 c08e6a84 00000000 c02f8a48
[    1.243611] 7ec0: 00000000 00000000 c08e6a84 c02eb6f0 00000000 c070a3ac ffffffff 00000000
[    1.251770] 7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 c08095a0 c08095a0
[    1.259930] 7f00: c02eb628 c0008a3c c0584ad4 c078395c 0000007d dfeff9b0 00000000 dfeff9af
[    1.268089] 7f20: 00000000 db0a7f38 dfeffb46 dfeffb37 c0584ad4 c0040f40 0000395c 00000000
[    1.276248] 7f40: c0716918 dfeffb57 00000006 00000006 c080d618 dfeff980 c07fee24 00000006
[    1.284408] 7f60: c07ea3ec c0851c80 c0851c80 0000007d c07ea3f4 c07aee28 00000006 00000006
[    1.292566] 7f80: c07ae5ac c0047e88 00001c80 c055553c 00000000 00000000 00000000 00000000
[    1.300725] 7fa0: 00000000 c0555548 00000000 c000f390 00000000 00000000 00000000 00000000
[    1.308884] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.317044] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ffffffff ffffffdf
[    1.325220] [<c02bf0d0>] (__exynos_sysmmu_enable) from [<c02bf1a0>] (exynos_iommu_attach_device+0x44/0x118)
[    1.334928] [<c02bf1a0>] (exynos_iommu_attach_device) from [<c02bc8e8>] (iommu_attach_device+0x1c/0xc8)
[    1.344305] [<c02bc8e8>] (iommu_attach_device) from [<c001eb48>] (arm_iommu_attach_device+0x18/0x50)
[    1.353420] [<c001eb48>] (arm_iommu_attach_device) from [<c02ef444>] (drm_iommu_attach_device+0x4c/0xcc)
[    1.362880] [<c02ef444>] (drm_iommu_attach_device) from [<c02f0af4>] (fimd_bind+0x124/0x198)
[    1.371298] [<c02f0af4>] (fimd_bind) from [<c02f3850>] (component_bind_all+0xc4/0x228)
[    1.379195] [<c02f3850>] (component_bind_all) from [<c02eb7d8>] (exynos_drm_load+0xa0/0x148)
[    1.387618] [<c02eb7d8>] (exynos_drm_load) from [<c02d4a44>] (drm_dev_register+0xa8/0x104)
[    1.395864] [<c02d4a44>] (drm_dev_register) from [<c02d62c4>] (drm_platform_init+0x44/0xdc)
[    1.404195] [<c02d62c4>] (drm_platform_init) from [<c02f33f0>] (try_to_bring_up_master.part.2+0xc8/0x108)
[    1.413741] [<c02f33f0>] (try_to_bring_up_master.part.2) from [<c02f34dc>] (component_master_add_with_match+0xac/0x124)
[    1.424505] [<c02f34dc>] (component_master_add_with_match) from [<c02eb97c>] (exynos_drm_platform_probe+0xfc/0x128)
[    1.434925] [<c02eb97c>] (exynos_drm_platform_probe) from [<c02f9acc>] (platform_drv_probe+0x44/0xa4)
[    1.444124] [<c02f9acc>] (platform_drv_probe) from [<c02f7ea4>] (driver_probe_device+0x13c/0x394)
[    1.452977] [<c02f7ea4>] (driver_probe_device) from [<c02f81cc>] (__driver_attach+0x8c/0x90)
[    1.461395] [<c02f81cc>] (__driver_attach) from [<c02f61b0>] (bus_for_each_dev+0x68/0x9c)
[    1.469555] [<c02f61b0>] (bus_for_each_dev) from [<c02f7540>] (bus_add_driver+0x160/0x21c)
[    1.477801] [<c02f7540>] (bus_add_driver) from [<c02f8a48>] (driver_register+0x78/0xf8)
[    1.485786] [<c02f8a48>] (driver_register) from [<c02eb6f0>] (exynos_drm_init+0xc8/0x110)
[    1.493946] [<c02eb6f0>] (exynos_drm_init) from [<c0008a3c>] (do_one_initcall+0xb8/0x1f0)
[    1.502108] [<c0008a3c>] (do_one_initcall) from [<c07aee28>] (kernel_init_freeable+0x1d4/0x278)
[    1.510787] [<c07aee28>] (kernel_init_freeable) from [<c0555548>] (kernel_init+0xc/0xe8)
[    1.518859] [<c0555548>] (kernel_init) from [<c000f390>] (ret_from_fork+0x14/0x24)
[    1.526406] Code: e3130004 1a00001e e3a06000 eaffffcf (e7f001f2)
[    1.532505] ---[ end trace 03b1b443463b1342 ]---
[    1.537077] Kernel panic - not syncing: Fatal exception

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agolocal / drm/panel : s6e3ha2: add support for brightness control
Hyungwon Hwang [Fri, 6 Feb 2015 05:58:18 +0000 (14:58 +0900)]
local / drm/panel : s6e3ha2: add support for brightness control

This patch adds support the brightness control for s6e3ha2 panel.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
7 years agolocal / drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS
Joonyoung Shim [Thu, 13 Nov 2014 08:46:36 +0000 (17:46 +0900)]
local / drm/exynos: depend on ARCH_EXYNOS for DRM_EXYNOS

Because PLAT_SAMSUNG isn't include exynos SoCs for arm64, but
ARCH_EXYNOS can do it. And it also needs to add ARCH_S3C64XX instead of
PLAT_SAMSUNG.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
7 years agolocal / arm64: fix FORCE_MAX_ZONEORDER to 14
Joonyoung Shim [Thu, 20 Nov 2014 05:52:56 +0000 (14:52 +0900)]
local / arm64: fix FORCE_MAX_ZONEORDER to 14

This patch modifies FORCE_MAX_ZONEORDER to 14. This patch might be
reverted after the problem in CMA is fixed.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
7 years agolocal / drm/exynos: add to check compatible "samsung,exynos5433"
Joonyoung Shim [Tue, 25 Nov 2014 04:02:16 +0000 (13:02 +0900)]
local / drm/exynos: add to check compatible "samsung,exynos5433"

This patch adds new machine-compatible string for exynos5433. Without
this patch, exynos5433 will be excepted out before it is probed.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
7 years agoreview / drm/panel: add s6e3ha2 AMOLED panel driver
Donghwa Lee [Fri, 28 Nov 2014 06:43:24 +0000 (15:43 +0900)]
review / drm/panel: add s6e3ha2 AMOLED panel driver

This patch adds MIPI-DSI based S6E3HA2 panel driver. This panel has
1440x2560 resolution in 5.7-inch physical panel.

Signed-off-by: Donghwa Lee <dh09.lee@samsung.com>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Sangbae Lee <sangbae90.lee@samsung.com>
7 years agomisc: tizen_global_lock: add support for 32bt compat mode from 64bit
Seung-Woo Kim [Wed, 4 Mar 2015 08:38:19 +0000 (17:38 +0900)]
misc: tizen_global_lock: add support for 32bt compat mode from 64bit

This patch adds support for 32bit compat mode, including compat_ioctl,
pointer casting and compat ioctl cmd, from 64bit system.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agomisc: add global lock driver for TIZEN
Joonyoung Shim [Tue, 29 Jan 2013 08:00:09 +0000 (17:00 +0900)]
misc: add global lock driver for TIZEN

This is the driver for tizen global lock feature for TIZEN specific and
will be removed if dma fence feature is enabled.

Change-Id: I52def5b921ea066bfaedd73a1e5f0f8959f6cb25
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
7 years agogator: Version 5.20.1
Drew Richardson [Fri, 19 Dec 2014 15:20:07 +0000 (07:20 -0800)]
gator: Version 5.20.1

Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
7 years agogator: Add config for building the module in-tree
Jon Medhurst [Thu, 10 May 2012 16:35:03 +0000 (17:35 +0100)]
gator: Add config for building the module in-tree

Signed-off-by: Jon Medhurst <tixy@linaro.org>
7 years agogator: Version 5.20
Jon Medhurst [Thu, 30 Oct 2014 16:32:27 +0000 (16:32 +0000)]
gator: Version 5.20

Signed-off-by: Jon Medhurst <tixy@linaro.org>
7 years agoLOCAL / ARM: dts: Add sound nodes for Exynos3250-based Rinato board
Inha Song [Mon, 23 Feb 2015 10:34:20 +0000 (19:34 +0900)]
LOCAL / ARM: dts: Add sound nodes for Exynos3250-based Rinato board

This patch add YMU831 audio codec and the sound machine
nodes to enable audio on exynos3250-rinato board.

Signed-off-by: Inha Song <ideal.song@samsung.com>
7 years agoARM: dts: Set the source clock for CLKOUT register as xusbxti
Inha Song [Mon, 23 Feb 2015 10:29:23 +0000 (19:29 +0900)]
ARM: dts: Set the source clock for CLKOUT register as xusbxti

This patch set the CLKOUT register source clock as xusbxti.

Signed-off-by: Inha Song <ideal.song@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoASoC: samsung: Add ASoC machine driver for Rinato board with YMU831 codec
Inha Song [Tue, 2 Sep 2014 02:11:02 +0000 (11:11 +0900)]
ASoC: samsung: Add ASoC machine driver for Rinato board with YMU831 codec

This patch add ASoC machine driver for Rinato board with YMU831 codec.

Signed-off-by: Inha Song <ideal.song@samsung.com>
7 years agoASoC: ymu831: Add Yamaha YMU831 codec support
Inha Song [Fri, 11 Jul 2014 01:08:43 +0000 (10:08 +0900)]
ASoC: ymu831: Add Yamaha YMU831 codec support

This patch add support for ymu831 codec.

Signed-off-by: Inha Song <ideal.song@samsung.com>
7 years agoLOCAL / ASoC: samsung: Add Samsung Low Power Audio Subsystem driver
Inha Song [Wed, 14 Jan 2015 02:48:48 +0000 (11:48 +0900)]
LOCAL / ASoC: samsung: Add Samsung Low Power Audio Subsystem driver

This patch adds LPASS driver. The LPASS (Low Power Audio Subsystem)
is a special subsystem that supports audio playback with low power
consumption.

Signed-off-by: Inha Song <ideal.song@samsung.com>
7 years agoLOCAL / ASoC: samsung: Add machine driver for Exynos5433-based TM2 board
Inha Song [Mon, 9 Mar 2015 04:35:32 +0000 (13:35 +0900)]
LOCAL / ASoC: samsung: Add machine driver for Exynos5433-based TM2 board

This patch add the sound machine driver for TM2 board.
The codec operate in master mode. So, Reference to the
codec master clock must be set.

This machine driver support SPK playback and Main Mic capture.

Signed-off-by: Inha Song <ideal.song@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / ASoC: max98504A: Add max98504A Speaker amplifier driver
Inha Song [Mon, 10 Nov 2014 04:40:23 +0000 (13:40 +0900)]
LOCAL / ASoC: max98504A: Add max98504A Speaker amplifier driver

This patch add MAX98504A Class D Speaker Amplifier driver.
The MAX98504A is a high efficiency mono Class D audio amplifier
that features an integrated boost converter with voltage and current
sensing ADCs for dynamic speaker management solutions.

Signed-off-by: Inha Song <ideal.song@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agophy: exynos5-usbdrd: Add to support for Exynos5433 SoC
Jaewon Kim [Mon, 12 Jan 2015 06:33:21 +0000 (15:33 +0900)]
phy: exynos5-usbdrd: Add to support for Exynos5433 SoC

This patch adds driver data to support for Exynos5433 SoC.
The Exynos5433 has one USB2.0 Host and two USB3.0 DRD(Dual Role Device).
Exynos5433 is simplar to Eyxnos7. But Eyxnos5433 has USB2.0 Host.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Support to change polling rate in runtime.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:23 +0000 (17:55 +0900)]
power: charger-manager: Support to change polling rate in runtime.

Add 'polling_ms' sysfs node to change charger-manager's monitoring rate
in runtime. It can set only bigger than 2 jiffies (for 200 HZ system it
is 10 msecs.) as it's allowed for minimum poling rate in previous.
It resets poller and re-configure polling rate based on new input if next
polling time is far enough. Otherwise, it just waits expiration of timer
and new polling rate will affects the next scheduling.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Support different polling mode for sleep state.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:22 +0000 (17:55 +0900)]
power: charger-manager: Support different polling mode for sleep state.

Add additional polling mode for sleep state to define different mode with
normal state. With this change, charger-manager can work differently in
normal state or sleep state. e.g, polling aways for normal and polling
only when charing for sleep. If there is no defined polling mode for
sleep state it just follows the normal state's.
In addition to, polling rate is still same in sleep.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Not to start charging directly in cable nofitication.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:21 +0000 (17:55 +0900)]
power: charger-manager: Not to start charging directly in cable nofitication.

This patch prevents direct charging control in cable notification.
It sets only input current limit according to cable type and yields charging
control to be done by cm_monitor() where charging management proceeds.
It may loose few ms to enable charging compared to before, even though it's
more important that charging is enabled always in safe context.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Make chraging decision focusing on battery status.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:20 +0000 (17:55 +0900)]
power: charger-manager: Make chraging decision focusing on battery status.

In cm_monitor() where charging management starts, it checks various charging
condition sequentially to decide next charging operation. However, as it
follows sequential process, cascaded IF statements, it does some duplicated
jobs which is already done in previous stage. It results delay in decision
making. And moreover, starting point of charing is spreaded all around, so
it makes maintain codes and debugging difficult.

Both of problems mentioned above becomes clean if it manages battery charging
focusing on battery status not following sequential condition checking.
Now, cm_monitor() moves battery state diagram and does optimal operation for
current state. As a result, it reduces whole monitoring time almost in half.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Get external power souce information only from EXTCON.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:19 +0000 (17:55 +0900)]
power: charger-manager: Get external power souce information only from EXTCON.

When charger-manager checks whether external power source is available,
it gets information from charger IC driver. However, it's not correct source,
charger IC doesn't have responsibilty to give cable connection status.
The charger-manager already gets cable information from EXTCON susbsystem,
so it can re-use it.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Concentrate scattered power_supply_changed() calls.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:18 +0000 (17:55 +0900)]
power: charger-manager: Concentrate scattered power_supply_changed() calls.

Current charger-manager calls power_suuply_changed() whenever charging
status is changed. This patch removes seperated power_supply_changed()
use and let it be called at end of try_charger_enable() function which
is called to set charging/discharging.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Fix to use CHARGE_NOW/FULL property correctly.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:17 +0000 (17:55 +0900)]
power: charger-manager: Fix to use CHARGE_NOW/FULL property correctly.

The POWER_SUPPLY_CHARGE_NOW/FULL property reflects battery's charges
in uAh unit, but charger-manager has been used it wrongly. This patch
makes it to use those propeties correctly and change to be optional.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Remove deprecated function, cm_notify_event().
Jonghwa Lee [Fri, 19 Dec 2014 08:55:16 +0000 (17:55 +0900)]
power: charger-manager: Remove deprecated function, cm_notify_event().

cm_notify_event() is introduced to get event associated with battery status
externally, but no one had been used. Moreover it makes charger manager
driver more complicated. This patch tries to drop the function and all data
related to simplify the driver.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Use power_supply_changed() not private uevent.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:15 +0000 (17:55 +0900)]
power: charger-manager: Use power_supply_changed() not private uevent.

Whenever battery status is changed, charger manager tries to trigger uevent
through private interface. This patch modifies it to use power_supply_changed()
since it belongs to power supply subsystem.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agopower: charger-manager: Use thermal subsystem interface only to get temperature.
Jonghwa Lee [Fri, 19 Dec 2014 08:55:14 +0000 (17:55 +0900)]
power: charger-manager: Use thermal subsystem interface only to get temperature.

It drops the way of using power_supply interface to reference battery's
temperature. Then it tries to use thermal subsystem's only. This makes driver
more simple and also can remove ifdeferies.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoDocumentation: Add device tree bindings document for max77843
Jaewon Kim [Mon, 23 Feb 2015 02:54:29 +0000 (11:54 +0900)]
Documentation: Add device tree bindings document for max77843

Add document describing device tree bindings for max77843 MFD.
Drivers: MFD core, regulator, extcon, charger and fuelgauge.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Sebastian Reichel <sre@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
7 years agopower: max77843_battery: Add Max77843 fuel gauge device driver
Beomho Seo [Mon, 23 Feb 2015 10:36:42 +0000 (19:36 +0900)]
power: max77843_battery: Add Max77843 fuel gauge device driver

This patch adds device driver of max77843 fuel gauge.
The driver support for battery fuel gauge in Maxim Max77843.
It is fuel-gauge systems for lithuum-ion batteries in handled and
portable devices.

Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
7 years agopower: max77843_charger: Add Max77843 charger device driver
Beomho Seo [Mon, 23 Feb 2015 10:35:30 +0000 (19:35 +0900)]
power: max77843_charger: Add Max77843 charger device driver

This patch adds device driver of max77843 charger. This driver provide
initialize each charging mode(e.g. fast charge, top-off mode and constant
charging mode so on.). Additionally, control charging paramters to use
i2c interface.

Cc: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
7 years agoLOCAL / input: keyboard: Add support for cypress touchkey
Beomho Seo [Fri, 9 Jan 2015 02:17:39 +0000 (11:17 +0900)]
LOCAL / input: keyboard: Add support for cypress touchkey

This patch add cypress touchkey device driver.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / input: touchscreen: Add STM FTS touchscreen
Beomho Seo [Tue, 25 Nov 2014 10:24:16 +0000 (19:24 +0900)]
LOCAL / input: touchscreen: Add STM FTS touchscreen

This patch add STMicroelectronics FTS touchscreen controller.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
7 years agoLOCAL / ARM: dts: Changes safeout regulator state for rinato
Jaewon Kim [Tue, 3 Feb 2015 06:24:24 +0000 (15:24 +0900)]
LOCAL / ARM: dts: Changes safeout regulator state for rinato

This patch changes safeout regualtor state to always on to use USB device

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
7 years agoLOCAL / usb: gadget: Add slp composite gadget
Jaewon Kim [Tue, 2 Dec 2014 12:34:54 +0000 (21:34 +0900)]
LOCAL / usb: gadget: Add slp composite gadget

This patch adds slp composite gadget for tizen platform.
slp composite gadget code comes from android.c

Verified Gadget List
 - SDB
 - RNDIS

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
7 years agoLOCAL / extcon: max14577: Change default h/w path from SW_OPEN to SW_UART
Chanwoo Choi [Fri, 20 Jun 2014 04:40:33 +0000 (13:40 +0900)]
LOCAL / extcon: max14577: Change default h/w path from SW_OPEN to SW_UART

This patch changes default h/w patch from SW_OPEN to SW_UART without connected
cables.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / arm: configs: Add tm2/rinato/trats2/odroidu3 defconfig
Chanwoo Choi [Mon, 23 Feb 2015 04:25:27 +0000 (13:25 +0900)]
LOCAL / arm: configs: Add tm2/rinato/trats2/odroidu3 defconfig

- arch/arm64/configs/defconfig : Exynos5433-based TM2 board

- arch/arm/configs/tizen_odroidu3_defconfig : Exynos4412-based Odroid-U3 board
- arch/arm/configs/tizen_trats2_defconfig   : Exynos4412-based TRATS2 board
- arch/arm/configs/tizen_rinato_defconfig   : Exynos3250-based Rinato board

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[k.kozlowski: rebased on 4.1]
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
7 years agoLOCAL / arm64: dts: Add Exynos5433-based TM2 board
Chanwoo Choi [Fri, 31 Oct 2014 08:25:46 +0000 (17:25 +0900)]
LOCAL / arm64: dts: Add Exynos5433-based TM2 board

This patch adds Exynos5433-based TM2 board which is third tizen reference
board for mobile profile.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
7 years agoLOCAL / cpufreq: Add the dt support for arm_big_little driver
Chanwoo Choi [Mon, 29 Dec 2014 09:52:38 +0000 (18:52 +0900)]
LOCAL / cpufreq: Add the dt support for arm_big_little driver

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / cpufreq: Enable big.LITTLE cpufreq driver on arm64
Mark Brown [Mon, 8 Dec 2014 07:59:46 +0000 (16:59 +0900)]
LOCAL / cpufreq: Enable big.LITTLE cpufreq driver on arm64

There are arm64 big.LITTLE systems so enable the big.LITTLE cpufreq driver.
While IKS is not available for these systems the driver is still useful
since it manages clusters with shared frequencies which is the common case
for these systems.

Long term combining the cpufreq-cpu0 and big.LITTLE drivers may be a
more sensible option but that is substantially more complex especially
in the case of IKS.

Signed-off-by: Mark Brown <broonie@kernel.org>
[cw00.choi: Fix the dependency on big.LITTLE configuration]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / arm64: Add big.LITTLE switcher stub
Mark Brown [Fri, 9 May 2014 16:40:30 +0000 (17:40 +0100)]
LOCAL / arm64: Add big.LITTLE switcher stub

The big.LITTLE cpufreq driver is useful on arm64 big.LITTLE systems even
without IKS support since it implements support for clusters with shared
clocks (a common big.LITTLE configuration). In order to allow it to be
built provide the non-IKS stubs for arm64, enabling cpufreq with all the
cores available.

It may make sense to make an asm-generic version of these stubs instead but
given that there's only likely to be these two architectures using the code
and asm-generic stubs also need per architecture updates it's probably more
trouble than it's worth.

Signed-off-by: Mark Brown <broonie@linaro.org>
7 years agoLOCAL / arm64: Enable OPP
Mark Brown [Mon, 29 Dec 2014 09:49:01 +0000 (18:49 +0900)]
LOCAL / arm64: Enable OPP

Some of the generic drivers used on ARM class systems use OPP so allow it
to be selected in Kconfig. No code is required for this, it is not clear
to me why there is config for this option.

Signed-off-by: Mark Brown <broonie@linaro.org>
7 years agoLOCAL / arm64: Add CONFIG_BIG_LITTLE dummy configuration
Chanwoo Choi [Mon, 8 Dec 2014 08:24:14 +0000 (17:24 +0900)]
LOCAL / arm64: Add CONFIG_BIG_LITTLE dummy configuration

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / arm64: dts: exynos5433: Add OPP entries for CPUFREQ of Exynos5433
Chanwoo Choi [Mon, 8 Dec 2014 07:33:10 +0000 (16:33 +0900)]
LOCAL / arm64: dts: exynos5433: Add OPP entries for CPUFREQ of Exynos5433

This patch adds the OPP entries for CPUFREQ of Exynos5433 SoC. Exynos5433 is
big.LITTLE architecture so each core has different OPP entries (CPU frequency
and voltage).

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoLOCAL / tools: Add build script for Exynos5433 SoC
Chanwoo Choi [Fri, 31 Oct 2014 11:33:26 +0000 (20:33 +0900)]
LOCAL / tools: Add build script for Exynos5433 SoC

This patch adds build script to build the kernel for Exynos5433-based board.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / ARM: dts: Modify hw revision to jump kernel image from bootloader
Chanwoo Choi [Mon, 22 Dec 2014 03:16:50 +0000 (12:16 +0900)]
LOCAL / ARM: dts: Modify hw revision to jump kernel image from bootloader

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / arm64: dts: exynos: Fix ARCH timer boot error for Exynos5433
Chanwoo Choi [Fri, 16 Jan 2015 11:21:43 +0000 (20:21 +0900)]
LOCAL / arm64: dts: exynos: Fix ARCH timer boot error for Exynos5433

This patch fix ARCH timer boot error for Exynos5433 as following:

[    0.000010] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
[    0.008436] Architected timer frequency not available
[    0.013416] ------------[ cut here ]------------
[    0.018016] WARNING: CPU: 0 PID: 0 at kernel/time/clockevents.c:44 cev_delta2ns.isra.1+0xc4/0xd4()
[    0.026943] Modules linked in:
[    0.029986] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.19.0-rc4-00072-g65baa5f #3
[    0.037531] Hardware name: Samsung TM2 board (DT)
[    0.042393] Call trace:
[    0.044830] [<ffffffc0000891c8>] dump_backtrace+0x0/0x124
[    0.050208] [<ffffffc0000892fc>] show_stack+0x10/0x1c
[    0.055246] [<ffffffc00072ef28>] dump_stack+0x74/0xb8
[    0.060278] [<ffffffc000097520>] warn_slowpath_common+0x98/0xd0
[    0.066178] [<ffffffc000097618>] warn_slowpath_null+0x14/0x20
[    0.071909] [<ffffffc0000f1d8c>] cev_delta2ns.isra.1+0xc0/0xd4
[    0.077722] [<ffffffc0000f1e30>] clockevents_config.part.3+0x70/0xa8
[    0.084059] [<ffffffc0000f1e88>] clockevents_config_and_register+0x20/0x38
[    0.090918] [<ffffffc00049843c>] arch_timer_setup+0xc4/0x1f0
[    0.096561] [<ffffffc0009fdc4c>] arch_timer_init+0x1fc/0x274
[    0.102199] [<ffffffc0009fd490>] clocksource_of_init+0x54/0x98
[    0.108018] [<ffffffc0009e07fc>] time_init+0x10/0x44
[    0.112963] [<ffffffc0009dd838>] start_kernel+0x260/0x394
[    0.118358] ---[ end trace cb88537fdc8fa200 ]---
[    0.123495] Architected cp15 timer(s) running at 0.00MHz (virt).
[    0.129439] Kernel panic - not syncing: Unable to initialise architected timer.
[    0.129439]
[    0.138182] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W 3.19.0-rc4-00072-g65baa5f #3
[    0.146855] Hardware name: Samsung TM2 board (DT)
[    0.151717] Call trace:
[    0.154156] [<ffffffc0000891c8>] dump_backtrace+0x0/0x124
[    0.159532] [<ffffffc0000892fc>] show_stack+0x10/0x1c
[    0.164569] [<ffffffc00072ef28>] dump_stack+0x74/0xb8
[    0.169600] [<ffffffc00072e224>] panic+0xec/0x228
[    0.174290] [<ffffffc0009e0814>] time_init+0x28/0x44
[    0.179237] [<ffffffc0009dd838>] start_kernel+0x260/0x394
[    0.184620] ---[ end Kernel panic - not syncing: Unable to initialise architected timer.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / pinctrl: samsung: Add GPFx support of Exynos5433
Joonyoung Shim [Fri, 16 Jan 2015 09:59:22 +0000 (18:59 +0900)]
LOCAL / pinctrl: samsung: Add GPFx support of Exynos5433

This patch add the support of GPFx pin of Exynos5433 SoC. Exynos5433 has
different memory map of GPFx from previous Exynos SoC. Exynos GPIO has
following register to control gpio funciton. Usually, all registers of GPIO
are included in same domain.
- CON / DAT / PUD / DRV / CONPDN / PUDPDN
- EINT_CON/ EINT_FLTCON0, EINT_FLTCON1 / EINT_MASK / EINT_PEND

But, GPFx are included in two domain as following. So, this patch add
workaround patch to support GPFx.
- ALIVE domain : CON / DAT / PUD / DRV / CONPDN / PUDPDN
- IMEM domain : EINT_CON/ EINT_FLTCON0, EINT_FLTCON1 / EINT_MASK / EINT_PEND

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Add patch description and fix merge conflict]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLOCAL / arm64: dts: exynos5433: Add LPASS dt node for Exynos5433 SoC
Inha Song [Tue, 17 Feb 2015 00:13:54 +0000 (09:13 +0900)]
LOCAL / arm64: dts: exynos5433: Add LPASS dt node for Exynos5433 SoC

This patch adds LPASS dt node for Exynos5433 SoC. The LPASS
(Low Power Audio Subsystem) is a special subsystem that
supports audio playback with low power consumption.

Signed-off-by: Inha Song <ideal.song@samsung.com>
7 years agoLOCAL / mmc: dw_mmc: exynos: enable mmc-erase capability
Jaehoon Chung [Thu, 26 Feb 2015 07:20:46 +0000 (16:20 +0900)]
LOCAL / mmc: dw_mmc: exynos: enable mmc-erase capability

To use erase feature(DISCARD or SANITIZE or ERASE, etc..), set MMC_CAP_ERASE.
(In future, this feature should be enabled by default. But before enable
 by default, it needs to fix the some erase issue - discussing at
 Mailing-list.)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agoLOCAL / clocksource: exynos_mct: Add the support for Exynos 64bit SoC
Chanwoo Choi [Fri, 31 Oct 2014 09:16:15 +0000 (18:16 +0900)]
LOCAL / clocksource: exynos_mct: Add the support for Exynos 64bit SoC

This patch adds the support for Exynos 64bit SoC. The delay_timer is only used
for Exynos 32bit SoC.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agomfd: sec-core: Modify RTC compatible name of S2MPS13
Chanwoo Choi [Fri, 6 Mar 2015 11:42:17 +0000 (20:42 +0900)]
mfd: sec-core: Modify RTC compatible name of S2MPS13

This patch modify the RTC compatible name of S2MPS13 because S2MPS13's RTC is
equal to S2MPS14's RTC.

Cc: Lee Jones <lee.jones@linaro.org>
Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoREVIEW / drm/panel: add s6e63j0x03 LCD panel driver
Inki Dae [Tue, 9 Dec 2014 09:29:05 +0000 (18:29 +0900)]
REVIEW / drm/panel: add s6e63j0x03 LCD panel driver

This patch adds MIPI-DSI based S6E63J0X03 AMOLED LCD panel driver
which uses mipi_dsi bus to communicate with panel. The panel has
320×320 resolution in 1.63-inch physical panel. This panel is used in
Samsung Galaxy Gear 2.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
7 years agoARM: dts: Add CPU OPP and regulator supply property for Exynos3250
Chanwoo Choi [Mon, 20 Oct 2014 12:08:42 +0000 (21:08 +0900)]
ARM: dts: Add CPU OPP and regulator supply property for Exynos3250

This patch add CPU operating points which include CPU frequency and regulator
voltage to use generic cpufreq-dt drivers.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
7 years agoARM: dts: Add CPU OPP and regulator supply property for Exynos4415
Chanwoo Choi [Fri, 16 Jan 2015 06:23:06 +0000 (15:23 +0900)]
ARM: dts: Add CPU OPP and regulator supply property for Exynos4415

This patch add CPU operating points which include CPU frequency and regulator
voltage to use generic cpufreq-dt driver.

Cc: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoLOCAL / arm64: dts: exynos: Add mali node for Exynos5433 SoC
Joonyoung Shim [Tue, 31 Mar 2015 01:09:41 +0000 (10:09 +0900)]
LOCAL / arm64: dts: exynos: Add mali node for Exynos5433 SoC

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoarm64: dts: exynos: Add mic node for Exynos5433 Soc
Hyungwon Hwang [Tue, 17 Feb 2015 04:21:59 +0000 (13:21 +0900)]
arm64: dts: exynos: Add mic node for Exynos5433 Soc

This patch adds mic device tree node for Exynos5433. After syscon is
implemented the register information about it must be removed.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoarm64: dts: exynos: Add dsi node for Exynos5433 SoC
Hyungwon Hwang [Tue, 17 Feb 2015 04:21:27 +0000 (13:21 +0900)]
arm64: dts: exynos: Add dsi node for Exynos5433 SoC

This patch adds MIPI dsi device tree node for Exynos5433. The endpoint
node represent the connection between dsi and mic, and is used
practically in the MIC driver.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoarm64: dts: exynos: Add mic node for Exynos5433 SoC
Hyungwon Hwang [Tue, 17 Feb 2015 04:20:22 +0000 (13:20 +0900)]
arm64: dts: exynos: Add mic node for Exynos5433 SoC

This patch adds mic device tree node for Exynos5433. After syscon is
implemented the register information about it must be removed.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com
7 years agoarm64: dts: exynos: Add UART3 dt node for Exynos5433 SoC
Beomho Seo [Tue, 17 Feb 2015 02:41:35 +0000 (11:41 +0900)]
arm64: dts: exynos: Add UART3 dt node for Exynos5433 SoC

This patch adds the UART3 devicetree node for Exynos5433 SoC. The UART3 device
is included in AUD_DOMAIN.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoarm64: dts: exynos: Add PWM dt node and pinctrl for Exynos5433 SoC
Jaewon Kim [Wed, 4 Feb 2015 11:51:38 +0000 (20:51 +0900)]
arm64: dts: exynos: Add PWM dt node and pinctrl for Exynos5433 SoC

This patch adds PWM(Pulsle Width Modulation) device tree node
to support for PWM Timer on Exynos5433 SoC.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoarm64: dts: exynos: Add USB3.0 Host dt node for Exynos5433
Jaewon Kim [Thu, 15 Jan 2015 05:22:17 +0000 (14:22 +0900)]
arm64: dts: exynos: Add USB3.0 Host dt node for Exynos5433

This patch adds PHY and USB3.0 Host device tree node
using DWC3 chip and set USB3.0 Host related clock parent
for Exynos5433.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoarm64: dts: exynos: Add USB Device dt node for Exynos5433
Jaewon Kim [Wed, 7 Jan 2015 11:41:19 +0000 (20:41 +0900)]
arm64: dts: exynos: Add USB Device dt node for Exynos5433

This patch adds USB DRD(Dual Role Device) and PHY
device tree node to use USB Device.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoarm64: dts: exynos: Add EHCI and OHCI dt node for Exynos5433
Jaewon Kim [Thu, 15 Jan 2015 05:16:38 +0000 (14:16 +0900)]
arm64: dts: exynos: Add EHCI and OHCI dt node for Exynos5433

This patch adds EHCI and OHCI device tree node
to usb USB2.0 Host and HSCI(High Speed Inter-Chip) function.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoLOCAL / clk: samsung: exynos5433: enable ignore unused flag
Beomho Seo [Tue, 24 Feb 2015 11:20:28 +0000 (20:20 +0900)]
LOCAL / clk: samsung: exynos5433: enable ignore unused flag

This patch enable ignore unused flags for properly working of aud uart.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
7 years agoclk: samsung: exynos5433: add CLK_IGNORE_UNUSED for g3d clock
Joonyoung Shim [Thu, 5 Mar 2015 07:14:04 +0000 (16:14 +0900)]
clk: samsung: exynos5433: add CLK_IGNORE_UNUSED for g3d clock

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLINUX-SAMSUNG / thermal: exynos: Add the support for Exynos5433 TMU
Chanwoo Choi [Thu, 12 Feb 2015 06:05:44 +0000 (15:05 +0900)]
LINUX-SAMSUNG / thermal: exynos: Add the support for Exynos5433 TMU

This patch adds the support for Exynos5433's TMU (Thermal Management Unit).
Exynos5433 has a little different register bit fields as following description:
- Support the eight trip points for rising/falling interrupt by using two registers
- Read the calibration type (1-point or 2-point) and sensor id from TRIMINFO register
- Use a little different register address

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add thermal-zones dt node for Exynos5433 SoC
Chanwoo Choi [Thu, 26 Feb 2015 05:15:14 +0000 (14:15 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: Add thermal-zones dt node for Exynos5433 SoC

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.

Cc: Kukjin Kim <kgene@kernel.org>
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>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add TMU sensor dt node for Exynos5433 SoC
Chanwoo Choi [Mon, 16 Feb 2015 09:42:39 +0000 (18:42 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: Add TMU sensor dt node for Exynos5433 SoC

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

Cc: Kukjin Kim <kgene@kernel.org>
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>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add I2S dt node for Exynos5433 SoC
Inha Song [Fri, 16 Jan 2015 07:30:22 +0000 (16:30 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: Add I2S dt node for Exynos5433 SoC

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>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add ADMA dt node for Exynos5433 SoC
Inha Song [Mon, 15 Dec 2014 05:31:00 +0000 (14:31 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: Add ADMA dt node for Exynos5433 SoC

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

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Inha Song <ideal.song@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add RTC and ADC dt node for Exynos5433 SoC
Chanwoo Choi [Mon, 1 Dec 2014 05:14:31 +0000 (14:14 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: Add RTC and ADC dt node for Exynos5433 SoC

This patch adds RTC (Real Time Clock) dt node for Exynos5433 SoC and adds
ADC dt node for Exynos5433 SoC. The c1b501564c98a94b4(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 don't contain OSEL/ESEL /HIGHF of ADC_CON2.

Cc: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add PMU dt node for Exynos5433
Chanwoo Choi [Mon, 1 Dec 2014 05:02:03 +0000 (14:02 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: 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 .

Cc: Kukjin Kim <kgene@kernel.org>
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>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add SPI/PDMA dt node for Exynos5433
Chanwoo Choi [Thu, 27 Nov 2014 06:13:33 +0000 (15:13 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: 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: Kukjin Kim <kgene@kernel.org>
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>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add MSHC dt node for Exynos5433
Jaehoon Chung [Thu, 27 Nov 2014 06:06:21 +0000 (15:06 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: 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: Kukjin Kim <kgene@kernel.org>
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>
7 years agoLINUX-SAMSUNG / arm64: dts: exynos: Add dts files for 64-bit Exynos5433 SoC
Chanwoo Choi [Fri, 24 Oct 2014 06:04:43 +0000 (15:04 +0900)]
LINUX-SAMSUNG / arm64: dts: exynos: 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: Kukjin Kim <kgene@kernel.org>
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>
7 years agoclocksource: exynos_mct: clear irq at stop local mct to fix suspend
Joonyoung Shim [Thu, 1 Dec 2016 05:49:10 +0000 (14:49 +0900)]
clocksource: exynos_mct: clear irq at stop local mct to fix suspend

This patch adds clear interrupt to exynos4_mct_tick_stop(). Without
clearing, after turning on non boot cpu at wakeup from suspend to
ram, not cleared tick interrupt occurs and it causes following null
deference for MCT_INT_SPI type mct.

   Unable to handle kernel NULL pointer dereference at virtual address 00000108
   pgd = ffffffc001309000
   [00000108] *pgd=00000000c402d003, *pud=00000000c402d003, *pmd=00000000c402e003, *pte=0060000011001707
   Internal error: Oops: 96000005 [#1] PREEMPT SMP
   Modules linked in:
   CPU: 1 PID: 12 Comm: ksoftirqd/1 Not tainted 4.1.35-01409-gf0c4b20 #16
   Hardware name: Samsung TM2 board (DT)
   Task: ffffffc0a41dcec0 ti: ffffffc0a4204000 task.ti: ffffffc0a4204000
   PC is at tick_periodic+0x38/0xc4
   LR is at tick_periodic+0x28/0xc4
   pc : [<ffffffc000108234>] lr : [<ffffffc000108224>] pstate: 800000c5
   sp : ffffffc0a4207b60
   x29: ffffffc0a4207b60 x28: ffffffc000eab000
   x27: ffffffc000eab000 x26: ffffffc001249f10
   x25: ffffffc0a4005a00 x24: ffffffc00124a000
   x23: ffffffc00124a000 x22: 0000000000000001
   x21: 0000000000000000 x20: ffffffc0bf5c64c0
   x19: 0000010a2ad67b00 x18: 0000000000000000
   x17: 0000000000000000 x16: 0000000000000000
   x15: 0000000000000000 x14: 0ffffffffffffffe
   x13: 0000000000000020 x12: 0000000000000001
   x11: 7f7f7f7f7f7f7f7f x10: fefefeff534f484f
   x9 : ffffffc0a4207cc0 x8 : ffffffc0a41dd430
   x7 : 0000000000000008 x6 : ffffff8000048440
   x5 : 0000000000005dc0 x4 : 0000000000000100
   x3 : ffffffc0a4204000 x2 : ffffffc0a4207b20
   x1 : 00000000be51f000 x0 : 0000000000000000

   Process ksoftirqd/1 (pid: 12, stack limit = 0xffffffc0a4204020)
   Stack: (0xffffffc0a4207b60 to 0xffffffc0a4208000)
   7b60: a4207b80 ffffffc0 001084ac ffffffc0 2ad67b00 0000010a bf5c64c0 ffffffc0
   7b80: a4207bb0 ffffffc0 0073d084 ffffffc0 bf5c64c0 ffffffc0 00000003 00000000
   7ba0: 00000000 00000000 00000000 00000000 a4207bd0 ffffffc0 000e9fe0 ffffffc0
   7bc0: a40ddc00 ffffffc0 000d49e8 ffffffc0 a4207c40 ffffffc0 000ea254 ffffffc0
   7be0: a4005a00 ffffffc0 a4005a98 ffffffc0 01120460 ffffffc0 00ea7008 ffffffc0
   7c00: 00f52630 ffffffc0 00f72648 ffffffc0 00000100 00000000 010ba000 ffffffc0
   7c20: 010a1000 ffffffc0 00ea7008 ffffffc0 00eabdc0 ffffffc0 00eabda8 ffffffc0
   7c40: a4207c80 ffffffc0 000ecf90 ffffffc0 a4005a00 ffffffc0 a4005a98 ffffffc0
   7c60: 01120460 ffffffc0 00ea7008 ffffffc0 a4207c80 ffffffc0 a40ddc00 ffffffc0
   7c80: a4207cb0 ffffffc0 000ec92c ffffffc0 00000003 00000000 0127a6a0 ffffffc0
   7ca0: 010da348 ffffffc0 010a1a98 ffffffc0 a4207ce0 ffffffc0 0009fa90 ffffffc0
   7cc0: 010da390 ffffffc0 010da398 ffffffc0 00000000 00000000 0009fa58 ffffffc0
   7ce0: a4207d20 ffffffc0 0009edfc ffffffc0 00000006 00000000 00000007 00000000
   7d00: 0124a300 ffffffc0 010ba130 ffffffc0 00000006 00000000 00000040 00000000
   7d20: a4207da0 ffffffc0 0009f10c ffffffc0 a4204000 ffffffc0 a4119d00 ffffffc0
   7d40: 00000001 00000000 010d1ce0 ffffffc0 00000001 00000000 00000002 00000000
   7d60: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7d80: 0001495e 00000001 00ea75a8 ffffffc0 04208040 0000000a 010a1b38 ffffffc0
   7da0: a4207db0 ffffffc0 000bb520 ffffffc0 a4207e00 ffffffc0 000b7d34 ffffffc0
   7dc0: a4119d40 ffffffc0 01257658 ffffffc0 00ea7010 ffffffc0 a4119d00 ffffffc0
   7de0: 000bb304 ffffffc0 00000000 00000000 00000000 00000000 a4119d00 ffffffc0
   7e00: 00000000 00000000 00085d80 ffffffc0 000b7c58 ffffffc0 a4119d40 ffffffc0
   7e20: 00000000 00000000 00000000 00000000 00000000 00000000 00a810b4 ffffffc0
   7e40: a4207e50 ffffffc0 00000001 00000000 00000001 ffffffc0 a4119d00 ffffffc0
   7e60: 00000000 ffffffc0 01f501f5 dead4ead ffffffff 00000000 ffffffff ffffffff
   7e80: a4207e80 ffffffc0 a4207e80 ffffffc0 00000000 00000000 00000000 dead4ead
   7ea0: ffffffff ffffffc0 ffffffff ffffffff a4207eb0 ffffffc0 a4207eb0 ffffffc0
   7ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7fa0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
   7fc0: 00000000 00000000 00000005 00000000 00000000 00000000 00000000 00000000
   7fe0: 00000000 00000000 00000000 00000000 ffffffff ffffffff ffffffff ffffffff

   Call trace:
   [<ffffffc000108234>] tick_periodic+0x38/0xc4
   [<ffffffc0001084ac>] tick_handle_periodic+0x24/0x78
   [<ffffffc00073d084>] exynos4_mct_tick_isr+0x54/0x64
   [<ffffffc0000e9fe0>] handle_irq_event_percpu+0x6c/0x294
   [<ffffffc0000ea254>] handle_irq_event+0x4c/0x78
   [<ffffffc0000ecf90>] handle_fasteoi_irq+0xe4/0x1a4
   [<ffffffc0000ec92c>] resend_irqs+0x54/0x8c
   [<ffffffc00009fa90>] tasklet_action+0xa4/0x170
   [<ffffffc00009edfc>] __do_softirq+0xcc/0x3a8
   [<ffffffc00009f10c>] run_ksoftirqd+0x34/0x48
   [<ffffffc0000bb520>] smpboot_thread_fn+0x21c/0x2b4
   [<ffffffc0000b7d34>] kthread+0xdc/0xf0
   Code: b0007ce0 d538d081 913c6000 f8606820 (f9408400)
   ---[ end trace 7232a23031ea6a74 ]---

Change-Id: I20b7d867d9894df1c81a30e91bca0233cf3b173e
Fixes: 56a94f13919c ("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier")
Cc: stable@vger.kernel.org #v4.2+ #v4.1.4+ #3.18.18+ #v3.16.18+ #v3.12.46+
Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[Adjust commit-msg]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
7 years agoLinux 4.1.36 v4.1.36
Sasha Levin [Tue, 29 Nov 2016 16:34:50 +0000 (11:34 -0500)]
Linux 4.1.36

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agokbuild: add -fno-PIE
Sebastian Andrzej Siewior [Fri, 4 Nov 2016 18:39:38 +0000 (19:39 +0100)]
kbuild: add -fno-PIE

[ Upstream commit 8ae94224c9d72fc4d9aaac93b2d7833cf46d7141 ]

Debian started to build the gcc with -fPIE by default so the kernel
build ends before it starts properly with:
|kernel/bounds.c:1:0: error: code model kernel does not support PIC mode

Also add to KBUILD_AFLAGS due to:

|gcc -Wp,-MD,arch/x86/entry/vdso/vdso32/.note.o.d … -mfentry -DCC_USING_FENTRY … vdso/vdso32/note.S
|arch/x86/entry/vdso/vdso32/note.S:1:0: sorry, unimplemented: -mfentry isn’t supported for 32-bit in combination with -fpic

Tagging it stable so it is possible to compile recent stable kernels as
well.

Cc: stable@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Michal Marek <mmarek@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agofirewire: net: fix fragmented datagram_size off-by-one
Stefan Richter [Sun, 30 Oct 2016 16:32:01 +0000 (17:32 +0100)]
firewire: net: fix fragmented datagram_size off-by-one

[ Upstream commit e9300a4b7bbae83af1f7703938c94cf6dc6d308f ]

RFC 2734 defines the datagram_size field in fragment encapsulation
headers thus:

    datagram_size:  The encoded size of the entire IP datagram.  The
    value of datagram_size [...] SHALL be one less than the value of
    Total Length in the datagram's IP header (see STD 5, RFC 791).

Accordingly, the eth1394 driver of Linux 2.6.36 and older set and got
this field with a -/+1 offset:

    ether1394_tx() /* transmit */
        ether1394_encapsulate_prep()
            hdr->ff.dg_size = dg_size - 1;

    ether1394_data_handler() /* receive */
        if (hdr->common.lf == ETH1394_HDR_LF_FF)
            dg_size = hdr->ff.dg_size + 1;
        else
            dg_size = hdr->sf.dg_size + 1;

Likewise, I observe OS X 10.4 and Windows XP Pro SP3 to transmit 1500
byte sized datagrams in fragments with datagram_size=1499 if link
fragmentation is required.

Only firewire-net sets and gets datagram_size without this offset.  The
result is lacking interoperability of firewire-net with OS X, Windows
XP, and presumably Linux' eth1394.  (I did not test with the latter.)
For example, FTP data transfers to a Linux firewire-net box with max_rec
smaller than the 1500 bytes MTU
  - from OS X fail entirely,
  - from Win XP start out with a bunch of fragmented datagrams which
    time out, then continue with unfragmented datagrams because Win XP
    temporarily reduces the MTU to 576 bytes.

So let's fix firewire-net's datagram_size accessors.

Note that firewire-net thereby loses interoperability with unpatched
firewire-net, but only if link fragmentation is employed.  (This happens
with large broadcast datagrams, and with large datagrams on several
FireWire CardBus cards with smaller max_rec than equivalent PCI cards,
and it can be worked around by setting a small enough MTU.)

Cc: stable@vger.kernel.org
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agofirewire: net: guard against rx buffer overflows
Stefan Richter [Sat, 29 Oct 2016 19:28:18 +0000 (21:28 +0200)]
firewire: net: guard against rx buffer overflows

[ Upstream commit 667121ace9dbafb368618dbabcf07901c962ddac ]

The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams.  A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.

So, drop any packets carrying a fragment with offset + length larger
than datagram_size.

In addition, ensure that
  - GASP header, unfragmented encapsulation header, or fragment
    encapsulation header actually exists before we access it,
  - the encapsulated datagram or fragment is of nonzero size.

Reported-by: Eyal Itkin <eyal.itkin@gmail.com>
Reviewed-by: Eyal Itkin <eyal.itkin@gmail.com>
Fixes: CVE 2016-8633
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agoparisc: Ensure consistent state when switching to kernel stack at syscall entry
John David Anglin [Sat, 29 Oct 2016 03:00:34 +0000 (23:00 -0400)]
parisc: Ensure consistent state when switching to kernel stack at syscall entry

[ Upstream commit 6ed518328d0189e0fdf1bb7c73290d546143ea66 ]

We have one critical section in the syscall entry path in which we switch from
the userspace stack to kernel stack. In the event of an external interrupt, the
interrupt code distinguishes between those two states by analyzing the value of
sr7. If sr7 is zero, it uses the kernel stack. Therefore it's important, that
the value of sr7 is in sync with the currently enabled stack.

This patch now disables interrupts while executing the critical section.  This
prevents the interrupt handler to possibly see an inconsistent state which in
the worst case can lead to crashes.

Interestingly, in the syscall exit path interrupts were already disabled in the
critical section which switches back to the userspace stack.

Cc: <stable@vger.kernel.org>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agoovl: fsync after copy-up
Miklos Szeredi [Mon, 31 Oct 2016 13:42:14 +0000 (14:42 +0100)]
ovl: fsync after copy-up

[ Upstream commit 641089c1549d8d3df0b047b5de7e9a111362cdce ]

Make sure the copied up file hits the disk before renaming to the final
destination.  If this is not done then the copy-up may corrupt the data in
the file in case of a crash.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agovirtio: console: Unlock vqs while freeing buffers
Matt Redfearn [Tue, 11 Oct 2016 11:05:15 +0000 (12:05 +0100)]
virtio: console: Unlock vqs while freeing buffers

[ Upstream commit 34563769e438d2881f62cf4d9badc4e589ac0ec0 ]

Commit c6017e793b93 ("virtio: console: add locks around buffer removal
in port unplug path") added locking around the freeing of buffers in the
vq. However, when free_buf() is called with can_sleep = true and rproc
is enabled, it calls dma_free_coherent() directly, requiring interrupts
to be enabled. Currently a WARNING is triggered due to the spin locking
around free_buf, with a call stack like this:

WARNING: CPU: 3 PID: 121 at ./include/linux/dma-mapping.h:433
free_buf+0x1a8/0x288
Call Trace:
[<8040c538>] show_stack+0x74/0xc0
[<80757240>] dump_stack+0xd0/0x110
[<80430d98>] __warn+0xfc/0x130
[<80430ee0>] warn_slowpath_null+0x2c/0x3c
[<807e7c6c>] free_buf+0x1a8/0x288
[<807ea590>] remove_port_data+0x50/0xac
[<807ea6a0>] unplug_port+0xb4/0x1bc
[<807ea858>] virtcons_remove+0xb0/0xfc
[<807b6734>] virtio_dev_remove+0x58/0xc0
[<807f918c>] __device_release_driver+0xac/0x134
[<807f924c>] device_release_driver+0x38/0x50
[<807f7edc>] bus_remove_device+0xfc/0x130
[<807f4b74>] device_del+0x17c/0x21c
[<807f4c38>] device_unregister+0x24/0x38
[<807b6b50>] unregister_virtio_device+0x28/0x44

Fix this by restructuring the loops to allow the locks to only be taken
where it is necessary to protect the vqs, and release it while the
buffer is being freed.

Fixes: c6017e793b93 ("virtio: console: add locks around buffer removal in port unplug path")
Cc: stable@vger.kernel.org
Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agomd: be careful not lot leak internal curr_resync value into metadata. -- (all)
NeilBrown [Fri, 28 Oct 2016 04:59:41 +0000 (15:59 +1100)]
md: be careful not lot leak internal curr_resync value into metadata. -- (all)

[ Upstream commit 1217e1d1999ed6c9c1e1b1acae0a74ab70464ae2 ]

mddev->curr_resync usually records where the current resync is up to,
but during the starting phase it has some "magic" values.

 1 - means that the array is trying to start a resync, but has yielded
     to another array which shares physical devices, and also needs to
     start a resync
 2 - means the array is trying to start resync, but has found another
     array which shares physical devices and has already started resync.

 3 - means that resync has commensed, but it is possible that nothing
     has actually been resynced yet.

It is important that this value not be visible to user-space and
particularly that it doesn't get written to the metadata, as the
resync or recovery checkpoint.  In part, this is because it may be
slightly higher than the correct value, though this is very rare.
In part, because it is not a multiple of 4K, and some devices only
support 4K aligned accesses.

There are two places where this value is propagates into either
->curr_resync_completed or ->recovery_cp or ->recovery_offset.
These currently avoid the propagation of values 1 and 3, but will
allow 3 to leak through.

Change them to only propagate the value if it is > 3.

As this can cause an array to fail, the patch is suitable for -stable.

Cc: stable@vger.kernel.org (v3.7+)
Reported-by: Viswesh <viswesh.vichu@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agomd: sync sync_completed has correct value as recovery finishes.
NeilBrown [Fri, 24 Jul 2015 03:27:08 +0000 (13:27 +1000)]
md: sync sync_completed has correct value as recovery finishes.

[ Upstream commit 5ed1df2eacc0ba92c8c7e2499c97594b5ef928a8 ]

There can be a small window between the moment that recovery
actually writes the last block and the time when various sysfs
and /proc/mdstat attributes report that it has finished.
During this time, 'sync_completed' can have the wrong value.
This can confuse monitoring software.

So:
 - don't set curr_resync_completed beyond the end of the devices,
 - set it correctly when resync/recovery has completed.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agoscsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware
Ching Huang [Wed, 19 Oct 2016 09:50:26 +0000 (17:50 +0800)]
scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware

[ Upstream commit 2bf7dc8443e113844d078fd6541b7f4aa544f92f ]

The arcmsr driver failed to pass SYNCHRONIZE CACHE to controller
firmware. Depending on how drive caches are handled internally by
controller firmware this could potentially lead to data integrity
problems.

Ensure that cache flushes are passed to the controller.

[mkp: applied by hand and removed unused vars]

Cc: <stable@vger.kernel.org>
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reported-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agoscsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
Ewan D. Milne [Wed, 26 Oct 2016 15:22:53 +0000 (11:22 -0400)]
scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded

[ Upstream commit 4d2b496f19f3c2cfaca1e8fa0710688b5ff3811d ]

map_storep was not being vfree()'d in the module_exit call.

Cc: <stable@vger.kernel.org>
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agodrm/radeon/si_dpm: workaround for SI kickers
Alex Deucher [Fri, 14 Oct 2016 20:38:02 +0000 (16:38 -0400)]
drm/radeon/si_dpm: workaround for SI kickers

[ Upstream commit 7dc86ef5ac91642dfc3eb93ee0f0458e702a343e ]

Consolidate existing quirks. Fixes stability issues
on some kickers.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
7 years agodrm/dp/mst: Check peer device type before attempting EDID read
Ville Syrjälä [Wed, 26 Oct 2016 09:05:55 +0000 (12:05 +0300)]
drm/dp/mst: Check peer device type before attempting EDID read

[ Upstream commit 4da5caa6a6f82cda3193bca855235b87debf78bd ]

Only certain types of pdts have the DDC bus registered, so check for
that before we attempt the EDID read. Othwewise we risk playing around
with an i2c adapter that doesn't actually exist.

Cc: stable@vger.kernel.org
Cc: Carlos Santa <carlos.santa@intel.com>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Tested-by: Carlos Santa <carlos.santa@intel.com>
Tested-by: Kirill A. Shutemov <kirill@shutemov.name>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1477472755-15288-5-git-send-email-ville.syrjala@linux.intel.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>