platform/kernel/linux-exynos.git
5 years agoarm64: dts: exynos5433: Add FIMC-IS subsystem nodes
Sylwester Nawrocki [Fri, 23 Mar 2018 16:53:48 +0000 (17:53 +0100)]
arm64: dts: exynos5433: Add FIMC-IS subsystem nodes

Change-Id: I489d4000217c1780cd7caac7469eb93345adb1fb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Set all buffer queues as bidirectional
Sylwester Nawrocki [Tue, 3 Apr 2018 13:34:36 +0000 (15:34 +0200)]
fimc-is: Set all buffer queues as bidirectional

This prevent SYSMMU fault from FIMC-IS CPU access:

[   42.220252] exynos-sysmmu 142d0000.sysmmu: 14180000.fimc_is: AW ACCESS PROTECTION FAULT occurred at 0x7ff98af0
[   42.220634] ------------[ cut here ]------------
[   42.222578] kernel BUG at drivers/iommu/exynos-iommu.c:449!
[   42.228136] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[   42.233602] Modules linked in:
[   42.236641] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W       4.14.24+ #154
[   42.244105] Hardware name: Samsung TM2 board (DT)
[   42.248790] task: ffffff800905eb80 task.stack: ffffff8009040000
[   42.254699] PC is at exynos_sysmmu_irq+0x17c/0x188
[   42.259468] LR is at exynos_sysmmu_irq+0x108/0x188
[   42.264241] pc : [<ffffff80084d68b4>] lr : [<ffffff80084d6840>] pstate: 600001c5
[   42.271620] sp : ffffff8008003e00
[   42.274915] x29: ffffff8008003e00 x28: ffffff8009031010
[   42.280211] x27: ffffff8009043db0 x26: ffffff8009031000
[   42.285506] x25: ffffff800913c000 x24: 000000007ff98af0
[   42.290800] x23: ffffffc0c9c4a918 x22: 0000000000000064
[   42.296095] x21: ffffffc0c9c4a958 x20: 0000000000000013
[   42.301390] x19: ffffff8008ad87c8 x18: 0000000000000010
[   42.306685] x17: 0000000000000000 x16: fffffffffffffffe
[   42.311980] x15: ffffff8089180f9f x14: 0720072007200720
[   42.317275] x13: 0720072007200720 x12: 0720072007200720
[   42.322569] x11: 0720072007200720 x10: 0720072007200720
[   42.327864] x9 : 0720072007200720 x8 : 0720072007200720
[   42.333159] x7 : 0720072007200720 x6 : 00000000000003cb
[   42.338454] x5 : 0000000000000000 x4 : 0000000000000000
[   42.343748] x3 : 0000000000000001 x2 : 000000007ff98af0
[   42.349044] x1 : ffffff8009140c80 x0 : 00000000ffffffda
[   42.354340] Process swapper/0 (pid: 0, stack limit = 0xffffff8009040000)
[   42.361024] Call trace:
[   42.363451] Exception stack(0xffffff8008003cc0 to 0xffffff8008003e00)
[   42.369879] 3cc0: 00000000ffffffda ffffff8009140c80 000000007ff98af0 0000000000000001
[   42.377692] 3ce0: 0000000000000000 0000000000000000 00000000000003cb 0720072007200720
[   42.385504] 3d00: 0720072007200720 0720072007200720 0720072007200720 0720072007200720
[   42.393317] 3d20: 0720072007200720 0720072007200720 0720072007200720 ffffff8089180f9f
[   42.401128] 3d40: fffffffffffffffe 0000000000000000 0000000000000010 ffffff8008ad87c8
[   42.408940] 3d60: 0000000000000013 ffffffc0c9c4a958 0000000000000064 ffffffc0c9c4a918
[   42.416753] 3d80: 000000007ff98af0 ffffff800913c000 ffffff8009031000 ffffff8009043db0
[   42.424564] 3da0: ffffff8009031010 ffffff8008003e00 ffffff80084d6840 ffffff8008003e00
[   42.432376] 3dc0: ffffff80084d68b4 00000000600001c5 ffffff8008ad87c8 0000000000000013
[   42.440189] 3de0: 0000007fffffffff 0000000000000064 ffffff8008003e00 ffffff80084d68b4
[   42.448001] [<ffffff80084d68b4>] exynos_sysmmu_irq+0x17c/0x188
[   42.453817] [<ffffff80080f4b14>] __handle_irq_event_percpu+0x64/0x280
[   42.460238] [<ffffff80080f4d4c>] handle_irq_event_percpu+0x1c/0x58
[   42.466400] [<ffffff80080f4dd0>] handle_irq_event+0x48/0x78
[   42.471956] [<ffffff80080f8a34>] handle_fasteoi_irq+0xbc/0x1b0
[   42.477772] [<ffffff80080f3bac>] generic_handle_irq+0x24/0x38
[   42.483499] [<ffffff80080f426c>] __handle_domain_irq+0x84/0xf8
[   42.489315] [<ffffff80080817c8>] gic_handle_irq+0x68/0xc8
[   42.494695] Exception stack(0xffffff8009043db0 to 0xffffff8009043ef0)
[   42.501119] 3da0:                                   0000000000000000 ffffff8008e3c628
[   42.508934] 3dc0: ffffff8009031010 0000000000000001 00000040d657b000 0000000000005dc0
[   42.516746] 3de0: 0000000000000008 0000000000000000 0000000000000002 ffffff8009043e70
[   42.524558] 3e00: 0000000000000980 000000000011fa88 0000000000000000 0000000000000001
[   42.532370] 3e20: 0000000000000000 ffffff8089180f9f fffffffffffffffe 0000000000000000
[   42.540183] 3e40: 0000000000000010 ffffff800913c000 ffffff800913ce78 0000000000000000
[   42.547993] 3e60: ffffff8008e1ee50 0000000000000000 0000000000000000 ffffff800905eb80
[   42.555806] 3e80: 00000000df6e4808 0000000000000000 0000000020f80018 ffffff8009043ef0
[   42.563618] 3ea0: ffffff8008085de0 ffffff8009043ef0 ffffff8008085de4 0000000060000145
[   42.571430] 3ec0: ffffff800903b048 ffffff8008e1ee50 ffffffffffffffff ffffff8009052000
[   42.579241] 3ee0: ffffff8009043ef0 ffffff8008085de4
[   42.584100] [<ffffff8008083130>] el1_irq+0xb0/0x124
[   42.588962] [<ffffff8008085de4>] arch_cpu_idle+0x34/0x1c8
[   42.594344] [<ffffff80080e2b1c>] do_idle+0x114/0x1e0
[   42.599289] [<ffffff80080e2d84>] cpu_startup_entry+0x24/0x28
[   42.604935] [<ffffff8008a390c8>] rest_init+0xc8/0xd8
[   42.609883] [<ffffff8008f80b94>] start_kernel+0x39c/0x3b0
[   42.615264] Code: 2a1803e4 9401e0bc f94032e0 b5fffbe0 (d4210000)
[   42.621339] ---[ end trace f42ebbac31eb0484 ]---

Change-Id: I2467a1646a6c6cdcb6898fd4911cb64f9f0d658e
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Drop code for old kernel versions
Sylwester Nawrocki [Thu, 29 Mar 2018 13:57:30 +0000 (15:57 +0200)]
fimc-is: Drop code for old kernel versions

Change-Id: If303fd1f7546df825b6c9399791d1044ec92630a
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc: Add missing memory allocator initialization for companion video node
Sylwester Nawrocki [Thu, 29 Mar 2018 13:56:06 +0000 (15:56 +0200)]
fimc: Add missing memory allocator initialization for companion video node

Change-Id: Ib8b910a54d024609a1c8e4dc675b2d61976531c0
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Enable build
Marek Szyprowski [Thu, 6 Aug 2015 13:39:42 +0000 (15:39 +0200)]
fimc-is: Enable build

Change-Id: I58682e769f517bb32d9a1a65b024a548ce20884a
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Remove unused Kconfig entry
Sylwester Nawrocki [Thu, 29 Mar 2018 10:35:50 +0000 (12:35 +0200)]
fimc-is: Remove unused Kconfig entry

CONFIG_OIS_FW_UPDATE_THREAD_USE is not used anywhere in the driver code.

Change-Id: I548a1793ccd9605fec24556cfbd1be36d5856827
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Enable required components in Kconfig by default
Sylwester Nawrocki [Tue, 27 Mar 2018 12:43:34 +0000 (14:43 +0200)]
fimc-is: Enable required components in Kconfig by default

Change-Id: Ia2d71205a997e551724ada9009aaf88dd9500669
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Adapt to latest changes DMA-mapping/IOMMU frameworks
Marek Szyprowski [Thu, 6 Aug 2015 08:03:46 +0000 (10:03 +0200)]
fimc-is: Adapt to latest changes DMA-mapping/IOMMU frameworks

This patch is a temporary workaround.

31-bit DMA mask is used to prevent overlapping with the Cortex-A5
reserved range. FIMC-IS CPU uses 0xe0000000-0xffffffff address
range for mapping peripheral devices, so those addresses must not
be used for memory buffers.

Change-Id: I74599b8037644bf7582043ac17a098d49b11193c
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Remove redundant memory allocation error log
Sylwester Nawrocki [Fri, 23 Mar 2018 17:14:09 +0000 (18:14 +0100)]
fimc-is: Remove redundant memory allocation error log

kzalloc() generates stack trace on errors.

Change-Id: I73a530a18a20e7e6d9aa73daec3e89357b1c1570
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Adaptation to kthread API changes
Sylwester Nawrocki [Wed, 21 Mar 2018 16:53:04 +0000 (17:53 +0100)]
fimc-is: Adaptation to kthread API changes

Change-Id: I0ef434f7c5a9a18348feaa391bb6a601d107e028
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Use ktime_get_ts() instead of do_posix_clock_monotonic_gettime
Sylwester Nawrocki [Wed, 21 Mar 2018 16:25:43 +0000 (17:25 +0100)]
fimc-is: Use ktime_get_ts() instead of do_posix_clock_monotonic_gettime

do_posix_clock_monotonic_gettime() is not available any more in kernel v4.14.

Change-Id: Ib9a5a1d1069e6ad7d593f8eddc0801f418163a16
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Adaptation to V4L2 API changes
Sylwester Nawrocki [Wed, 21 Mar 2018 16:24:35 +0000 (17:24 +0100)]
fimc-is: Adaptation to V4L2 API changes

Change-Id: Ia944801f9bd161bb4381b679a0d0b6920bb3d35d
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Remove BUG() from fimc_is_itf_s_param()
Sylwester Nawrocki [Mon, 21 Aug 2017 16:19:50 +0000 (18:19 +0200)]
fimc-is: Remove BUG() from fimc_is_itf_s_param()

The condition being tested for that BUG() invocation is often
recoverable, so replace BUG() with a WARN_ON() and return EINVAL.
This prevents specific user space call sequences crashing the kernel,
which should never happen.
The callers of fimc_is_itf_s_param() function will be updated in
subsequent patches if necessary, to prevent any further possible
crashes.

Change-Id: I90a08278baa0cee85a4a69fa1b278e28e5c6764a
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: change metadata header as uapi header
Seung-Woo Kim [Thu, 22 Jun 2017 09:41:20 +0000 (18:41 +0900)]
fimc-is: change metadata header as uapi header

The header fimc-is-metadata.h is required from user, so it should
be a uapi header. So this patch moves the header to uapi header.

Change-Id: I5618889c806d4463da0bf0ea947bf5d1b667d5e3
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agofimc-is: Rename "is fail" to "failed"
Sylwester Nawrocki [Thu, 3 Mar 2016 15:27:59 +0000 (16:27 +0100)]
fimc-is: Rename "is fail" to "failed"

Change-Id: Ifd587dd48cf28d91250814499b881198cc039229
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Add proper implementation of fimc_is_ischain_forcedown()
Sylwester Nawrocki [Fri, 11 Mar 2016 15:08:37 +0000 (16:08 +0100)]
fimc-is: Add proper implementation of fimc_is_ischain_forcedown()

Change-Id: I1f9314050dd9ca52623dd1770ccef3fa8b3755d6
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: MCUCTL register definition cleanup
Sylwester Nawrocki [Thu, 10 Mar 2016 16:46:47 +0000 (17:46 +0100)]
fimc-is: MCUCTL register definition cleanup

Lots of (mostly unused) postfix-indexed macro definitions
are now replaced with parametric definitions.

Change-Id: I86280b01681dfd25915ba7001af2e69c84369032
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Remove unused data structure declaration
Sylwester Nawrocki [Thu, 10 Mar 2016 16:24:27 +0000 (17:24 +0100)]
fimc-is: Remove unused data structure declaration

Change-Id: I8ba9ae47aab00f4dfad1724a92e4659cca91588b
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Clear all MCUCTL register in the power up sequence
Sylwester Nawrocki [Thu, 10 Mar 2016 16:43:00 +0000 (17:43 +0100)]
fimc-is: Clear all MCUCTL register in the power up sequence

When the ISP, CAM{0,1} power domains are always on it is required
to clear MCUCTL registers in the ISP power up sequence, otherwise
the front camera is not working properly if previously the rear
camera pipeline was used. The original code relied on the MCUCTL
registers being reset to default values after the ISP power domain
switch off/on cycle.

Change-Id: I685603ab968e5eb3871dd0ed3a25a4eb694bdc75
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Reconfigure more muxes to oscclk in the power off sequence
Sylwester Nawrocki [Fri, 4 Mar 2016 16:56:32 +0000 (17:56 +0100)]
fimc-is: Reconfigure more muxes to oscclk in the power off sequence

We don't switch off CAM1, CAM0, ISP power domain so reconfigure
more muxes to their default after reset state duriong power off
sequence.

Change-Id: I85161973d654268acd741f36210f5d8aee8c1ec9
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Workaround for ACLK_CAM1_552_USER configuration issues
Sylwester Nawrocki [Mon, 29 Feb 2016 15:03:26 +0000 (16:03 +0100)]
fimc-is: Workaround for ACLK_CAM1_552_USER configuration issues

For some reason "mout_aclk_cam1_552_user" clock reconfiguration from
"oscclk" to "aclk_cam1_552" breaks the front camera operation (often
only empty buffer are dequeued). But it is required for the rear
camera. Until the root cause is found reconfigure the mux conditionally
only for the rear sensor operation.

Change-Id: If121971afa4007efc778bde452ff95e75f20dced
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fix compiler warning
Sylwester Nawrocki [Thu, 3 Mar 2016 15:30:54 +0000 (16:30 +0100)]
fimc-is: Fix compiler warning

n file included from drivers/media/platform/exynos/fimc-is/fimc-is-companion-dt.c:23:0:
drivers/media/platform/exynos/fimc-is/fimc-is-dt.h:36:58: warning: 'struct fimc_is_core' declared inside parameter list
 int fimc_is_parse_children_dt(struct device *dev, struct fimc_is_core *core);
                                                          ^
drivers/media/platform/exynos/fimc-is/fimc-is-dt.h:36:58: warning: its scope is only this definition or declaration, which is probably not what you want

Change-Id: I8848007ce5de95574699a735c19bad195f0bd3cb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Add setting of vendorSpecific2[0] metadata structure field
Sylwester Nawrocki [Fri, 26 Feb 2016 16:33:50 +0000 (17:33 +0100)]
fimc-is: Add setting of vendorSpecific2[0] metadata structure field

vendorSpecific2[0] value pattern depends on the fimc-is firmware
revision. Move setting up of this field to the kernel as there is
all information required for this.
The driver will update the field accordingly only if user space
leaves it cleared.

Change-Id: Ib77d7be7081a2239a19912757392522d044d58f9
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Workaround for CLK_MOUT_ACLK_CAM1_552_USER clock
Sylwester Nawrocki [Fri, 26 Feb 2016 16:02:46 +0000 (17:02 +0100)]
fimc-is: Workaround for CLK_MOUT_ACLK_CAM1_552_USER clock

When CLK_MOUT_ACLK_CAM1_552_USER clock is properly defined
in clk-exynos5433.c re-parenting commented out in this patch
causes that only empty buffers can be dequeued from the scaler
for front camera. So re-parenting is disabled for now until
we can address this issue in a better way.

Change-Id: I6198a5f8945638ec0002a071d8f4865920790d00
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Eliminate some BUG_ON() from fimc_is_group_buffer_finish()
Sylwester Nawrocki [Fri, 6 Nov 2015 13:33:22 +0000 (14:33 +0100)]
fimc-is: Eliminate some BUG_ON() from fimc_is_group_buffer_finish()

This prevents kernel panic caused by wrong sequences in user space.

Change-Id: I1470675c0a2a2bcecb526dbef0f93772c5da9cb4
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fix code issues pointed by CPPTest tool
Marek Szyprowski [Tue, 24 Nov 2015 09:33:57 +0000 (10:33 +0100)]
fimc-is: Fix code issues pointed by CPPTest tool

Change-Id: I2d717c6eca79bc213e98448666cc0f88995bb00e
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Fix possible memory leak found by static analysis
Marek Szyprowski [Mon, 23 Nov 2015 12:55:49 +0000 (13:55 +0100)]
fimc-is: Fix possible memory leak found by static analysis

This patch fixes all issues pointed by Klocwork static analysis tool.

Change-Id: Ie0d80a2bbd514c6dac0959784623d380ea580b19
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: 6d1: add sentinel element to id table
Seung-Woo Kim [Tue, 1 Sep 2015 08:21:01 +0000 (17:21 +0900)]
fimc-is: 6d1: add sentinel element to id table

This patch adds sentinel element to id table to fix following out
of bounds access:
    ==================================================================
    BUG: KASan: out of bounds access in i2c_device_match+0xcc/0xf0 at addr ffffffc00120ee80
    Read of size 1 by task swapper/0/1
    page:ffffffbdc0848380 count:1 mapcount:0 mapping:          (null) index:0x0
    flags: 0x400(reserved)
    page dumped because: kasan: bad access detected
    Address belongs to variable sensor_6d1_idt+0x20/0x40
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.0-00839-gb91c2a6-dirty #3
    Hardware name: Samsung TM2 board (DT)
    Call trace:
    [<ffffffc00008bc58>] dump_backtrace+0x0/0x1d8
    [<ffffffc00008be40>] show_stack+0x10/0x20
    [<ffffffc000eee3a4>] dump_stack+0x80/0xd4
    [<ffffffc00021e4f0>] kasan_report_error+0x3e0/0x408
    [<ffffffc00021e9ec>] kasan_report+0x44/0x50
    [<ffffffc00021d8f0>] __asan_load1+0x78/0x80
    [<ffffffc000916b78>] i2c_device_match+0xc8/0xf0
    [<ffffffc0006d9d54>] __driver_attach+0x3c/0xd0
    [<ffffffc0006d6fac>] bus_for_each_dev+0xd4/0x138
    [<ffffffc0006d932c>] driver_attach+0x2c/0x40
    [<ffffffc0006d8dfc>] bus_add_driver+0x214/0x2e8
    [<ffffffc0006dab40>] driver_register+0xb0/0x1c0
    [<ffffffc000917fc0>] i2c_register_driver+0x48/0xc8
    [<ffffffc001795344>] sensor_6d1_load+0x18/0x24
    [<ffffffc000082ae4>] do_one_initcall+0xec/0x240
    [<ffffffc001755e50>] kernel_init_freeable+0x288/0x330
    [<ffffffc000eeab1c>] kernel_init+0xc/0xf0
    Memory state around the buggy address:
     ffffffc00120ed80: 00 00 00 00 00 00 00 00 00 00 00 00 00 04 fa fa
     ffffffc00120ee00: fa fa fa fa 00 00 06 fa fa fa fa fa 00 00 00 00
    >ffffffc00120ee80: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00
                       ^
     ffffffc00120ef00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     ffffffc00120ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ==================================================================

Change-Id: I9db130c66d2aa884b946e946581e5dc08f8a20ca
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agofimc-is: Fix wrong index access for dt child nodes
Seung-Woo Kim [Tue, 1 Sep 2015 07:59:03 +0000 (16:59 +0900)]
fimc-is: Fix wrong index access for dt child nodes

This patch fixes wrong index access for dt child nodes. This fixes
following use after free:
    ==================================================================
    BUG: KASan: use after free in fimc_is_parse_children_dt+0x6c/0xe8 at addr ffffffc08d27ffa8
    Write of size 8 by task swapper/0/1
    page:ffffffbdc2b49fc0 count:0 mapcount:0 mapping:          (null) index:0x0
    flags: 0x0()
    page dumped because: kasan: bad access detected
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.0-00839-gb91c2a6-dirty #3
    Hardware name: Samsung TM2 board (DT)
    Call trace:
    [<ffffffc00008bc58>] dump_backtrace+0x0/0x1d8
    [<ffffffc00008be40>] show_stack+0x10/0x20
    [<ffffffc000eee3a4>] dump_stack+0x80/0xd4
    [<ffffffc00021e510>] kasan_report_error+0x400/0x408
    [<ffffffc00021e9ec>] kasan_report+0x44/0x50
    [<ffffffc00021d38c>] __asan_store8+0x94/0xb0
    [<ffffffc000991900>] fimc_is_parse_children_dt+0x68/0xe8
    [<ffffffc000959368>] fimc_is_probe+0xc0/0xed8
    [<ffffffc0006dc724>] platform_drv_probe+0x64/0xf8
    [<ffffffc0006d9ae8>] driver_probe_device+0x1f0/0x3a8
    [<ffffffc0006d9de0>] __driver_attach+0xc8/0xd0
    [<ffffffc0006d6fac>] bus_for_each_dev+0xd4/0x138
    [<ffffffc0006d932c>] driver_attach+0x2c/0x40
    [<ffffffc0006d8dfc>] bus_add_driver+0x214/0x2e8
    [<ffffffc0006dab40>] driver_register+0xb0/0x1c0
    [<ffffffc0006dc618>] __platform_driver_register+0xa8/0xb8
    [<ffffffc0017952c0>] fimc_is_driver_init+0x18/0x24
    [<ffffffc000082ae4>] do_one_initcall+0xec/0x240
    [<ffffffc001755e50>] kernel_init_freeable+0x288/0x330
    [<ffffffc000eeab1c>] kernel_init+0xc/0xf0
    Memory state around the buggy address:
     ffffffc08d27fe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
     ffffffc08d27ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    >ffffffc08d27ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                      ^
     ffffffc08d280000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     ffffffc08d280080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ==================================================================

Change-Id: Id2794dfbb02c5fac923f0df15618609fe5387503
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agofimc-is: Set allow_zero_bytesused flag on videbuf2 queues
Marek Szyprowski [Wed, 12 Aug 2015 08:29:23 +0000 (10:29 +0200)]
fimc-is: Set allow_zero_bytesused flag on videbuf2 queues

Change-Id: Ib477ca52c34de66b22e7583696ebd2a250917677
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Get rid of struct v4l2_subdev_core_ops::init use
Sylwester Nawrocki [Thu, 30 Jul 2015 04:21:48 +0000 (13:21 +0900)]
fimc-is: Get rid of struct v4l2_subdev_core_ops::init use

The init() is too limited to be used in this driver, it is deprecated
and usage of this callback should be removed anyway.
There is no device nodes for subdevs so ioctl is no exposed to user space.

Change-Id: I7ff42e1a7843826cba8cb9e652616b8c10a8c932
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fix/add vidioc_querycap for several video nodes
Sylwester Nawrocki [Thu, 30 Jul 2015 01:55:38 +0000 (10:55 +0900)]
fimc-is: Fix/add vidioc_querycap for several video nodes

This allows us to get rid of a warning from v4l2-core.

Change-Id: I30fae593f0dcdd314d5c2cd18f02528b78e7807c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fail device open when called from udev
Marek Szyprowski [Thu, 13 Aug 2015 12:52:20 +0000 (14:52 +0200)]
fimc-is: Fail device open when called from udev

This workaround avoids driver state change on system boot when udev checks
all video nodes.

Change-Id: I13f16b109251010f138f97943ab180c5003cf6b9
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Workaround to ensure proper video open sequence
Sylwester Nawrocki [Tue, 28 Jul 2015 05:06:58 +0000 (14:06 +0900)]
fimc-is: Workaround to ensure proper video open sequence

This a workaround to prevent system crash when video nodes are opened
in random sequence during system booting.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
fimc-is: hack video node open to require companion to be opened

Change-Id: I3b7f929c087acb32169fd6a26cee6eeb7e225497
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Add memory barriers in place of vb2_ion_sync_for_device() calls
Sylwester Nawrocki [Mon, 27 Jul 2015 01:17:35 +0000 (10:17 +0900)]
fimc-is: Add memory barriers in place of vb2_ion_sync_for_device() calls

Change-Id: If208bd4f9f7ef2b2c488b004d552891e57577e25
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Do not skip enabling enabled regulators
Marek Szyprowski [Thu, 6 Aug 2015 08:09:24 +0000 (10:09 +0200)]
fimc-is: Do not skip enabling enabled regulators

Regulators have proper on/off refcount, so use it instead of strange
is_enabled() based logic.

Change-Id: I6e23a5a6c3576d50581cb887f57a51897cdd86eb
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: temporary hack to ensure proper structure size
Marek Szyprowski [Thu, 23 Jul 2015 07:33:18 +0000 (09:33 +0200)]
fimc-is: temporary hack to ensure proper structure size

Change-Id: Ib87a85508a6be13ace45fcd800df867ad87115fc
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: temporary workaround for more strict vb2 buffer state tracking
Marek Szyprowski [Fri, 7 Aug 2015 08:42:08 +0000 (10:42 +0200)]
fimc-is: temporary workaround for more strict vb2 buffer state tracking

Change-Id: I72897d4cbf6cf0b6bd349fe5f99ebc45b8c461f9
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Correct error logs in fimc-is-groupmgr.c
Sylwester Nawrocki [Mon, 20 Jul 2015 01:53:30 +0000 (10:53 +0900)]
fimc-is: Correct error logs in fimc-is-groupmgr.c

Change-Id: I386a2b86fb6637617e02b9467020e196aaf31a15
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fix printk format in wq_func_general() function
Sylwester Nawrocki [Mon, 20 Jul 2015 01:48:56 +0000 (10:48 +0900)]
fimc-is: Fix printk format in wq_func_general() function

Change-Id: Ia3ce3de8328ec5ab57b71bb383d274217a2a800a
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Remove unneeded variable declarations
Sylwester Nawrocki [Mon, 20 Jul 2015 01:46:25 +0000 (10:46 +0900)]
fimc-is: Remove unneeded variable declarations

Change-Id: Ia5392e11cade65529a91fb5d000b879c55e66738
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Use proper type for FIMC-LITE register region pointer
Sylwester Nawrocki [Fri, 17 Jul 2015 05:20:40 +0000 (14:20 +0900)]
fimc-is: Use proper type for FIMC-LITE register region pointer

Aside of dropping the pointless TO_WORD_OFFSET() macro this let's
us avoid errors on a 64-bit system where size of unsigned long is
8 bytes, as opposed to 4 bytes on 32-bit machines.

Change-Id: I572003d0f85a21724411030e322bf6da967a613a
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fix data type errors in debug printks
Sylwester Nawrocki [Fri, 17 Jul 2015 05:17:48 +0000 (14:17 +0900)]
fimc-is: Fix data type errors in debug printks

Change-Id: I7585c99ab7e8e2582da97e49688bea56ff66593f
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Remove unused function declarations from fimc-is-hw.h
Sylwester Nawrocki [Fri, 17 Jul 2015 05:15:33 +0000 (14:15 +0900)]
fimc-is: Remove unused function declarations from fimc-is-hw.h

Change-Id: If173cd69b6e4ac3431740fa1b787b8894a09e5d0
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Use proper type for CSIS register region pointer
Sylwester Nawrocki [Fri, 17 Jul 2015 04:32:45 +0000 (13:32 +0900)]
fimc-is: Use proper type for CSIS register region pointer

Aside of dropping the pointless TO_WORD_OFFSET() macro this let's
us avoid errors on a 64-bit system where size of unsigned long is
8 bytes, as opposed to 4 bytes on 32-bit machines.

Change-Id: Ibba3165211b1d0a11ea34918cf8fc7033718420e
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fix CRC32 code for arm64
Marek Szyprowski [Thu, 16 Jul 2015 08:59:37 +0000 (10:59 +0200)]
fimc-is: Fix CRC32 code for arm64

Fix getCRC() function return type.

Change-Id: I4aab3b97d3ff2b35aaa5cef10ad06bc6301292f2
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Set correct paths to firmware files
Marek Szyprowski [Mon, 13 Jul 2015 10:43:39 +0000 (12:43 +0200)]
fimc-is: Set correct paths to firmware files

fimc-is-ois: correct sd card path
fimc-is: change firmware path to /lib/firmware to avoid confusion

Change-Id: I198cdc58c1464a963a8ca23875f7c9ae38175b13
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Use the same iommu address space for all fimc-is/sensors blocks
Marek Szyprowski [Wed, 5 Aug 2015 13:38:28 +0000 (15:38 +0200)]
fimc-is: Use the same iommu address space for all fimc-is/sensors blocks

Change-Id: Ib6cfb506e13d02f91489d45f3679effaa75ddfe8
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Remove ION integration code
Marek Szyprowski [Thu, 6 Aug 2015 07:43:41 +0000 (09:43 +0200)]
fimc-is: Remove ION integration code

Change-Id: I9b06e9479ee3028cce895f3f73b76d101c1572ac
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Add support for MIPI PHY power/reset control
Marek Szyprowski [Tue, 11 Aug 2015 08:28:56 +0000 (10:28 +0200)]
fimc-is: Add support for MIPI PHY power/reset control

Change-Id: Id7afb8b99a87a664a16f74ff0d3e6c28904cce1b
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Fix all possible casting issues and function signature incompatibilities
Marek Szyprowski [Thu, 6 Aug 2015 10:59:20 +0000 (12:59 +0200)]
fimc-is: Fix all possible casting issues and function signature incompatibilities

Change-Id: Idd9371751954bb7b44d4c0a52f6e361e264e4b55
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Fix includes and make the code to compile on ARM64
Marek Szyprowski [Fri, 7 Aug 2015 08:41:03 +0000 (10:41 +0200)]
fimc-is: Fix includes and make the code to compile on ARM64

Change-Id: Ida4edf177272add32891af691661ee943cdac66a
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Remove pin_config_set() dependency
Marek Szyprowski [Fri, 10 Jul 2015 12:21:45 +0000 (14:21 +0200)]
fimc-is: Remove pin_config_set() dependency

Change-Id: I70ba0537ffaff4d2b3ad858d41aaa28622d9800d
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Add exynos_smc() implementation (temporary workaround)
Sylwester Nawrocki [Fri, 8 May 2015 14:35:05 +0000 (16:35 +0200)]
fimc-is: Add exynos_smc() implementation (temporary workaround)

Ported from arch/arm64/kernel/exynos-smc.S, include/linux/smc.h
from LSI kernel.

Change-Id: I94a82210ab1f4cfdeff12b87e51592f8d417a060
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agofimc-is: Disable support for V4L2_CID_IS_MAP_BUFFER
Marek Szyprowski [Thu, 9 Jul 2015 08:28:58 +0000 (10:28 +0200)]
fimc-is: Disable support for V4L2_CID_IS_MAP_BUFFER

Change-Id: I09c01ee11a4d359cf21535b7f00ddea7eb5e3015
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Configure clocks on companion open
Marek Szyprowski [Fri, 7 Aug 2015 08:17:23 +0000 (10:17 +0200)]
fimc-is: Configure clocks on companion open

Change-Id: I140e7793fcaeea81e756b22e03fb73047fca21df
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Remove conditional runtime PM support
Marek Szyprowski [Fri, 7 Aug 2015 06:37:00 +0000 (08:37 +0200)]
fimc-is: Remove conditional runtime PM support

Remove conditional runtime PM code.

Change-Id: Id8c12b806217bba6f242e926e4d88ef74a567289
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Replace hard coded PMU register access with regmap calls
Marek Szyprowski [Fri, 7 Aug 2015 08:36:26 +0000 (10:36 +0200)]
fimc-is: Replace hard coded PMU register access with regmap calls

Change-Id: Ifa9cccbbe68ff937c5ade1539592f5db0876edfb
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Read fimc-lite and csis regs and irqs from dt
Marek Szyprowski [Fri, 7 Aug 2015 08:36:35 +0000 (10:36 +0200)]
fimc-is: Read fimc-lite and csis regs and irqs from dt

Change-Id: I94a94d3e85c640cdec3f20289e97cb450e359252
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Remove unused code
Marek Szyprowski [Thu, 6 Aug 2015 13:21:55 +0000 (15:21 +0200)]
fimc-is: Remove unused code

 - remove unused sensor driver code
 - remove dead code for non-Exynos5433 SoCs
 - remove USE_OWN_FAULT_HANDLER support
 - remove ENABLE_CLOCK_GATE support
 - remove ENABLE_DVFS support
 - remove completely dead code
 - remove unused conditional code
 - remove pm qos support
 - remove ncp6335b support (unused)

Change-Id: Ibf4ca12f72642da12082f0d1bccd37b9eda04962
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Add code from arch/arm/mach-exynos and missing headers
Marek Szyprowski [Thu, 6 Aug 2015 13:24:20 +0000 (15:24 +0200)]
fimc-is: Add code from arch/arm/mach-exynos and missing headers

Change-Id: I15d16161f1d1f036bd4a0f359f40b94b4cf08e99
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agofimc-is: Initial import from SM-N910 Android LL release code
Marek Szyprowski [Thu, 6 Aug 2015 13:20:55 +0000 (15:20 +0200)]
fimc-is: Initial import from SM-N910 Android LL release code

Import fimc-is driver from SM-N910C_LL_Opensource (verified 32-bit
Android kernel) from opensource.samsung.com

Change-Id: I62eec9bc33a21c5742d2c5d5f79facfcb1ec59c9
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agospi: spi-s3c64xx: Add support for Exynos5433 ISP SPI controllers
Sylwester Nawrocki [Thu, 12 Apr 2018 15:02:00 +0000 (17:02 +0200)]
spi: spi-s3c64xx: Add support for Exynos5433 ISP SPI controllers

This patch adds support for the Exynos5433 ISP SPI devices. An additional
code performing the SPI controller's software reset is added to ensure
proper operation as the controller is also used by the FIMC-IS firmware.

Change-Id: I4c4e8d7b032e1068bb77411a5f19d8d3f17df3eb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Add DT property for byte swapping control
Sylwester Nawrocki [Thu, 12 Apr 2018 14:39:57 +0000 (16:39 +0200)]
spi: spi-s3c64xx: Add DT property for byte swapping control

Enabling this feature is required for the FIMC-IS subsystem driver.

Change-Id: I331f69eb5b41429449939ae5f05ee07a30f3405e
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Allow higher transfer lengths in polling IO mode
Sylwester Nawrocki [Thu, 12 Apr 2018 14:08:27 +0000 (16:08 +0200)]
spi: spi-s3c64xx: Allow higher transfer lengths in polling IO mode

Some variants of the SPI controller have no DMA support, in such case
SPI transfers longer than the FIFO length are not currently properly handled
by the driver. Fix it by doing multiple transfers in the s3c64xx_spi_transfer_one()
function if the SPI transfer length exceeds the FIFO size.

Change-Id: I6a21a72f40a52237ebe3c1f3037153e27f7392fb
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Fix indentation in the register offset definitions
Sylwester Nawrocki [Thu, 12 Apr 2018 13:59:24 +0000 (15:59 +0200)]
spi: spi-s3c64xx: Fix indentation in the register offset definitions

Change-Id: I52f8ea378c45379ef36fa3753eec39a558a68f92
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Do not ignore timeout errors in polling I/O mode
Sylwester Nawrocki [Thu, 12 Apr 2018 13:57:17 +0000 (15:57 +0200)]
spi: spi-s3c64xx: Do not ignore timeout errors in polling I/O mode

Currently timeout errors in polling I/O mode transfer are silently ignored.
Fix it by returning an error when we time out waiting on the RX FIFO level
to reach the transfer length.

Change-Id: I39d663204880bb5a9c4d092c020912055078416c
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Drop unused enable_datapath() function argument
Sylwester Nawrocki [Thu, 12 Apr 2018 13:36:37 +0000 (15:36 +0200)]
spi: spi-s3c64xx: Drop unused enable_datapath() function argument

The spi pointer argument is not used now so remove it. While at it a s3c64xx_
prefix is added to the function name.

Change-Id: I2b7016af73834808268314cbcfbaec4b36558e22
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Remove unused s3c64xx_spi_hwinit() function argument
Sylwester Nawrocki [Thu, 12 Apr 2018 13:27:47 +0000 (15:27 +0200)]
spi: spi-s3c64xx: Remove unused s3c64xx_spi_hwinit() function argument

The channel argument is not used and anyway it could be retrieved from
the passed driver data structure.

Change-Id: Ib89885dd2e0d80e7ca97a1c15fb69f11f55a8740
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agospi: spi-s3c64xx: Remove unused driver data structure tgl_spi field
Sylwester Nawrocki [Thu, 12 Apr 2018 13:21:46 +0000 (15:21 +0200)]
spi: spi-s3c64xx: Remove unused driver data structure tgl_spi field

The tgl_spi pointer is now unused so remove it.

Change-Id: Iedfa3e5e39bac27aa4f6ec467578635d99d01b1e
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agoi2c: i2c-s3c2410: Add quirks for Exynos5433 ISP I2C
Marek Szyprowski [Thu, 30 Jul 2015 10:35:18 +0000 (12:35 +0200)]
i2c: i2c-s3c2410: Add quirks for Exynos5433 ISP I2C

This is required to ensure proper operation of the ISP I2C controller
from the Linux driver and the FIMC-IS firmware level.

Change-Id: If845cf516fb8aa29a0e6b1b1533208b63fecdc69
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agoclk: samsung: exynos5433: Update definitions of ISP, CAM{0,1} domain clocks
Marek Szyprowski [Fri, 7 Aug 2015 10:35:28 +0000 (12:35 +0200)]
clk: samsung: exynos5433: Update definitions of ISP, CAM{0,1} domain clocks

This patch adds CLK_IS_CRITICAL and CLK_IGNORE_UNUSED flags to some camera
subsystem clocks to keep them always enabled, until handling of these clocks
is added to the driver.

Change-Id: I8db5d90b21d59e20a6b8461021fac68b0ddfa780
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agoclk: samsung: exynos5433: Add ISP, CAM{0,1} domain clocks
Sylwester Nawrocki [Wed, 18 Feb 2015 16:35:08 +0000 (17:35 +0100)]
clk: samsung: exynos5433: Add ISP, CAM{0,1} domain clocks

Add definitions of clocks required by fimc-is driver.

Change-Id: Icc5be29c30a54d04f692af0aa20353304297baf8
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
5 years agodrm: exynos: add support for prime vmap to exynos gem
Marek Szyprowski [Thu, 29 Mar 2018 10:35:51 +0000 (12:35 +0200)]
drm: exynos: add support for prime vmap to exynos gem

Change-Id: I9399ba024f2cc6e61c3b463071aef700ad4c9bed
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / PCI: exynos: remove __init macro from exynos_pcie_probe()
Seung-Woo Kim [Mon, 16 Apr 2018 06:32:11 +0000 (15:32 +0900)]
LOCAL / PCI: exynos: remove __init macro from exynos_pcie_probe()

After the commit 7051bc3056ba ("LOCAL / pci: dwc: pci-exynos:
support the pci of exynos5433"), exynos_pcie_probe() is no more
called from context started from subsys_initcall() and it makes
section mismatch in reference to .init.text:exynos_pcie_probe().
Remove __init macro from exynos_pcie_probe() to remove the
section mismatch.

Change-Id: Ic2c4eceb3ae33a78482f5beb02bf1ec42d01aa78
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years agoLOCAL / net: rfkill: bcm: block unused function bt_lpm_wake()
Seung-Woo Kim [Mon, 16 Apr 2018 06:18:34 +0000 (15:18 +0900)]
LOCAL / net: rfkill: bcm: block unused function bt_lpm_wake()

The commit a59dded59516 ("LOCAL / net: rfkill: adapt to mainline
API/framework changes") blocks bluetooth low power mode feature
which requires bluetooth hci core modification but bt_lpm_wake()
function remains unused. Block the unused function to fix build
warning.

Change-Id: I91afca0435b1399d481d8d8b2130b83e8de7bba0
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
5 years ago[LOCAL] base/firmware: return -EPROBE_DEFER until rootfs is available
Marek Szyprowski [Fri, 30 Mar 2018 06:12:30 +0000 (08:12 +0200)]
[LOCAL] base/firmware: return -EPROBE_DEFER until rootfs is available

Return -EPROBE_DEFER for request_firmware*() until root filesystem is
mounted. This allows to have wifi drivers build into the kernel, but
the firmware files shipped on the root filesystem.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ic9545c6bf0e007bc1d130e80ac1e5e2b0009ffbd

5 years agoarm64: configs: tizen_tm2_defconfig: enable BRCMFMAC driver for wifi
Marek Szyprowski [Tue, 13 Mar 2018 11:59:44 +0000 (12:59 +0100)]
arm64: configs: tizen_tm2_defconfig: enable BRCMFMAC driver for wifi

Change-Id: Ib351bded23805288e8436a93bb2edb3e76ef567a
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoarm64: configs: tizen_tm2_config: enable the PCIe and PHY
Jaehoon Chung [Mon, 12 Mar 2018 04:16:30 +0000 (13:16 +0900)]
arm64: configs: tizen_tm2_config: enable the PCIe and PHY

Enable the PCIe and PHY configurations.

Change-Id: Ib84bc517a6373a0ee22a6a14d6741f22914ff5bc
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / pci: quirks: add the fixup for Samsung SoC
Jaehoon Chung [Wed, 21 Mar 2018 09:41:46 +0000 (18:41 +0900)]
LOCAL / pci: quirks: add the fixup for Samsung SoC

If Device id is 0xa5e3 in Samsung SoC, it doesn't support the MSI.
To disable the msi feature, add the fixup data.

Change-Id: I4620ac8b36be173bd5d7b26539bd6c6b6a76625f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / arm64: dts: exynos5433-tm2-common: add the extra pcie property
Jaehoon Chung [Wed, 4 Apr 2018 02:22:42 +0000 (11:22 +0900)]
LOCAL / arm64: dts: exynos5433-tm2-common: add the extra pcie property

Add the specific property of tm2.
Remove the duplicated initiailzation gpio pins.

Change-Id: I2416ef7cb6d3e43c6dbe9377d89dbeec0fa7c564
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / arm64: dts: exynos5433: add the pice node
Jaehoon Chung [Mon, 12 Mar 2018 03:51:21 +0000 (12:51 +0900)]
LOCAL / arm64: dts: exynos5433: add the pice node

Add the nodes relevant to pcie.
PCIe is used the WiFi interface. So also add the nodes relevant to wlan
in exynos5433-pinctrl.dtsi.

Change-Id: I2aed23349ed1ad216f497cd233daa40c6660f161
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / phy: samsung: phy-exynos-pcie: support the exynos5433 pcie for phy
Jaehoon Chung [Wed, 20 Dec 2017 11:57:25 +0000 (20:57 +0900)]
LOCAL / phy: samsung: phy-exynos-pcie: support the exynos5433 pcie for phy

This is to support the exynos5433 SoCs for PCIe. (WIP)

Change-Id: Ie6a018023789544a330cdaf6b13380a114af2d3f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / PCI: exynos: clean the codes to reuse some functions
Jaehoon Chung [Fri, 29 Dec 2017 05:21:39 +0000 (14:21 +0900)]
LOCAL / PCI: exynos: clean the codes to reuse some functions

Clean the codes to reuse some functions.

Change-Id: I7a47538f96c96f9989613ffd56c6e0fa9eda69dd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / pci: dwc: pci-exynos: support the pci of exynos5433
Jaehoon Chung [Mon, 12 Mar 2018 02:30:23 +0000 (11:30 +0900)]
LOCAL / pci: dwc: pci-exynos: support the pci of exynos5433

Support the Exynos5433 PCIe.

Change-Id: I99fd5ab10d851cfa46e5050702e9427b88db58b0
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoLOCAL / pci: dwc: pci-exynos: change Kconfig dependency
Jaehoon Chung [Fri, 9 Mar 2018 10:51:13 +0000 (19:51 +0900)]
LOCAL / pci: dwc: pci-exynos: change Kconfig dependency

Current PCI EXYNOS has the dependency with SOC_EXYNOS5440.
It's changed to ARCH_EXYNOS from SOC_EXYNOS5440, because other SoCs
needs to use this driver.

Change-Id: I4a04ac1ee76d5ac2efca6b0e1a5af086f8098e78
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
5 years agodrm/exynos: update minor version
Inki Dae [Thu, 29 Mar 2018 08:33:25 +0000 (17:33 +0900)]
drm/exynos: update minor version

Updated minor version according to IPPv2 support.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Change-Id: I0e46e7c45010845586790efdf12675ee9f5652a3

5 years agodrm/exynos: gsc: Add limited support for ARGB8888 format
Marek Szyprowski [Mon, 19 Mar 2018 10:06:57 +0000 (11:06 +0100)]
drm/exynos: gsc: Add limited support for ARGB8888 format

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I88bac208fc1c7d1e753eeddb22143f95c2d52c64

5 years agodrm/exynos: gsc: relax limits for exynos5433 variant
Marek Szyprowski [Fri, 2 Mar 2018 14:00:48 +0000 (15:00 +0100)]
drm/exynos: gsc: relax limits for exynos5433 variant

It turned out that GSC module is able to process images with less strict
alignment.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I27c92b877225744df7295341463aa48c5be169ee

5 years agodrm/exynos: ipp: Move buffer setup to separate function
Marek Szyprowski [Mon, 26 Mar 2018 13:09:48 +0000 (15:09 +0200)]
drm/exynos: ipp: Move buffer setup to separate function

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I57d31254f3f7c677ee350c83f732a674e7f6d557

5 years agodrm/exynos: ipp: Fix support for image rotation and buffer offset
Marek Szyprowski [Fri, 30 Mar 2018 06:16:59 +0000 (08:16 +0200)]
drm/exynos: ipp: Fix support for image rotation and buffer offset

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I4bf6b571d845f000ae3b2502bb37ae12b0cfabf7

5 years agotizen_tm2_defconfig: enable TM2 sensorhub driver
Marek Szyprowski [Fri, 23 Mar 2018 12:28:29 +0000 (13:28 +0100)]
tizen_tm2_defconfig: enable TM2 sensorhub driver

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoARM64: dts: exynos: Add support for TM2(e) SensorHUB and GPS devices
Marek Szyprowski [Fri, 23 Mar 2018 09:36:09 +0000 (10:36 +0100)]
ARM64: dts: exynos: Add support for TM2(e) SensorHUB and GPS devices

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / sensors: build fix after porting to v4.14 kernel
Marek Szyprowski [Fri, 23 Mar 2018 12:08:15 +0000 (13:08 +0100)]
LOCAL / sensors: build fix after porting to v4.14 kernel

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / sensors: add sensor_core and drivers for TM2
Jaewon Kim [Tue, 24 Feb 2015 04:54:15 +0000 (13:54 +0900)]
LOCAL / sensors: add sensor_core and drivers for TM2

Add BCM 4773 sensorhub and max86902 HRM and UV sensor drivers from v4.1
Tizen kernel. This is a squashed version of the following commits:

LOCAL / sensors: add sensor_core driver

This patch adds to support "/sys/class/sensors" node.
sensors node shared with sensorhub driver and
each sensor for TIZEN platform. So, sensorhub driver merged with
this sensors driver.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
LOCAL / sensors: add max86902 HRM and UV sensor driver

This patch adds max86902 HRM(Heart Rate Monitor) and
UV(Ultraviolet Ray) sensor driver.
This driver supports via sensors core driver.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
sensors: stm_rinato: Kconfig: remove unused YAS532 driver configuration

The STM sensorhub doesn't have the yas532 compass sensor driver.
Remove it from the related configuration file.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: stm_rinato: Kconfig: remove unused SHTC1 driver configuration

The STM sensorhub doesn't have the shtc1 compass sensor driver.
Remove it from the related configuration file.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: Kconfig: move the ssp and ssp_sensorhub in upper directory

The CONFIG_SSP and SENSORS_SSP_SENSORHUB are flags not strictly
related to the STM sensorhub. Put them outside from the
stm_rinato directory to an upper level to be ready to relate to
other sensorhubs.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: add support for the BCM 4773 sensorhub

The Broadcom BCM4773 is a microcontroller that works as a
sensorhub. It's placed in between sensors and AP.

It's connected to the AP through SPI bus and has support for
a range of sensors:

 - icm20610
 - yas532
 - bmp182
 - tmg399x
 - mobeam

The config file provides a "choice" option in order to choose
between different targets, S333 and TM2(e).

The BCM4773 it can handle GPS and the gps driver is the main
entry point to the sensorhub driver as an SPI device.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: brcm: bbdpl2: add new version (v2) of the BCM4773 sensorhub

Commit, "sensors: add support for the BCM 4773 sensorhub" has
added support for the BCM4773. Since then the firmware interface
has been updated to a new version: version 2.

Add the second version of the BCM4773 sensorhub and rename the
previous version configuration flags to VER1.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
sensors: brcm: use non atomic sleeps instead of atomic delays

Do not use mdelay in non atomic contexts, use the appropriate
*sleep functions instead.

mdelay should be used only in atomic contexts, out from atomic it
keeps looping over the CPU wasting unnecessary resources.

Replace the mdelay's with:

 - usleep_range for 10us - 20ms delays,
 - msleep for over 20ms

Reported-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: sensorhub_brcm: fix for compatibility

For 32bit compatibility, compat_ioctl should be registered. Also,
32bit built IOCTL value is different from 64bit, then it should be
considered. So this fixes for compatibility with compat_ioctl.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
sensors: brcm: fix not to send commands to not initialized mcu

The suspend and resume errors happen when sensorhub mcu was not
initialized. So it needs to check the sensorhub mcu state.

Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
sensors: brcm: bbdpl2: fix log messages to info level with new line

This patch fixes log messages to info level and adds new line
character to log messages.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
sensors: brcm: Remove wake_lock to fix the suspend issue

Even if TM2 doesn't use the wake_lock feature, the brcm sensor
drivers used the wake_lock and the the count of GPS interrupt
of brcm sensor is too much. The too much interrupt causes the
pending of reading the 'sys/power/wakeup_count' and then failed
to enter the suspend state by user-process.

This patch removes the wake_lock code to fix the suspend issue.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
[remove rinato driver, add missing wakelock.h]

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / sec_sysfs: sec_class driver
Jaewon Kim [Tue, 24 Feb 2015 05:06:12 +0000 (14:06 +0900)]
LOCAL / sec_sysfs: sec_class driver

sec_sysfs driver create sysfs node and device in "/dev/class/sec/".
It is used for TIZEN platform specific drivers.

Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com>
5 years agotizen_tm2_defconfig: enable rfkill-bcm driver
Marek Szyprowski [Tue, 20 Mar 2018 13:53:13 +0000 (14:53 +0100)]
tizen_tm2_defconfig: enable rfkill-bcm driver

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoARM64: dts: exynos: Enable serial 3 and rfkill-bcm for BT support
Marek Szyprowski [Tue, 20 Mar 2018 08:21:52 +0000 (09:21 +0100)]
ARM64: dts: exynos: Enable serial 3 and rfkill-bcm for BT support

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / net: rfkill: adapt to mainline API/framework changes
Marek Szyprowski [Tue, 20 Mar 2018 08:38:38 +0000 (09:38 +0100)]
LOCAL / net: rfkill: adapt to mainline API/framework changes

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
5 years agoLOCAL / net: rfkill: add rfkill-bcm driver
Beomho Seo [Thu, 26 Feb 2015 08:08:59 +0000 (17:08 +0900)]
LOCAL / net: rfkill: add rfkill-bcm driver

This patch add rfkill-bcm driver for specific control Broadcom bluetooth
chip. This is based rfkill-gpio driver. This driver control on/off
Broadcom bluetooth chip, handle interrupt and notify.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
LOCAL / net: rfkill: Fix irq trigger

This patch fix wrong irq trigger.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
LOCAL / net: rfkill: rfkill-bcm: Change correctly compatible

This patch changes the compatible to using prefix-vendor and bluetooth
chip name.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
LOCAL / net: rfkill: rfkill-bcm: Add hci registered flag

This patch add hci registered flag for handling abnormal interrupt
signal.

Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>