diff mbox series

[V2,2/2] tty: serial: meson: Added S4 SOC compatibility

Message ID 20220418053202.24528-3-yu.tu@amlogic.com (mailing list archive)
State Superseded
Headers show
Series Add q 12MHz internal clock rate to calculate | expand

Commit Message

Yu Tu April 18, 2022, 5:32 a.m. UTC
Make UART driver compatible with S4 SOC UART. Meanwhile, the S4 SOC
UART uses 12MHz as the clock source for baud rate calculations.

Signed-off-by: Yu Tu <yu.tu@amlogic.com>
---
 drivers/tty/serial/meson_uart.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Neil Armstrong April 21, 2022, 8:49 a.m. UTC | #1
On 18/04/2022 07:32, Yu Tu wrote:
> Make UART driver compatible with S4 SOC UART. Meanwhile, the S4 SOC
> UART uses 12MHz as the clock source for baud rate calculations.
> 
> Signed-off-by: Yu Tu <yu.tu@amlogic.com>
> ---
>   drivers/tty/serial/meson_uart.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
> index 58bd2723c004..43941f21735f 100644
> --- a/drivers/tty/serial/meson_uart.c
> +++ b/drivers/tty/serial/meson_uart.c
> @@ -790,11 +790,19 @@ static int meson_uart_remove(struct platform_device *pdev)
>   	return 0;
>   }
>   
> +static struct meson_uart_data s4_uart_date = {

Should be s4_uart_data instead of s4_uart_date

> +	.has_xtal_div2 = true,
> +};
> +
>   static const struct of_device_id meson_uart_dt_match[] = {
>   	{ .compatible = "amlogic,meson6-uart" },
>   	{ .compatible = "amlogic,meson8-uart" },
>   	{ .compatible = "amlogic,meson8b-uart" },
>   	{ .compatible = "amlogic,meson-gx-uart" },
> +	{
> +		.compatible = "amlogic,meson-s4-uart",
> +		.data = (void *)&s4_uart_date,

Here same

> +	},
>   	{ /* sentinel */ },
>   };
>   MODULE_DEVICE_TABLE(of, meson_uart_dt_match);
With this change, it's fine for me.

Neil
Yu Tu April 21, 2022, 9:47 a.m. UTC | #2
On 2022/4/21 16:49, Neil Armstrong wrote:
> [ EXTERNAL EMAIL ]
> 
> On 18/04/2022 07:32, Yu Tu wrote:
>> Make UART driver compatible with S4 SOC UART. Meanwhile, the S4 SOC
>> UART uses 12MHz as the clock source for baud rate calculations.
>>
>> Signed-off-by: Yu Tu <yu.tu@amlogic.com>
>> ---
>>   drivers/tty/serial/meson_uart.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/tty/serial/meson_uart.c 
>> b/drivers/tty/serial/meson_uart.c
>> index 58bd2723c004..43941f21735f 100644
>> --- a/drivers/tty/serial/meson_uart.c
>> +++ b/drivers/tty/serial/meson_uart.c
>> @@ -790,11 +790,19 @@ static int meson_uart_remove(struct 
>> platform_device *pdev)
>>       return 0;
>>   }
>> +static struct meson_uart_data s4_uart_date = {
> 
> Should be s4_uart_data instead of s4_uart_date
> 
I will prepare the next version and  correct it.
>> +    .has_xtal_div2 = true,
>> +};
>> +
>>   static const struct of_device_id meson_uart_dt_match[] = {
>>       { .compatible = "amlogic,meson6-uart" },
>>       { .compatible = "amlogic,meson8-uart" },
>>       { .compatible = "amlogic,meson8b-uart" },
>>       { .compatible = "amlogic,meson-gx-uart" },
>> +    {
>> +        .compatible = "amlogic,meson-s4-uart",
>> +        .data = (void *)&s4_uart_date,
> 
> Here same
> 
>> +    },
>>       { /* sentinel */ },
>>   };
>>   MODULE_DEVICE_TABLE(of, meson_uart_dt_match);
> With this change, it's fine for me.
> 
> Neil
> 
> .
diff mbox series

Patch

diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 58bd2723c004..43941f21735f 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -790,11 +790,19 @@  static int meson_uart_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct meson_uart_data s4_uart_date = {
+	.has_xtal_div2 = true,
+};
+
 static const struct of_device_id meson_uart_dt_match[] = {
 	{ .compatible = "amlogic,meson6-uart" },
 	{ .compatible = "amlogic,meson8-uart" },
 	{ .compatible = "amlogic,meson8b-uart" },
 	{ .compatible = "amlogic,meson-gx-uart" },
+	{
+		.compatible = "amlogic,meson-s4-uart",
+		.data = (void *)&s4_uart_date,
+	},
 	{ /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_uart_dt_match);