Commit 23029150 authored by Elaine Zhang's avatar Elaine Zhang Committed by Heiko Stuebner

clk: rockchip: Optimize PLL table memory usage

Before the change: The sizeof rk3568_pll_rates = 2544
Use union: The sizeof rk3568_pll_rates = 1696

In future Soc, more PLL types will be added, and the
rockchip_pll_rate_table will add more members,
and the space savings will be even more pronounced
by using union.
Signed-off-by: default avatarElaine Zhang <zhangqing@rock-chips.com>
Link: https://lore.kernel.org/r/20210511090726.15146-1-zhangqing@rock-chips.comSigned-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
parent 6efb943b
...@@ -271,17 +271,24 @@ struct rockchip_clk_provider { ...@@ -271,17 +271,24 @@ struct rockchip_clk_provider {
struct rockchip_pll_rate_table { struct rockchip_pll_rate_table {
unsigned long rate; unsigned long rate;
unsigned int nr; union {
unsigned int nf; struct {
unsigned int no; /* for RK3066 */
unsigned int nb; unsigned int nr;
/* for RK3036/RK3399 */ unsigned int nf;
unsigned int fbdiv; unsigned int no;
unsigned int postdiv1; unsigned int nb;
unsigned int refdiv; };
unsigned int postdiv2; struct {
unsigned int dsmpd; /* for RK3036/RK3399 */
unsigned int frac; unsigned int fbdiv;
unsigned int postdiv1;
unsigned int refdiv;
unsigned int postdiv2;
unsigned int dsmpd;
unsigned int frac;
};
};
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment