Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp302960rwe; Wed, 24 Aug 2022 00:57:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR4IC8ci21OQnLBXq/6KnPp5kkTqi4yfIlttmg66t4dv1Afleo7EruHJNZm1V9NlFhMMrn1K X-Received: by 2002:a17:907:3e18:b0:73d:8180:a3c6 with SMTP id hp24-20020a1709073e1800b0073d8180a3c6mr2125812ejc.447.1661327822591; Wed, 24 Aug 2022 00:57:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661327822; cv=none; d=google.com; s=arc-20160816; b=KK7j+iV2sNejCx9Rexpima3KBP/6A8XSJAm8neibrbqRLPO/+4KMMmZ2AMfWlF0rUl qmRB+9mp4b/itFDX6GkxPFDMnYrL1AKpRdn5K8Jfyig1ZgeSv+Ibr0kl1sl07OOwZUA6 lGj5anDqMqjE8anvTIR3vFMW562DuqqzqhRRuA6aaOwEVT7/7syc8XOwFar1/OHVjR7N hk6KAWR/AM/Ciz1y2WMkUeLbuZXuIklXT8SmCTm6iGey39yZC+tY1A5UOu1HMAxFJ5zn QAFAEQ0wQSRlnVMGDOJxtpjwx+Ya+f7cSVb86teR1g6+dkOTqqRvAThAyEpvJyCVZzq3 MakA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=9CVLEu5X5W558Mdwud6PEFNhZNUWDtayqH7r9TTDZuA=; b=iW8/1PhCeJ8pDRhZYenLdbqrl3DLhrhPLJHPTPkI73tYd8RSNUHFpf9LU9tmbMEkd9 ctXzKqLGrh6c1fTPnxyD1o9OFid01LeN0w5XH5lheppMsLAEGzOyjT3ELcra8Bl/tzR4 01hUbGgacad6n00UGqmdOi87H+BXICDErc+wI3A0uCsZ6eeqclBcYYBPa1yLmKXo/9mx V+LV15sDmJunFYxC1ltqWTPwv/KmQOHHXnJpOdMr00CHzK83K8M5BwgzDieTc9kclTPQ 5ZZvJvGfdmwMS83wYHUbpQ8BtdycBJKNNFNtyJlCjXSe31QJkrUO5TAy/YPPBM4ZFP+U l95g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="Lz/ACUxI"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=tl3Xm9YZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb37-20020a1709071ca500b007311b45e4bcsi2135848ejc.692.2022.08.24.00.56.36; Wed, 24 Aug 2022 00:57:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="Lz/ACUxI"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=tl3Xm9YZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235024AbiHXHou (ORCPT + 99 others); Wed, 24 Aug 2022 03:44:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233356AbiHXHot (ORCPT ); Wed, 24 Aug 2022 03:44:49 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E45783B5; Wed, 24 Aug 2022 00:44:45 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id D443922534; Wed, 24 Aug 2022 07:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661327083; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9CVLEu5X5W558Mdwud6PEFNhZNUWDtayqH7r9TTDZuA=; b=Lz/ACUxILC+R3yz2Ui0SJh6CaW4tttXbYGqKExsC2hkoEsZCegFXYFc22ajQzGRvdjEryQ 3CotfVecb7dxD8/WETOSvYRosDVKGJM3RkXu2/Cz96AiSW7ON9ujL0feO/uL9jEDd7Zl+h Ba3bmdinRxLW6ofOfbyC0I3KWkqj9FE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661327083; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9CVLEu5X5W558Mdwud6PEFNhZNUWDtayqH7r9TTDZuA=; b=tl3Xm9YZ2vhlGUbXJNfule+zMvT2R4ylbRHH+Q3QSBJF/vfQm60/mcW6ZWE/UtUCRMNmGt ZBO5wTmc8lAY3PBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B707713AC0; Wed, 24 Aug 2022 07:44:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id elupLOvWBWPhUgAAMHmgww (envelope-from ); Wed, 24 Aug 2022 07:44:43 +0000 Date: Wed, 24 Aug 2022 10:44:43 +0300 From: "Ivan T. Ivanov" To: Stephen Boyd Cc: Albert Ou , Broadcom internal kernel review list , Florian Fainelli , Michael Turquette , Nicolas Saenz Julienne , Palmer Dabbelt , Paul Walmsley , Ray Jui , Scott Branden , Stefan Wahren , Phil Elwell , kernel test robot , linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v3] clk: bcm2835: Round UART input clock up Message-ID: <20220824074443.nvrnqhpvqrtn72p4@suse> References: <20220527102900.144894-1-iivanov@suse.de> <20220823230842.AB8BAC433C1@smtp.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220823230842.AB8BAC433C1@smtp.kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08-23 16:08, Stephen Boyd wrote: > Date: Tue, 23 Aug 2022 16:08:40 -0700 > From: Stephen Boyd > To: Albert Ou , Broadcom internal kernel review list > , Florian Fainelli > , "Ivan T. Ivanov" , Michael > Turquette , Nicolas Saenz Julienne > , Palmer Dabbelt , Paul Walmsley > , Ray Jui , Scott Branden > , Stefan Wahren > Cc: "Ivan T. Ivanov" , Phil Elwell , > kernel test robot , linux-clk@vger.kernel.org, > linux-rpi-kernel@lists.infradead.org, > linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, > linux-riscv@lists.infradead.org > Subject: Re: [PATCH v3] clk: bcm2835: Round UART input clock up > Message-Id: <20220823230842.AB8BAC433C1@smtp.kernel.org> > > Quoting Ivan T. Ivanov (2022-05-27 03:29:00) > > It was reported that RPi3[1] and RPi Zero 2W boards have issues with > > the Bluetooth. It turns out that when switching from initial to > > operation speed host and device no longer can talk each other because > > host uses incorrect UART baud rate. > > > > The UART driver used in this case is amba-pl011. Original fix, see > > below Github link[2], was inside pl011 module, but somehow it didn't > > look as the right place to fix. Beside that this original rounding > > function is not exactly perfect for all possible clock values. So I > > deiced to move the hack to the platform which actually need it. > > > > The UART clock is initialised to be as close to the requested > > frequency as possible without exceeding it. Now that there is a > > clock manager that returns the actual frequencies, an expected > > 48MHz clock is reported as 47999625. If the requested baud rate > > == requested clock/16, there is no headroom and the slight > > reduction in actual clock rate results in failure. > > > > If increasing a clock by less than 0.1% changes it from ..999.. > > to ..000.., round it up. > > > > [1] https://bugzilla.suse.com/show_bug.cgi?id=1188238 > > [2] https://github.com/raspberrypi/linux/commit/ab3f1b39537f6d3825b8873006fbe2fc5ff057b7 > > > > Cc: Phil Elwell > > Signed-off-by: Ivan T. Ivanov > > --- > > This is waiting for someone like Stefan to review. It's customary to > include previous reviewers on new versions of patches. Thanks for fixing me mistake. Regards, Ivan