From patchwork Mon Jan 25 17:38:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Ferre X-Patchwork-Id: 8113691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 13F169F440 for ; Mon, 25 Jan 2016 17:39:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4F1DB20303 for ; Mon, 25 Jan 2016 17:39:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E5B2202EB for ; Mon, 25 Jan 2016 17:39:44 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNl5v-0006rS-DR; Mon, 25 Jan 2016 17:38:27 +0000 Received: from eusmtp01.atmel.com ([212.144.249.243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aNl5k-0006fg-Ma for linux-arm-kernel@lists.infradead.org; Mon, 25 Jan 2016 17:38:18 +0000 Received: from tenerife.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Mon, 25 Jan 2016 18:37:52 +0100 From: Nicolas Ferre To: Greg Kroah-Hartman , Subject: [PATCH 2/2] serial: atmel: add support for new UART version Date: Mon, 25 Jan 2016 18:38:02 +0100 Message-ID: <93f5f783fd232d9dfe99e7d6f1fdc6c92adb7c46.1453743308.git.nicolas.ferre@atmel.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <198abfa682d5a39758599d34d1c5b9fd2858cedc.1453743308.git.nicolas.ferre@atmel.com> References: <198abfa682d5a39758599d34d1c5b9fd2858cedc.1453743308.git.nicolas.ferre@atmel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160125_093817_052346_7C2F0363 X-CRM114-Status: GOOD ( 10.39 ) X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: davidm@egauge.net, Nicolas Ferre , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, jslaby@suse.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Starting with sama5d2, the new UART revision has an hardware timer. So, add it to the IP detection code and set the "has_hw_timer" property for it. Signed-off-by: Nicolas Ferre Reported-by: David Mosberger --- drivers/tty/serial/atmel_serial.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index de5d32c31179..fab135824679 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -1714,11 +1714,12 @@ static void atmel_get_ip_name(struct uart_port *port) /* ASCII decoding for IP version */ usart = 0x55534152; /* USAR(T) */ dbgu_uart = 0x44424755; /* DBGU */ + new_uart = 0x55415254; /* UART */ atmel_port->has_hw_timer = false; - if (name == usart) { - dev_dbg(port->dev, "Usart with hw timer\n"); + if (name == usart || name == new_uart) { + dev_dbg(port->dev, "Usart or uart with hw timer\n"); atmel_port->has_hw_timer = true; } else if (name == dbgu_uart) { dev_dbg(port->dev, "Dbgu or uart without hw timer\n");