summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/pch_uart.c
diff options
context:
space:
mode:
authorZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>2016-08-12 12:48:54 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-31 15:45:19 +0200
commit7789e5a2accdbc5d506405c11ef4e5469440e96b (patch)
treeab44f96a4c0ac701c222e0f236494a5b81d1f8a0 /drivers/tty/serial/pch_uart.c
parentbed3d7babafda16cf2e095366dec3f64143b370a (diff)
serial: pch_uart: Add support for reading clock-frequency from DT
The MIPS based Boston platform provides a 25MHz clock to the UART. Enable the driver for MIPS and add support in the driver to read the frequency from device tree. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/pch_uart.c')
-rw-r--r--drivers/tty/serial/pch_uart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index ea4ffc2ebb2f..23672f8a343e 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -31,6 +31,7 @@
#include <linux/dmi.h>
#include <linux/nmi.h>
#include <linux/delay.h>
+#include <linux/of.h>
#include <linux/debugfs.h>
#include <linux/dmaengine.h>
@@ -1826,6 +1827,10 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
priv->trigger_level = 1;
priv->fcr = 0;
+ if (pdev->dev.of_node)
+ of_property_read_u32(pdev->dev.of_node, "clock-frequency"
+ , &user_uartclk);
+
#ifdef CONFIG_SERIAL_PCH_UART_CONSOLE
pch_uart_ports[board->line_no] = priv;
#endif