From patchwork Tue Jun 13 02:55:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9783009 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0841E602C9 for ; Tue, 13 Jun 2017 02:56:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF0F028382 for ; Tue, 13 Jun 2017 02:56:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3A3028583; Tue, 13 Jun 2017 02:56:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 44E4728382 for ; Tue, 13 Jun 2017 02:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IhMKhRaH9xP5OJyWt0FKXYy6qSDBFoD5/KxLa5e9ZvU=; b=FSwrc/o0SSOjUR WKaLh4PcS48IVWct02s6K9A9J+lmhRO6XLaAOVfaA0q1cgHu2K7nlJui89mUuhOxmC4+lN+pG2vTD ZwIZgCsnLjGAJ3mW8RrFl+WtBJoVQ0sTxTa4sOxjALUfOInI9pRh1MiDA5K5m1oPohPTghZ/Uxg7p FSISVdb8d11U9UFoKNVcIabJs26u9ZZWCTUYTsvK+mi2ZDt8SJ77xvW8g4A1c6lfYbL1AjWftRub2 DdhDrjuiw9LTC9k8lhuTLuz4z/qUZuLets4omQ/yMwkGBEP0rY2xPAZZMwa9X4ZauLYFAzN2a3lTp UxIHfLIxiqHFq/eRBNNQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dKc0E-0002zN-6P; Tue, 13 Jun 2017 02:56:22 +0000 Received: from mail-bn3nam01on0630.outbound.protection.outlook.com ([2a01:111:f400:fe41::630] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dKc03-0002Yz-5P for linux-arm-kernel@lists.infradead.org; Tue, 13 Jun 2017 02:56:17 +0000 Received: from BN6PR03CA0079.namprd03.prod.outlook.com (2603:10b6:405:6f::17) by DM2PR0301MB0911.namprd03.prod.outlook.com (2a01:111:e400:501d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Tue, 13 Jun 2017 02:55:45 +0000 Received: from BN1BFFO11OLC001.protection.gbl (2a01:111:f400:7c10::1:103) by BN6PR03CA0079.outlook.office365.com (2603:10b6:405:6f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12 via Frontend Transport; Tue, 13 Jun 2017 02:55:45 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11OLC001.mail.protection.outlook.com (10.58.145.12) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1143.11 via Frontend Transport; Tue, 13 Jun 2017 02:55:45 +0000 Received: from b29396-OptiPlex-7040.ap.freescale.net (b29396-OptiPlex-7040.ap.freescale.net [10.192.242.182]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v5D2tZTX012328; Mon, 12 Jun 2017 19:55:40 -0700 From: Dong Aisheng To: Subject: [PATCH V4 1/7] tty: serial: lpuart: introduce lpuart_soc_data to represent SoC property Date: Tue, 13 Jun 2017 10:55:48 +0800 Message-ID: <1497322554-24463-2-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497322554-24463-1-git-send-email-aisheng.dong@nxp.com> References: <1497322554-24463-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131417961453875596; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39380400002)(39860400002)(39850400002)(39400400002)(39410400002)(39840400002)(39450400003)(2980300002)(1110001)(1109001)(339900001)(199003)(54534003)(189002)(9170700003)(8936002)(86362001)(356003)(7416002)(53936002)(38730400002)(8676002)(77096006)(575784001)(50226002)(81166006)(4326008)(110136004)(48376002)(498600001)(36756003)(189998001)(5660300001)(54906002)(8656002)(39060400002)(305945005)(6916009)(33646002)(85426001)(105606002)(2950100002)(5003940100001)(2351001)(106466001)(2906002)(47776003)(76176999)(50466002)(50986999)(104016004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB0911; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11OLC001; 1:lIa/pokYTvPozIkDeDZIVbhqnaUTjVmALJCxLZa3Y7m8zmofmMQRH3fW1kpswNGaaJWl5EEvogZ90Bv5C7WB819D2frRazknvbqO/byB05cojW+P3M5Lgfr3FFNMsqWb0HwYFKSkv9cEAqlZzFDWTsb1nYiMkoxugZN8W8y6pPm6oNey2Lu717qu9DT081Bb0xMZXb3iNpg2ksWfJj05CPzB3XpliWNCDR7grSW7aSewwrH5swgt39AHFydUQZyFJ3+eIxYSaJkfd4BlLmqUjjbpWbBP17i5oo+9cGc3AZ00THpb2eZRo+2/4MJ0AEHt02CrxjUVBs9XTXTeUh34vQQUCl/S8IQ0/mfKzzXyTueKbtTRzKBYZMmUMiIJl99pz+NSGsvF//cDODjM2Hh0U1yQIBE9VwxE009xde0EIhQNphF/LRAvwsud4Jo8Ft8VkLvYMZyJQU/1kt0euQA+pfrmauoCKk+x/6nbA7vzuRAiOmLROOQBstWEFtC2CMADMYHhqD+YUIPGvN/Z35xaMJVQw5LizbXVQNiMklM84o6ByxXtYnqkCFbjXwvB4iQIMlkSmVBBbFYHeiuDxO2j+ip/jEbT4CKvjqZws9VrYRN+NbKY1JU3ifmeti7x3KrGlBKnbfiiYlYoH15rBUm/+28jrYsARX7sOZ4AuzRu/K+H7/Eh91/LJrgjnJBm7QJC MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR0301MB0911: X-MS-Office365-Filtering-Correlation-Id: 4c927091-73fa-44dd-102d-08d4b207b005 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:DM2PR0301MB0911; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB0911; 3:f74WSLeE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4f7n624Do34WkMxklUzobGteoLzHb6wg06D1hfPN8uDyefHRIJHr/ooHUpZPea3e4wLtKw5XyD723loSI2ZNjkS4KAtplzwu9sshQCbIB/rd7P8RIZfvy2pp3NlV+aALOOuJwvmL2Iawn3KMYi+7Vrew02/cZ6iM2g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(13016025)(8121501046)(13018025)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123559100)(20161123556025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259150)(20161123563025)(20161123565025)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0301MB0911; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0301MB0911; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0911; 4:pQjv728G/Oi3AffxXErF56HQY0LFX9Mlt7Ga8Kva?= =?us-ascii?Q?kH+YEm9q+bEaCf6e0yYTimFtv9SszhtJi7+TIwWj3f0J7/cdmA6o42t7anKM?= =?us-ascii?Q?S5T5CpSbIaC0S68pB63jDq/HceHIcrx4HxGhTdv0x6dNawG4nba+tEEzx3Pm?= =?us-ascii?Q?H5bVKTYU86VCgHi7UyypaTfGrLXYuWCYP0lx48scob8WGeVk9xRPjMNhV7v0?= =?us-ascii?Q?f0e4BHguINwY8L3srt7kJe8vtsD8gdVvaeA7Pgtok9FgsZLoXB/t8JHnb2n2?= =?us-ascii?Q?VE29ZeS/b8PukzwtwCo7SwGywt2mpnas6OAJY/4sj8K8TlDMbaFFgRpFtfez?= =?us-ascii?Q?fgWxYgvfH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2jTe20IRLYui?= =?us-ascii?Q?5SBP72pW/r9XUFPLlZr484F2YgN1EEtfB3SqFw+A?= X-Forefront-PRVS: 0337AFFE9A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB0911; 23:yqPS9w3Chw+e00EqfPNgx2s4ZTkaN0qqNesdWHy?= =?us-ascii?Q?dxOiUG0pPfEQ8nv3AORQyPm6c3e6iGVS5+oTxO0XlBfRqmguPX0fFrghxWuL?= =?us-ascii?Q?lIRkk8w3QXRz0Rv2Wpo0pRrq+7y3Aca0tMwXeawYhO6rWC2+LCW+u1yScCT/?= =?us-ascii?Q?P9oKvKA25bFnWpfxaq4tp+peqICrjKADKaNyEX5YlKoOq3LOoEJXcbSsIz5w?= =?us-ascii?Q?sQtYa5qmfwdUdh0GlZ0F+NuEzAMpNF/M8lWHfdEIxh7lc7wxRZATNRreJiEJ?= =?us-ascii?Q?CeZnU1CGkmb4/D85y4sVy5/BKHgncaU9/+CfyT0W1+717qgs6rwFMbyOe2Co?= =?us-ascii?Q?5DGkUuHrBamZASLAl6hHWFph6RpFnELvBT/lX2q2EWj7BEFxt0USljT8gnUD?= =?us-ascii?Q?1niRaIXa7xxIa60+FiQOW0cxLcaNqL1ucW+twepsWLCQfNtFRcLEpSW91TfD?= =?us-ascii?Q?5e4olgBlVRUqSKfLNM/PZkVY4QzuGJ8tynY5LWhTj60RM57PV6rERmRwqZqc?= =?us-ascii?Q?4VE2sNlyX/w6SOigtNlIUONCPIXDzA5FH247ElVswi0vDV3Mnpvgaplucs7+?= =?us-ascii?Q?nPWgC2xsLTUO2ORK8q6ezeiDLSI+xVYLTLGK9HVTAebrzU3Ugm3kEP2jHnqv?= =?us-ascii?Q?jiHDs7mKzk2ybE/zkmWL3WNouA51G9GCL9iXniAy73wsPLccihBrnxGD2c9z?= =?us-ascii?Q?wsca1JundFPGPr5VDdMaYR7CmTRBhImPLti8dZBJQ6KA99f9zewiklMQ9CCT?= =?us-ascii?Q?1brmHIqOy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mnANYkOW/LMMeE4lEAW6VmIEy0LlixZAG3H/pVYTLYTgzVPPL4O53Y/APjSU7MCIo1qPt3swTvRd+DYTzTN4klCaqfHcy2gA1E413Bhv/BSHgacCyUpU/HIXe4t2q4Jv3A6CEh+QWBJkBnYCDWEIe3zE378o5yHvYfstTfPWTI/NkyaULaRnnDBakpwah/RDOIsdarvSXhDzXyGafkRwCOFPrbg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2017 02:55:45.0599 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0911 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170612_195611_865260_1B747284 X-CRM114-Status: GOOD ( 14.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nikita.yoush@cogentembedded.com, Dong Aisheng , fugang.duan@nxp.com, dongas86@gmail.com, gregkh@linuxfoundation.org, yangbo.lu@nxp.com, linux-kernel@vger.kernel.org, stefan@agner.ch, andy.shevchenko@gmail.com, Mingkai.Hu@nxp.com, jslaby@suse.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This is used to dynamically check the SoC specific lpuart properies. Currently only the iotype is added, it functions the same as before. With this, new chips with different iotype will be more easily added. Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Stefan Agner Cc: Mingkai Hu Cc: Yangbo Lu Cc: Fugang Duan Cc: Andy Shevchenko Cc: Nikita Yushchenko Signed-off-by: Dong Aisheng --- ChangeLog: v3->v4: * remove one duplicated blank line v2->v3: * use standard iotype flags instead of private is_32 member v1->v2: * make all soc_data const --- drivers/tty/serial/fsl_lpuart.c | 47 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 15df1ba7..c17a0ea 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -236,7 +236,6 @@ struct lpuart_port { struct clk *clk; unsigned int txfifo_size; unsigned int rxfifo_size; - bool lpuart32; bool lpuart_dma_tx_use; bool lpuart_dma_rx_use; @@ -258,13 +257,21 @@ struct lpuart_port { wait_queue_head_t dma_wait; }; +struct lpuart_soc_data { + char iotype; +}; + +static const struct lpuart_soc_data vf_data = { + .iotype = UPIO_MEM, +}; + +static const struct lpuart_soc_data ls_data = { + .iotype = UPIO_MEM32BE, +}; + static const struct of_device_id lpuart_dt_ids[] = { - { - .compatible = "fsl,vf610-lpuart", - }, - { - .compatible = "fsl,ls1021a-lpuart", - }, + { .compatible = "fsl,vf610-lpuart", .data = &vf_data, }, + { .compatible = "fsl,ls1021a-lpuart", .data = &ls_data, }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, lpuart_dt_ids); @@ -593,7 +600,7 @@ static irqreturn_t lpuart_txint(int irq, void *dev_id) spin_lock_irqsave(&sport->port.lock, flags); if (sport->port.x_char) { - if (sport->lpuart32) + if (sport->port.iotype & UPIO_MEM32BE) lpuart32_write(sport->port.x_char, sport->port.membase + UARTDATA); else writeb(sport->port.x_char, sport->port.membase + UARTDR); @@ -601,14 +608,14 @@ static irqreturn_t lpuart_txint(int irq, void *dev_id) } if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { - if (sport->lpuart32) + if (sport->port.iotype & UPIO_MEM32BE) lpuart32_stop_tx(&sport->port); else lpuart_stop_tx(&sport->port); goto out; } - if (sport->lpuart32) + if (sport->port.iotype & UPIO_MEM32BE) lpuart32_transmit_buffer(sport); else lpuart_transmit_buffer(sport); @@ -1881,12 +1888,12 @@ static int __init lpuart_console_setup(struct console *co, char *options) if (options) uart_parse_options(options, &baud, &parity, &bits, &flow); else - if (sport->lpuart32) + if (sport->port.iotype & UPIO_MEM32BE) lpuart32_console_get_options(sport, &baud, &parity, &bits); else lpuart_console_get_options(sport, &baud, &parity, &bits); - if (sport->lpuart32) + if (sport->port.iotype & UPIO_MEM32BE) lpuart32_setup_watermark(sport); else lpuart_setup_watermark(sport); @@ -1971,6 +1978,9 @@ static struct uart_driver lpuart_reg = { static int lpuart_probe(struct platform_device *pdev) { + const struct of_device_id *of_id = of_match_device(lpuart_dt_ids, + &pdev->dev); + const struct lpuart_soc_data *sdata = of_id->data; struct device_node *np = pdev->dev.of_node; struct lpuart_port *sport; struct resource *res; @@ -1988,8 +1998,6 @@ static int lpuart_probe(struct platform_device *pdev) return ret; } sport->port.line = ret; - sport->lpuart32 = of_device_is_compatible(np, "fsl,ls1021a-lpuart"); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sport->port.membase = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(sport->port.membase)) @@ -1998,15 +2006,14 @@ static int lpuart_probe(struct platform_device *pdev) sport->port.mapbase = res->start; sport->port.dev = &pdev->dev; sport->port.type = PORT_LPUART; - sport->port.iotype = UPIO_MEM; ret = platform_get_irq(pdev, 0); if (ret < 0) { dev_err(&pdev->dev, "cannot obtain irq\n"); return ret; } sport->port.irq = ret; - - if (sport->lpuart32) + sport->port.iotype = sdata->iotype; + if (sport->port.iotype & UPIO_MEM32BE) sport->port.ops = &lpuart32_pops; else sport->port.ops = &lpuart_pops; @@ -2033,7 +2040,7 @@ static int lpuart_probe(struct platform_device *pdev) platform_set_drvdata(pdev, &sport->port); - if (sport->lpuart32) + if (sport->port.iotype & UPIO_MEM32BE) lpuart_reg.cons = LPUART32_CONSOLE; else lpuart_reg.cons = LPUART_CONSOLE; @@ -2086,7 +2093,7 @@ static int lpuart_suspend(struct device *dev) struct lpuart_port *sport = dev_get_drvdata(dev); unsigned long temp; - if (sport->lpuart32) { + if (sport->port.iotype & UPIO_MEM32BE) { /* disable Rx/Tx and interrupts */ temp = lpuart32_read(sport->port.membase + UARTCTRL); temp &= ~(UARTCTRL_TE | UARTCTRL_TIE | UARTCTRL_TCIE); @@ -2137,7 +2144,7 @@ static int lpuart_resume(struct device *dev) if (sport->port.suspended && !sport->port.irq_wake) clk_prepare_enable(sport->clk); - if (sport->lpuart32) { + if (sport->port.iotype & UPIO_MEM32BE) { lpuart32_setup_watermark(sport); temp = lpuart32_read(sport->port.membase + UARTCTRL); temp |= (UARTCTRL_RIE | UARTCTRL_TIE | UARTCTRL_RE |