From patchwork Wed May 11 09:00:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pramod Gurav X-Patchwork-Id: 67492 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp112308qge; Wed, 11 May 2016 02:00:52 -0700 (PDT) X-Received: by 10.98.25.15 with SMTP id 15mr3115673pfz.60.1462957252853; Wed, 11 May 2016 02:00:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d27si8298400pfj.14.2016.05.11.02.00.52; Wed, 11 May 2016 02:00:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751405AbcEKJAv (ORCPT + 8 others); Wed, 11 May 2016 05:00:51 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:34838 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbcEKJAu (ORCPT ); Wed, 11 May 2016 05:00:50 -0400 Received: by mail-pa0-f52.google.com with SMTP id iv1so15634641pac.2 for ; Wed, 11 May 2016 02:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=7LLkGodAnc6Eq5px+LDXAzNZINvyJsVq/Vxl215ou24=; b=cCATBY6nPgz7dO1nD5RvAwlUudXsnbRrXK3ZIR+7HDBhi82XS6UC6tXJMPCsTGdDfJ 8VLHmEQ9dpzeA0DxZ0I7U9g4YnJq4m1kTx7l1Af+cDPHYmse0oSTmeEbTZVsgX7r9FHx WnFP3eLLCfpt1ixqFHCkw8OJmx3VojkdbLJL8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7LLkGodAnc6Eq5px+LDXAzNZINvyJsVq/Vxl215ou24=; b=YdFn/xiM1R8ch+tuaOv16jO7Rg4c9LVby5k6MKxXI9vtIUVb0AijA1KRWPhYVY/LMJ PV7g1GPq5eY6NgjlLFUHA7cTZUGgUTBUGokGtTdEqjhbooc6s+aGeVdGOgFWzwMxqDxK nEzfAtLK6IqPLWSBcNcywJVX+Gvwa0CkFr7s4n1OeYoLFnU9m90B5SVT6btLGnWGs6df SF7qbnK8f+7yP5qR823ESZIzUCpQWZhO7XtvdGh37f3PyVG7Z6OOnNqq/s1n+TZq1pjg gXqzqOhoG8qTDW65HdtZHLO6Lx/O7As16uvkY0aaqAhGQedjUyFsrZDds2Ij6isFE5uX sDKw== X-Gm-Message-State: AOPr4FU2Bgrxb2CjkZn0Yut19LQtZ/VOEa4zmHLfIyEGUhFN8C1jDoKczCy24J+iHeBSBOOq X-Received: by 10.66.65.133 with SMTP id x5mr3114811pas.108.1462957249110; Wed, 11 May 2016 02:00:49 -0700 (PDT) Received: from blr-ubuntu-56.ap.qualcomm.com ([202.46.23.61]) by smtp.gmail.com with ESMTPSA id u65sm10341445pfa.9.2016.05.11.02.00.45 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 May 2016 02:00:48 -0700 (PDT) From: Pramod Gurav To: sboyd@codeaurora.org, andy.gross@linaro.org, gregkh@linuxfoundation.org, davidb@codeaurora.org, jslaby@suse.com Cc: linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Pramod Gurav Subject: [PATCH] tty: serial: msm: Remove duplicate handling of clocks Date: Wed, 11 May 2016 14:30:29 +0530 Message-Id: <1462957229-17567-1-git-send-email-pramod.gurav@linaro.org> X-Mailer: git-send-email 1.8.2.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org msm_serial driver provides a .pm callback to the serial core to enable and disable clock resource in suspend/resume path. This function is also called before msm_startup. msm_startup also enables the clocks which is not needed. Hence remove the duplcate clock operation from msm_startup and msm_shutdown. Same is done in console setup to get rid of duplicate clock operation. Tested on DB410C console. Signed-off-by: Pramod Gurav --- drivers/tty/serial/msm_serial.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index dcde955..73c3217 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -959,15 +959,6 @@ static int msm_set_baud_rate(struct uart_port *port, unsigned int baud, return baud; } -static void msm_init_clock(struct uart_port *port) -{ - struct msm_port *msm_port = UART_TO_MSM(port); - - clk_prepare_enable(msm_port->clk); - clk_prepare_enable(msm_port->pclk); - msm_serial_set_mnd_regs(port); -} - static int msm_startup(struct uart_port *port) { struct msm_port *msm_port = UART_TO_MSM(port); @@ -982,7 +973,7 @@ static int msm_startup(struct uart_port *port) if (unlikely(ret)) return ret; - msm_init_clock(port); + msm_serial_set_mnd_regs(port); if (likely(port->fifosize > 12)) rfr_level = port->fifosize - 12; @@ -1021,8 +1012,6 @@ static void msm_shutdown(struct uart_port *port) if (msm_port->is_uartdm) msm_release_dma(msm_port); - clk_disable_unprepare(msm_port->clk); - free_irq(port->irq, port); } @@ -1451,7 +1440,7 @@ static int __init msm_console_setup(struct console *co, char *options) if (unlikely(!port->membase)) return -ENXIO; - msm_init_clock(port); + msm_serial_set_mnd_regs(port); if (options) uart_parse_options(options, &baud, &parity, &bits, &flow);