All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-renesas-soc@vger.kernel.org, linux-serial@vger.kernel.org,
	Milan Stevanovic <milan.stevanovic@se.com>,
	Jimmy Lalande <jimmy.lalande@se.com>,
	Pascal Eberhard <pascal.eberhard@se.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Herve Codina <herve.codina@bootlin.com>,
	Clement Leger <clement.leger@bootlin.com>,
	Phil Edworthy <phil.edworthy@renesas.com>
Subject: Re: [PATCH v4 1/9] serial: 8250: dw: Move definitions to the shared header
Date: Wed, 30 Mar 2022 17:08:25 +0300	[thread overview]
Message-ID: <YkRkWQCPUMWTbOzg@smile.fi.intel.com> (raw)
In-Reply-To: <20220330132038.808679-2-miquel.raynal@bootlin.com>

On Wed, Mar 30, 2022 at 03:20:30PM +0200, Miquel Raynal wrote:
> From: Phil Edworthy <phil.edworthy@renesas.com>
> 
> Move the per-device structure and a helper out of the main .c file, into
> a shared header as they will both be reused from another .c file.
> 
> There is no functional change.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
> [miquel.raynal@bootlin.com: Extracted from a bigger change]
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  drivers/tty/serial/8250/8250_dw.c    | 21 ---------------------
>  drivers/tty/serial/8250/8250_dwlib.h | 26 ++++++++++++++++++++++++++
>  2 files changed, 26 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
> index 96a62e95726b..1666041513a5 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -42,27 +42,6 @@
>  #define DW_UART_QUIRK_ARMADA_38X	BIT(1)
>  #define DW_UART_QUIRK_SKIP_SET_RATE	BIT(2)
>  
> -struct dw8250_data {
> -	struct dw8250_port_data	data;
> -
> -	u8			usr_reg;
> -	int			msr_mask_on;
> -	int			msr_mask_off;
> -	struct clk		*clk;
> -	struct clk		*pclk;
> -	struct notifier_block	clk_notifier;
> -	struct work_struct	clk_work;
> -	struct reset_control	*rst;
> -
> -	unsigned int		skip_autocfg:1;
> -	unsigned int		uart_16550_compatible:1;
> -};
> -
> -static inline struct dw8250_data *to_dw8250_data(struct dw8250_port_data *data)
> -{
> -	return container_of(data, struct dw8250_data, data);
> -}
> -
>  static inline struct dw8250_data *clk_to_dw8250_data(struct notifier_block *nb)
>  {
>  	return container_of(nb, struct dw8250_data, clk_notifier);
> diff --git a/drivers/tty/serial/8250/8250_dwlib.h b/drivers/tty/serial/8250/8250_dwlib.h
> index 83d528e5cc21..72e7dbcccad0 100644
> --- a/drivers/tty/serial/8250/8250_dwlib.h
> +++ b/drivers/tty/serial/8250/8250_dwlib.h
> @@ -1,10 +1,15 @@
>  /* SPDX-License-Identifier: GPL-2.0+ */
>  /* Synopsys DesignWare 8250 library header file. */
>  
> +#include <linux/notifier.h>
>  #include <linux/types.h>
> +#include <linux/workqueue.h>
>  
>  #include "8250.h"
>  
> +struct clk;
> +struct reset_control;
> +
>  struct dw8250_port_data {
>  	/* Port properties */
>  	int			line;
> @@ -16,5 +21,26 @@ struct dw8250_port_data {
>  	u8			dlf_size;
>  };
>  
> +struct dw8250_data {
> +	struct dw8250_port_data	data;
> +
> +	u8			usr_reg;
> +	int			msr_mask_on;
> +	int			msr_mask_off;
> +	struct clk		*clk;
> +	struct clk		*pclk;
> +	struct notifier_block	clk_notifier;
> +	struct work_struct	clk_work;
> +	struct reset_control	*rst;
> +
> +	unsigned int		skip_autocfg:1;
> +	unsigned int		uart_16550_compatible:1;
> +};
> +
>  void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios, struct ktermios *old);
>  void dw8250_setup_port(struct uart_port *p);
> +
> +static inline struct dw8250_data *to_dw8250_data(struct dw8250_port_data *data)
> +{
> +	return container_of(data, struct dw8250_data, data);
> +}
> -- 
> 2.27.0
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2022-03-30 14:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30 13:20 [PATCH v4 0/9] serial: 8250: dw: RZN1 DMA support Miquel Raynal
2022-03-30 13:20 ` [PATCH v4 1/9] serial: 8250: dw: Move definitions to the shared header Miquel Raynal
2022-03-30 14:08   ` Andy Shevchenko [this message]
2022-03-30 13:20 ` [PATCH v4 2/9] serial: 8250: dw: Use the device API Miquel Raynal
2022-03-30 13:58   ` Andy Shevchenko
2022-03-30 13:20 ` [PATCH v4 3/9] serial: 8250: dw: Create a more generic platform data structure Miquel Raynal
2022-03-30 14:02   ` Andy Shevchenko
2022-03-30 14:04     ` Andy Shevchenko
2022-03-30 13:20 ` [PATCH v4 4/9] serial: 8250: dw: Allow to use a fallback CPR value if not synthesized Miquel Raynal
2022-03-30 14:11   ` Andy Shevchenko
2022-03-30 13:20 ` [PATCH v4 5/9] serial: 8250: dma: Allow driver operations before starting DMA transfers Miquel Raynal
2022-03-30 14:07   ` Andy Shevchenko
2022-03-30 13:20 ` [PATCH v4 6/9] serial: 8250: dw: Introduce an rx_timeout variable in the IRQ path Miquel Raynal
2022-03-30 14:14   ` Andy Shevchenko
2022-03-30 13:20 ` [PATCH v4 7/9] serial: 8250: dw: Add support for DMA flow controlling devices Miquel Raynal
2022-03-30 14:16   ` Andy Shevchenko
2022-03-30 14:18     ` Andy Shevchenko
2022-04-01 10:56   ` Ilpo Järvinen
2022-04-01 17:38     ` Andy Shevchenko
2022-04-04 15:20       ` Miquel Raynal
2022-04-04 15:29         ` Ilpo Järvinen
2022-03-30 13:20 ` [PATCH v4 8/9] serial: 8250: dw: Improve RZN1 support Miquel Raynal
2022-03-30 14:19   ` Andy Shevchenko
2022-03-30 13:20 ` [PATCH v4 9/9] ARM: dts: r9a06g032: Fill the UART DMA properties Miquel Raynal
2022-03-30 14:13 ` [PATCH v4 0/9] serial: 8250: dw: RZN1 DMA support Andy Shevchenko
2022-04-04 14:20   ` Miquel Raynal
2022-04-04 14:39     ` Ilpo Järvinen

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=YkRkWQCPUMWTbOzg@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=clement.leger@bootlin.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=herve.codina@bootlin.com \
    --cc=jimmy.lalande@se.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=milan.stevanovic@se.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=pascal.eberhard@se.com \
    --cc=phil.edworthy@renesas.com \
    --cc=thomas.petazzoni@bootlin.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.