linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Update Renesas {EMMA mobile, RZ/V2M} UART Port type
@ 2023-02-17 11:42 Biju Das
  2023-02-17 11:42 ` [PATCH v4 1/6] serial: 8250_em: Use dev_err_probe() Biju Das
                   ` (5 more replies)
  0 siblings, 6 replies; 26+ messages in thread
From: Biju Das @ 2023-02-17 11:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Biju Das, Jiri Slaby, Ilpo Järvinen, Andy Shevchenko,
	Uwe Kleine-König, Maciej W. Rozycki, Eric Tremblay,
	Wander Lairson Costa, linux-serial, Geert Uytterhoeven,
	Niklas Söderlund, Fabrizio Castro, linux-renesas-soc

The Renesas {EMMA mobile, RZ/V2M} UART compatible with the general-purpose
16750 UART chip. This patch updates Renesas {EMMA mobile, RZ/V2M} UART type
from 16550a->16750 and also enables 64-bytes fifo.

This patch series also simplifies 8250_em_probe() and also updates the
register handling for the below restriction mentioned in the hardware
manual.

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.

v3->v4:
 * Split patch#1 to 3 patches and removed Rb tags.
 * Replaced dev_err->dev_err_probe() in probe()
 * Added a local variable 'dev' to replace '&pdev->dev' in probe().
 * Patch#2 removes unused header file slab.h.
 * Patch#3 simplifies clk handling in probe()/remove()
 * Removed sclk from struct serial8250_em_priv instead used local
   variable in probe()
 * Replaced devm_clk_get->devm_clk_get_enabled() and removed
   clk_prepare_enable/clk_disable_unprepare from probe()/remove().
 * Both {RZ/V2M, EMMA mobile} SoC is Register-compatible
   with the general-purpose 16750 UART chip. So started using
   generic compatible and removed struct serial8250_em_hw_info.
 * Introduced pseudo offset for UART_FCR(UART_FCR_EM) and used
   UART_FCR_EM in serial8250_em_serial{_in/_out} function to read/write
   FCR register.
 * Updated register update restriction to EMMA mobile SoC as well.
 * Replaced readl->serial8250_em_serial_in() for reading fcr register
   in serial8250_em_reg_update().
 * Added serial8250_em_serial_out_helper() to simplify the
   code and used for register writes in serial8250_em_reg_update().
v2->v3:
 * Dropped sclk from priv.
 * Dropped unneeded clk_disable_unprepare from remove().
 * Retained Rb tags from Geert,Andy and Ilpo as the changes are trivial.
 * Replaced of_device_get_match_data->device_get_match_data
 * Dropped struct serial8250_em_hw_info *info from priv and started
   using a local variable info in probe().
 * Retained Rb tag from Ilpo as changes are trivial.
 * Replaced readl/writel()->serial8250_em_serial_in/out() in serial8250_rzv2m_
   reg_update() to avoid duplication of offset trickery.
 * Added support for HCR0 read/write in serial8250_em_{serial_in, serial_out}
 * Added UART_LCR macro support in serial8250_em_serial_in() to read LCR
 * Reordered serial8250_em_{serial_in, serial_out} above serial8250_rzv2m_
   reg_update().
 * Replaced priv->info->serial_out to info->serial_out.
v1->v2:
 * Dropped patch#1 from previous series
 * Replaced devm_clk_get->devm_clk_get_enabled() and updated clk
   handling in probe().
 * Added Rb tag from Geert.
 * Added patch for updating Renesas RZ/V2M UART type from 16550a->16750
   and also enables 64-bytes fifo.
 * Used .data for taking h/w differences between EMMA mobile and RZ/V2M UART.
 * Added serial_out() to struct serial8250_em_hw_info for the write register
   differences between EMMA mobile and RZ/V2M UART.

Biju Das (6):
  serial: 8250_em: Use dev_err_probe()
  serial: 8250_em: Drop slab.h
  serial: 8250_em: Use devm_clk_get_enabled()
  serial: 8250_em: Update port type as PORT_16750
  serial: 8250_em: Use pseudo offset for UART_FCR
  serial: 8250_em: Add serial8250_em_{reg_update(),out_helper()}

 drivers/tty/serial/8250/8250_em.c | 110 +++++++++++++++++++++++-------
 1 file changed, 85 insertions(+), 25 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2023-02-17 15:24 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-02-17 14:35     ` Biju Das
2023-02-17 15:15       ` Andy Shevchenko
2023-02-17 15:24         ` Biju Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).