From: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
To: Paul Barker <paul.barker.ct@bp.renesas.com>
Cc: linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 09/14] serial: sh-sci: Introduced function pointers
Date: Fri, 7 Feb 2025 15:05:40 +0100 [thread overview]
Message-ID: <Z6YTNNTa7xoQ0bXW@superbuilder> (raw)
In-Reply-To: <46ae969b-f24a-42cc-8477-70d9e8f8c057@bp.renesas.com>
On Tue, Feb 04, 2025 at 06:04:57PM +0000, Paul Barker wrote:
> Hi Thierry,
>
>
> > +struct sci_port_params {
> > + const struct plat_sci_reg regs[SCI_NR_REGS];
>
> I don't see any usage of the regs field of this struct - is it needed?
> If not, can we also get rid of SCI_NR_REGS?
>
Yes, the 'regs' field is used in sh-sci.c, most essentially
through the sci_getregs macro.
Notice that the field is however not used in the later patch
that adds rzsci support.
> > + const struct sci_common_regs *common_regs;
> > + unsigned int fifosize;
> > + unsigned int overrun_reg;
> > + unsigned int overrun_mask;
> > + unsigned int sampling_rate_mask;
> > + unsigned int error_mask;
> > + unsigned int error_clear;
> > + struct sci_port_params_bits param_bits;
>
> It looks like we always initialise param_bits via a `static const struct
> sci_port_params_bits` instance. Is there any reason we copy the contents
> of this into the sci_port_params instance instead of using a pointer?
>
> > +};
> > +
> > +struct sci_port_ops {
> > + u32 (*read_reg)(struct uart_port *port, int reg);
> > + void (*write_reg)(struct uart_port *port, int reg, int value);
> > + void (*clear_SCxSR)(struct uart_port *port, unsigned int mask);
> > +
> > + void (*transmit_chars)(struct uart_port *port);
> > + void (*receive_chars)(struct uart_port *port);
> > +
> > + void (*poll_put_char)(struct uart_port *port, unsigned char c);
> > +
> > + int (*set_rtrg)(struct uart_port *port, int rx_trig);
> > + int (*rtrg_enabled)(struct uart_port *port);
> > +
> > + void (*shutdown_complete)(struct uart_port *port);
> > +
> > + unsigned int (*get_ctrl_temp)(struct uart_port *port, unsigned int ctrl);
>
> I think we need a better name for this one. ctrl_temp is just the name
> of the value we want to write to the control register in the
> serial_console_write function, the name doesn't give any clue as to its
> intended function.
>
> Perhaps it would be better to define a prepare_console_write operation
> which modifies the control register state and returns the old control
> register state (so that it can later be restored). That would result in
> a little more code duplication but it'd be easier to understand.
>
> > +};
>
> [snipped the rest]
>
> Thanks,
>
> --
> Paul Barker
next prev parent reply other threads:[~2025-02-07 14:06 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 16:37 [PATCH 00/14] add initial support for Renesas RZ/T2H SoC Thierry Bultel
2025-01-29 16:37 ` [PATCH 01/14] dt-bindings: soc: Document Renesas RZ/T2H (R9A09G077) SoC Thierry Bultel
2025-01-29 18:28 ` Krzysztof Kozlowski
2025-02-10 13:14 ` Thierry Bultel
2025-02-10 13:34 ` Krzysztof Kozlowski
2025-02-10 12:52 ` Geert Uytterhoeven
2025-02-10 13:32 ` Thierry Bultel
2025-02-10 13:56 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 02/14] dt-bindings: serial: Document sci bindings for the Renesas RZ/T2H (a.k.a r9a09g077) SoC Thierry Bultel
2025-01-29 18:31 ` Krzysztof Kozlowski
2025-01-30 8:09 ` Krzysztof Kozlowski
2025-01-30 8:11 ` Krzysztof Kozlowski
2025-02-10 13:14 ` Geert Uytterhoeven
2025-02-10 13:19 ` Biju Das
2025-02-10 14:15 ` Geert Uytterhoeven
2025-02-10 14:26 ` Biju Das
2025-02-10 14:35 ` Geert Uytterhoeven
2025-02-10 14:42 ` Biju Das
2025-02-10 14:46 ` Biju Das
2025-02-10 14:48 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 03/14] dt-bindings: soc: Document the Renesas RZ/T2H Evaluation board for the R9A09G077 SoC Thierry Bultel
2025-01-29 18:31 ` Krzysztof Kozlowski
2025-01-30 8:11 ` Krzysztof Kozlowski
2025-02-10 13:21 ` Geert Uytterhoeven
2025-02-10 14:02 ` Thierry Bultel
2025-02-10 14:10 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 04/14] dt-bindings: clock: Document cpg bindings for the Renesas RZ/T2H SoC Thierry Bultel
2025-01-29 18:34 ` Krzysztof Kozlowski
2025-02-10 13:39 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 05/14] soc: renesas: Add RZ/T2H (R9A09G077) config option Thierry Bultel
2025-02-10 13:40 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 06/14] clk: renesas: Add support for RZ/T2H family clock Thierry Bultel
2025-02-04 16:14 ` Paul Barker
2025-02-06 15:02 ` Thierry Bultel
2025-02-10 14:06 ` Geert Uytterhoeven
2025-02-10 14:53 ` Thierry Bultel
2025-02-10 16:14 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 07/14] clk: renesas: Add support for R9A09G077 SoC Thierry Bultel
2025-02-04 16:44 ` Paul Barker
2025-01-29 16:37 ` [PATCH 08/14] serial: sh-sci: Fix a comment about SCIFA Thierry Bultel
2025-01-30 8:38 ` Geert Uytterhoeven
2025-02-04 16:51 ` Paul Barker
2025-01-29 16:37 ` [PATCH 09/14] serial: sh-sci: Introduced function pointers Thierry Bultel
2025-01-30 8:38 ` Geert Uytterhoeven
2025-02-04 18:04 ` Paul Barker
2025-02-07 14:05 ` Thierry Bultel [this message]
2025-02-10 14:45 ` Geert Uytterhoeven
2025-02-10 15:36 ` Geert Uytterhoeven
2025-02-11 10:58 ` Thierry Bultel
2025-01-29 16:37 ` [PATCH 10/14] serial: sh-sci: Introduced sci_of_data Thierry Bultel
2025-01-30 8:39 ` Geert Uytterhoeven
2025-02-10 15:48 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 11/14] serial: sh-sci: Add support for RZ/T2H SCI Thierry Bultel
2025-02-10 15:30 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 12/14] arm64: dts: renesas: Add initial support for renesas RZ/T2H SoC Thierry Bultel
2025-01-29 18:36 ` Krzysztof Kozlowski
2025-02-10 15:52 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 13/14] arm64: dts: renesas: Add initial support for renesas RZ/T2H eval board Thierry Bultel
2025-01-29 18:37 ` Krzysztof Kozlowski
2025-02-10 15:54 ` Geert Uytterhoeven
2025-01-29 16:37 ` [PATCH 14/14] defconfig: Enable RZ/T2H Soc and RZ_SCI Thierry Bultel
2025-01-29 18:40 ` Krzysztof Kozlowski
2025-01-30 8:40 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z6YTNNTa7xoQ0bXW@superbuilder \
--to=thierry.bultel.yh@bp.renesas.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=paul.barker.ct@bp.renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.