<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/clk/samsung, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-01-18T10:41:12Z</updated>
<entry>
<title>clk: samsung: Fix memory leak in _samsung_clk_register_pll()</title>
<updated>2023-01-18T10:41:12Z</updated>
<author>
<name>Xiu Jianfeng</name>
</author>
<published>2022-11-23T03:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a00b4e0fa27317957536abf8f5d6a96d6cb9d9be'/>
<id>urn:sha1:a00b4e0fa27317957536abf8f5d6a96d6cb9d9be</id>
<content type='text'>
[ Upstream commit 5174e5b0d1b669a489524192b6adcbb3c54ebc72 ]

If clk_register() fails, @pll-&gt;rate_table may have allocated memory by
kmemdup(), so it needs to be freed, otherwise will cause memory leak
issue, this patch fixes it.

Fixes: 3ff6e0d8d64d ("clk: samsung: Add support to register rate_table for samsung plls")
Signed-off-by: Xiu Jianfeng &lt;xiujianfeng@huawei.com&gt;
Link: https://lore.kernel.org/r/20221123032015.63980-1-xiujianfeng@huawei.com
Reviewed-by: Alim Akhtar &lt;alim.akhtar@samsung.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: exynos7: Mark aclk_fsys1_200 as critical</title>
<updated>2021-05-19T08:08:33Z</updated>
<author>
<name>Paweł Chmiel</name>
</author>
<published>2020-10-24T15:43:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa9d659856b170e042ab428c08e2bd5e6c232181'/>
<id>urn:sha1:aa9d659856b170e042ab428c08e2bd5e6c232181</id>
<content type='text'>
commit 34138a59b92c1a30649a18ec442d2e61f3bc34dd upstream.

This clock must be always enabled to allow access to any registers in
fsys1 CMU. Until proper solution based on runtime PM is applied
(similar to what was done for Exynos5433), mark that clock as critical
so it won't be disabled.

It was observed on Samsung Galaxy S6 device (based on Exynos7420), where
UFS module is probed before pmic used to power that device.
In this case defer probe was happening and that clock was disabled by
UFS driver, causing whole boot to hang on next CMU access.

Fixes: 753195a749a6 ("clk: samsung: exynos7: Correct CMU_FSYS1 clocks names")
Signed-off-by: Paweł Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Link: https://lore.kernel.org/linux-clk/20201024154346.9589-1-pawel.mikolaj.chmiel@gmail.com
[s.nawrocki: Added comment in the code]
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED</title>
<updated>2020-10-07T06:01:28Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2020-09-22T12:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08e66c0c1c0e3e2ca65b8fb1e609105b0b991302'/>
<id>urn:sha1:08e66c0c1c0e3e2ca65b8fb1e609105b0b991302</id>
<content type='text'>
[ Upstream commit f3bb0f796f5ffe32f0fbdce5b1b12eb85511158f ]

The ChipID IO region has it's own clock, which is being disabled while
scanning for unused clocks. It turned out that some CPU hotplug, CPU idle
or even SOC firmware code depends on the reads from that area. Fix the
mysterious hang caused by entering deep CPU idle state by ignoring the
'chipid' clock during unused clocks scan, as there are no direct clients
for it which will keep it enabled.

Fixes: e062b571777f ("clk: exynos4: register clocks using common clock framework")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Link: https://lore.kernel.org/r/20200922124046.10496-1-m.szyprowski@samsung.com
Reviewed-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: samsung: exynos5433: Add IGNORE_UNUSED flag to sclk_i2s1</title>
<updated>2020-06-24T15:50:30Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2020-05-19T10:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7d95cb8a4073bb27eceeacd704fb41f3f32bff29'/>
<id>urn:sha1:7d95cb8a4073bb27eceeacd704fb41f3f32bff29</id>
<content type='text'>
[ Upstream commit 25bdae0f1c6609ceaf55fe6700654f0be2253d8e ]

Mark the SCLK clock for Exynos5433 I2S1 device with IGNORE_UNUSED flag to
match its behaviour with SCLK clock for AUD_I2S (I2S0) device until
a proper fix for Exynos I2S driver is ready.

This fixes the following synchronous abort issue revealed by the probe
order change caused by the commit 93d2e4322aa7 ("of: platform: Batch
fwnode parsing when adding all top level devices")

Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 50 Comm: kworker/0:1 Not tainted 5.7.0-rc5+ #701
Hardware name: Samsung TM2E board (DT)
Workqueue: events deferred_probe_work_func
pstate: 60000005 (nZCv daif -PAN -UAO)
pc : samsung_i2s_probe+0x768/0x8f0
lr : samsung_i2s_probe+0x688/0x8f0
...
Call trace:
 samsung_i2s_probe+0x768/0x8f0
 platform_drv_probe+0x50/0xa8
 really_probe+0x108/0x370
 driver_probe_device+0x54/0xb8
 __device_attach_driver+0x90/0xc0
 bus_for_each_drv+0x70/0xc8
 __device_attach+0xdc/0x140
 device_initial_probe+0x10/0x18
 bus_probe_device+0x94/0xa0
 deferred_probe_work_func+0x70/0xa8
 process_one_work+0x2a8/0x718
 worker_thread+0x48/0x470
 kthread+0x134/0x160
 ret_from_fork+0x10/0x1c
Code: 17ffffaf d503201f f94086c0 91003000 (88dffc00)
---[ end trace ccf721c9400ddbd6 ]---

Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: samsung: Mark top ISP and CAM clocks on Exynos542x as critical</title>
<updated>2020-06-24T15:50:13Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2020-05-06T13:26:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc9024f69ba7811293bd403f34e1a4d5b5807fd0'/>
<id>urn:sha1:cc9024f69ba7811293bd403f34e1a4d5b5807fd0</id>
<content type='text'>
[ Upstream commit e47bd937e602bb4379546095d1bd0b9871fa60c2 ]

The TOP 'aclk*_isp', 'aclk550_cam', 'gscl_wa' and 'gscl_wb' clocks must
be kept enabled all the time to allow proper access to power management
control for the ISP and CAM power domains. The last two clocks, although
related to GScaler device and GSCL power domain, provides also the
I_WRAP_CLK signal to MIPI CSIS0/1 devices, which are a part of CAM power
domain and are needed for proper power on/off sequence.

Currently there are no drivers for the devices, which are part of CAM and
ISP power domains yet. This patch only fixes the race between disabling
the unused power domains and disabling unused clocks, which randomly
resulted in the following error during boot:

Power domain CAM disable failed
Power domain ISP disable failed

Fixes: 318fa46cc60d ("clk/samsung: exynos542x: mark some clocks as critical")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: samsung: exynos5420: Keep top G3D clocks enabled</title>
<updated>2020-01-23T07:22:39Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2019-12-16T13:14:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0ac15bd2cff0b12ac80f62606d89e36cda3d18f'/>
<id>urn:sha1:b0ac15bd2cff0b12ac80f62606d89e36cda3d18f</id>
<content type='text'>
commit 67f96ff7c8f073648696eab50fd23ded23441067 upstream.

In Exynos542x/5800 SoCs, the G3D leaf clocks are located in the G3D power
domain. This is similar to the other hardware modules and their power
domains. However there is one thing specific to G3D clocks hierarchy.
Unlike other hardware modules, the G3D clocks hierarchy doesn't have any
gate clock between the TOP part of the hierarchy and the part located in
the power domain and some SoC internal busses are sourced directly from
the TOP muxes. The consequence of this design if the fact that the TOP
part of the hierarchy has to be enabled permanently to ensure proper
operation of the SoC power related components (G3D power domain and
Exynos Power Management Unit for system suspend/resume).

This patch adds an explicit call to clk_prepare_enable() on the last MUX
in the TOP part of G3D clock hierarchy to keep it enabled permanently to
ensure that the internal busses get their clock regardless of the main
G3D clock enablement status.

This fixes following imprecise abort issue observed on Odroid XU3/XU4
after enabling Panfrost driver by commit 1a5a85c56402 "ARM: dts: exynos:
Add Mali/GPU node on Exynos5420 and enable it on Odroid XU3/4"):

panfrost 11800000.gpu: clock rate = 400000000
panfrost 11800000.gpu: failed to get regulator: -517
panfrost 11800000.gpu: regulator init failed -517
Power domain G3D disable failed
...
panfrost 11800000.gpu: clock rate = 400000000
8&lt;--- cut here ---
Unhandled fault: imprecise external abort (0x1406) at 0x00000000
pgd = (ptrval)
[00000000] *pgd=00000000
Internal error: : 1406 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 7 PID: 53 Comm: kworker/7:1 Not tainted 5.4.0-rc8-next-20191119-00032-g56f1001191a6 #6923
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events deferred_probe_work_func
PC is at panfrost_gpu_soft_reset+0x94/0x110
LR is at ___might_sleep+0x128/0x2dc
...
[&lt;c05c231c&gt;] (panfrost_gpu_soft_reset) from [&lt;c05c2704&gt;] (panfrost_gpu_init+0x10/0x67c)
[&lt;c05c2704&gt;] (panfrost_gpu_init) from [&lt;c05c15d0&gt;] (panfrost_device_init+0x158/0x2cc)
[&lt;c05c15d0&gt;] (panfrost_device_init) from [&lt;c05c0cb0&gt;] (panfrost_probe+0x80/0x178)
[&lt;c05c0cb0&gt;] (panfrost_probe) from [&lt;c05cfaa0&gt;] (platform_drv_probe+0x48/0x9c)
[&lt;c05cfaa0&gt;] (platform_drv_probe) from [&lt;c05cd20c&gt;] (really_probe+0x1c4/0x474)
[&lt;c05cd20c&gt;] (really_probe) from [&lt;c05cd694&gt;] (driver_probe_device+0x78/0x1bc)
[&lt;c05cd694&gt;] (driver_probe_device) from [&lt;c05cb374&gt;] (bus_for_each_drv+0x74/0xb8)
[&lt;c05cb374&gt;] (bus_for_each_drv) from [&lt;c05ccfa8&gt;] (__device_attach+0xd4/0x16c)
[&lt;c05ccfa8&gt;] (__device_attach) from [&lt;c05cc110&gt;] (bus_probe_device+0x88/0x90)
[&lt;c05cc110&gt;] (bus_probe_device) from [&lt;c05cc634&gt;] (deferred_probe_work_func+0x4c/0xd0)
[&lt;c05cc634&gt;] (deferred_probe_work_func) from [&lt;c0149df0&gt;] (process_one_work+0x300/0x864)
[&lt;c0149df0&gt;] (process_one_work) from [&lt;c014a3ac&gt;] (worker_thread+0x58/0x5a0)
[&lt;c014a3ac&gt;] (worker_thread) from [&lt;c0151174&gt;] (kthread+0x12c/0x160)
[&lt;c0151174&gt;] (kthread) from [&lt;c01010b4&gt;] (ret_from_fork+0x14/0x20)
Exception stack(0xee03dfb0 to 0xee03dff8)
...
Code: e594300c e5933020 e3130c01 1a00000f (ebefff50).
---[ end trace badde2b74a65a540 ]---

In the above case, the Panfrost driver disables G3D clocks after failure
of getting the needed regulator and return with -EPROVE_DEFER code. This
causes G3D power domain disable failure and then, during second probe
an imprecise abort is triggered due to undefined power domain state.

Fixes: 45f10dabb56b ("clk: samsung: exynos5420: Add SET_RATE_PARENT flag to clocks on G3D path")
Fixes: c9f7567aff31 ("clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Link: https://lkml.kernel.org/r/20191216131407.17225-1-m.szyprowski@samsung.com
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Acked-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>clk: samsung: exynos5420: Preserve CPU clocks configuration during suspend/resume</title>
<updated>2020-01-17T18:48:49Z</updated>
<author>
<name>Marian Mihailescu</name>
</author>
<published>2019-10-29T00:50:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=27c65c1e4eed7cdb79de3c366e42548506e8f454'/>
<id>urn:sha1:27c65c1e4eed7cdb79de3c366e42548506e8f454</id>
<content type='text'>
commit e21be0d1d7bd7f78a77613f6bcb6965e72b22fc1 upstream.

Save and restore top PLL related configuration registers for big (APLL)
and LITTLE (KPLL) cores during suspend/resume cycle. So far, CPU clocks
were reset to default values after suspend/resume cycle and performance
after system resume was affected when performance governor has been selected.

Fixes: 773424326b51 ("clk: samsung: exynos5420: add more registers to restore list")
Signed-off-by: Marian Mihailescu &lt;mihailescu2m@gmail.com&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>clk: samsung: exynos5420: Preserve PLL configuration during suspend/resume</title>
<updated>2019-10-25T09:20:00Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2019-10-25T09:02:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9323b664ce29547d996195e8a6129a351c39108'/>
<id>urn:sha1:e9323b664ce29547d996195e8a6129a351c39108</id>
<content type='text'>
Properly save and restore all top PLL related configuration registers
during suspend/resume cycle. So far driver only handled EPLL and RPLL
clocks, all other were reset to default values after suspend/resume cycle.
This caused for example lower G3D (MALI Panfrost) performance after system
resume, even if performance governor has been selected.

Reported-by: Reported-by: Marian Mihailescu &lt;mihailescu2m@gmail.com&gt;
Fixes: 773424326b51 ("clk: samsung: exynos5420: add more registers to restore list")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
</content>
</entry>
<entry>
<title>clk: samsung: exynos542x: Move G3D subsystem clocks to its sub-CMU</title>
<updated>2019-10-23T16:26:21Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2019-10-23T07:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9f7567aff31348a3dcf54845f7e389f5df0c0c1'/>
<id>urn:sha1:c9f7567aff31348a3dcf54845f7e389f5df0c0c1</id>
<content type='text'>
G3D clocks require special handling of their parent bus clock during power
domain on/off sequences. Those clocks were not initially added to the
sub-CMU handler, because that time there was no open-source driver for the
G3D (MALI Panfrost) hardware module and it was not possible to test it.

This patch fixes this issue. Parent clock for G3D hardware block is now
properly preserved during G3D power domain on/off sequence. This restores
proper MALI Panfrost performance broken by commit 8686764fc071
("ARM: dts: exynos: Add G3D power domain to Exynos542x").

Reported-by: Marian Mihailescu &lt;mihailescu2m@gmail.com&gt;
Fixes: b06a532bf1fa ("clk: samsung: Add Exynos5 sub-CMU clock driver")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marian Mihailescu &lt;mihailescu2m@gmail.com&gt;
Acked-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
</content>
</entry>
<entry>
<title>clk: samsung: exynos5433: Fix error paths</title>
<updated>2019-10-23T16:23:28Z</updated>
<author>
<name>Marek Szyprowski</name>
</author>
<published>2019-10-02T08:53:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=faac3604d05e8015567124e5ee79edc3f1568a89'/>
<id>urn:sha1:faac3604d05e8015567124e5ee79edc3f1568a89</id>
<content type='text'>
Add checking the value returned by samsung_clk_alloc_reg_dump() and
devm_kcalloc(). While fixing this, also release all gathered clocks.

Fixes: 523d3de41f02 ("clk: samsung: exynos5433: Add support for runtime PM")
Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
[s.nawrocki: squashed patch from K. Kozlowski adding missing slab.h header]
Reported-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Sylwester Nawrocki &lt;s.nawrocki@samsung.com&gt;
</content>
</entry>
</feed>
