All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@denx.de>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>,
	Chris Paterson <chris.paterson2@renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Subject: Re: [PATCH 5.10.y-cip 6/7] serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
Date: Wed, 14 Jun 2023 12:18:46 +0200	[thread overview]
Message-ID: <ZImUBg3er1tsqZzz@duo.ucw.cz> (raw)
In-Reply-To: <20230613132339.150671-7-biju.das.jz@bp.renesas.com>

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]

Hi!

> As per RZ/V2M hardware manual(Rev.1.30 Jun, 2022), UART IP has a
> restriction as mentioned below.
> 
> 40.6.1 Point for Caution when Changing the Register Settings:
> 
> When changing the settings of the following registers, a PRESETn master
> reset or FIFO reset + SW reset (FCR[2],FCR[1], HCR0[7]) must be input to
> re-initialize them.
> 
> Target Registers: FCR, LCR, MCR, DLL, DLM, HCR0.

So how does this work? AFAIU looking at the previous patch, FCR is
write only, you get IIR register when you try to read it.

> +static void serial8250_em_reg_update(struct uart_port *p, int off, int value)
> +{
> +	unsigned int ier, fcr, lcr, mcr, hcr0;
> +
> +	ier = serial8250_em_serial_in(p, UART_IER);
> +	fcr = serial8250_em_serial_in(p, UART_FCR_EM);

So here you read IIR...

> +	serial8250_em_serial_out_helper(p, UART_FCR_EM, fcr);

...and write it back to fcr?

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,        Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2023-06-14 10:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 13:23 [PATCH 5.10.y-cip 0/7] RZ/V2M UART FIFO support Biju Das
2023-06-13 13:23 ` [PATCH 5.10.y-cip 1/7] serial: 8250_em: Simplify probe() Biju Das
2023-06-13 13:23 ` [PATCH 5.10.y-cip 2/7] serial: 8250_em: Drop unused header file Biju Das
2023-06-13 13:23 ` [PATCH 5.10.y-cip 3/7] serial: 8250_em: Add missing break statement Biju Das
2023-06-13 13:23 ` [PATCH 5.10.y-cip 4/7] serial: 8250_em: Use devm_clk_get_enabled() Biju Das
2023-06-13 13:23 ` [PATCH 5.10.y-cip 5/7] serial: 8250_em: Use pseudo offset for UART_FCR Biju Das
2023-06-14 10:14   ` Pavel Machek
2023-06-14 13:41     ` Biju Das
2023-06-15  8:27       ` Pavel Machek
2023-06-13 13:23 ` [PATCH 5.10.y-cip 6/7] serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()} Biju Das
2023-06-14 10:18   ` Pavel Machek [this message]
2023-06-14 13:44     ` Biju Das
2023-06-13 13:23 ` [PATCH 5.10.y-cip 7/7] arm64: dts: renesas: rzv2mevk2: Add uart0 pins Biju Das
2023-06-14  0:39 ` [PATCH 5.10.y-cip 0/7] RZ/V2M UART FIFO support nobuhiro1.iwamatsu
2023-06-15  8:23   ` Pavel Machek

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=ZImUBg3er1tsqZzz@duo.ucw.cz \
    --to=pavel@denx.de \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=chris.paterson2@renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    /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.