[PATCH] clk: imx: Check the i.MX51 IIM clock before reading the revision
Krzysztof Kozlowski
krzk at kernel.org
Sun Nov 29 18:11:49 PST 2026
On Sun, 29 Nov 2026 19:25:33 +0000, Jiawen Liu wrote:
> During i.MX51 device-tree boot, mx51_clocks_init() enables the IIM
> clock to read the silicon revision. If IIM gate registration fails,
> clk_prepare() dereferences the error pointer and can fault during boot.
> If preparing or enabling a valid clock fails, the code still reads the
> IIM register and releases a clock reference it never acquired.
>
> Check the clock handle and cache the revision only after a successful
> enable. Release the clock after the read. On clock failure, leave the
> revision unknown and continue CCM and UART initialization. Make the late
> NEON fixup use the cached revision and disable NEON when the revision
> is unknown.
>
> Verification included source and
> ARM object inspection, targeted ARM builds with CONFIG_NEON enabled
> and disabled, git diff --check, and checkpatch. Runtime and hardware
> reproduction were not performed.
>
> Fixes: b8d4176fa59e ("ARM i.MX5: implement clocks using common clock framework")
> Signed-off-by: Jiawen Liu <liu1298662399 at gmail.com>
> ---
> arch/arm/mach-imx/cpu-imx5.c | 41 ++++++++++++++++++++++++++----------
> drivers/clk/imx/clk-imx5.c | 3 +--
> include/soc/imx/revision.h | 3 +++
> 3 files changed, 34 insertions(+), 13 deletions(-)
>
You sent multiple independent patches, to multiple independent
subsystems. The amount of these patches clearly suggest this was
AI generated and most likely not tested.
More importantly, you sent all this work without properly organizing
relevant patches into patchsets. This makes reviewing difficult
and might cause multiple reviewers to address the same issue.
Replying to the entire set is impossible and requires handling each
patch independently, instead of applying or discarding the set.
Maintainers also won't see the bigger picture of your work. Quite
worrying.
Please read kernel documentation BEFORE posting more work. It will
explain you how to identify subsystems, how to organize your work per
subsystem (so a patchset grouping multiple patches with a short cover
letter), how to document the issue discovery method and what was
or was not tested.
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list