aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2013-08-21 02:48:04 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-27 19:22:59 -0400
commitc3b5d3be7e354d4e05ae433b9c733330c65b8b34 (patch)
treef52b129fd08db10d0606cd3db3ef6176c427c951 /drivers/tty
parentbfaddb7d13ffd5db0180f0121447e2ca4ce3020e (diff)
msm_serial: Add support for non-GSBI UARTDM devices
Not all UARTDM hardware is part of a GSBI complex. Add support for these devices and fix a bug where we assumed uartdm meant the hardware was part of a GSBI complex. Cc: David Brown <davidb@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/msm_serial.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 67894354dc2a..5a7503986d7d 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -678,7 +678,7 @@ static void msm_config_port(struct uart_port *port, int flags)
678 if (ret) 678 if (ret)
679 return; 679 return;
680 } 680 }
681 if (msm_port->is_uartdm) 681 if (msm_port->gsbi_base)
682 writel_relaxed(GSBI_PROTOCOL_UART, 682 writel_relaxed(GSBI_PROTOCOL_UART,
683 msm_port->gsbi_base + GSBI_CONTROL); 683 msm_port->gsbi_base + GSBI_CONTROL);
684} 684}
@@ -868,6 +868,11 @@ static struct uart_driver msm_uart_driver = {
868 868
869static atomic_t msm_uart_next_id = ATOMIC_INIT(0); 869static atomic_t msm_uart_next_id = ATOMIC_INIT(0);
870 870
871static const struct of_device_id msm_uartdm_table[] = {
872 { .compatible = "qcom,msm-uartdm" },
873 { }
874};
875
871static int __init msm_serial_probe(struct platform_device *pdev) 876static int __init msm_serial_probe(struct platform_device *pdev)
872{ 877{
873 struct msm_port *msm_port; 878 struct msm_port *msm_port;
@@ -887,7 +892,7 @@ static int __init msm_serial_probe(struct platform_device *pdev)
887 port->dev = &pdev->dev; 892 port->dev = &pdev->dev;
888 msm_port = UART_TO_MSM(port); 893 msm_port = UART_TO_MSM(port);
889 894
890 if (platform_get_resource(pdev, IORESOURCE_MEM, 1)) 895 if (of_match_device(msm_uartdm_table, &pdev->dev))
891 msm_port->is_uartdm = 1; 896 msm_port->is_uartdm = 1;
892 else 897 else
893 msm_port->is_uartdm = 0; 898 msm_port->is_uartdm = 0;
@@ -934,6 +939,7 @@ static int msm_serial_remove(struct platform_device *pdev)
934 939
935static struct of_device_id msm_match_table[] = { 940static struct of_device_id msm_match_table[] = {
936 { .compatible = "qcom,msm-uart" }, 941 { .compatible = "qcom,msm-uart" },
942 { .compatible = "qcom,msm-uartdm" },
937 {} 943 {}
938}; 944};
939 945