Re: [PATCH v4 1/5] serial: 8250_dw: select port setup through platform data
From: Andy Shevchenko
Date: Wed Oct 28 2026 - 04:56:57 EST
On Tue, Oct 27, 2026 at 05:05:29PM -0600, James Hilliard wrote:
> Select feature discovery and DMA attachment through a platform-data setup
> callback. The generic callback probes the optional registers and attaches
> DMA when a FIFO size is available. Integrations with a fixed configuration
> can supply their own setup before the port is registered.
>
> Replace skip_autocfg with the Octeon setup selection. On 64-bit builds,
> Octeon continues to skip optional-register probing while retaining its DMA
> setup; on 32-bit builds it retains the generic setup. Keep generic setup
> for devices without matched platform data as well.
...
> +static void dw8250_setup_dma(struct uart_port *p)
> +{
> + struct dw8250_data *data = to_dw8250_data(p->private_data);
> + struct uart_8250_port *up = up_to_u8250p(p);
> + /* DMA setup requires a FIFO. */
The style of the single-line comment in this file is without period at the end.
> + if (!p->fifosize)
> + return;
> +
> + data->data.dma.rxconf.src_maxburst = p->fifosize / 4;
> + data->data.dma.txconf.dst_maxburst = p->fifosize / 4;
> + up->dma = &data->data.dma;
> +}
...
> +static void dw8250_octeon_setup(struct uart_port *p)
> +{
> + if (!IS_ENABLED(CONFIG_64BIT))
> + dw8250_setup_port(p);
I believe the Cavium OCTEON is 64-bit only platform, so you can just drop this
conditional altogether.
> + dw8250_setup_dma(p);
> +}
With this being done, you can kill the entire helper ad use dw8250_setup_dma()
directly in dw8250_octeon_3860_data.
--
With Best Regards,
Andy Shevchenko