* [PATCH 1/2] serial: samsung: honor fifosize from dts at first
[not found] <CGME20240202212456epcas5p15589813cd79526e9d0c444082e2f0e51@epcas5p1.samsung.com>
@ 2024-02-02 21:24 ` Tamseel Shams
[not found] ` <CGME20240202212459epcas5p2e1703c35ebe9302ac5b2f3d3fcd853c0@epcas5p2.samsung.com>
2024-02-05 7:40 ` [PATCH 1/2] serial: samsung: honor fifosize from dts at first Krzysztof Kozlowski
0 siblings, 2 replies; 6+ messages in thread
From: Tamseel Shams @ 2024-02-02 21:24 UTC (permalink / raw)
To: alim.akhtar, linux-fsd, robh+dt, krzysztof.kozlowski+dt, conor+dt,
gregkh, jirislaby
Cc: linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-serial, Tamseel Shams
Currently for platforms which passes UART fifosize from DT gets
override by local driver structure "s3c24xx_serial_drv_data",
which is not indentded. Change the code to honor fifosize from
device tree at first.
Signed-off-by: Tamseel Shams <m.shams@samsung.com>
---
drivers/tty/serial/samsung_tty.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 71d17d804fda..e4c4c9f4f9b0 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1990,8 +1990,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
}
if (np) {
- of_property_read_u32(np,
- "samsung,uart-fifosize", &ourport->port.fifosize);
+ ret = of_property_read_u32(np, "samsung,uart-fifosize", &ourport->port.fifosize);
if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
switch (prop) {
@@ -2009,10 +2008,13 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
}
}
- if (ourport->drv_data->fifosize[index])
- ourport->port.fifosize = ourport->drv_data->fifosize[index];
- else if (ourport->info->fifosize)
- ourport->port.fifosize = ourport->info->fifosize;
+ if (ret) {
+ if (ourport->drv_data->fifosize[index])
+ ourport->port.fifosize = ourport->drv_data->fifosize[index];
+ else if (ourport->info->fifosize)
+ ourport->port.fifosize = ourport->info->fifosize;
+ }
+
ourport->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_SAMSUNG_CONSOLE);
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] arm64: dts: fsd: Add fifosize for UART in Device Tree
[not found] ` <CGME20240202212459epcas5p2e1703c35ebe9302ac5b2f3d3fcd853c0@epcas5p2.samsung.com>
@ 2024-02-02 21:24 ` Tamseel Shams
2024-02-05 7:41 ` Krzysztof Kozlowski
0 siblings, 1 reply; 6+ messages in thread
From: Tamseel Shams @ 2024-02-02 21:24 UTC (permalink / raw)
To: alim.akhtar, linux-fsd, robh+dt, krzysztof.kozlowski+dt, conor+dt,
gregkh, jirislaby
Cc: linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-serial, Tamseel Shams
UART in FSD SoC has fifosize of 64 bytes.
Set fifosize as 64 bytes for UART from Device Tree.
Signed-off-by: Tamseel Shams <m.shams@samsung.com>
---
arch/arm64/boot/dts/tesla/fsd.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/tesla/fsd.dtsi b/arch/arm64/boot/dts/tesla/fsd.dtsi
index aaffb50b8b60..047a83cee603 100644
--- a/arch/arm64/boot/dts/tesla/fsd.dtsi
+++ b/arch/arm64/boot/dts/tesla/fsd.dtsi
@@ -601,6 +601,7 @@
clocks = <&clock_peric PERIC_PCLK_UART0>,
<&clock_peric PERIC_SCLK_UART0>;
clock-names = "uart", "clk_uart_baud0";
+ samsung,uart-fifosize = <64>;
status = "disabled";
};
@@ -613,6 +614,7 @@
clocks = <&clock_peric PERIC_PCLK_UART1>,
<&clock_peric PERIC_SCLK_UART1>;
clock-names = "uart", "clk_uart_baud0";
+ samsung,uart-fifosize = <64>;
status = "disabled";
};
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] serial: samsung: honor fifosize from dts at first
2024-02-02 21:24 ` [PATCH 1/2] serial: samsung: honor fifosize from dts at first Tamseel Shams
[not found] ` <CGME20240202212459epcas5p2e1703c35ebe9302ac5b2f3d3fcd853c0@epcas5p2.samsung.com>
@ 2024-02-05 7:40 ` Krzysztof Kozlowski
2024-02-05 8:11 ` Tamseel Shams
1 sibling, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-05 7:40 UTC (permalink / raw)
To: Tamseel Shams, alim.akhtar, linux-fsd, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, jirislaby
Cc: linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-serial
On 02/02/2024 22:24, Tamseel Shams wrote:
> Currently for platforms which passes UART fifosize from DT gets
> override by local driver structure "s3c24xx_serial_drv_data",
> which is not indentded. Change the code to honor fifosize from
> device tree at first.
>
> Signed-off-by: Tamseel Shams <m.shams@samsung.com>
> ---
> drivers/tty/serial/samsung_tty.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 71d17d804fda..e4c4c9f4f9b0 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -1990,8 +1990,7 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
> }
>
> if (np) {
> - of_property_read_u32(np,
> - "samsung,uart-fifosize", &ourport->port.fifosize);
> + ret = of_property_read_u32(np, "samsung,uart-fifosize", &ourport->port.fifosize);
>
> if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
> switch (prop) {
> @@ -2009,10 +2008,13 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)
> }
> }
>
> - if (ourport->drv_data->fifosize[index])
> - ourport->port.fifosize = ourport->drv_data->fifosize[index];
> - else if (ourport->info->fifosize)
> - ourport->port.fifosize = ourport->info->fifosize;
I think ret is not initialized here.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] arm64: dts: fsd: Add fifosize for UART in Device Tree
2024-02-02 21:24 ` [PATCH 2/2] arm64: dts: fsd: Add fifosize for UART in Device Tree Tamseel Shams
@ 2024-02-05 7:41 ` Krzysztof Kozlowski
2024-02-05 8:12 ` Tamseel Shams
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-05 7:41 UTC (permalink / raw)
To: Tamseel Shams, alim.akhtar, linux-fsd, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, jirislaby
Cc: linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-serial
On 02/02/2024 22:24, Tamseel Shams wrote:
> UART in FSD SoC has fifosize of 64 bytes.
> Set fifosize as 64 bytes for UART from Device Tree.
>
> Signed-off-by: Tamseel Shams <m.shams@samsung.com>
> ---
> arch/arm64/boot/dts/tesla/fsd.dtsi | 2 ++
Please split SoC changes from patches sent to serial, so it will be easy
to apply for Greg and others.
Unless you want to say that there is dependency, but there cannot be
such - it would be a NAK.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 1/2] serial: samsung: honor fifosize from dts at first
2024-02-05 7:40 ` [PATCH 1/2] serial: samsung: honor fifosize from dts at first Krzysztof Kozlowski
@ 2024-02-05 8:11 ` Tamseel Shams
0 siblings, 0 replies; 6+ messages in thread
From: Tamseel Shams @ 2024-02-05 8:11 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', alim.akhtar, linux-fsd, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, jirislaby
Cc: linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-serial
> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@linaro.org]
> Sent: 05 February 2024 13:10
> To: Tamseel Shams <m.shams@samsung.com>; alim.akhtar@samsung.com;
> linux-fsd@tesla.com; robh+dt@kernel.org;
> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org;
> gregkh@linuxfoundation.org; jirislaby@kernel.org
> Cc: linux-arm-kernel@lists.infradead.org; linux-samsung-
> soc@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-serial@vger.kernel.org
> Subject: Re: [PATCH 1/2] serial: samsung: honor fifosize from dts at first
>
> On 02/02/2024 22:24, Tamseel Shams wrote:
> > Currently for platforms which passes UART fifosize from DT gets
> > override by local driver structure "s3c24xx_serial_drv_data", which is
> > not indentded. Change the code to honor fifosize from device tree at
> > first.
> >
> > Signed-off-by: Tamseel Shams <m.shams@samsung.com>
> > ---
> > drivers/tty/serial/samsung_tty.c | 14 ++++++++------
> > 1 file changed, 8 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/tty/serial/samsung_tty.c
> > b/drivers/tty/serial/samsung_tty.c
> > index 71d17d804fda..e4c4c9f4f9b0 100644
> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> > @@ -1990,8 +1990,7 @@ static int s3c24xx_serial_probe(struct
> platform_device *pdev)
> > }
> >
> > if (np) {
> > - of_property_read_u32(np,
> > - "samsung,uart-fifosize", &ourport->port.fifosize);
> > + ret = of_property_read_u32(np, "samsung,uart-fifosize",
> > +&ourport->port.fifosize);
> >
> > if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
> > switch (prop) {
> > @@ -2009,10 +2008,13 @@ static int s3c24xx_serial_probe(struct
> platform_device *pdev)
> > }
> > }
> >
> > - if (ourport->drv_data->fifosize[index])
> > - ourport->port.fifosize = ourport->drv_data->fifosize[index];
> > - else if (ourport->info->fifosize)
> > - ourport->port.fifosize = ourport->info->fifosize;
>
> I think ret is not initialized here.
>
>
Thanks for review. Will fix it in the version.
Thanks & Regards
Tamseel Shams
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/2] arm64: dts: fsd: Add fifosize for UART in Device Tree
2024-02-05 7:41 ` Krzysztof Kozlowski
@ 2024-02-05 8:12 ` Tamseel Shams
0 siblings, 0 replies; 6+ messages in thread
From: Tamseel Shams @ 2024-02-05 8:12 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', alim.akhtar, linux-fsd, robh+dt,
krzysztof.kozlowski+dt, conor+dt, gregkh, jirislaby
Cc: linux-arm-kernel, linux-samsung-soc, devicetree, linux-kernel,
linux-serial
> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@linaro.org]
> Sent: 05 February 2024 13:11
> To: Tamseel Shams <m.shams@samsung.com>; alim.akhtar@samsung.com;
> linux-fsd@tesla.com; robh+dt@kernel.org;
> krzysztof.kozlowski+dt@linaro.org; conor+dt@kernel.org;
> gregkh@linuxfoundation.org; jirislaby@kernel.org
> Cc: linux-arm-kernel@lists.infradead.org; linux-samsung-
> soc@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-serial@vger.kernel.org
> Subject: Re: [PATCH 2/2] arm64: dts: fsd: Add fifosize for UART in Device Tree
>
> On 02/02/2024 22:24, Tamseel Shams wrote:
> > UART in FSD SoC has fifosize of 64 bytes.
> > Set fifosize as 64 bytes for UART from Device Tree.
> >
> > Signed-off-by: Tamseel Shams <m.shams@samsung.com>
> > ---
> > arch/arm64/boot/dts/tesla/fsd.dtsi | 2 ++
>
> Please split SoC changes from patches sent to serial, so it will be easy to apply
> for Greg and others.
>
> Unless you want to say that there is dependency, but there cannot be such -
> it would be a NAK.
>
Thanks for review. Will take care of this the next version.
Thanks & Regards,
Tamseel Shams
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-05 10:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20240202212456epcas5p15589813cd79526e9d0c444082e2f0e51@epcas5p1.samsung.com>
2024-02-02 21:24 ` [PATCH 1/2] serial: samsung: honor fifosize from dts at first Tamseel Shams
[not found] ` <CGME20240202212459epcas5p2e1703c35ebe9302ac5b2f3d3fcd853c0@epcas5p2.samsung.com>
2024-02-02 21:24 ` [PATCH 2/2] arm64: dts: fsd: Add fifosize for UART in Device Tree Tamseel Shams
2024-02-05 7:41 ` Krzysztof Kozlowski
2024-02-05 8:12 ` Tamseel Shams
2024-02-05 7:40 ` [PATCH 1/2] serial: samsung: honor fifosize from dts at first Krzysztof Kozlowski
2024-02-05 8:11 ` Tamseel Shams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).