Message ID | 1514596392-22270-20-git-send-email-pure.logic@nexus-software.ie (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> 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 622B16037D for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Dec 2017 01:16:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 528DC2B551 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Dec 2017 01:16:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44A4A2B55D; Sat, 30 Dec 2017 01:16:36 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C82112B551 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 30 Dec 2017 01:16:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0PrUgX8LvUVBMoBYEi+iL7I6pHULmhhWucF0UepDjnE=; b=dEruKn+gUVOaxlLIdzLqlYpEwp ccLCp55VuqDC6yT0hu8tCz+LN4AGwrq/pVejYRfMUpcGFUDoJnnIxTxsN3Dq4zziY6x7HzPV0GJLf H7ozUEQ4MU9o0VRhc5rGJRf/oS5JpC/IxS4hM5i1/fqyvnCLQWFTG4cdJavfEa062c9Fg6MeBXwm/ jEsBG75P0aBe7+yph2ZylYTBioDjekFVjpNoSPUYujzE7i7QW5NSZ3SgmKqvxlHXYZwQm+UQay7eP gj+bTir22TbvlsIpJi8o6V11/OXjBV9roDM/mfFU8FG3zSljhy0pfeJ90dBzB+RcbumsZZRHFMGGe xfHhF5Pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eV5lH-0004Ts-Bt; Sat, 30 Dec 2017 01:16:31 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eV5iY-0001Lf-7X for linux-arm-kernel@lists.infradead.org; Sat, 30 Dec 2017 01:14:21 +0000 Received: by mail-wm0-x242.google.com with SMTP id 64so50100250wme.3 for <linux-arm-kernel@lists.infradead.org>; Fri, 29 Dec 2017 17:13:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nexus-software-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aH30kt7bAii44k8osrXspDgDNOquJixNuo9L9eBKb6k=; b=N0bm6dq36ei1F3NPuWVFLAPosRKvRji97cUuEzBb/wCJByBAPuJZkV8qh4klGyHZEj shV8AsNX+3M3+aowDwvT1Ar3gj3+zruQiPa/i5oeQ2FTjg2jaVOuhxsJVa7VY/pnvY/A vhTzoUsfVH4z5TYWwRbi5EfCTy2ua0GGW2gifrL2W3xCkIVuDaniHGAfFomh81eSF4+3 GM/fyU7CDdtRb08A6MFqJggFu0nWhuqfPpVid4J2ev0SbOfjlvJqstT+Q70EqD8kQjO7 TIEEGcHbDduf+XUGEovm5wsDe/MNOhuYKhjZ9P/xSdTg7MIY8hKyB+1OhqWfCuoFVJEZ Uk+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aH30kt7bAii44k8osrXspDgDNOquJixNuo9L9eBKb6k=; b=PP855yle5NSNhxrfHRCiFDFpLjuakb5stU1Aw1kRvCtoynORuXDCBMiaM4/dJJNu2c vOV9W9VK62cnCV2ZARlcEFOZg7st3hPmavMSbft52ijeq+Hye2WUU61rNit+ayeB75jG Xl7c1UCM4unN1iDRlyqMOaP0BzOTbJ5dyHynX9QchQRDXjA5Z8oPBTXTSKI6qXsldMjF BL49bh/wG0C9uOedKHNDm0W0CBMtP1m17jRdt7j50Q2LvPfvCZKFjQC15afNNJ4hWMO+ BK3TXos8Eouk8CGk7kkY3h1XKx/G4vJDknKmVUxsYo1x/ETuG80qJerJm/dCp8YNBL0z Gh/Q== X-Gm-Message-State: AKGB3mIGpGQEKYYmzpaYVYj6rL82DWiP8nfBhyHQtuHglmGQQ7nEHlPn WsuDpio0+vr6LyNxESMDIQV5Pw== X-Google-Smtp-Source: ACJfBotYe8QWqWj/4cy0FPbFOG6imCVmr8dD7KXDpjPE5wRFbyXnB58hk1nmofGnVAWULY4eghZAdw== X-Received: by 10.80.208.150 with SMTP id v22mr45885077edd.62.1514596410857; Fri, 29 Dec 2017 17:13:30 -0800 (PST) Received: from localhost.localdomain ([109.255.42.2]) by smtp.gmail.com with ESMTPSA id h4sm29818268edb.16.2017.12.29.17.13.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Dec 2017 17:13:30 -0800 (PST) From: Bryan O'Donoghue <pure.logic@nexus-software.ie> To: mturquette@baylibre.com, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 19/33] clk: nxp: change lpc18xx_pll0_round_rate() return logic Date: Sat, 30 Dec 2017 01:12:58 +0000 Message-Id: <1514596392-22270-20-git-send-email-pure.logic@nexus-software.ie> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> References: <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171229_171342_613499_A608DC61 X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: pure.logic@nexus-software.ie, Joachim Eastwood <manabian@gmail.com>, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/clk/nxp/clk-lpc18xx-cgu.c b/drivers/clk/nxp/clk-lpc18xx-cgu.c index e08bad9..396d4f7 100644 --- a/drivers/clk/nxp/clk-lpc18xx-cgu.c +++ b/drivers/clk/nxp/clk-lpc18xx-cgu.c @@ -381,13 +381,13 @@ static unsigned long lpc18xx_pll0_round_rate(struct clk_hw *hw, if (*prate < rate) { pr_warn("%s: pll dividers not supported\n", __func__); - return -EINVAL; + return 0; } m = DIV_ROUND_UP_ULL(*prate, rate * 2); if (m <= 0 && m > LPC18XX_PLL0_MSEL_MAX) { pr_warn("%s: unable to support rate %lu\n", __func__, rate); - return -EINVAL; + return 0; } return 2 * *prate * m;
This patch updates the round_rate() logic here to return zero instead of a negative number on error. In conjunction with higher-level changes associated with acting on the return value of clk_ops->round_rate() it is then possible to have clk_ops->round_rate() return values from 1 Hz to ULONG_MAX Hz instead of the current limitation of 1 Hz to LONG_MAX Hz. Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Joachim Eastwood <manabian@gmail.com> Cc: linux-clk@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/clk/nxp/clk-lpc18xx-cgu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)