]> git.ipfire.org Git - thirdparty/u-boot.git/commit
Merge patch series "clk: mediatek: implement of_xlate and dump"
authorTom Rini <trini@konsulko.com>
Mon, 12 Jan 2026 19:17:00 +0000 (13:17 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 12 Jan 2026 19:17:00 +0000 (13:17 -0600)
commit8cfb0ad1a0cce40ad68b5bd94bbaddeded56eb07
tree4fdc01a545e1f6a8c57d46511cf03c562d9aa3cb
parent1bcb2fe324180d0a8cfbdb0511737eba1d5b8550
parentc8ebe42b3f5f753f2c84266e289a31e85e257110
Merge patch series "clk: mediatek: implement of_xlate and dump"

David Lechner <dlechner@baylibre.com> says:

I started looking into fixing some bugs in the mt8365 clock driver and
realized that there was no way to inspect or debug the clock trees.

I set out to implement the dump function to help with this. The driver
architecture didn't make this easy since there was no way to know the
number of elements in each of the clock arrays. The first few patches
in this series are adding fields to the data structures to hold this
information.

Once that was fixed, I was still getting crashes due to other bugs. To
work around this, I implemented the of_xlate function to validate clk
IDs as early as possible and return errors instead of crashing when
requested IDs are invalid. This also makes use of the new size fields
to prevent out of bounds array accesses. There are a couple of drivers
that remap IDs, so there are a few extra patches to handle that as well.

Then finally, I was able to implement the dump function to print out the
clock tree information without crashing. In the v1 cover letter, there
is an example of the output (it is quite long and doesn't need to be
repeated here).

Link: https://lore.kernel.org/r/20260107-clk-mtk-improvements-v2-0-7d4338e520a1@baylibre.com