From patchwork Fri Aug 19 07:12:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9289545 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 626C960574 for ; Fri, 19 Aug 2016 07:12:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51DB0292EA for ; Fri, 19 Aug 2016 07:12:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4611629306; Fri, 19 Aug 2016 07:12:49 +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 8FF8A292EA for ; Fri, 19 Aug 2016 07:12:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755056AbcHSHMa (ORCPT ); Fri, 19 Aug 2016 03:12:30 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:20044 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755009AbcHSHM2 (ORCPT ); Fri, 19 Aug 2016 03:12:28 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OC500D3GAOOY910@mailout1.w1.samsung.com>; Fri, 19 Aug 2016 08:12:24 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-8b-57b6b1587a99 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 97.60.04866.851B6B75; Fri, 19 Aug 2016 08:12:24 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OC500BDZAOKM480@eusync3.samsung.com>; Fri, 19 Aug 2016 08:12:24 +0100 (BST) From: Krzysztof Kozlowski To: Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz Subject: [RESEND PATCH] serial: samsung: Register cpufreq notifier only on S3C24xx Date: Fri, 19 Aug 2016 09:12:17 +0200 Message-id: <1471590737-18620-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGJMWRmVeSWpSXmKPExsVy+t/xq7oRG7eFGzzbJG6xccZ6VovmxevZ LKZs+MBk8fqFocXlXXPYLGac38dkcWZxL7sDu8f+uWvYPfq2rGL0WL/lKovH501yASxRXDYp qTmZZalF+nYJXBl7TpoVnOapePvzA2MD4zmuLkZODgkBE4kLu06wQdhiEhfurQeyuTiEBJYy SsyfsYAJwmlkkrg68w5YFZuAscTm5UvAqkQEtjBKrHv6kBEkwSyQKdG5dy47iC0sECJx8PY7 VhCbRUBV4vCChWA1vALuEt0/nrBCrJOTOHlsMusERu4FjAyrGEVTS5MLipPSc430ihNzi0vz 0vWS83M3MUJC4+sOxqXHrA4xCnAwKvHw7ji4NVyINbGsuDL3EKMEB7OSCO+a9dvChXhTEiur Uovy44tKc1KLDzFKc7AoifPO3PU+REggPbEkNTs1tSC1CCbLxMEp1cDo839n/pxj65Uatnb8 VdsnnBt/4pHKgUu+8Y7VOuxnI7dJKrlqXJUWKpi2fsX7xL56F9+M/rO88Us5+ItnsN+XKXXu iNGdwuU2pa0/JGIHwxUFl6816f+e5704OfvvnaDwecLWuqHubmua2X3vzTZnXaZ48cQXC7dt uXNi3/45usV58Q4NTnYlluKMREMt5qLiRACYlytVCQIAAA== 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 The Samsung serial driver registered for CPU frequency transitions to recalculate its clock when ARM clock frequency changes. Driver is used on all Samsung SoCs (old S3C and new Exynos) however this is needed only on S3C24xx platform so limit the ifdef to respective cpufreq driver. On S3C24xx the ratio between frequencies of UART's parent clock (pclk) and ARM's parent clock (fclk) remains fixed. Therefore when ARM clock frequency goes down, the serial is also affected. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski --- drivers/tty/serial/samsung.c | 2 +- drivers/tty/serial/samsung.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index ae2095a66708..f44615fa474d 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1577,7 +1577,7 @@ static void s3c24xx_serial_resetport(struct uart_port *port, } -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_S3C24XX_CPUFREQ static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb, unsigned long val, void *data) diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h index 2ae4fcee1814..a04acef1cb20 100644 --- a/drivers/tty/serial/samsung.h +++ b/drivers/tty/serial/samsung.h @@ -102,7 +102,7 @@ struct s3c24xx_uart_port { struct s3c24xx_uart_dma *dma; -#ifdef CONFIG_CPU_FREQ +#ifdef CONFIG_ARM_S3C24XX_CPUFREQ struct notifier_block freq_transition; #endif };