From patchwork Mon Jun 30 16:56:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soren Brinkmann X-Patchwork-Id: 4453401 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 B34BE9F358 for ; Mon, 30 Jun 2014 16:59:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 018FB2020F for ; Mon, 30 Jun 2014 16:59:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 3562D20382 for ; Mon, 30 Jun 2014 16:59:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1euH-00040I-Pc; Mon, 30 Jun 2014 16:58:17 +0000 Received: from mail-pd0-x22e.google.com ([2607:f8b0:400e:c02::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X1etM-0002qF-07 for linux-arm-kernel@lists.infradead.org; Mon, 30 Jun 2014 16:57:20 +0000 Received: by mail-pd0-f174.google.com with SMTP id y10so8515891pdj.19 for ; Mon, 30 Jun 2014 09:56:58 -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=bJ/7aZYJ/Z9mGhGMkMx7vUXfrDfL9rRbIryP1aizw10=; b=jacczLHCQuaXw3fHlxLt/5gHAh54h7ugpnc/yiToYFGi6nyldKXXDBM890/zPAXTBh bIoCduNJNqlCsfAM+JE62Wm0KzTIoqDD7PcNHv/oCVPTx7ib6dQh5ybRBMOtAyUBcSFX yrakUJfL+nwUlEHL2OM80k//xDuwsZzq8bJRg6fZduKLpQzljbUtJpLjsaObTC86Bbzt tNm4JufoWYU+E/doL0SKSwOG5iFsQAwt6i97aaPAkloKE0a5ABAUURXV57SYb8+TqmxN Vcgtj92iNdbBXZ7X1sGnMLYxoDu+4Yilz98QLFrCoi35DrbFubVF7qSH4NTuug5IJI5F 1M6w== X-Received: by 10.69.30.74 with SMTP id kc10mr53248409pbd.111.1404147418266; Mon, 30 Jun 2014 09:56:58 -0700 (PDT) Received: from localhost ([149.199.62.254]) by mx.google.com with ESMTPSA id bv4sm102370669pad.25.2014.06.30.09.56.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 30 Jun 2014 09:56:57 -0700 (PDT) From: Soren Brinkmann To: Mike Turquette , "Rafael J. Wysocki" , Viresh Kumar Subject: [PATCH 3/4] net: macb: Use clk_find_nearest_rate() API Date: Mon, 30 Jun 2014 09:56:35 -0700 Message-Id: <1404147396-8041-4-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 2.0.1.1.gfbfc394 In-Reply-To: <1404147396-8041-1-git-send-email-soren.brinkmann@xilinx.com> References: <1404147396-8041-1-git-send-email-soren.brinkmann@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140630_095720_088529_34450E9E X-CRM114-Status: UNSURE ( 9.94 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Russell King , linux-pm@vger.kernel.org, netdev@vger.kernel.org, Nicolas Ferre , Michal Simek , cpufreq@vger.kernel.org, linux-kernel@vger.kernel.org, Soren Brinkmann , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 The Ethernet clock has to match the specified frequencies as accurately as possible. clk_round_rate() does not specify how rounding is implemented. Hence use clk_find_nearest_rate(). Signed-off-by: Soren Brinkmann --- drivers/net/ethernet/cadence/macb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index e9daa072ebb4..7b7f5eb1b341 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -223,7 +223,7 @@ static void macb_set_tx_clk(struct clk *clk, int speed, struct net_device *dev) return; } - rate_rounded = clk_round_rate(clk, rate); + rate_rounded = clk_find_nearest_rate(clk, rate); if (rate_rounded < 0) return;