From patchwork Fri Oct 2 00:16:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 7312231 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 E09BD9F302 for ; Fri, 2 Oct 2015 00:19:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0E9E520781 for ; Fri, 2 Oct 2015 00:19:06 +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 127E720762 for ; Fri, 2 Oct 2015 00:19:05 +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 1Zho1t-0002bQ-7U; Fri, 02 Oct 2015 00:16:53 +0000 Received: from mail-bl2on0135.outbound.protection.outlook.com ([65.55.169.135] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zho1q-0002UO-8i for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2015 00:16:50 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=scottwood@freescale.com; Received: from home.buserror.net (192.88.168.49) by CY1PR03MB1488.namprd03.prod.outlook.com (10.163.17.18) with Microsoft SMTP Server (TLS) id 15.1.280.20; Fri, 2 Oct 2015 00:16:25 +0000 Date: Thu, 1 Oct 2015 19:16:16 -0500 From: Scott Wood To: Greg Kroah-Hartman Subject: [PATCH] serial: Enable Freescale 16550 workaround on arm Message-ID: <20151002001616.GA3885@home.buserror.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: BY2PR1001CA0056.namprd10.prod.outlook.com (25.164.163.24) To CY1PR03MB1488.namprd03.prod.outlook.com (25.163.17.18) X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1488; 2:YzWnxu+vRjgwXa2kJtjji9gcE4P9ZxZwqxsznoPplQEyug/KflMNmQPIlTiBUXj6j2gM11cqw47bj6CEeMrerQ8giCxDY2akmLhvKCLuNX6yChFC3OdkZnAWlcgq0K8mUjUYH1ReN/8GptSTr8THLTeK2HATJcinVJeDj1FT6Ig=; 3:z88dYhzff8xnNY3a/iog5yR/UoolSpEoVP6XKX+e0Tw/XKLSrXDw6MjS6oo9taDTe0o6dKvxDmV+oMOVUpS4jn/31T7FI4dIMM2iqqc0MBxEI21oyg3/pkP0bulooSaTD33rWrx8fXOor4sK9m08Cg==; 25:DXIZV6pc3jVR3TTdccd32skhN2pqOT51IwMb9f7Uz+2UQ+N5wJ8TcAECK+sHsA6HraBsnbFGgqQRY9rxhYlkJaKNK5l7GBAszRxvj7sYwDm21DSQ0BXk8zGkZVBsS/G8hPUDbZjx66SYd8p36Uww+iUHvAAvl+RCHFnx8w3+fIWv5tVcnUsZJPOBlBrI5srPb45JDLDquaYVpoIaPiQWJbWsYYdokG1BqL0GVNthF6En/S+JCxqKKPmJ5aap0xVBi1nKJPfsEQn77HtAnxq1VQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR03MB1488; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB1488; 20:L9jqzvKEXKOlYlTHomqJxTWcIGQLI/CenJEOK8ooVC1hyuBc0T8SxJzZ4cgN8yY58L4zH6Lcrz7nlF7UhbjQElDlTlXqkG282pdWcjnFr2tDMkYeVwhS5LlT3RoiRCW11vEw5arGyR7CnWOqjuvtPE5SAyNV8tMioxU4RmziC6fz84eqUlVXdqHefOGcPUcZtvW5ixV2YkUzTYxZ3r7EKGTScuAdyYo2ltK8iMTGGedTVS/2OYSUTwxlSxwev4A4DlhC2O3EV8OqKepPJnuGfPfRtNfDdZi55iZiYqh1z+MgGPm4uLcpJApO0jsaPjUdMCjr92OLKW3ieb3gBIMVUZPyiLuQgdNrGV24RNzXtjnpb0R6H9hyeBtUrjdROyX3jyWM8fOxtjcXrNXy/UMcEMQdC/K8WmaYZHQASXfhrm26fLX9EKvyj6IOc6eNPYYSpOks8oUkDm97art+lRLWTqifpg1jmk4JoxIH1KsMZmepi4xRJeDgHJ59pgIpbvHR; 4:x4qyfoaRzr8oQZ0UFjDeggbSXtDDLx3rXeu5dRL+AhkpXM+JJtV/AKLO32yjcJoAiRhhp0fkxEI3tBWDYFvIndE6KrW6BEEha2Ae26YpUjaM6kRIxkWdqVZYhdcl21u/T9gxUBahN58bM8sWkykjuAFS8kXlZ924pec528MCGmIbrbvRWL5EuD/kZtPjJ9mQLSiWJfDoRelqeE49S1AuYvWkFd+P4TUS4UwZ7BdfysNT4KxfqWLEXGaLmoZjAmezMqgIV6me0nK4QTNgpTFvmcJx+VTfjQPGk6b2zzdoaosdv8ZYMyw1TUqZ9Sdl/1hNYN0nmFfXtAdmVgLRHqBMDH/6CnOjlPi3WEWknrob8Yo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001); SRVR:CY1PR03MB1488; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1488; X-Forefront-PRVS: 0717E25089 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(122386002)(46406003)(189998001)(40100003)(5007970100001)(101416001)(50986999)(229853001)(86362001)(5008740100001)(83506001)(68736005)(4001350100001)(87976001)(110136002)(5004730100002)(92566002)(105586002)(77096005)(69596002)(54356999)(19580395003)(97756001)(106356001)(5001960100002)(23726002)(62966003)(81156007)(50466002)(42186005)(33656002)(4001540100001)(53416004)(5001830100001)(47776003)(97736004)(5001860100001)(46102003)(19580405001)(64706001)(77156002)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR03MB1488; H:home.buserror.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: freescale.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB1488; 23:/AZ1ff/z8uU0ER4SGaLfg9IGcVDBtt288uUS1T0bD?= =?us-ascii?Q?JhAATGtN3twys9b0kTz8Sf1OAD56MY56KbTtG6OrZ2Zse6dFa8gGAjcF4NGQ?= =?us-ascii?Q?Uu5iBistrwoJDXdXHSpiTVYdk3Ouz5Vg8rJ/qnX9NSLQWytvDKf4s24RBlfz?= =?us-ascii?Q?VLnZtx0cdyG/j8pb3DIYgqBhbFvwZ/hWMcTjHmKzYG9WPDfHNRCdpDadAWOy?= =?us-ascii?Q?8s8FN5010R88ySODMr8argLjqLFSE0LLKMkCfwvlc+Xv4Cc77c+qTuinL72F?= =?us-ascii?Q?9R7PJ9C2gSXJHSEqhXg/c5dGNgTCBiIZBuKufHjAspFH0RXryiqqpEg5uAS6?= =?us-ascii?Q?5LWX+pvpPXV5kNyVaP5zWNHxSs9uEfF5yPXPGX5DtTTf25DFU0duZ20CbVK4?= =?us-ascii?Q?4qJAHJrB38LvW2QgPeUKj8QJ1CrDVzXlMRABm5lijNGwxiYI3St6fKuoU/e1?= =?us-ascii?Q?vb49hUBF7/wxDJiZNz0fF4eSBwncvPnVa5UV/NdPkal3YwkN0Ra0PG6JojSb?= =?us-ascii?Q?UMcD1NJVF/lm/5VnvfTnW8NMRhzwpCqoiTjYsK4OMs4Wvg7Z2mKkR7LoxsQr?= =?us-ascii?Q?HYDHum3X8DqFOwXQHp+nPjq39HDnus6BdXdNSPuUX08vZiKHON/+ReZVnXmz?= =?us-ascii?Q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rxzDkAhI333tk2TCbjITPZAKjs6t4wsjjh/NVBTT93KuHEiacPv1unaxxvGJwxuRzFIg== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2015 00:16:25.6216 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1488 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151001_171650_526305_DCC3D2BC X-CRM114-Status: GOOD ( 11.10 ) X-Spam-Score: -1.9 (-) 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: linux-arm-kernel@lists.infradead.org, Stuart Yoder , linux-serial@vger.kernel.org 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=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_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 The same serial hardware is present on LS2080A which is arm64, and LS1021A which is arm32, so don't limit the workaround to PPC. Unlike PPC which uses arch/powerpc/kernel/legacy_serial.c, the ARM targets use drivers/tty/serial/of_serial.c, so add the handle_irq override check there as well. Signed-off-by: Scott Wood --- drivers/tty/serial/8250/Kconfig | 4 ++-- drivers/tty/serial/of_serial.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig index e1de118..5a2ae57 100644 --- a/drivers/tty/serial/8250/Kconfig +++ b/drivers/tty/serial/8250/Kconfig @@ -274,8 +274,8 @@ config SERIAL_8250_ACORN config SERIAL_8250_FSL bool - depends on SERIAL_8250_CONSOLE && PPC_UDBG_16550 - default PPC + depends on SERIAL_8250_CONSOLE + default PPC || ARM || ARM64 config SERIAL_8250_DW tristate "Support for Synopsys DesignWare 8250 quirks" diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index 6823df9..9cd0061 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c @@ -150,6 +150,12 @@ static int of_platform_serial_setup(struct platform_device *ofdev, break; } +#ifdef CONFIG_SERIAL_8250_FSL + if (of_device_is_compatible(np, "fsl,ns16550") || + of_device_is_compatible(np, "fsl,16550-FIFO64")) + port->handle_irq = fsl8250_handle_irq; +#endif + return 0; out: if (info->clk)