From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B49BC433FE for ; Fri, 15 Oct 2021 08:05:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6AD1D60ED4 for ; Fri, 15 Oct 2021 08:05:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6AD1D60ED4 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=aljxyzs/8wl8qqxYM4V2pMs9FCMNxt8D/DpLo7UELv0=; b=tYbzJ5Nkagja4P/o1J9FQKm1xc lQqrVqazRKcjv/E2voxrHmzPGYY8uDTxGc0tEqljx2AGbCvcQlsbj3mFdQuWnzh9LoTufHMN+Wgyf cx8a3WJ3bv3CRjz6dDqcu3Y0DQna792K9F3CdJqMjXqQbiTCPUH4qLGrEy5U887N0BbllVnQJr6Si fV6i39G+U7gtRiHIfQck5JU3aNpvvCw6JjXDF36rPixJ9PwDEA+XnjjasGi3PVZ9rlI6SSUWsKlJT aFiCmhfx1FTJUBrvl7ObdruiJLDhhNd3vY4JApQAvFPehQEy4Q3tM2v7AN9JImyJ4HBCw11AaEJ4s viQrMgag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbIBQ-005qAQ-92; Fri, 15 Oct 2021 08:03:16 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbI6w-005oP9-4s for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 07:58:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1634284718; x=1665820718; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=oCB7i+Ff2eyLa/FEWfr5IeaOAbYgKZzhb8tXmlEFifA=; b=ZyKELkkxVoQSEMwiVBfq6YilsscDXG2Xww2xPkgdYqXVQoaSqglZON6P 7xtj0iF3/UGI31DzyWy0C6fqaiwKN6oxYPrF76wVvoPQMth4vlMqSWp6a B/wLvsUbqZ3zqVoWvdtta6RayHNPoHnotx7wYD/16cs77H+h7mvj5xfZE zBhPv0cq9RMO6imz+/YcrJZdGfKN39IPKSFxCJrgeEM3sD/USesaOJHUg SJrWkS/2EdffRt7bm5GGQjB7Hy64IVxjBsLlqpIAfxBH4PCxmFntVydXM iF+RiI1x9dxLAlK9VAuHytbgDZuWPqCFKnstQnYWSGADSQWn9CqONu6oH A==; IronPort-SDR: c/fIwTs9DiQJoYJ7tivX1d/2TCEAVBJIdSFIT28xXiTocPRNKnFt+9N3K2qdviZZ7r6lKr2Z1S IqD91CqzojTzEBrkYq6lJxCCg1Fyy5fwZt7aS2x9qzvQ6pAHBjh2UM9wPt/zZaPYGbo7WnDzTC JdzVLC3PCcWY9y9UaDwdYgyho5EJJlau3jK9gpmik846tw6Vo9sC1j/mfMc9epMdhyuACetOj6 IXu9iWVmxAHvDQGad5Wg8c2xz4K6yjurrgZWtrwQgvkauKwYuDmnUVp5Yp0eLzJ0rsv4hj7Ml2 TUMYWUm0Zyrzl/YZEQ+dsDRZ X-IronPort-AV: E=Sophos;i="5.85,375,1624345200"; d="scan'208";a="135630219" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Oct 2021 00:58:37 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 15 Oct 2021 00:58:36 -0700 Received: from [10.12.67.94] (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 15 Oct 2021 00:58:35 -0700 Subject: Re: [PATCH v5 10/15] clk: at91: clk-master: fix prescaler logic To: Claudiu Beznea , , , , CC: , , References: <20211011112719.3951784-1-claudiu.beznea@microchip.com> <20211011112719.3951784-11-claudiu.beznea@microchip.com> From: Nicolas Ferre Organization: microchip Message-ID: <220aaf60-0ee1-97d1-6b65-eb3b57ddab10@microchip.com> Date: Fri, 15 Oct 2021 09:58:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20211011112719.3951784-11-claudiu.beznea@microchip.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_005838_324964_B802EBCA X-CRM114-Status: GOOD ( 16.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/10/2021 at 13:27, Claudiu Beznea wrote: > When prescaler value read from register is MASTER_PRES_MAX it means > that the input clock will be divided by 3. Fix the code to reflect > this. > > Fixes: 7a110b9107ed8 ("clk: at91: clk-master: re-factor master clock") > Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre > --- > drivers/clk/at91/clk-master.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/at91/clk-master.c b/drivers/clk/at91/clk-master.c > index 6da9ae34313a..e67bcd03a827 100644 > --- a/drivers/clk/at91/clk-master.c > +++ b/drivers/clk/at91/clk-master.c > @@ -386,7 +386,7 @@ static unsigned long clk_master_pres_recalc_rate(struct clk_hw *hw, > > val &= master->layout->mask; > pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK; > - if (pres == 3 && characteristics->have_div3_pres) > + if (pres == MASTER_PRES_MAX && characteristics->have_div3_pres) > pres = 3; > else > pres = (1 << pres); > -- Nicolas Ferre _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel