diff options
| author | David Carlier <devnexen@gmail.com> | 2026-06-18 05:50:30 +0100 |
|---|---|---|
| committer | Brian Masney <bmasney@redhat.com> | 2026-06-29 13:08:40 -0400 |
| commit | 804bac4a2654ac69e328d68e1961eb984fb18a01 (patch) | |
| tree | db320126ec4e33d8efb4fc908bca95bf9a0609e1 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | d4873b9181345f089d4bdd0019e5744567a755f0 (diff) | |
clk: canaan: Clear rate fields before reprogramming dividers
The rate set_rate helpers perform a read-modify-write on the divider
and multiplier registers but only ever OR the new value in, without
first masking off the existing field. The first write after reset lands
on a zeroed field and looks correct, but any later reprogramming leaves
the old bits set: the field becomes the bitwise OR of the previous and
new encodings, corrupting the divider or multiplier.
Mask off each field before writing the new value so reprogramming a
clock to a different rate produces the intended register contents.
Fixes: a7b7c7c6c016 ("clk: canaan: Add clock driver for Canaan K230")
Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Acked-by: Xukai Wang <kingxukai@zohomail.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions
