From patchwork Wed Oct 7 22:31:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 7347511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A54B6BEEA4 for ; Wed, 7 Oct 2015 22:34:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE01A20569 for ; Wed, 7 Oct 2015 22:34:22 +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 E7C8020504 for ; Wed, 7 Oct 2015 22:34:21 +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 1ZjxFd-0001xB-MW; Wed, 07 Oct 2015 22:31:57 +0000 Received: from mail-bl2on0109.outbound.protection.outlook.com ([65.55.169.109] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZjxFa-0001oj-8t for linux-arm-kernel@lists.infradead.org; Wed, 07 Oct 2015 22:31:54 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=scottwood@freescale.com; Received: from snotra.am.freescale.net (192.88.168.49) by BY1PR03MB1483.namprd03.prod.outlook.com (10.162.210.141) with Microsoft SMTP Server (TLS) id 15.1.286.20; Wed, 7 Oct 2015 22:31:28 +0000 From: Scott Wood To: Greg Kroah-Hartman Subject: [PATCH v2] serial: Enable Freescale 16550 workaround on arm Date: Wed, 7 Oct 2015 17:31:21 -0500 Message-ID: <1444257081-30491-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <20151002001616.GA3885@home.buserror.net> References: <20151002001616.GA3885@home.buserror.net> Status: O Lines: 48 MIME-Version: 1.0 X-Originating-IP: [192.88.168.49] X-ClientProxiedBy: BLUPR05CA0051.namprd05.prod.outlook.com (10.141.20.21) To BY1PR03MB1483.namprd03.prod.outlook.com (25.162.210.141) X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1483; 2:zOFfadnTSaYWuQK+89qIWj4syfjOgaALXblUC9E8GbZ+LEYp5rZFdoh8zKMsBcN2ASKq5nlRiwMNv2fP+w7YWnWeR6T4qju5CXwlVrlgS5IfpwmGOGpUAWsu+FATGBZp9m3ZNvwkIhFG7PgUNREi3cqhpyL5WelRsUNPd36vzg0=; 3:VPiJAgekt8ijy0KUxH290N4pVWL5J/0yuZBUIbNy/OnMB0PMQmAp7mI295OekERVrBOInztPEN7gInKwx5kaZoIVYjqCURE6gIBK0kef2JIsyY0Hs06DXKa14o4sZ3gZ/D/AIG3RDtsIkZmNWXG4pA==; 25:Kt35a8IE3+l3ccuTo5DgkYHYwSgpWXW9I8uuOVW8vsN+Uxm2TOIWoC2+/Gm6LtFZLCropjD/IFexGa7v4K08WYRujuIyS1SiejN7bKzobgVFvU33kaakxH90a/8HcqJ6XG3rWTAdXwWKaEfr3Vc1mnQ4BDDWy3k7A+KEQ+ypNXEAE5/TOAfTT9PwLcJtc+7kA9Nqp1W6FKvkc/HvChtBFWLgy+wahd2LbGu/PXxP0EQUJu4bXbIsC2sZzsj+pU1GcPcYCDLKzPKi4KqAO/Te5g== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1483; X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1483; 20:0Jl3gnsDIg5ojnPg6ltglx/Jj1qHTbLcOanY4jAWA4QUz4fE/U8NVSGabj4x49bUZYbb94pezKAMfVKcVC71s4T52lFctSYlIJRnXUk4eVo6FHrREgJIkJDY0vpiYomMX+h6fGAHVb0OT0nGmJpJxiVRqqoSIt6cjm3ItJFeQAqkO264ZyfeD8+JG/hl3iSVh2EDoiH0KmMAX6RduooyZbiBPR08db47SngVa+gcjGuBG5EGx4RN/VqF0snmktZ0jc14MxmOHEkAKCxrES6ePIQ91KS0XCFtc351YmZ3wr/urlyxidUe8AheUqsrvCfMfCGgQJn9AZnJ800bx/gDmXq6QUie7rER4E0r5URilQWGVUH4ppeeIgaCczlrtJ4ujHZqLAJaduf0YAZMY39a9rEOQAkmwMv4YpJX3BrBCRkiwocOJJXmyvvlUkdUthHMamG9iAq7b1IBuAl195hpotU6S2AEcXvxwLlTamMZ9nl5pHz9lHVeBxF0E7qBL0oY; 4:EfDjXY1rnLcwnXGpGqHY81edGfG7eXnvpjQGP5QazUm27QNR5sd4tESEeY8pE+DI8xoIvKBTiE42M/0qSCmjqc7OuIRZWhvE5du4iMNqXPDZhGSi0CtTE4gQy69JqBBoDX+qvXYcntFnEbfkmyvs2hp95S0O6V99N3g8lwQ3wNCH/XCMYSfa6+cBSiNrddunD2bQIlfjoq1nuY8mGRq3xxDiOvpiS2onxS8stEcoRj7hGiRr8MLDsLHnHjIcml9vEZsJ9ZhyHjEXbD+URMDAzg1Ak7UMYjUbRji60ZFCrR2+30nQmAUB6O502noq3kd19T7JtWZwHPyNUESHKJQIbPsVRSel7nj2nlw3sMzk7iU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(520078)(3002001); SRVR:BY1PR03MB1483; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1483; X-Forefront-PRVS: 0722981D2A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(50226001)(66066001)(5008740100001)(92566002)(101416001)(2950100001)(33646002)(97736004)(48376002)(81156007)(36756003)(105586002)(77096005)(106356001)(107886002)(5007970100001)(122386002)(19580395003)(5003940100001)(189998001)(19580405001)(5001960100002)(229853001)(86362001)(87976001)(40100003)(46102003)(110136002)(76176999)(64706001)(50986999)(5004730100002)(42186005)(50466002)(47776003)(4001430100001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY1PR03MB1483; H:snotra.am.freescale.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; BY1PR03MB1483; 23:27TXifHVBB/FET0ReZrtaOcm19SKD7R+TQsXs/Zke?= =?us-ascii?Q?g/SiX3adJviV0ww3BRZUhPoczGpdDSQ9TWJCzwk3lm3jTjD8dalwEL+p9ugu?= =?us-ascii?Q?q8Jz4Y2UOXPSetHIDeeRCkEhIS8etACd6THbELlOOjLUnDeEUiJ3ua3rn5kH?= =?us-ascii?Q?2tFohG3jlDEehVJgeIxSExaBB6SyvcSJ3PotS44loNF0cg/4aSiLJh8nfTwx?= =?us-ascii?Q?eHwY8xVl2yDa4RNdaSzLr8pshkoYBa5dTwkuv+jNYdsZA89FBZ69HyDez/OQ?= =?us-ascii?Q?fZz0PERkhEZBJ6MbKtQo45HAABOEzFt0LDFKXzfZrAuwxJei4ufKw4pr6ZjZ?= =?us-ascii?Q?hzue/or6B+1JkkHGMgBVXeLF9fFNpW03DQtX5j7VHYQZoBSnsKSP8lI8wsFh?= =?us-ascii?Q?D2JL64iCYWIFEFwgB+MA/l09tENmq8CWMMYXaw3AZsJtEKYW1HZn4MR7mTVA?= =?us-ascii?Q?KJAOjo0/0zjLH+WYGsvUJW4b57cQNDWtEcByaShGycIbNmiIQuAahprrXAYF?= =?us-ascii?Q?4J1kwMvFym30Mm6p8pSlITG0v+UxOng9xBsudl9HtBP379LjeovslSCqbMgo?= =?us-ascii?Q?oL9QprivYvq0PWj+ToJLscQb7mS+/PypSipUy7BIMolRM5kwKr/spGUWYbnS?= =?us-ascii?Q?0mc5TR9PRq5bbJ+nY3AhrG4m71VjLQ2uxUtThEt9xlFrzVKhbv/zdwydq0ma?= =?us-ascii?Q?9nZKDgMkp316IYPILCs8snQSe2eE3Sye1ZxJE3ErU2b+t34v6mltmluCixQi?= =?us-ascii?Q?n/GjmsxNMrUaulRx82rh9cuxIEGtdTHy37fcPkdcdUZ2nISkiUlq1hNRBiTz?= =?us-ascii?Q?RCrRk0+yEtsFri5l2/7lb+2Zd+7orpbl7fq54W0G9xlStO0eMD6QHMhTdlUx?= =?us-ascii?Q?vU7twsucLUCDcSiTm+JW4fyiSUIE17enweu7jPUl9j4T3EeVVnz4rxwtqQCV?= =?us-ascii?Q?NAu3Bc/P/OkyNR1kkuSTb/FRGjrZ7QFYjs5WvzqIouRryvucUzG2ioYC4t7G?= =?us-ascii?Q?IIjgSGZW9B4bshXczvCNZGBkREXnj/losGQK3jFz1ZIgkgXXOFqdmwA9z/7u?= =?us-ascii?Q?kfJskFxNB9ZjOnqaX6Bkl4hGjWz?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR03MB1483; 5:9cvyc6rTwXoM5hrtNip0foWNRNx5rfzsdYxesYFil1MLvwsniVskI4W+5vqMswZfP8z/rzJY3RmtcPGK085l1HgYtQUyrK690XHlwgNFZ0Y6o2d04M106uv5Gf9Cppufu9Mb9hCtVhvw4q/a2wrnSg==; 24:KlQoQ01zQMK7K4O300y2o2S1C5G4POhUs7N3fCQf7JLmvLha2JsHq28Yj+s1vrr618qdxjRwQXOZwXBxiz7BmP29DKCXMH+ZJChH5zq8D64=; 20:aF66HoK5oib6TVgfK36KN6rURK4N/zFRMpi2pyWEBNncoJGkvA8/DjF3NYSUgn1iSvzK8aRK4rAaxcF+Kv6emA== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2015 22:31:28.8756 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1483 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151007_153154_599900_A7B7FF95 X-CRM114-Status: GOOD ( 11.43 ) 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, Scott Wood , Arnd Bergmann , 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 Acked-by: Arnd Bergmann --- v2: Use IS_ENABLED rather than ifdef drivers/tty/serial/8250/Kconfig | 4 ++-- drivers/tty/serial/of_serial.c | 5 +++++ 2 files changed, 7 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..fe241bd 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c @@ -150,6 +150,11 @@ static int of_platform_serial_setup(struct platform_device *ofdev, break; } + if (IS_ENABLED(CONFIG_SERIAL_8250_FSL) && + (of_device_is_compatible(np, "fsl,ns16550") || + of_device_is_compatible(np, "fsl,16550-FIFO64"))) + port->handle_irq = fsl8250_handle_irq; + return 0; out: if (info->clk)