<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/clk/spacemit, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2026-02-26T23:01:19Z</updated>
<entry>
<title>clk: spacemit: Respect Kconfig setting when building modules</title>
<updated>2026-02-26T23:01:19Z</updated>
<author>
<name>Inochi Amaoto</name>
</author>
<published>2025-12-19T01:28:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03c63f97bb1c8b7b9a22ffa563349db9f52b621d'/>
<id>urn:sha1:03c63f97bb1c8b7b9a22ffa563349db9f52b621d</id>
<content type='text'>
[ Upstream commit 5ec8cbbc54c82c0bdae4dbf0e5aecf9817bde2b9 ]

Currently, the SPACEMIT_CCU entry is only a switch for enabling entry
SPACEMIT_K1_CCU. It does not guide the build for common clock codes
even if it is a tristate entry. This makes this entry useless.

Change the Makefile to add a separate build for common clock logic,
so the SPACEMIT_CCU entry takes effect, also add necessary
MODULE_LICENSE()/MODULE_DESCRIPTION()/EXPORT_SYMBOL() for the module
build.

Fixes: 1b72c59db0ad ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Signed-off-by: Inochi Amaoto &lt;inochiama@gmail.com&gt;
Reviewed-by: Yixun Lan &lt;dlan@gentoo.org&gt;
Link: https://lore.kernel.org/r/20251219012819.440972-2-inochiama@gmail.com
Signed-off-by: Yixun Lan &lt;dlan@gentoo.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: Set clk_hw_onecell_data::num before using flex array</title>
<updated>2025-11-21T03:02:16Z</updated>
<author>
<name>Charles Mirabile</name>
</author>
<published>2025-11-17T19:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=23b2d2fb136959fd0a8e309c70be83d9b8841c7e'/>
<id>urn:sha1:23b2d2fb136959fd0a8e309c70be83d9b8841c7e</id>
<content type='text'>
When booting with KASAN enabled the following splat is
encountered during probe of the k1 clock driver:

UBSAN: array-index-out-of-bounds in drivers/clk/spacemit/ccu-k1.c:1044:16
index 0 is out of range for type 'clk_hw *[*]'
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.18.0-rc5+ #1 PREEMPT(lazy)
Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2022.10spacemit 10/01/2022
Call Trace:
[&lt;ffffffff8002b628&gt;] dump_backtrace+0x28/0x38
[&lt;ffffffff800027d2&gt;] show_stack+0x3a/0x50
[&lt;ffffffff800220c2&gt;] dump_stack_lvl+0x5a/0x80
[&lt;ffffffff80022100&gt;] dump_stack+0x18/0x20
[&lt;ffffffff800164b8&gt;] ubsan_epilogue+0x10/0x48
[&lt;ffffffff8099034e&gt;] __ubsan_handle_out_of_bounds+0xa6/0xa8
[&lt;ffffffff80acbfa6&gt;] k1_ccu_probe+0x37e/0x420
[&lt;ffffffff80b79e6e&gt;] platform_probe+0x56/0x98
[&lt;ffffffff80b76a7e&gt;] really_probe+0x9e/0x350
[&lt;ffffffff80b76db0&gt;] __driver_probe_device+0x80/0x138
[&lt;ffffffff80b76f52&gt;] driver_probe_device+0x3a/0xd0
[&lt;ffffffff80b771c4&gt;] __driver_attach+0xac/0x1b8
[&lt;ffffffff80b742fc&gt;] bus_for_each_dev+0x6c/0xc8
[&lt;ffffffff80b76296&gt;] driver_attach+0x26/0x38
[&lt;ffffffff80b759ae&gt;] bus_add_driver+0x13e/0x268
[&lt;ffffffff80b7836a&gt;] driver_register+0x52/0x100
[&lt;ffffffff80b79a78&gt;] __platform_driver_register+0x28/0x38
[&lt;ffffffff814585da&gt;] k1_ccu_driver_init+0x22/0x38
[&lt;ffffffff80023a8a&gt;] do_one_initcall+0x62/0x2a0
[&lt;ffffffff81401c60&gt;] do_initcalls+0x170/0x1a8
[&lt;ffffffff81401e7a&gt;] kernel_init_freeable+0x16a/0x1e0
[&lt;ffffffff811f7534&gt;] kernel_init+0x2c/0x180
[&lt;ffffffff80025f56&gt;] ret_from_fork_kernel+0x16/0x1d8
[&lt;ffffffff81205336&gt;] ret_from_fork_kernel_asm+0x16/0x18
---[ end trace ]---

This is bogus and is simply a result of KASAN consulting the
`.num` member of the struct for bounds information (as it should
due to `__counted_by`) and finding 0 set by kzalloc() because it
has not been initialized before the loop that fills in the array.
The easy fix is to just move the line that sets `num` to before
the loop that fills the array so that KASAN has the information
it needs to accurately conclude that the access is valid.

Fixes: 1b72c59db0add ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Tested-by: Yanko Kaneti &lt;yaneti@declera.com&gt;
Signed-off-by: Charles Mirabile &lt;cmirabil@redhat.com&gt;
Reviewed-by: Alex Elder &lt;elder@riscstar.com&gt;
Reviewed-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Reviewed-by: Yixun Lan &lt;dlan@gentoo.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: fix comment typo</title>
<updated>2025-11-14T02:19:51Z</updated>
<author>
<name>Encrow Thorne</name>
</author>
<published>2025-11-11T15:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e12d91cbf3d0105fc58d07b8a0548ebd7bb619b'/>
<id>urn:sha1:2e12d91cbf3d0105fc58d07b8a0548ebd7bb619b</id>
<content type='text'>
Fix incorrect comment to match the filename.

Reviewd-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Signed-off-by: Encrow Thorne &lt;jyc0019@gmail.com&gt;
Reviewed-by: Yixun Lan &lt;dlan@gentoo.org&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: fix i2s clock</title>
<updated>2025-09-20T05:54:46Z</updated>
<author>
<name>Troy Mitchell</name>
</author>
<published>2025-09-11T03:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=519cff1d85694cbdf33b27591740e7e37348e6b4'/>
<id>urn:sha1:519cff1d85694cbdf33b27591740e7e37348e6b4</id>
<content type='text'>
Defining i2s_bclk and i2s_sysclk as fixed-rate clocks is insufficient
for real I2S use cases.

Moreover, the current I2S clock configuration does not work as expected
due to missing parent clocks.

This patch adds the missing parent clocks, defines i2s_sysclk as
a DDN clock, and i2s_bclk as a DIV clock.

A special note for i2s_bclk:

From the register definition, the i2s_bclk divider always implies
an additional 1/2 factor.

The following table shows the correspondence between index
and frequency division coefficients:

| index |  div  |
|-------|-------|
|   0   |   2   |
|   1   |   4   |
|   2   |   6   |
|   3   |   8   |

From a software perspective, introducing i2s_bclk_factor as the
parent of i2s_bclk is sufficient to address the issue.

The I2S-related clock registers can be found here [1].

Link:
https://developer.spacemit.com/documentation?token=LCrKwWDasiJuROkVNusc2pWTnEb
[1]

Fixes: 1b72c59db0add ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Co-developer: Jinmei Wei &lt;weijinmei@linux.spacemit.com&gt;
Suggested-by: Haylen Chu &lt;heylenay@4d2.org&gt;
Signed-off-by: Jinmei Wei &lt;weijinmei@linux.spacemit.com&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: introduce pre-div for ddn clock</title>
<updated>2025-09-20T05:54:44Z</updated>
<author>
<name>Troy Mitchell</name>
</author>
<published>2025-09-11T03:34:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74246a820c817f195f6191e370c3df98d2df5d91'/>
<id>urn:sha1:74246a820c817f195f6191e370c3df98d2df5d91</id>
<content type='text'>
The original DDN operations applied an implicit divide-by-2, which should
not be a default behavior.

This patch removes that assumption, letting each clock define its
actual behavior explicitly.

Reviewed-by: Haylen Chu &lt;heylenay@4d2.org&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: ccu_pll: convert from round_rate() to determine_rate()</title>
<updated>2025-08-25T22:07:45Z</updated>
<author>
<name>Brian Masney</name>
</author>
<published>2025-08-11T15:18:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d02c71cba7bba453d233a49497412ddbf2d44871'/>
<id>urn:sha1:d02c71cba7bba453d233a49497412ddbf2d44871</id>
<content type='text'>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney &lt;bmasney@redhat.com&gt;
Reviewed-by: Haylen Chu &lt;heylenay@4d2.org&gt;
Reviewed-by: Yixun Lan &lt;dlan@kernel.org&gt;
Link: https://lore.kernel.org/r/20250811-clk-for-stephen-round-rate-v1-51-b3bf97b038dc@redhat.com
Signed-off-by: Yixun Lan &lt;dlan@gentoo.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: ccu_mix: convert from round_rate() to determine_rate()</title>
<updated>2025-08-25T22:07:41Z</updated>
<author>
<name>Brian Masney</name>
</author>
<published>2025-08-11T15:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56737edda7db58549550776092da12fe03600399'/>
<id>urn:sha1:56737edda7db58549550776092da12fe03600399</id>
<content type='text'>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney &lt;bmasney@redhat.com&gt;
Reviewed-by: Haylen Chu &lt;heylenay@4d2.org&gt;
Reviewed-by: Yixun Lan &lt;dlan@kernel.org&gt;
Link: https://lore.kernel.org/r/20250811-clk-for-stephen-round-rate-v1-50-b3bf97b038dc@redhat.com
Signed-off-by: Yixun Lan &lt;dlan@gentoo.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: ccu_ddn: convert from round_rate() to determine_rate()</title>
<updated>2025-08-25T22:07:38Z</updated>
<author>
<name>Brian Masney</name>
</author>
<published>2025-08-11T15:18:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4a7b0d2c4485d11d37dec721709660f3967efcf'/>
<id>urn:sha1:b4a7b0d2c4485d11d37dec721709660f3967efcf</id>
<content type='text'>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney &lt;bmasney@redhat.com&gt;
Reviewed-by: Haylen Chu &lt;heylenay@4d2.org&gt;
Reviewed-by: Yixun Lan &lt;dlan@kernel.org&gt;
Link: https://lore.kernel.org/r/20250811-clk-for-stephen-round-rate-v1-49-b3bf97b038dc@redhat.com
Signed-off-by: Yixun Lan &lt;dlan@gentoo.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: fix sspax_clk</title>
<updated>2025-08-24T07:42:31Z</updated>
<author>
<name>Troy Mitchell</name>
</author>
<published>2025-08-11T13:40:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c536e00d58dc8db3e1e430a8e6830bc22d2a38e3'/>
<id>urn:sha1:c536e00d58dc8db3e1e430a8e6830bc22d2a38e3</id>
<content type='text'>
Hardware Requirement:

BIT[3] of this register must be set if need to select i2s_bclk as
SSPA parent clock, to solve this, introduces a new SSPAx_I2S_BCLK
clock as the virtual gate clock.

Fixes: 1b72c59db0add ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Suggested-by: Yao Zi &lt;ziyao@disroot.org&gt;
Reviewed-by: Haylen Chu &lt;heylenay@4d2.org&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Link: https://lore.kernel.org/r/20250811-k1-clk-i2s-v5-2-ebadd06e1e91@linux.spacemit.com
Signed-off-by: Yixun Lan &lt;dlan@gentoo.org&gt;
</content>
</entry>
<entry>
<title>clk: spacemit: ccu_pll: fix error return value in recalc_rate callback</title>
<updated>2025-07-25T02:36:15Z</updated>
<author>
<name>Akhilesh Patil</name>
</author>
<published>2025-07-23T05:29:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c60b95389d0206a3a3c087c09113315e7084be3f'/>
<id>urn:sha1:c60b95389d0206a3a3c087c09113315e7084be3f</id>
<content type='text'>
Return 0 instead of -EINVAL if function ccu_pll_recalc_rate() fails to
get correct rate entry. Follow .recalc_rate callback documentation
as mentioned in include/linux/clk-provider.h for error return value.

Signed-off-by: Akhilesh Patil &lt;akhilesh@ee.iitb.ac.in&gt;
Fixes: 1b72c59db0add ("clk: spacemit: Add clock support for SpacemiT K1 SoC")
Reviewed-by: Haylen Chu &lt;heylenay@4d2.org&gt;
Reviewed-by: Alex Elder &lt;elder@riscstar.com&gt;
Link: https://lore.kernel.org/r/aIBzVClNQOBrjIFG@bhairav-test.ee.iitb.ac.in
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
</content>
</entry>
</feed>
