Skip to contentSkip to conversation

serial: tegra: remove Kconfig dependency on APB DMA controller

PATCH Superseded Francesco Lavra 4 participants 10 messages Nov 26, 2025 – Mar 13

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: tegra: remove Kconfig dependency on APB DMA controller

This driver runs also on SoCs without a Tegra20 APB DMA controller (e.g. Tegra234).
Remove the Kconfig dependency on TEGRA20_APB_DMA, and remove reference to the APB DMA controller from the Kconfig help text.

Fixes 60d2016a5161 ("arm64: tegra: Add Tegra234 GPCDMA device tree node")
---
 drivers/tty/serial/Kconfig | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/Kconfig +2 -3
index 44427415a80d..6212a814fdb7 100644
@@ -255,14 +255,13 @@ config SERIAL_SAMSUNG_CONSOLE
 
 config SERIAL_TEGRA
 	tristate "NVIDIA Tegra20/30 SoC serial controller"
-	depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST
+	depends on ARCH_TEGRA || COMPILE_TEST
 	select SERIAL_CORE
 	help
 	  Support for the on-chip UARTs on the NVIDIA Tegra series SOCs
 	  providing /dev/ttyTHS0, 1, 2, 3 and 4 (note, some machines may not
 	  provide all of these ports, depending on how the serial port
-	  are enabled). This driver uses the APB DMA to achieve higher baudrate
-	  and better performance.
+	  are enabled).
 
 config SERIAL_TEGRA_TCU
 	tristate "NVIDIA Tegra Combined UART"
Signature · 1 line
2.39.5
#1 lore raw
Quoted 4 lines · Francesco Lavra

This driver runs also on SoCs without a Tegra20 APB DMA controller (e.g. Tegra234).
Remove the Kconfig dependency on TEGRA20_APB_DMA, and remove reference to the APB DMA controller from the Kconfig help text.

...

drivers/tty/serial/Kconfig config SERIAL_SAMSUNG_CONSOLE · line 264

Quoted 7 lines
drivers/tty/serial/Kconfig +1 -2
 	help
 	  Support for the on-chip UARTs on the NVIDIA Tegra series SOCs
 	  providing /dev/ttyTHS0, 1, 2, 3 and 4 (note, some machines may not
 	  provide all of these ports, depending on how the serial port
-	  are enabled). This driver uses the APB DMA to achieve higher baudrate
-	  and better performance.
+	  are enabled).

I think this removes a good piece of information. Perhaps rephrase?

This driver may use the APB DMA when available to achieve higher baudrate and better performance.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 20 lines · Andy Shevchenko
Quoted 6 lines · Francesco Lavra

This driver runs also on SoCs without a Tegra20 APB DMA controller (e.g.
Tegra234).
Remove the Kconfig dependency on TEGRA20_APB_DMA, and remove reference to
the APB DMA controller from the Kconfig help text.

...

Quoted 9 lines

        help
          Support for the on-chip UARTs on the NVIDIA Tegra series SOCs providing /dev/ttyTHS0, 1, 2, 3 and 4 (note, some machines may not
          provide all of these ports, depending on how the serial port -         are enabled). This driver uses the APB DMA to achieve higher baudrate
-         and better performance.
+         are enabled).

Quoted 4 lines

I think this removes a good piece of information. Perhaps rephrase?

          This driver may use the APB DMA when available to achieve higher baudrate and better performance.

I think this sentence would make it sound like the driver performs better if the APB DMA controller is available, but in reality the driver just uses the generic DMA API like most serial drivers, and there is nothing APB- specific in it. If another DMA controller (e.g. GPC on Tegra234) is available instead of the APB one, the serial peripheral will be just as fast.

#3 lore raw
Quoted 2 lines · Francesco Lavra
Quoted 1 line · Andy Shevchenko

On Wed, Nov 26, 2025 at 10:07:59AM +0100, Francesco Lavra wrote:

...

Quoted 15 lines
Quoted 10 lines
Quoted 9 lines

        help
          Support for the on-chip UARTs on the NVIDIA Tegra series SOCs providing /dev/ttyTHS0, 1, 2, 3 and 4 (note, some machines may not
          provide all of these ports, depending on how the serial port -         are enabled). This driver uses the APB DMA to achieve higher baudrate
-         and better performance.
+         are enabled).

Quoted 4 lines

I think this removes a good piece of information. Perhaps rephrase?

          This driver may use the APB DMA when available to achieve higher baudrate and better performance.

Quoted 6 lines

I think this sentence would make it sound like the driver performs better if the APB DMA controller is available, but in reality the driver just uses the generic DMA API like most serial drivers, and there is nothing APB- specific in it. If another DMA controller (e.g. GPC on Tegra234) is available instead of the APB one, the serial peripheral will be just as fast.

OK. But this is not the case for Tegra234? Or is it and it uses DMA for UART?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
Quoted 34 lines · Andy Shevchenko
Quoted 2 lines · Francesco Lavra
Quoted 1 line · Andy Shevchenko

On Wed, Nov 26, 2025 at 10:07:59AM +0100, Francesco Lavra wrote:

...

Quoted 19 lines
Quoted 14 lines
Quoted 5 lines

        help
          Support for the on-chip UARTs on the NVIDIA Tegra series SOCs
          providing /dev/ttyTHS0, 1, 2, 3 and 4 (note, some machines

Quoted 8 lines

may not
          provide all of these ports, depending on how the serial port
-         are enabled). This driver uses the APB DMA to achieve higher
baudrate
-         and better performance.
+         are enabled).

Quoted 4 lines

I think this removes a good piece of information. Perhaps rephrase?

          This driver may use the APB DMA when available to achieve higher baudrate and better performance.

Quoted 8 lines

I think this sentence would make it sound like the driver performs better
if the APB DMA controller is available, but in reality the driver just uses
the generic DMA API like most serial drivers, and there is nothing APB- specific in it. If another DMA controller (e.g. GPC on Tegra234) is available instead of the APB one, the serial peripheral will be just as fast.

Quoted 2 lines

OK. But this is not the case for Tegra234? Or is it and it uses DMA for UART?

Yes, that is the case, Tegra234 has just a different DMA controller (TEGRA186_GPC_DMA), which is used by the UART driver as long as the relevant device tree node properties are in place.

Reviewed-by
#5 lore raw
Quoted 4 lines · Francesco Lavra
Quoted 3 lines · Andy Shevchenko
Quoted 2 lines · Francesco Lavra
Quoted 1 line · Andy Shevchenko

On Wed, Nov 26, 2025 at 10:07:59AM +0100, Francesco Lavra wrote:

...

Quoted 28 lines
Quoted 28 lines
Quoted 27 lines
Quoted 14 lines
Quoted 5 lines

        help
          Support for the on-chip UARTs on the NVIDIA Tegra series SOCs
          providing /dev/ttyTHS0, 1, 2, 3 and 4 (note, some machines

Quoted 8 lines

may not
          provide all of these ports, depending on how the serial port
-         are enabled). This driver uses the APB DMA to achieve higher
baudrate
-         and better performance.
+         are enabled).

Quoted 4 lines

I think this removes a good piece of information. Perhaps rephrase?

          This driver may use the APB DMA when available to achieve higher baudrate and better performance.

I think this sentence would make it sound like the driver performs better
if the APB DMA controller is available, but in reality the driver just uses
the generic DMA API like most serial drivers, and there is nothing APB- specific in it. If another DMA controller (e.g. GPC on Tegra234) is available instead of the APB one, the serial peripheral will be just as fast.

Quoted 6 lines
Quoted 2 lines

OK. But this is not the case for Tegra234? Or is it and it uses DMA for UART?

Yes, that is the case, Tegra234 has just a different DMA controller (TEGRA186_GPC_DMA), which is used by the UART driver as long as the relevant device tree node properties are in place.

Okay, with this it means that some generic statement like

          This driver may use the DMA when available to achieve higher baudrate and better performance.

is too generic to be added. That said, I agree that you dropped the original one completely.

FWIW,

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#6 lore raw
In reply to Francesco Lavra

Friendly ping

Quoted 35 lines · Francesco Lavra

This driver runs also on SoCs without a Tegra20 APB DMA controller (e.g. Tegra234).
Remove the Kconfig dependency on TEGRA20_APB_DMA, and remove reference to the APB DMA controller from the Kconfig help text.

Fixes 60d2016a5161 ("arm64: tegra: Add Tegra234 GPCDMA device tree

node")

---
 drivers/tty/serial/Kconfig | 5 ++---

 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/tty/serial/Kconfig +0 -0
index 44427415a80d..6212a814fdb7 100644
@@ -255,14 +255,13 @@ config SERIAL_SAMSUNG_CONSOLE


 config SERIAL_TEGRA
        tristate "NVIDIA Tegra20/30 SoC serial controller"
-       depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST +       depends on ARCH_TEGRA || COMPILE_TEST
        select SERIAL_CORE
        help
          Support for the on-chip UARTs on the NVIDIA Tegra series SOCs providing /dev/ttyTHS0, 1, 2, 3 and 4 (note, some machines may not
          provide all of these ports, depending on how the serial port -         are enabled). This driver uses the APB DMA to achieve higher baudrate
-         and better performance.
+         are enabled).

 config SERIAL_TEGRA_TCU
        tristate "NVIDIA Tegra Combined UART"

maintainer
#9 lore raw
In reply to Francesco Lavra
Quoted 6 lines · Francesco Lavra

This driver runs also on SoCs without a Tegra20 APB DMA controller (e.g. Tegra234).
Remove the Kconfig dependency on TEGRA20_APB_DMA, and remove reference to the APB DMA controller from the Kconfig help text.

Fixes 60d2016a5161 ("arm64: tegra: Add Tegra234 GPCDMA device tree node")

This patch looks fine, but I would drop the fixes tag. There are other earlier devices, such as Tegra186 that also use this. Also please CC [email protected] on these patches too. I know people try to limit the number of list copied, but we may miss this otherwise.

Thanks
Jon

Signature · 1 line
nvpublic
#8 lore raw
Quoted 4 lines · Greg Kroah-Hartman
Quoted 1 line · Francesco Lavra

Friendly ping

Can you resend this, I don't have it around anymore, thanks.

I saw that it has been applied to the tty-testing branch already (thanks!), anyway for reference the last version of the patch can be found at
https://patch.msgid.link/[email protected]