From patchwork Wed Feb 1 10:25:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Youngmin Nam X-Patchwork-Id: 9549273 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 D4C2560236 for ; Wed, 1 Feb 2017 10:25:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7A4427BA5 for ; Wed, 1 Feb 2017 10:25:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBE4F28375; Wed, 1 Feb 2017 10:25:52 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0ACF27BA5 for ; Wed, 1 Feb 2017 10:25:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751284AbdBAKZu convert rfc822-to-8bit (ORCPT ); Wed, 1 Feb 2017 05:25:50 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:56317 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751202AbdBAKZt (ORCPT ); Wed, 1 Feb 2017 05:25:49 -0500 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKO02QAQYAZJV60@mailout1.samsung.com>; Wed, 01 Feb 2017 19:25:47 +0900 (KST) Received: from epsmges1p5.samsung.com (unknown [182.195.40.46]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20170201102547epcas2p3a19c827a3090810fbe9255fb1af57d49~fIt-hirud0625106251epcas2p3J; Wed, 1 Feb 2017 10:25:47 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 65.8D.06732.AA7B1985; Wed, 1 Feb 2017 19:25:46 +0900 (KST) Received: from epcpsbgm1new.samsung.com (u26.gpu120.samsung.co.kr [203.254.230.26]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20170201102546epcas1p25107505cc2ff66f06211f945d2ddd679~fIt-I9YD_1103711037epcas1p2I; Wed, 1 Feb 2017 10:25:46 +0000 (GMT) X-AuditID: b6c32a39-f79c86d000001a4c-b7-5891b7aa7565 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 98.89.06487.AA7B1985; Wed, 1 Feb 2017 19:25:46 +0900 (KST) Received: from NOYOUNGMINN01 ([12.36.166.83]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OKO00F4MYAYEN40@mmp1.samsung.com>; Wed, 01 Feb 2017 19:25:46 +0900 (KST) From: =?UTF-8?B?64Ko7JiB66+8?= To: gregkh@linuxfoundation.org, jslaby@suse.com Cc: linux-serial@vger.kernel.org, linux-samsung-soc@vger.kernel.org, tjakobi@math.uni-bielefeld.de Subject: [RESEND PATCH] serial: samsung: enable clock before accessing interrupt mask resister Date: Wed, 01 Feb 2017 19:25:46 +0900 Message-id: <008c01d27c75$8cd73e60$a685bb20$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 8BIT X-Mailer: Microsoft Outlook 14.0 Thread-index: AdJ8dSKhiYFaSwa3RPqejIyQLSAdjg== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA01Sb0hTURzlbnvblBbPaXYz1PGiDxrOvbn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y+t9jAd1V2ydGGCy+oWTRvHg9m8WUDR+Y LGac38dkcWZxL7tF2+oPrA6sHvvnrmH3+HeM3WP9lqssHp83yQWwRLnZZKQmpqQWKaTmJeen ZOal2yqFhrjpWigp5CXmptoqRej6hgQpKZQl5pQCeUYGaMDBOcA9WEnfLsEtY9fi62wFkzgr /v5ZwNLAeJa9i5GTQ0LARGLBvWlsELaYxIV768FsIYGljBIPXzt2MXIB2e8ZJfY9+cwMkmAT sJR49eckWJGIgL7EusZ7LF2MHBzMAikSP1ZFgYSFBRIkblz6wApiswioSsy/ug+slReodf/B G4wQtqDEj8kgrZxAreoSk+YtYoawtSWevLvACnGPgsSOs68ZIVbpSdw8vo0RokZEYt+Ld4wT GAVmIRk1C8moWUhGzULSsoCRZRWjRGpBckFxUnquYV5quV5xYm5xaV66XnJ+7iZGcGQ9k9rB eHCX+yFGAQ5GJR5ej3MTIoRYE8uKK3MPMUpwMCuJ8PpunRghxJuSWFmVWpQfX1Sak1p8iNEU 6NmJzFKiyfnAqM8riTc0MTcxNzawMLe0NDFSEudtnP0sXEggPbEkNTs1tSC1CKaPiYNTqoHx xA9W65yFB76vFeLLNvjOeKt/5p8FfOdUjr19HLd2at4/1+9+TO9ux9R84Tl8ujNTWWT3J83D m1Zu+Nw59/6cG+s1ZQ+8X+LSP6fV+6tjqv0nMQdPy/lRRy6x/Bf5GcK+6uBxTc3X4hdnMHy0 ijllWtlzJuCWw64rQh8vVV5V22ZivXNTX8aaU0osxRmJhlrMRcWJADtyDnXCAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170201102546epcas1p25107505cc2ff66f06211f945d2ddd679 X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?64Ko7JiB66+8G1MvVyBQbGF0Zm9ybeqwnOuwnO2MgChTLkxT?= =?UTF-8?B?SSkb7IK87ISx7KCE7J6QG1M1KOyxheyehCkv7LGF7J6E?= X-Global-Sender: =?UTF-8?B?WW91bmdtaW4gTmFtG1MvVyBQbGF0Zm9ybSBEZXZlbG9wbWVu?= =?UTF-8?B?dCBUZWFtG1NhbXN1bmcgRWxlY3Ryb25pY3MbUzUvU2VuaW9yIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG1NFTUkbQzEwRjg2Mzc=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170201102546epcas1p25107505cc2ff66f06211f945d2ddd679 X-RootMTR: 20170201102546epcas1p25107505cc2ff66f06211f945d2ddd679 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Ensure that the uart clock is enabled prior to writing to the interrupt mask register in s3c24xx_serial_resume_noirq function. Without enabing the uart clock, the uart register cannot be accessed. Signed-off-by: Youngmin Nam --- drivers/tty/serial/samsung.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index f44615f..06488fd 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1921,6 +1921,7 @@ static int s3c24xx_serial_resume(struct device *dev) static int s3c24xx_serial_resume_noirq(struct device *dev) { struct uart_port *port = s3c24xx_dev_to_port(dev); + struct s3c24xx_uart_port *ourport = to_ourport(port); if (port) { /* restore IRQ mask */ @@ -1930,7 +1931,9 @@ static int s3c24xx_serial_resume_noirq(struct device *dev) uintm &= ~S3C64XX_UINTM_TXD_MSK; if (rx_enabled(port)) uintm &= ~S3C64XX_UINTM_RXD_MSK; + clk_prepare_enable(ourport->clk); wr_regl(port, S3C64XX_UINTM, uintm); + clk_disable_unprepare(ourport->clk); } }