On Thu, Mar 17, 2022 at 06:46:21PM +0100, Miquel Raynal wrote: > From: Phil Edworthy <phil.edworthy@xxxxxxxxxxx> > > DW UART controllers can be synthesized without the CPR register. > In this case, allow to the platform information to provide a CPR value. ... > void dw8250_setup_port(struct uart_port *p) > { > struct uart_8250_port *up = up_to_u8250p(p); > + const struct dw8250_platform_data *pdata = device_get_match_data(up->port.dev); Why not p->dev? ... > reg = dw8250_readl_ext(p, DW_UART_CPR); > + if (!reg && pdata) > + reg = pdata->cpr; Perhaps if (!reg) { if (pdata) reg = pdata->cpr; dev_dbg("CPR is not available, using %x instead\n", reg); } ? > if (!reg) > return; -- With Best Regards, Andy Shevchenko