[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfbpnMWqRUZTw+UzxrnnfWsHn2dgqVpz2WDQo5PW-sgEQ@mail.gmail.com>
Date: Sun, 30 Nov 2025 21:25:24 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Crescent Hsieh <crescentcy.hsieh@...a.com>
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org,
ilpo.jarvinen@...ux.intel.com, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org
Subject: Re: [PATCH v1 11/31] serial: 8250_mxpcie: enable enhanced mode and
custom FIFO trigger levels
On Sun, Nov 30, 2025 at 12:44 PM Crescent Hsieh
<crescentcy.hsieh@...a.com> wrote:
>
> Add support for enabling enhanced mode and configuring custom FIFO
> trigger levels on Moxa PCIe serial boards.
>
> Enhanced mode is activated via EFR[4] and SFR[5], which is required to
> access special function registers used for advanced features. Once
> enhanced mode is enabled, custom TX/RX FIFO trigger levels and flow
> control thresholds are configured through specific registers.
...
> +static int mxpcie8250_startup(struct uart_port *port)
> +{
> + struct uart_8250_port *up = up_to_u8250p(port);
> + int i, ret;
Should "i" be signed?
> + ret = serial8250_do_startup(port);
Same Q here: Why do we continue if we know it failed already?
> + for (i = 0; i < 5; ++i)
> + serial_out(up, UART_FCR, UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
> +
> + serial_out(up, MOXA_PUART_EFR, MOXA_PUART_EFR_ENHANCED);
> + serial_out(up, MOXA_PUART_SFR, MOXA_PUART_SFR_950);
> +
> + serial_out(up, MOXA_PUART_TTL, 0);
> + serial_out(up, MOXA_PUART_RTL, 96);
> + serial_out(up, MOXA_PUART_FCL, 16);
> + serial_out(up, MOXA_PUART_FCH, 110);
> +
> + return ret;
> +}
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists