[PATCH 1/2] riscv: ultrarisc: 8250_dw: support DP1000 uart
Conor Dooley
conor at kernel.org
Mon Mar 16 04:22:16 PDT 2026
On Mon, Mar 16, 2026 at 09:36:18AM +0800, Jia Wang wrote:
> From: Zhang Xincheng <zhangxincheng at ultrarisc.com>
>
> The UART of DP1000 does not support automatic detection of
> buffer size. skip_autocfg needs to be set to true
>
> Signed-off-by: Zhang Xincheng <zhangxincheng at ultrarisc.com>
> Signed-off-by: Jia Wang <wangjia at ultrarisc.com>
$subject: riscv: ultrarisc: 8250_dw: support DP1000 uart
Please update this to match other modifications to this file.
"riscv: ultrariscv" doesn't belong at the start.
> ---
> drivers/tty/serial/8250/8250_dw.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
> index db73b2ae17fa..6a2acf173331 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -56,6 +56,7 @@
> #define DW_UART_QUIRK_IS_DMA_FC BIT(3)
> #define DW_UART_QUIRK_APMC0D08 BIT(4)
> #define DW_UART_QUIRK_CPR_VALUE BIT(5)
> +#define DW_UART_QUIRK_FIXED_TYPE BIT(6)
>
> struct dw8250_platform_data {
> u8 usr_reg;
> @@ -514,6 +515,11 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
> data->data.dma.prepare_tx_dma = dw8250_prepare_tx_dma;
> data->data.dma.prepare_rx_dma = dw8250_prepare_rx_dma;
> }
> + if (quirks & DW_UART_QUIRK_FIXED_TYPE) {
> + p->flags |= UPF_FIXED_TYPE;
> + p->type = PORT_16550A;
> + data->skip_autocfg = true;
> + }
> if (quirks & DW_UART_QUIRK_APMC0D08) {
> p->iotype = UPIO_MEM32;
> p->regshift = 2;
> @@ -789,6 +795,11 @@ static const struct dw8250_platform_data dw8250_skip_set_rate_data = {
> .quirks = DW_UART_QUIRK_SKIP_SET_RATE,
> };
>
> +static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
> + .usr_reg = DW_UART_USR,
> + .quirks = DW_UART_QUIRK_FIXED_TYPE,
> +};
> +
> static const struct of_device_id dw8250_of_match[] = {
> { .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb },
> { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
> @@ -796,6 +807,7 @@ static const struct of_device_id dw8250_of_match[] = {
> { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
> { .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data },
> { .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data },
> + { .compatible = "ultrarisc,dp1000-uart", .data = &dw8250_ultrarisc_dp1000_data },
> { /* Sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, dw8250_of_match);
>
> --
> 2.34.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20260316/b35908d3/attachment.sig>
More information about the linux-riscv
mailing list