]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: sifive: avoid declaring static variables in includes
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 16 Feb 2024 23:18:04 +0000 (00:18 +0100)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Tue, 10 Sep 2024 02:10:43 +0000 (10:10 +0800)
commit5896ac5766fdafb0ba087c16261e3dff792dbe3e
treea64174dadfcffc47e58b1762027c42229a324b57
parentf7fead89141e72558dd24bb7ac47aabb77fc4662
clk: sifive: avoid declaring static variables in includes

The existing code is unnecessarily convoluted:

Arrays __prci_init_clocks_fu[5|7]40  are initialized with data.
In separate includes fu[5|7]40-prci.h the size of the arrays is provided as
constants.

By moving the structures prci_clk_fu[5|7]40 to the respective code modules
we can directly use ARRAY_SIZE() to access the size of the data used for
initialization.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
drivers/clk/sifive/fu540-prci.c
drivers/clk/sifive/fu540-prci.h [deleted file]
drivers/clk/sifive/fu740-prci.c
drivers/clk/sifive/fu740-prci.h [deleted file]
drivers/clk/sifive/sifive-prci.c
drivers/clk/sifive/sifive-prci.h