From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
linux-serial@vger.kernel.org,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Fabrizio Castro" <fabrizio.castro.jz@renesas.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v4 6/6] serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}
Date: Fri, 17 Feb 2023 16:14:01 +0200 [thread overview]
Message-ID: <Y++LqQIHuO8BGTm2@smile.fi.intel.com> (raw)
In-Reply-To: <20230217114255.226517-7-biju.das.jz@bp.renesas.com>
On Fri, Feb 17, 2023 at 11:42:55AM +0000, Biju Das wrote:
> 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.
>
> This patch adds serial8250_em_reg_update() and serial8250_em_serial_
> out_helper to handle it.
>
> DLL/DLM register can be updated only by setting LCR[7]. So the
> updation of LCR[7] will perform reset for DLL/DLM register changes.
>
> EMMA mobile has the same register set as RZ/V2M and this patch is tested on
> EMEV2 board. So, there is no harm in applying the same restriction here as
> well as the HW manual for EMMA mobile is not updated for a long time.
...
> + serial8250_em_serial_out_helper(p, UART_FCR_EM, fcr | UART_FCR_CLEAR_RCVR |
> + UART_FCR_CLEAR_XMIT);
I would put it like
serial8250_em_serial_out_helper(p, UART_FCR_EM, fcr |
UART_FCR_CLEAR_RCVR |
UART_FCR_CLEAR_XMIT);
...
> + switch (off) {
> + case UART_FCR_EM:
> + fcr = value;
> + break;
> + case UART_LCR:
> + lcr = value;
> + break;
> + case UART_MCR:
> + mcr = value;
Missing break; statement.
> + }
...
> + switch (offset) {
> + case UART_TX:
> + case UART_SCR:
> + case UART_IER:
> + case UART_DLL_EM:
> + case UART_DLM_EM:
> + serial8250_em_serial_out_helper(p, offset, value);
> + break;
> + case UART_FCR:
> + serial8250_em_reg_update(p, UART_FCR_EM, value);
> + break;
> + case UART_LCR:
> + case UART_MCR:
> + serial8250_em_reg_update(p, offset, value);
Missing break; statement.
> + }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2023-02-17 14:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 11:42 [PATCH v4 0/6] Update Renesas {EMMA mobile, RZ/V2M} UART Port type Biju Das
2023-02-17 11:42 ` [PATCH v4 1/6] serial: 8250_em: Use dev_err_probe() Biju Das
2023-02-17 14:03 ` Andy Shevchenko
2023-02-17 14:14 ` Biju Das
2023-02-17 11:42 ` [PATCH v4 2/6] serial: 8250_em: Drop slab.h Biju Das
2023-02-17 14:05 ` Andy Shevchenko
2023-02-17 14:30 ` Biju Das
2023-02-17 15:13 ` Andy Shevchenko
2023-02-17 15:17 ` Biju Das
2023-02-17 11:42 ` [PATCH v4 3/6] serial: 8250_em: Use devm_clk_get_enabled() Biju Das
2023-02-17 11:42 ` [PATCH v4 4/6] serial: 8250_em: Update port type as PORT_16750 Biju Das
2023-02-17 14:06 ` Andy Shevchenko
2023-02-17 14:53 ` Biju Das
2023-02-17 11:42 ` [PATCH v4 5/6] serial: 8250_em: Use pseudo offset for UART_FCR Biju Das
2023-02-17 11:46 ` Ilpo Järvinen
2023-02-17 11:56 ` Biju Das
2023-02-17 12:00 ` Ilpo Järvinen
2023-02-17 12:11 ` Biju Das
2023-02-17 12:42 ` Ilpo Järvinen
2023-02-17 12:58 ` Biju Das
2023-02-17 13:03 ` Ilpo Järvinen
2023-02-17 11:42 ` [PATCH v4 6/6] serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()} Biju Das
2023-02-17 14:14 ` Andy Shevchenko [this message]
2023-02-17 14:35 ` Biju Das
2023-02-17 15:15 ` Andy Shevchenko
2023-02-17 15:24 ` Biju Das
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=Y++LqQIHuO8BGTm2@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
/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.