Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: uniphier: Add SoC-glue clock source selector support for Pro4

Add SoC-glue clock source selector for ahci controller on UniPhier SoCs.
Currently this supports Pro4 only.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1634000035-3114-6-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Kunihiko Hayashi and committed by
Stephen Boyd
c64daf36 d911ed93

+23
+5
drivers/clk/uniphier/clk-uniphier-core.c
··· 210 210 .compatible = "socionext,uniphier-nx1-peri-clock", 211 211 .data = uniphier_pro4_peri_clk_data, 212 212 }, 213 + /* SoC-glue clock */ 214 + { 215 + .compatible = "socionext,uniphier-pro4-sg-clock", 216 + .data = uniphier_pro4_sg_clk_data, 217 + }, 213 218 { /* sentinel */ } 214 219 }; 215 220
+17
drivers/clk/uniphier/clk-uniphier-sys.c
··· 330 330 "cpll/32"), 331 331 { /* sentinel */ } 332 332 }; 333 + 334 + const struct uniphier_clk_data uniphier_pro4_sg_clk_data[] = { 335 + UNIPHIER_CLK_DIV("gpll", 4), 336 + { 337 + .name = "sata-ref", 338 + .type = UNIPHIER_CLK_TYPE_MUX, 339 + .idx = 0, 340 + .data.mux = { 341 + .parent_names = { "gpll/4", "ref", }, 342 + .num_parents = 2, 343 + .reg = 0x1a28, 344 + .masks = { 0x1, 0x1, }, 345 + .vals = { 0x0, 0x1, }, 346 + }, 347 + }, 348 + { /* sentinel */ } 349 + };
+1
drivers/clk/uniphier/clk-uniphier.h
··· 155 155 extern const struct uniphier_clk_data uniphier_pro5_sd_clk_data[]; 156 156 extern const struct uniphier_clk_data uniphier_ld4_peri_clk_data[]; 157 157 extern const struct uniphier_clk_data uniphier_pro4_peri_clk_data[]; 158 + extern const struct uniphier_clk_data uniphier_pro4_sg_clk_data[]; 158 159 159 160 #endif /* __CLK_UNIPHIER_H__ */