Skip to contentSkip to conversation

serial: 8250_lpss: Enable DMA on Intel Elkhart Lake

PATCH New Andy Shevchenko 1 participant 1 message Jul 21, 2021

Subsystems (2)
lore
Share & tools
lore

Andy Shevchenko

author reviewer
#0 lore raw

PATCH 1/1 serial: 8250_lpss: Enable DMA on Intel Elkhart Lake

PSE UARTs on Intel Elkhart Lake support DMA mode.
Enable DMA on these ports.

---
 drivers/tty/serial/8250/8250_lpss.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/tty/serial/8250/8250_lpss.c +10 -0
index 4dee8a9e0c95..848d81e3838c 100644
@@ -158,6 +158,16 @@ static int byt_serial_setup(struct lpss8250 *lpss, struct uart_port *port)
 
 static int ehl_serial_setup(struct lpss8250 *lpss, struct uart_port *port)
 {
+	struct uart_8250_dma *dma = &lpss->data.dma;
+	struct uart_8250_port *up = up_to_u8250p(port);
+
+	/*
+	 * This simply makes the checks in the 8250_port to try the DMA
+	 * channel request which in turn uses the magic of ACPI tables
+	 * parsing (see drivers/dma/acpi-dma.c for the details) and
+	 * matching with the registered General Purpose DMA controllers.
+	 */
+	up->dma = dma;
 	return 0;
 }
 
Signature · 1 line
2.30.2