Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1164362ybl; Thu, 23 Jan 2020 15:00:29 -0800 (PST) X-Google-Smtp-Source: APXvYqw7sGNMwN4aYgK4jvItl9RrpOT4fRyq0Kxbkeko7yaJx+eWa6mRIJtN4aaCuMiRy81RY2xj X-Received: by 2002:a05:6808:81:: with SMTP id s1mr160474oic.179.1579820429503; Thu, 23 Jan 2020 15:00:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579820429; cv=none; d=google.com; s=arc-20160816; b=m0VKlHXFi4kv0XN3HANzBQosN8tPEP/cJKHM6EFkxn0ItAsG7B+YGwg3ek5W6oHhcC A4osHTPFTib1iL8rgnlhICKp3NHG/5pJ2SiNYPKEjuSFuCqC0kmIYWieoURQW2OdrnV1 bxht7UzAAazITksqhFbW+qhRs7zKdP9aT77pr8uRts8eiITVmW/VUHSO1UsqkeeorzVV dkO8UUChL0JjzuI6VeUUFPc6Z8HYMYLW690ttJV2o4CGw253ZYSYF5I3MZzyfeWccHZ1 YRkfkrE47VWjJSmOcaFsqjO37TO9697+6Oc2ZxjWHz90rp4Wq/fFT33Ut7KBCfVowLRG 7dPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=zEuOC3td88tpHLgeBxK5wnCGR91LNEGrEovg5lXPIWk=; b=PRJS2nQSOUp/PkYbKmZC203Mb4jlX8NHDDPuITLMgHU5VS/MVa9u9k+WtPAKk+hjZk 0V1XaGBPiew1y9PXspVHE7BqDXyyMTzHaDUsPH681iWMX4U+s3Oo0Rb/5r/QfUCZgyUK weA1OXdzVLmyRUAvauM8GPgXmLT3wgIoTtQihj/RJA6+70RGOvxXk41IG7AFg02T/r3h 6f26vwv7KOQ0POLxkxSd1NsW4jHLVchWRWaPbF3/zfpSOlOL9+X4GrnJvwiofrj9dBFO qNIZOrSTpIqyc5WXiXp20g1ONLdv34DxEEFplNqZaRpyw6E3F3Zz7kwxItCsnZUQLGW3 b/Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Dluiq1xH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a22si498081oia.15.2020.01.23.15.00.15; Thu, 23 Jan 2020 15:00:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Dluiq1xH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729680AbgAWW7B (ORCPT + 99 others); Thu, 23 Jan 2020 17:59:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:40492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729149AbgAWW7A (ORCPT ); Thu, 23 Jan 2020 17:59:00 -0500 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B264120718; Thu, 23 Jan 2020 22:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579820339; bh=zEuOC3td88tpHLgeBxK5wnCGR91LNEGrEovg5lXPIWk=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Dluiq1xHhJ2Gs+g+ZFcZgKpL8P/eAedGwAdaXjAzu2QplsivR52091g9VkeMirFEP jebgeC+xNRqUWjKg8MGbvB0rCiLhlOn1Wj6kB1bwN08czoJej8O27m818gZ31q1arc TlWQuxLXCTj34+k7QbYjzyIG3eUIS1CZMkAYsiRA= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1575527759-26452-6-git-send-email-rajan.vaja@xilinx.com> References: <1574415814-19797-1-git-send-email-rajan.vaja@xilinx.com> <1575527759-26452-1-git-send-email-rajan.vaja@xilinx.com> <1575527759-26452-6-git-send-email-rajan.vaja@xilinx.com> Subject: Re: [PATCH v3 5/6] clk: zynqmp: Fix divider calculation From: Stephen Boyd Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rajan Vaja To: Rajan Vaja , gustavo@embeddedor.com, jolly.shah@xilinx.com, m.tretter@pengutronix.de, mark.rutland@arm.com, mdf@kernel.org, michal.simek@xilinx.com, mturquette@baylibre.com, nava.manne@xilinx.com, robh+dt@kernel.org, tejas.patel@xilinx.com User-Agent: alot/0.8.1 Date: Thu, 23 Jan 2020 14:58:59 -0800 Message-Id: <20200123225859.B264120718@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Rajan Vaja (2019-12-04 22:35:58) > zynqmp_clk_divider_round_rate() returns actual divider value > after calculating from parent rate and desired rate, even though > that rate is not supported by single divider of hardware. It is > also possible that such divisor value can be achieved through 2 > different dividers. As, Linux tries to set such divisor value(out > of range) in single divider set divider is getting failed. >=20 > Fix the same by computing best possible combination of two > divisors which provides more accurate clock rate. >=20 > Signed-off-by: Michal Simek > Signed-off-by: Tejas Patel > Signed-off-by: Rajan Vaja > --- Applied to clk-next