From patchwork Wed Mar 12 19:02:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 3820511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C24D99F2BB for ; Wed, 12 Mar 2014 19:10:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6C74D202DD for ; Wed, 12 Mar 2014 19:10:14 +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 7C88D202B8 for ; Wed, 12 Mar 2014 19:10:13 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNoXA-00026c-Pb; Wed, 12 Mar 2014 19:09:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNoSI-0000OP-Kz; Wed, 12 Mar 2014 19:04:42 +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 1WNoS1-0000Jg-ML for linux-arm-kernel@lists.infradead.org; Wed, 12 Mar 2014 19:04:26 +0000 Received: by mail-ig0-f174.google.com with SMTP id h18so15157148igc.1 for ; Wed, 12 Mar 2014 12:04:09 -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=hJZuzzF5ePJP+ksk/pTRB+xinuQDXpvRQ0j6mYuIju4=; b=pAAN6JqTqNDAz/+9Ph1QE+sPJ6jJORuUwESZRTIFIkv6kCCx/nZLNE1V+S8koEKM9Y Zczep83ePiFyt2cXHjS2PN46xc9q+NwRZrDFmaaqMXU5CsORZNozTHN8dTjQ9qUzRO6A AFLjEnQyRtg6qiFOaYEa1/kO+0Bb40IOzQ0ImCz7yqiPPqyrgZBLBzHqiFDuH2d408w9 NYhbSse1+8BpWfJwRdAD+0PVXddiyCcXXhbTFZO6MN+j3volFE3vdAy59oVgk0m+wOu3 tbtz8dFgfollcUq/AASK2B8ldLZ/LsXprR8JrluCbsUG56rGCrEx1/37gT27adw1oPHh vFow== X-Received: by 10.43.79.66 with SMTP id zp2mr2337151icb.76.1394651049711; Wed, 12 Mar 2014 12:04:09 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id ji9sm62113062igb.1.2014.03.12.12.04.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 12 Mar 2014 12:04:08 -0700 (PDT) From: Soren Brinkmann To: Russell King , Greg Kroah-Hartman , Jiri Slaby , One Thousand Gnomes Subject: [PATCH v3 4/9] tty: xuartps: Print warning in clock notifier Date: Wed, 12 Mar 2014 12:02:58 -0700 Message-Id: <1394650983-24780-5-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 1.9.0.1.g4196000 In-Reply-To: <1394650983-24780-1-git-send-email-soren.brinkmann@xilinx.com> References: <1394650983-24780-1-git-send-email-soren.brinkmann@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140312_150425_803942_71BB75D6 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. 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 787a12064fa0..814391038abb 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);