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: Make sci_scbrr_calc() public

Make the function sci_scbrr_calc() public for code reuse to support RZ/G3E
RSCI IP.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
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-15-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
5632bda5 83c405ec

+6 -3
+3
drivers/tty/serial/sh-sci-common.h
··· 169 169 int sci_startup(struct uart_port *port); 170 170 void sci_shutdown(struct uart_port *port); 171 171 172 + int sci_scbrr_calc(struct sci_port *s, unsigned int bps, unsigned int *brr, 173 + unsigned int *srr, unsigned int *cks); 174 + 172 175 #define min_sr(_port) ffs((_port)->sampling_rate_mask) 173 176 #define max_sr(_port) fls((_port)->sampling_rate_mask) 174 177
+3 -3
drivers/tty/serial/sh-sci.c
··· 2573 2573 } 2574 2574 2575 2575 /* calculate sample rate, BRR, and clock select */ 2576 - static int sci_scbrr_calc(struct sci_port *s, unsigned int bps, 2577 - unsigned int *brr, unsigned int *srr, 2578 - unsigned int *cks) 2576 + int sci_scbrr_calc(struct sci_port *s, unsigned int bps, unsigned int *brr, 2577 + unsigned int *srr, unsigned int *cks) 2579 2578 { 2580 2579 unsigned long freq = s->clk_rates[SCI_FCK]; 2581 2580 unsigned int sr, br, prediv, scrate, c; ··· 2638 2639 min_err, *brr, *srr + 1, *cks); 2639 2640 return min_err; 2640 2641 } 2642 + EXPORT_SYMBOL_NS_GPL(sci_scbrr_calc, "SH_SCI"); 2641 2643 2642 2644 static void sci_reset(struct uart_port *port) 2643 2645 {