Skip to content

Commit cad4dda

Browse files
inochisagregkh
authored andcommitted
serial: 8250_dw: Add Sophgo SG2044 quirk
SG2044 relys on an internal divisor when calculating bitrate, which means a wrong clock for the most common bitrates. So add a quirk for this uart device to skip the set rate call and only relys on the internal UART divisor. Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Inochi Amaoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a54108c commit cad4dda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/tty/serial/8250/8250_dw.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ static const struct dw8250_platform_data dw8250_renesas_rzn1_data = {
750750
.quirks = DW_UART_QUIRK_CPR_VALUE | DW_UART_QUIRK_IS_DMA_FC,
751751
};
752752

753-
static const struct dw8250_platform_data dw8250_starfive_jh7100_data = {
753+
static const struct dw8250_platform_data dw8250_skip_set_rate_data = {
754754
.usr_reg = DW_UART_USR,
755755
.quirks = DW_UART_QUIRK_SKIP_SET_RATE,
756756
};
@@ -760,7 +760,8 @@ static const struct of_device_id dw8250_of_match[] = {
760760
{ .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
761761
{ .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data },
762762
{ .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
763-
{ .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data },
763+
{ .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data },
764+
{ .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data },
764765
{ /* Sentinel */ }
765766
};
766767
MODULE_DEVICE_TABLE(of, dw8250_of_match);

0 commit comments

Comments
 (0)