From patchwork Mon Jul 9 08:22:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jisheng Zhang X-Patchwork-Id: 10513859 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 55799600CA for ; Mon, 9 Jul 2018 08:24:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E85628A33 for ; Mon, 9 Jul 2018 08:24:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30CFD28A51; Mon, 9 Jul 2018 08:24:47 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 D2AD428A33 for ; Mon, 9 Jul 2018 08:24:46 +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:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YAleME9h4OxvWNAy6kXGPSdfI58ElNYvQJiTpo5OkTs=; b=VXUN7qz6MT0eTH 8cohH3ygLD9jN3O4PwftQSknrfBcIHIW9WLivS7KdR/wIT5DB1T/YhDSr6fQChKD8/dhDHHdPWh/T xy0pZoQPY0hPtT3CH8HIkprV6sVzgGN7oXO2RByJqG6oMVctG0u8/xxzKy11vJKZDVIzEsql0/CgJ bPC5JuOw1CkzX+kUgPTwVChCXHceOxOV4kpsPqcjCe26TpVxGFIApVPG+XvpK9JB57sIlVEQqE3/r HCpRU27er7oogk2axEUekwLc3X4esPY7GQDuQFlW5TD+55yru/6lufJN/vJAcOLfBsi3iuD+cFQ9H ZCUUrs+7VHIX/jJ22biw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcRTQ-0001pB-1e; Mon, 09 Jul 2018 08:24:44 +0000 Received: from mail-eopbgr690061.outbound.protection.outlook.com ([40.107.69.61] helo=NAM04-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcRTN-0001nF-9e for linux-arm-kernel@lists.infradead.org; Mon, 09 Jul 2018 08:24:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GkvLDubnQoXKOsaraEE5tysys5NXbGMIcBYWCj1zUZw=; b=TWb8opw4dDCJ97rCUT+kT29yY6IYX1uU7qfaPP7ZcfL4SaTCJjR65ZpC4U+HQcoNRU/AuKLPnHTLKCV2JgygL6eQPf9X4HUkOpovF6s6e07j9SjbZW1v9+i5Smy9LbDYC3xN+NB+9lX0r48+HX8oo/7UO+fOYWLHe0IR8iPUZlA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; Received: from xhacker.debian (124.74.246.114) by CY4PR03MB2629.namprd03.prod.outlook.com (2603:10b6:903:75::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.18; Mon, 9 Jul 2018 08:24:26 +0000 Date: Mon, 9 Jul 2018 16:22:30 +0800 From: Jisheng Zhang To: Andy Shevchenko , Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH v3 2/3] serial: 8250: export serial8250_do_set_divisor() Message-ID: <20180709162230.066bcf66@xhacker.debian> In-Reply-To: <20180709160942.11a74f7a@xhacker.debian> References: <20180709160942.11a74f7a@xhacker.debian> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Originating-IP: [124.74.246.114] X-ClientProxiedBy: TY2PR06CA0022.apcprd06.prod.outlook.com (2603:1096:404:42::34) To CY4PR03MB2629.namprd03.prod.outlook.com (2603:10b6:903:75::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4de5fef3-a7f9-402a-409d-08d5e5756386 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:CY4PR03MB2629; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2629; 3:7+4XeFvoYBCA3F0ts7Fiwq5RWmZyLTX92RoyD9s28/Dm5SlwLkL2iI0XWIv4S3PNPQK1vj/VC1F8uo7oObd9p5A0XT0Kmgip+x/MyZj56oIgYpa97bRzt0jDZUXyBZSHtWeznB7cKqAr9IF3nEsVDQdT8FrTT4tp+3gZPfe6wqBN+0UVSrLzf6mKZpsdW9v3O0qPpylUNN5XP9GGHz+5BBMcSJYfzRIsxLt9+3lTHsoqKyoPc8mHI3iESY2zmJvG; 25:V0/l2Py8sXl2EHkxvZivV9JblPy1fnnoPvKDPXA1AQ66w4KrY9Sc6FpgXMXbQUMy/R/DybRgLFyiPq4PT2lGLwa8Qk/H29CI3A+1LW43vA6Al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TNyH/hXHemMvxR0wUS8Ue8BMB75Wi+UdAskVogpuRcIbIPtjO2NkXC3TqIPYJxyeLZ6SxRNYbL2yphaoLyHQTYc3lpdZ+vFcmdoqwzKpKJbfvS08AGO1HYdss4/2Ijr3ffzC2VI9sTwzbYydcj0HW9+bmuubbRq34i2ErJWe2dJN7Pu2XJL1SKDu3MAxI8PqczJlugAIL5vWa7BmnQRZ+OllHY0OBeSKSKJ1IAKPRnhwbA+LuCrRTfGwTLUVomVVSCInU/g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:CY4PR03MB2629; BCL:0; PCL:0; RULEID:; SRVR:CY4PR03MB2629; X-Forefront-PRVS: 07283408BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(346002)(376002)(136003)(366004)(189003)(199004)(956004)(50226002)(8936002)(5660300001)(6666003)(68736007)(50466002)(81166006)(81156014)(8676002)(66066001)(386003)(6506007)(11346002)(9686003)(76176011)(52116002)(7696005)(33896004)(4326008)(16526019)(186003)(1076002)(25786009)(446003)(2906002)(53936002)(47776003)(6116002)(3846002)(55016002)(230700001)(476003)(23726003)(15760500003)(105586002)(26005)(486006)(86362001)(110136005)(305945005)(478600001)(97736004)(575784001)(316002)(7736002)(106356001)(72206003)(54906003)(39210200001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2629; H:xhacker.debian; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) X-Microsoft-Exchange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jRP6MvienaYzXFXs/PadVUIW9po/swlB7iP0YcNt1chyu0qkfVY3Q2Wcxp3NfvMyT/n5iZICkm/iLwdT4AcYSd//ZOaLApiJ5sIvoqqCx4yLu8k7DISI2rwywf24pFJJXRbtBRUeb4ZAceYgC6q6gXsPXnkwTykdpDBWzZ+VQWchVnv4Oy6UMYam0erVX4M4+KYHDMwX5LHG67XfNfwD3bLVSmqdDg1P+AebYp8MkURp5GFMZWTc+69dsu/a3KAMd0QQ5zE/EFsQhdZ+C5fDVNdSdO2AKbSHyPwgUSGdO/YgVn1eWfkvjnbThq21uem0Oye55Wn5YGFsOUVtDHcq4a27AjoiCFDjmKjok6jPkDx2qELJ8Bnhjclvp75uuqeYfMiY6ztoeog==; 5:QDYHu+CGV6qZi9f2b7f1bHnPGQdTUD4nhFT6a1y8XCZGFTXdygPfmdWhXStRniJm1aYvGZ4J5ORl1B8ik5hnbTTkQzb8WZ8KMY/giCIi6q3z3UG2qplw8bMooMwSFbSIchq5wekLeLC9yktr1HBLjRp/Ti78GI5aiZQj37AjGpw=; 24:vGP2SR+/9eoYgaDhkqBIZJ/MaLqozD9uwp8GQSWSuOhyPfkua3Nj1j4Wljvee7TETcGNBQY9SCEbmN3Wz97suPGXXm1UDfJaLRd24FvenVg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2629; 7:cvgSn+kqDoS0P8+Yagk3VJs73Mwu8/Iw/bTx3zKmAcWERBSg6c8lq2HFq4lCJ24rJAwtswrA5M9won7Y1ckF8FWmzifIO1on2xlHONdUrn9bxx5qqQbX5uJXAg3qLkdwzKfikUKWrDuRLVThuhvQPEJXKGHooWZU38BljMac7AMN1QznEJr103iHCGvzYo5TzZHTy3yuN9OL4Pfi7yvESDfKoPzeZwqPIe7yb5qiV8jgoX4HCPdD8w2V3p5Z6RBA X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2018 08:24:26.9936 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4de5fef3-a7f9-402a-409d-08d5e5756386 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2629 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180709_012441_366922_16109034 X-CRM114-Status: UNSURE ( 8.83 ) X-CRM114-Notice: Please train this message. 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: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, 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-Virus-Scanned: ClamAV using ClamSMTP Some drivers could call serial8250_do_set_divisor() to complete its own set_divisor routine. Export this symbol for code reusing. Signed-off-by: Jisheng Zhang --- drivers/tty/serial/8250/8250_port.c | 5 +++-- include/linux/serial_8250.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index ce0dc17f18ee..945f8dc2d50f 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -2580,8 +2580,8 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up, return cval; } -static void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, - unsigned int quot, unsigned int quot_frac) +void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, + unsigned int quot, unsigned int quot_frac) { struct uart_8250_port *up = up_to_u8250p(port); @@ -2612,6 +2612,7 @@ static void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, serial_port_out(port, 0x2, quot_frac); } } +EXPORT_SYMBOL_GPL(serial8250_do_set_divisor); static void serial8250_set_divisor(struct uart_port *port, unsigned int baud, unsigned int quot, unsigned int quot_frac) diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 76b9db71e489..18e21427bce4 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -160,6 +160,9 @@ extern void serial8250_do_shutdown(struct uart_port *port); extern void serial8250_do_pm(struct uart_port *port, unsigned int state, unsigned int oldstate); extern void serial8250_do_set_mctrl(struct uart_port *port, unsigned int mctrl); +extern void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, + unsigned int quot, + unsigned int quot_frac); extern int fsl8250_handle_irq(struct uart_port *port); int serial8250_handle_irq(struct uart_port *port, unsigned int iir); unsigned char serial8250_rx_chars(struct uart_8250_port *up, unsigned char lsr);