public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/5] serial: ns16550: Read reg-io-width from device tree
Date: Thu, 15 Nov 2018 19:28:16 +0100	[thread overview]
Message-ID: <2089286e-bd80-e487-2a1f-83cbe1db6dcf@suse.de> (raw)
In-Reply-To: <20181115175854.7550-3-andriy.shevchenko@linux.intel.com>



On 15.11.18 18:58, Andy Shevchenko wrote:
> Cache the value of the reg-io-width property for the future use.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/serial/ns16550.c | 1 +
>  include/ns16550.h        | 4 +++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
> index f9041aa626..b51b56de9f 100644
> --- a/drivers/serial/ns16550.c
> +++ b/drivers/serial/ns16550.c
> @@ -408,6 +408,7 @@ int ns16550_serial_ofdata_to_platdata(struct udevice *dev)
>  
>  	plat->reg_offset = dev_read_u32_default(dev, "reg-offset", 0);
>  	plat->reg_shift = dev_read_u32_default(dev, "reg-shift", 0);
> +	plat->reg_width = dev_read_u32_default(dev, "reg-io-width", 1);
>  
>  	err = clk_get_by_index(dev, 0, &clk);
>  	if (!err) {
> diff --git a/include/ns16550.h b/include/ns16550.h
> index 5fcbcd2e74..22b89e4d6d 100644
> --- a/include/ns16550.h
> +++ b/include/ns16550.h
> @@ -49,14 +49,16 @@
>   * struct ns16550_platdata - information about a NS16550 port
>   *
>   * @base:		Base register address
> + * @reg_width:		IO accesses size of registers (in bytes)
>   * @reg_shift:		Shift size of registers (0=byte, 1=16bit, 2=32bit...)
>   * @clock:		UART base clock speed in Hz
>   */
>  struct ns16550_platdata {
>  	unsigned long base;
> +	int reg_width;
>  	int reg_shift;
> -	int clock;
>  	int reg_offset;
> +	int clock;

Why move clock?

Alex

>  	u32 fcr;
>  };
>  
> 

  reply	other threads:[~2018-11-15 18:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 17:58 [U-Boot] [PATCH v2 0/5] ACPI: Generate SPCR table Andy Shevchenko
2018-11-15 17:58 ` [U-Boot] [PATCH v2 1/5] serial: Introduce ->getinfo() callback Andy Shevchenko
2018-11-15 18:22   ` Alexander Graf
2018-11-15 19:31     ` Andy Shevchenko
2018-11-15 20:09       ` Alexander Graf
2018-11-20 18:27         ` Andy Shevchenko
2018-11-15 19:45   ` Simon Glass
2018-11-15 19:51     ` Andy Shevchenko
2018-11-15 20:22       ` Simon Glass
2018-11-20 17:39         ` Andy Shevchenko
2018-11-20 18:32     ` Andy Shevchenko
2018-11-20 22:04       ` Alexander Graf
2018-11-20 22:16         ` Andy Shevchenko
2018-11-15 17:58 ` [U-Boot] [PATCH v2 2/5] serial: ns16550: Read reg-io-width from device tree Andy Shevchenko
2018-11-15 18:28   ` Alexander Graf [this message]
2018-11-15 19:33     ` Andy Shevchenko
2018-11-15 20:12       ` Alexander Graf
2018-11-15 19:45   ` Simon Glass
2018-11-15 19:53     ` Andy Shevchenko
2018-11-15 17:58 ` [U-Boot] [PATCH v2 3/5] serial: ns16550: Provide ->getinfo() implementation Andy Shevchenko
2018-11-15 18:30   ` Alexander Graf
2018-11-15 19:37     ` Andy Shevchenko
2018-11-15 19:45       ` Simon Glass
2018-11-15 17:58 ` [U-Boot] [PATCH v2 4/5] x86: acpi: Add SPCR table description Andy Shevchenko
2018-11-18 12:37   ` Bin Meng
2018-11-15 17:58 ` [U-Boot] [PATCH v2 5/5] x86: acpi: Generate SPCR table Andy Shevchenko
2018-11-15 18:27   ` Alexander Graf
2018-11-15 19:43     ` Andy Shevchenko
2018-11-15 20:19       ` Alexander Graf
2018-11-20 21:06         ` Andy Shevchenko
2018-11-18 12:37   ` Bin Meng
2018-11-20 20:47     ` Andy Shevchenko

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=2089286e-bd80-e487-2a1f-83cbe1db6dcf@suse.de \
    --to=agraf@suse.de \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox