From patchwork Mon Mar 10 21:40:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 3807611 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 641DCBF540 for ; Mon, 10 Mar 2014 22:16:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 815A820221 for ; Mon, 10 Mar 2014 22:16:28 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C0BD2021C for ; Mon, 10 Mar 2014 22:16:27 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WN7yn-0006ej-4M; Mon, 10 Mar 2014 21:43:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WN7xw-0006ef-Gb; Mon, 10 Mar 2014 21:42:32 +0000 Received: from mail-ig0-x22f.google.com ([2607:f8b0:4001:c05::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WN7xa-0006Wy-LO for linux-arm-kernel@lists.infradead.org; Mon, 10 Mar 2014 21:42:13 +0000 Received: by mail-ig0-f175.google.com with SMTP id ur14so9421604igb.2 for ; Mon, 10 Mar 2014 14:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=lJbjffUUKtXQXJL8A5x3wyp6iZg2YGDCvnchYDIF9L8=; b=ufYP+M/feuucN7FXz64uCrb6rXdEYaKrs44dSy0JDO34doNvtsMIMrHQ3bZvnL9cPz nyFtEtVfXp6/feIyaDYlKqzbMtE0VUqcuaWN9fEURQmxXa+n+sl3tzhNz+EbRm0Ap9bA oHSPwkdaW/OrRlZyOkm15Sn2IRj5NE2uXeu0EEUxwSF/292qgAudmz8qMpjRdyqCLSfi TbM50oT0Ds7i9R8E2wNGQN+AApTP4KowChW3Eybst7AStCilugMFwfeXMWaUNHw1EWJE hTNJwpHgbY83QfTTt+PlPGzTJjwWnWyJNjJbHfk4bBPCI1GdtcoFqty7OnCMYuEc7xBo /4Fg== X-Received: by 10.42.64.17 with SMTP id e17mr29684853ici.26.1394487709596; Mon, 10 Mar 2014 14:41:49 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id an1sm37473215igc.0.2014.03.10.14.41.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 14:41:48 -0700 (PDT) From: Soren Brinkmann To: Russell King , Greg Kroah-Hartman , Jiri Slaby , One Thousand Gnomes Subject: [PATCH v2 2/7] tty: xuartps: Print warning in clock notifier Date: Mon, 10 Mar 2014 14:40:05 -0700 Message-Id: <1394487610-2419-3-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 1.9.0.1.g4196000 In-Reply-To: <1394487610-2419-1-git-send-email-soren.brinkmann@xilinx.com> References: <1394487610-2419-1-git-send-email-soren.brinkmann@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140310_174210_756340_BCC6825C X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -1.9 (-) Cc: Mark Rutland , devicetree@vger.kernel.org, Peter Crosthwaite , Rob Landley , Pawel Moll , Ian Campbell , linux-doc@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Rob Herring , Soren Brinkmann , linux-serial@vger.kernel.org, Kumar Gala , Grant Likely , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Print a warning if the clock notifier rejects a clock frequency change to facilitate debugging (see: http://thread.gmane.org/gmane.linux.ports.arm.kernel/304329/focus=304379) Signed-off-by: Soren Brinkmann --- drivers/tty/serial/xilinx_uartps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 1c6e1a68ae95..b00060052316 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -429,8 +429,10 @@ static int xuartps_clk_notifier_cb(struct notifier_block *nb, * frequency. */ if (!xuartps_calc_baud_divs(ndata->new_rate, xuartps->baud, - &bdiv, &cd, &div8)) + &bdiv, &cd, &div8)) { + dev_warn(port->dev, "clock rate change rejected\n"); return NOTIFY_BAD; + } spin_lock_irqsave(&xuartps->port->lock, flags);