summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-09-30ARM: configs: tizen_odroid_defconfig: enable kdbustizen_5.5.m2_releasesubmit/tizen_5.5_wearable_hotfix/20201026.184306submit/tizen_5.5_mobile_hotfix/20201026.185106submit/tizen_5.5/20191031.000010submit/tizen/20190930.080320accepted/tizen/unified/20191004.003457accepted/tizen/5.5/unified/wearable/hotfix/20201027.102546accepted/tizen/5.5/unified/mobile/hotfix/20201027.063551accepted/tizen/5.5/unified/20191031.004317tizen_5.5_wearable_hotfixtizen_5.5_tvtizen_5.5_mobile_hotfixaccepted/tizen_5.5_unified_wearable_hotfixaccepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.5_unifiedAdrian Szyndela1-0/+1
Enable kdbus driver to use it for Odroid, as in tizen 5.0. Change-Id: Ifcee653f25599f9261905c10aa1bfe5a387bfc58 Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
2019-09-30kdbus: test suite changed to common formatKonrad Lipinski31-3762/+3075
This commit adapts the kdbus test suite to use with dbus-integration-tests. Change-Id: Ifee21253f4e3c732b27517a0c566d4b9a569d5af Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
2019-09-30kdbus: porting to 4.14Adrian Szyndela12-30/+54
This commit makes kdbus driver working with kernel 4.14. It also enabled compilation of the driver if enabled in config. The list of changes needed to make it compile with kernel 4.14: - Add missing includes for <linux/cred.h> - put inode_lock()/inode_unlock() in place of explicit mutex locking - replace CURRENT_TIME with proper call to current_time() - replace PAGE_CACHE_* with PAGE_* - replace GFP_TEMPORARY with GFP_KERNEL - use kvecs for kernel memory, iovec for user memory instead of only iovec for both - fix usage of task_cgroup_path() - replace GROUP_AT usage with 'gid' field dereference - add 0 as an argument to init_name_hash - add 0 as flags as an argument to vfs_iter_write - replace __vfs_read with kernel_read to allow compilation into module Change-Id: I3dd066ab531d0d3f7082556e4d38381961998015 Signed-off-by: Adrian Szyndela <adrian.s@samsung.com>
2019-09-30kdbus: the driver, original and non-workingAdrian Szyndela91-1/+34532
[based on commit 216823ac83c0ab89348e2ed6f66179f53626586e] Introduce the kdbus driver again. This driver worked previously on kernel 4.1. This is the source code taken from the working driver. It is non-working and disabled. It is a base for porting. The documentation is moved from Documentation to ipc/kdbus/Documentation. The references to kdbus source code are commented out or removed in Makefiles. Original authors of the files are those from commit 216823ac83c0ab8934. Change-Id: Id60af5faf794fc4ae7122976621076f1021f6c38 Signed-off-by: Adrian Szyndela <adrian.s@samsung.com> Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2019-09-06ARM: exynos: Fix boot with CONFIG_SUSPEND disabledMarek Szyprowski2-15/+8
Exynos SMP code relies on PMU registers to be mapped via pmu_base_addr. Those mapping is done in suspend.c:exynos_pmu_irq_init(), which is not called if CONFIG_SUSPEND is disabled. Fix this by moving PMU mapping creation to exynos.c:exynos_map_pmu(), which is called in all cases. Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: Ic9dc37b18b63827b612fbc91e0f84509d4e8723b
2019-09-06drm/exynos: fix to build suspend/resume callback functions alwaysSeung-Woo Kim1-2/+0
When CONFIG_SUSPEND is disabled, conditional build for suspend and resume callbcak functions causes build error after the commit ae1c75eeaa19 ("drm/exynos: Suspend/resume display pipeline as early/late as possible"). So fix to build the callbacks always like mainline applied version, the commit dc684af6fc8d. Change-Id: I226ef3279df0b3ed646f5c532a0093b34e877723 CC: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-07-31ARM: configs: tizen_odroid_defconfig: Enable NETFILTER_XT_MATCH_OWNER configsubmit/tizen/20190801.010047accepted/tizen/unified/20190801.113438Seung-Woo Kim1-0/+1
Enable the NETFILTER_XT_MATCH_OWNER config option to use xt_owner supplementary groups. Change-Id: I715a8e360152f4f46d3ea7daeef5c6bcbc895e2f Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-07-31ARM: configs: tizen_odroid: sync with savedefconfigSeung-Woo Kim1-2/+1
After few changes, it is different from savedefconfig, so sync. Change-Id: I50759332ef3660cf57090d65e78e7fc95d945342 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-07-31arm64: configs: tizen_tm2_defconfig: Enable NETFILTER_XT_MATCH_OWNER configSeung-Woo Kim1-0/+1
Enable the NETFILTER_XT_MATCH_OWNER config option to use xt_owner supplementary groups. Change-Id: I3719c6fb2d2f12014889e88002fd7ac9f67f4d94 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-07-03netfilter: xt_owner: bail out with EINVAL in case of unsupported flagssubmit/tizen/20190705.061120accepted/tizen/unified/20190705.110609Pablo Neira Ayuso2-0/+8
Reject flags that are not supported with EINVAL. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> [sw0312.kim: backport from mainline to apply supplementary groups on netfilter] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I92f1bd37788cc71088112770bb1b4071dfe8f3fd
2019-07-03netfilter: xt_owner: Add supplementary groups optionLukasz Pawelczyk2-6/+24
The XT_OWNER_SUPPL_GROUPS flag causes GIDs specified with XT_OWNER_GID to be also checked in the supplementary groups of a process. f_cred->group_info cannot be modified during its lifetime and f_cred holds a reference to it so it's safe to use. Signed-off-by: Lukasz Pawelczyk <l.pawelczyk@samsung.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> [sw0312.kim: backport from mainline to apply supplementary groups on netfilter] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Ie2e4c64388b4c64794ebc73de9bacf206eb46173
2019-05-15ARM: defconfig: enable I-Cache line size workaround on Exynos systemssubmit/tizen/20190611.014400accepted/tizen/unified/20190611.110428Marek Szyprowski2-0/+2
All Exynos big.LITTLE system suffer from I-Cache line size mismatch between CPU cores, so enable workaround for it in exynos_defconfig and tizen_odroid_defconfig. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: I0f324a5832e1ef47999f7b8d4ddd4a29db0ee176
2019-05-15ARM: Add workaround for I-Cache line size mismatch between CPU coresMarek Szyprowski6-0/+47
Some big.LITTLE systems have mismatch of I-Cache line size between LITTLE and big cores. This patch adds workaround for proper I-Cache support on such systems. Without it, some code (typically self-modifying) might suffer from random SIGILL failures. Similar workaround exists for ARM64 architecture, added by commit 116c81f427ff ("arm64: Work around systems with mismatched cache line sizes"). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: I76e1cb24cde91dbfd5a16bd8d5dc97c7953767ff
2019-05-07gpu: drm: exynos: Add extcon notification for hdmi connectionsubmit/tizen/20190507.092632accepted/tizen/unified/20190508.111058Dongwoo Lee2-0/+48
Currently, hdmi connection generates only uevent by drm core. In addition, it has no information about connection state. But, Tizen starts TV-out behavior along with extcon uevent. To this end, this patch will add extcon notification for hdmi connection. Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com> [sw0312.kim: port to v4.14] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I20a2d13deff07e566ce4f50c7fc64600ce10ca9f
2019-04-26ARM: configs: tizen_odroid: enable squashfssubmit/tizen/20190426.054810accepted/tizen/unified/20190426.110522Seung-Woo Kim1-0/+4
Tizen web engine uses squashfs for its libraray update. Enable squashfs and related options. Change-Id: Id9a25c46642598d0927a4304f6813dbbd64f68b1 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-04-26arm64: configs: tizen_tm2_defconfig: enable squashfsSeung-Woo Kim1-0/+4
Tizen web engine uses squashfs for its libraray update. Enable squashfs and related options. Change-Id: Id2f7640cf6007b280bb6daef3c42484e8b4a04ef Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
2019-04-11clocksource/drivers/arm_arch_timer: Fix DEFINE_PER_CPU expansionMark Rutland1-2/+1
Our ctags mangling script can't handle newlines inside of a DEFINE_PER_CPU(), leading to an annoying message whenever tags are built: ctags: Warning: drivers/clocksource/arm_arch_timer.c:302: null expansion of name pattern "\1" This was dealt with elsewhere in commit: 25528213fe9f75f4 ("tags: Fix DEFINE_PER_CPU expansions") ... by ensuring each DEFINE_PER_CPU() was contained on a single line, even where this would violate the usual code style (checkpatch warnings and all). Let's do the same for the arch timer driver, and get rid of the distraction. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> [sw0312.kim: cherry-pick mainline commit a7fb4577bbe3 to resolve warning on ctags build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: Id79bac4d2450f30c21b50cdf0de1be7fb3b1bbec
2019-03-28soc: samsung: Split ASV drivers into ARM and ARM64 partssubmit/tizen/20190329.020226accepted/tizen/unified/20190330.030053Sylwester Nawrocki4-5/+37
This fixes build error with tizen_odroid_defconfig related to missing MTD symbols required by exynos5433-asv.c driver. The Exynos5433 ASV driver has dependency on MTD, to avoid inheriting this dependency by the Exynos5422 ASV driver split Exynos ASV drivers into ARM and ARM64 parts, similarly as it is done for the PMU. This also has an advantage that we don't need to include ARM ASV drivers on ARM64 SoCs and we can build only ARM ASV drivers for ARM SoCs. Change-Id: I3d647b784f936dcb535632e4ee15a7d571d7a131 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27arm64: configs: tizen_tm2_defconfig: Enable MTD_EXYNOS_OTPSylwester Nawrocki1-0/+2
Enable MTD_EXYNOS_OTP which is required for the ASV driver on Exynos5433. Change-Id: I6b176856405ea38c51436e73d5aa4df80c79f6b1 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27arm64: exynos: Enable ASV driver for ARCH_EXYNOSSylwester Nawrocki1-0/+1
Enable ASV driver for Exynos5433 SoC. Change-Id: I2870b83f909425356be2391ac5e534a773cd8db8 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27soc: samsung: Add ASV support for Exynos5433 SoCSylwester Nawrocki4-1/+529
This patch adds Adaptive Supply Voltage support or the Cortex A53 and the Cortex A57 clusters. There is no Adaptive Body Bias handling added yet. Change-Id: I07190bf3614428292594b42bb8a1fb60a7b3ae63 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27arm64: dts: Add Exynos5433 SoC OTP device nodeSylwester Nawrocki1-0/+9
Change-Id: I8bcd9955c3cff940150bff10da564c3b9f477952 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27arm64: dts: exynos: Update Exynos5433 CHIPID nodeSylwester Nawrocki1-2/+3
Extend the register region to also cover the ASV table region and add reg entries for the ABB registers region. Change-Id: I64704397a0cd12cb9a019b83f45fd23890da458b Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27mtd: Add exynos OTP memory driverSylwester Nawrocki3-0/+277
This patch adds driver for Exynos5433 OTP memory. Access to the OTP memory is required, among others, to support the Adaptive Supply Voltage feature. Partially based on code from Android SM-N910C_LL_Opensource kernel. Change-Id: If85363f1626d622f1559757eb06fd950e214e5ab Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27soc: samsung: chipid: Add ABB register region read helperSylwester Nawrocki2-3/+22
This patch adds helper functions for accessing the ABB block registers needed by the ASV driver. Change-Id: Ida2ea622136c1abea2caffaee00b5400a8efba7d Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27soc: samsung: chipid: Update DT bindings documentationSylwester Nawrocki1-3/+7
Document "samsung,exynos5433-chipid" compatible and add description of 'reg' property for Exynos5433. Change-Id: I9f22c76aabd46ea7aa31cfbecbb64131914e9938 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27soc: samsung: chipid: Add exynos_chipid_read_bits() functionSylwester Nawrocki2-0/+8
Add register read helper function needed by the ASV driver. Change-Id: I90ec78cff58ac7ff424a50309e83d37605e7cbc7 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27clk: samsung: Add CLK_IGNORE_UNUSED for Exynos5433 ABB, ASV_TB clocksSylwester Nawrocki1-2/+2
Prevent disabling these clocks by the kernel until proper support is added to the ASV driver. With current code this patch is not necessarily required, because exynos_asv_init() is being called before unused clocks get disabled by clk core. However, things may break when the timings change for any reason. This patch has been tested after changing initcall type in exynos-asv.c: -late_initcall(exynos_asv_init) +late_initcall_sync(exynos_asv_init) Change-Id: I513ff391bece219318020c0bcca07e2a7938a175 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27soc: samsung: asv: Print error code when adding an OPP failsSylwester Nawrocki1-2/+2
Log error code from devm_pm_opp_add() to make any errors easier to debug. Change-Id: If418320565f1efc14d16242d8b166bea07353c54 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-27soc: samsung: asv: Wait until OPP gets released before adding new oneSylwester Nawrocki1-0/+10
There is currently no check whether an OPP is actually removed before attempting to add an replacement OPP. In situations when and OPP is referenced when we try to remove it and it is not already removed at the time of return from the dev_pm_opp_remove() call subsequent dev_pm_opp_add() invocation will fail. To avoid that add a polling loop with timeout as a barrier before adding new OPP. This patch should also prevent related cpufreq core issues as indicated by logs as follows. exynos_asv_update_cpu_opp cpu4 opp5, freq: 2000 missing exynos5433_asv_opp_get_voltage: arm,cortex-a57: [6] freq: 1900, voltage: 1262500 -> 1187500 cpu cpu4: _opp_add: duplicate OPPs detected. Existing: freq: 1900000000, volt: 1262500, enabled: 1. New: freq: 1900000000, volt: 1187500, enabled: 1 exynos_asv_update_cpu_opp: Failed to add OPP 1900000000 Hz/1187500 uV for cpu4 (-17) cpu cpu4: dev_pm_opp_set_rate: failed to find OPP for freq 1900000000 (-34) exynos5433_asv_opp_get_voltage: arm,cortex-a57: [9] freq: 1600, voltage: 1137500 -> 1062500 cpufreq: __target_index: Failed to change cpu frequency: -34 Change-Id: Ibf6a568cabbd5380952d97f93d27ac59f1db125b Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-19drm/exynos/mixer: fix MIXER shadow registry synchronisation codeAndrzej Hajda1-44/+66
MIXER on Exynos5 SoCs uses different synchronisation method than Exynos4 to update internal state (shadow registers). Apparently the driver implements it incorrectly. The rule should be as follows: - do not request updating registers until previous request was finished, ie. MXR_CFG_LAYER_UPDATE_COUNT must be 0. - before setting registers synchronisation on VSYNC should be turned off, ie. MXR_STATUS_SYNC_ENABLE should be reset, - after finishing MXR_STATUS_SYNC_ENABLE should be set again. The patch hopefully implements it correctly. Below sample kernel log from page fault caused by the bug: [ 25.670038] exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0x2247b800 [ 25.677888] ------------[ cut here ]------------ [ 25.682164] kernel BUG at ../drivers/iommu/exynos-iommu.c:450! [ 25.687971] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM [ 25.693778] Modules linked in: [ 25.696816] CPU: 5 PID: 1553 Comm: fb-release_test Not tainted 5.0.0-rc7-01157-g5f86b1566bdd #136 [ 25.705646] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 25.711710] PC is at exynos_sysmmu_irq+0x1c0/0x264 [ 25.716470] LR is at lock_is_held_type+0x44/0x64 v2: added missing MXR_CFG_LAYER_UPDATE bit setting in mixer_enable_sync Reported-by: Marian Mihailescu <mihailescu2m@gmail.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Change-Id: Idd49412e699350a7ea3a98ef7f925924e0ddf1ff
2019-03-19drm/exynos/mixer: fix synchronization check in interlaced modeAndrzej Hajda2-0/+11
In case of interlace mode video processor registers and mixer config register must be check to ensure internal state is in sync with shadow registers. This patch fixes page-faults in interlaced mode. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> [backport of mainline commit 2eced8e917b060587fc8ed46df41c364957a5050] Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: I8b09ed165101a7dcccd1d6e7338e0216a27f4481
2019-03-19ARM: dts: exynos: Increase minimal ACLK400_DISP1 frequency on Exynos542xMarek Szyprowski1-1/+1
ACLK400_DISP1 bus feeds some internal buses of the display subsystem, some of which are also related to TV/Mixer hardware modules. When that bus is set to 120MHz, Exynos Mixer is not able to properly handle two XRGB display planes at FullHD-60MHz. DMA underrun happens, which in turn might result in reading data out of the configured buffer, what causes IOMMU page fault and kernel panic. This change fixes the following IOMMU fault, observed, when 2 Mixer planes were enabled: exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0x20fe9000 ------------[ cut here ]------------ kernel BUG at ../drivers/iommu/exynos-iommu.c:450! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Modules linked in: CPU: 5 PID: 0 Comm: swapper/5 Not tainted 5.0.0-00003-g1b03088168ea #149 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) PC is at exynos_sysmmu_irq+0x1c0/0x264 LR is at lock_is_held_type+0x44/0x64 ... Reported-by: Marian Mihailescu <mihailescu2m@gmail.com> Fixes: 5d99cc59a3c6 ("ARM: dts: exynos: Move Exynos5250 and Exynos5420 nodes under soc") Fixes: b04a62d3ade3 ("ARM: dts: exynos: Add bus nodes using VDD_INT for Exynos542x SoC") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: I3d2f341f5e89d4631401f653d0ad9e36f26f45ad
2019-03-12ASoC: samsung: odroid: Change rfs value to 256Jaechul Lee1-2/+5
rfs is set 256 as a default value in I2S module. Due to clock rate setting rounding errors with rfs=512 playback is almost twice faster than original speed when the device is opened with 44.1k samplerate. pulseaudio that uses 44.1k sinks can't play the sound properly. Change-Id: I21d5553e36dcbf00802230cf1c60f5fb7df1056d Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
2019-03-08ASoS: samsung: odroid: Fix clock configuration for 44100 sample rateSylwester Nawrocki1-2/+2
After commit fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample rate handling") due to clock rounding error CODEC master clock frequency is being set to 20070401 Hz instead of 22579000 Hz. This results in too fast actual sample rate for fs=44100, e.g. 2 kHz tone has really 3555 Hz frequency (2000 Hz * 20070401/22579000 * 2). Fix this by increasing correction passed to clk_set_rate() to take into account inaccuracy of EPLL frequency properly. Change-Id: I8d08bec8e70394421c115bde1d511b730885bbe2 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-04ARM: dts: exynos: Fix audio routing on exynos5422-odroidxu3Sylwester Nawrocki1-1/+2
Add missing audio routing entry for the capture stream, this change is required to fix audio recording on Odroid XU3. Change-Id: I8db68ab3e097a0f3cfd07224016e4704e57c6635 Fixes: 885b005d232c ("ARM: dts: exynos: Add support for secondary DAI to Odroid XU3") Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-04ASoC: samsung: i2s: Fix DAPM routes for capture streamSylwester Nawrocki1-1/+2
This patch sets missing stream_name of capture part of the DAI driver so we can define DAPM routing properly also for the capture stream. Fixes: 64aba9bca5bd ("ASoC: samsung: i2s: Add widgets and routes for DPCM support") Change-Id: I7ac244afcd74d92cf92da1d9d7d9606285ea0360 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
2019-03-04ARM: dts: exynos: Add support for secondary DAI to Odroid XU4Sylwester Nawrocki1-1/+3
This patch extends DAPM routing and adds secondary CPU DAI entry to support the secondary audio PCM interface on Odroid XU4. Change-Id: Id20d2a064f5d29c4edf349e9a968864a48a11b46 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2019-03-04ARM: dts: exynos: Add support for secondary DAI to Odroid XU3Sylwester Nawrocki1-2/+4
This patch extends DAPM routing and adds secondary CPU DAI entry to support the secondary audio PCM interface on Odroid XU3. Change-Id: I2efb8eca9418554482194a2c54aa6b6ca674d5c2 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2019-03-04LOCAL: ASoC: temporary workaround for i2s/prepare_lock deadlockMarek Szyprowski1-10/+10
This reverts commit 00ffa8a3b1a60a89ab0ef5ae1d8e41269c30a3bd. Change-Id: I396b1250a748fdb8219abf6d0bf71c5fab119658 Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2019-03-04ASoC: dmaengine: Remove unused SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flagSylwester Nawrocki2-21/+4
There is now no users of this flag so remove it together with related code. The chan_name field of snd_dmaengine_dai_dma_data data structure is not removed as it is still in use by the PXA platform. Change-Id: Ia8bb6022ce7c5e85abb7c5410459130666785f45 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: odroid: Prevent uninitialized variable useSylwester Nawrocki1-2/+6
This addresses an issue pointed out by compiler warning: sound/soc/samsung/odroid.c: In function ‘odroid_audio_probe’: sound/soc/samsung/odroid.c:298:22: warning: ‘cpu_dai’ may be used uninitialized in this function [-Wmaybe-uninitialized] priv->clk_i2s_bus = of_clk_get_by_name(cpu_dai, "iis"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I39c6dd0a1aa5ec68bfc17c895988c21a1a34733e Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: odroid: Fix of_node refcount unbalanceSylwester Nawrocki1-7/+12
In odroid_audio_probe() some OF nodes are left without reference count decrease after use. Fix it by ensuring required of_node_calls() are done before exiting probe. Change-Id: Ifbcb6294331acc59028e675d8ab1143394508d66 Reported-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: i2s: Fix multiple "IIS multi" devices initializationSylwester Nawrocki2-18/+34
On some SoCs (e.g. Exynos5433) there are multiple "IIS multi audio interfaces" and the driver will try to register there multiple times same platform device for the secondary FIFO, which of course fails miserably. To fix this we derive the secondary platform device name from the primary device name. The secondary device name will now be <primary_dev_name>-sec instead of fixed "samsung-i2s-sec". The fixed platform_device_id table entry is removed as the secondary device name is now dynamic and device/driver matching is done through driver_override. Change-Id: I49ed3e20279af198cdce11c08cc11bd6536dddad Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: i2s: Fix secondary platform device unregistrationSylwester Nawrocki1-9/+10
This fixes unregistration of the secondary platform device so all resources are properly released. Additionally the removal sequence is corrected so it is in reverse order comparing to probe sequence. The test against NULL priv->pdev_sec is removed as it is not necessary. Change-Id: If325e11b4109fbc61fbb2df3ac012f2c1e9f0cb5 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: odroid: Add missing DAPM routesSylwester Nawrocki1-1/+11
With old DTS there will be missing DAPM routes linking BE with CODECs. Add those routes in the card driver so sound works properly on Odroid XU3/4 also without DTS updates enabling the secondary PCM. Change-Id: I0a2a8e59859cdaf46da0563e30278dc9a8fe2376 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: odroid: Ensure proper sample rate on pri/sec PCMSylwester Nawrocki1-0/+56
Currently when playing sound with different sample rates actual sample rate will be determined by audio stream which starts first on either primary or secondary PCM. The audio root clock will be configured appropriately only for the first stream. As the hardware is limited to same sample rate on both interfaces we need to disallow streams with different sample rates. It is done by this patch by returning error in FE hw_params if there is already active stream running with different sample rate. Change-Id: I643d02d38acf20a7711ba5930e6bceceeaafc087 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: i2s: Prevent potential NULL platform data dereferenceSylwester Nawrocki1-12/+15
When np is NULL i2s_pdata could also be NULL but i2s_pdata is now being dereferenced without proper check. Fix this and shorten the error message so we don't exceed 80 characters limit. Change-Id: I5d5b14ff953d4a2617500f50e81eb459d56a6e4f Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: i2s: Convert to SPDX License IndentifierSylwester Nawrocki1-10/+6
Replace GPL v2.0 license statements with SPDX license identifier. Change-Id: Iaf0ae489d7d55dc949ba70e956afe3642cdfaeb4 Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-04ASoC: samsung: i2s: Comments clean upSylwester Nawrocki1-14/+15
Spelling error fixes, upper/lower case letter changes. Change-Id: Id1060cbb859c6da4480a0dd6f676a6614b64da8c Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>