Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp608668ybl; Thu, 23 Jan 2020 04:44:00 -0800 (PST) X-Google-Smtp-Source: APXvYqza+55u1jIcA3ocyiZD4KWWAYa9YYaklBFOIfVaFg2BnDLCzWSEdsp3ph/pf9VlsqrbBSS5 X-Received: by 2002:a05:6830:20d3:: with SMTP id z19mr10466399otq.330.1579783439900; Thu, 23 Jan 2020 04:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579783439; cv=none; d=google.com; s=arc-20160816; b=S5TTsVZUBs5egTJTzs1BYr4XG0oadsCwOH+0tQnOkT/s/35Q6ZJ0aN8MQiWwCGMXeo CXEiik38vMdbf+Odlo0zkzHWbTkV9mdqiHGmYpYOVKPlZSppud93vWmZ5uW4Z2A3+ili SQxbj8OaIsYBAFydyAO1ym4ZzypDH8sP40+I6E4T7eZYCpRXN3zBr1uAggMx14K4Ux70 H7pWOnMgI2AlNdCgigPR33D3S5MPGwePazrdOWMSWUywyKDypaTAPw0tpNGFYrV1ikqE lwtLCcBDsJ2+XQQLrKpXeVSd/Avfxj5N9Ip2tFlAGvOKWJgxN4tJfLvvyQfGHA7/R+l4 w8/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KE5U2DLgaruu+/tkZNiBNwyEilY9tzQtjisladI4V60=; b=pOKFEeuBKZo9C5Ptimpbg++o1EJI94xQ9vH5Yi0ofm160IZydpjjJG778xhCGF9C9I 9ZywF7HbnwovLbJC6rMA1wqpj1E0n9md1hW91PUYjecPWfZWormw5N32l6JVFlNbgWyI btP8jzzw18g5/Igw/RzFrjFFnrUS0zSwfE1gmnA8g5jZqdN6QXT4seAFtzglNbxoHpVk f83iTOXreWCgHKLjgQ9tgFBbDJBqwYV/gXpRQiothYKDYHM1hMCmKWZVxgpvrZnBFiYn b0XIeN21PQfzMnhSVZSlwf9x8zuAIPVuxZgZV5xt2xA2jrjdbrb/ilxGOqP3I+8TOQTK qOFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k10si1148801otf.237.2020.01.23.04.43.47; Thu, 23 Jan 2020 04:43:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbgAWMmv (ORCPT + 99 others); Thu, 23 Jan 2020 07:42:51 -0500 Received: from alexa-out-blr-01.qualcomm.com ([103.229.18.197]:27165 "EHLO alexa-out-blr-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbgAWMmv (ORCPT ); Thu, 23 Jan 2020 07:42:51 -0500 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by alexa-out-blr-01.qualcomm.com with ESMTP/TLS/AES256-SHA; 23 Jan 2020 18:12:15 +0530 Received: from c-rojay-linux.qualcomm.com ([10.206.21.80]) by ironmsg01-blr.qualcomm.com with ESMTP; 23 Jan 2020 18:11:54 +0530 Received: by c-rojay-linux.qualcomm.com (Postfix, from userid 88981) id C230A26EB; Thu, 23 Jan 2020 18:11:53 +0530 (IST) From: Roja Rani Yarubandi To: Greg Kroah-Hartman Cc: akashast@codeaurora.org, msavaliy@qti.qualcomm.com, mgautam@codeaurora.org, skakit@codeaurora.org, Andy Gross , Bjorn Andersson , Jiri Slaby , linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Roja Rani Yarubandi Subject: [PATCH 1/1] tty: serial: qcom_geni_serial: Configure UART_IO_MACRO_CTRL register Date: Thu, 23 Jan 2020 18:11:50 +0530 Message-Id: <20200123124150.19176-2-rojay@codeaurora.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200123124150.19176-1-rojay@codeaurora.org> References: <20200123124150.19176-1-rojay@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Configure UART_IO_MACRO_CTRL register if UART lines are swapped. Signed-off-by: Roja Rani Yarubandi --- drivers/tty/serial/qcom_geni_serial.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index ff63728a95f4..68b11b6ad3be 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -24,6 +24,7 @@ /* UART specific GENI registers */ #define SE_UART_LOOPBACK_CFG 0x22c +#define SE_UART_IO_MACRO_CTRL 0x240 #define SE_UART_TX_TRANS_CFG 0x25c #define SE_UART_TX_WORD_LEN 0x268 #define SE_UART_TX_STOP_BIT_LEN 0x26c @@ -1260,6 +1261,7 @@ static int qcom_geni_serial_probe(struct platform_device *pdev) int irq; bool console = false; struct uart_driver *drv; + u32 val; if (of_device_is_compatible(pdev->dev.of_node, "qcom,geni-debug-uart")) console = true; @@ -1309,6 +1311,10 @@ static int qcom_geni_serial_probe(struct platform_device *pdev) return irq; uport->irq = irq; + ret = of_property_read_u32(pdev->dev.of_node, "qcom,pin_inverse", &val); + if (!ret) + writel(val, uport->membase + SE_UART_IO_MACRO_CTRL); + irq_set_status_flags(uport->irq, IRQ_NOAUTOEN); ret = devm_request_irq(uport->dev, uport->irq, qcom_geni_serial_isr, IRQF_TRIGGER_HIGH, port->name, uport); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation