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

Configure Feed

Select the types of activity you want to include in your feed.

serial: sh-sci: Add support for RZ/G3E RSCI clks

RZ/G3E RSCI has 6 clocks (5 module clocks + 1 external clock). Add
support for the module clocks.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://patch.msgid.link/20251129164325.209213-14-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Biju Das and committed by
Greg Kroah-Hartman
83c405ec 4cb2bd1b

+13
+3
drivers/tty/serial/sh-sci-common.h
··· 16 16 SCI_SCK, /* Optional External Clock */ 17 17 SCI_BRG_INT, /* Optional BRG Internal Clock Source */ 18 18 SCI_SCIF_CLK, /* Optional BRG External Clock Source */ 19 + SCI_FCK_DIV4, /* Optional Functional Clock frequency-divided by 4 */ 20 + SCI_FCK_DIV16, /* Optional Functional Clock frequency-divided by 16 */ 21 + SCI_FCK_DIV64, /* Optional Functional Clock frequency-divided by 64 */ 19 22 SCI_NUM_CLKS 20 23 }; 21 24
+10
drivers/tty/serial/sh-sci.c
··· 3172 3172 [SCI_SCK] = "sck", 3173 3173 [SCI_BRG_INT] = "brg_int", 3174 3174 [SCI_SCIF_CLK] = "scif_clk", 3175 + [SCI_FCK_DIV4] = "tclk_div4", 3176 + [SCI_FCK_DIV16] = "tclk_div16", 3177 + [SCI_FCK_DIV64] = "tclk_div64", 3175 3178 }; 3176 3179 struct clk *clk; 3177 3180 unsigned int i; ··· 3184 3181 } else if (sci_port->type == RSCI_PORT_SCIF16) { 3185 3182 clk_names[SCI_FCK] = "operation"; 3186 3183 clk_names[SCI_BRG_INT] = "bus"; 3184 + } else if (sci_port->type == RSCI_PORT_SCIF32) { 3185 + clk_names[SCI_FCK] = "tclk"; 3186 + clk_names[SCI_BRG_INT] = "pclk"; 3187 3187 } 3188 3188 3189 3189 for (i = 0; i < SCI_NUM_CLKS; i++) { ··· 3198 3192 3199 3193 if (!clk && sci_port->type == RSCI_PORT_SCIF16 && 3200 3194 (i == SCI_FCK || i == SCI_BRG_INT)) 3195 + return dev_err_probe(dev, -ENODEV, "failed to get %s\n", name); 3196 + 3197 + if (!clk && sci_port->type == RSCI_PORT_SCIF32 && 3198 + (i != SCI_SCK && i != SCI_SCIF_CLK)) 3201 3199 return dev_err_probe(dev, -ENODEV, "failed to get %s\n", name); 3202 3200 3203 3201 if (!clk && i == SCI_FCK) {