From patchwork Fri Mar 7 19:13:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 3794021 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 D844DBF540 for ; Fri, 7 Mar 2014 19:15:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 142E120304 for ; Fri, 7 Mar 2014 19:15:26 +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 F0EFA20340 for ; Fri, 7 Mar 2014 19:15:24 +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 1WM0EY-0003fs-3k; Fri, 07 Mar 2014 19:15:02 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WM0EQ-0003Hm-Nr; Fri, 07 Mar 2014 19:14:54 +0000 Received: from mail-ig0-x22e.google.com ([2607:f8b0:4001:c05::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WM0EC-0003DC-6i for linux-arm-kernel@lists.infradead.org; Fri, 07 Mar 2014 19:14:42 +0000 Received: by mail-ig0-f174.google.com with SMTP id h18so2730112igc.1 for ; Fri, 07 Mar 2014 11:14:19 -0800 (PST) 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=aLaad+KxnUK9MwFEdeqSvolQ/O6IL84iaYmHEvPjJoZBnLhjPGbr6uDQvs3A9r0oPx LBiyV83jm2gOZl2ijOdMuxFlSRS2W1xdmbn+S8OcIBstSJYpzn8eQl4kzLs7r6HZM3HO Q8KZocR27LLDP/Nb+wX4lWKXcF8o/x46ZjJwHFphPOupDMiys4sYiT98eGiCkkNpsGKj nKjBP7SQtETqlt53yg096luuIEZ0XaKEmEHGG/yLgidCUkKhWvXGCM0C89TTPHCP+udF MBm0xyQUebFwiLp6LBcb6fpiZ1JlgEATmdiq60HiOopyyGaq53IJJI6Ol8/Uftf06ssZ fNzQ== X-Received: by 10.50.45.100 with SMTP id l4mr4785677igm.27.1394219658886; Fri, 07 Mar 2014 11:14:18 -0800 (PST) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id sc8sm5218919igb.0.2014.03.07.11.14.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 07 Mar 2014 11:14:18 -0800 (PST) From: Soren Brinkmann To: Russell King , Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , One Thousand Gnomes Subject: [PATCH RFC v2 02/11] tty: xuartps: Print warning in clock notifier Date: Fri, 7 Mar 2014 11:13:25 -0800 Message-Id: <1394219614-3197-3-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 1.9.0.1.g4196000 In-Reply-To: <1394219614-3197-1-git-send-email-soren.brinkmann@xilinx.com> References: <1394219614-3197-1-git-send-email-soren.brinkmann@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140307_141440_354155_1E16D70F X-CRM114-Status: UNSURE ( 9.17 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: Peter Crosthwaite , Michal Simek , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Soren Brinkmann 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);