summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRalph Siemsen <ralph.siemsen@linaro.org>2023-03-01 16:55:20 -0500
committerGeert Uytterhoeven <geert+renesas@glider.be>2023-03-10 17:09:00 +0100
commit1ef48138f90785ba7091fb8fa317039cd3cf9494 (patch)
tree47fb444e2f1939c2a143ca871a13341bd19779b7 /lib
parent5a5ca2c758c200663fdf5c04f71796a8f300151a (diff)
downloadlinux-stable-1ef48138f90785ba7091fb8fa317039cd3cf9494.tar.gz
linux-stable-1ef48138f90785ba7091fb8fa317039cd3cf9494.tar.bz2
linux-stable-1ef48138f90785ba7091fb8fa317039cd3cf9494.zip
clk: renesas: r9a06g032: Improve clock tables
Each entry in the clock table specifies a number of individual bits in registers, for contolling clock reset, gaiting, etc. These reg/bit were packed into a u16 to save space. The combined value is difficult to understand when reviewing the clock table entries. Introduce a "struct regbit" which still occupies only 16 bits, but allows the register and bit values to be specified explicitly. Convert all previous uses of u16 for reg/bit into "struct regbit". The bulk of this patch converts the clock table to use struct regbit, making use of the RB() helper macro. The conversion was automated by script, and as a further verification, the compiled binary of the table was compared before/after the change (with objdump -D). The clk_rdesc_set() function now checks for zero reg/bit internally. This allows callers of that function to remove those checks. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20230301215520.828455-5-ralph.siemsen@linaro.org Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions