Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp317356rdb; Thu, 5 Oct 2023 06:59:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH7l/njIBqU71TSbYjxtaefrrsf8MGhJaeaO2KNJjq0+Wa594NTxarBA2wUs5juCDitAPNw X-Received: by 2002:aa7:8888:0:b0:68a:53e6:1fed with SMTP id z8-20020aa78888000000b0068a53e61fedmr5839558pfe.23.1696514369682; Thu, 05 Oct 2023 06:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696514369; cv=none; d=google.com; s=arc-20160816; b=a3MUVt5ljQ5Is1m+M9PEgOQi15XxtYXZO6UIa5INxOfpScunxJD2r4aN7NU9dBoFeA ij7zZsfxjpsw9BE3ZRtyqsWLKd6VliMwOqaIFskuxcNZgRPjFq0qg2vIS+kmz1hqlS2J Dc3bfK839lIRwaZuQu76UGJnJ3y0B22bY9HbSJbWghv9sr1M9mNxal5ahtkIhI9hoy0G DvlkWL+dVusVNO8nFvkv2/pjPkyPkUHBmBL9vumigLcSyd6x2A8DQExa58VY5HgGqlcX N2J41KI0rDThlQmq778o6am3C4L9kQM2qRRr2kVeyRun0yppg5kqc/JUY8zpQbzUd63r DRZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :dkim-signature:from; bh=iEcmtjaXtVKR/FAZlgMVJnQNS9IPw4/oTIf2c1S/O20=; fh=8S+y7TJBhdxA0ahXdxZ8HULWEgzdciyeE1Guelzluj4=; b=ia5BpMnuPq9vCV2x+gGn2svU2Y212d/BTCewzN99azK8zg8o57naojAkZqXiokAIdS C0QKrjwcW8x4Z0nTIAitEjQpKaolZMzHl7hkdhWJo1hnn93HxqD9Et5hdaf0mvbiGlNB 0JPAhIDzqBWqhSuC+jxZq7SXIuJtHPUq9dO5R4oEZ7lnc4/yw6aAfoOdLKG7O3XY7yhp 5zGWyvQjQ8VneeNkvCBg8ehi9GR5to7m6utZ6iwNNE7GR1naAA3TeOW9sqPYRgUeuhuy HgDKzqqEmEadjvidueC0jjie6vBOAX7FXLkm+aHSk6XLmexqrqz00a2em0IP3w4W1OWX jecQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lleZ2iCh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=abLGdVaH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b005855e5e2f98si1493965pgb.75.2023.10.05.06.59.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 06:59:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lleZ2iCh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=abLGdVaH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6595F80E8FE0; Thu, 5 Oct 2023 06:59:28 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232654AbjJEN7O (ORCPT + 99 others); Thu, 5 Oct 2023 09:59:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231990AbjJEN5K (ORCPT ); Thu, 5 Oct 2023 09:57:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24BE71F759; Thu, 5 Oct 2023 02:59:37 -0700 (PDT) From: Benedikt Spranger DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1696499973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iEcmtjaXtVKR/FAZlgMVJnQNS9IPw4/oTIf2c1S/O20=; b=lleZ2iChN6yQS/m0/TYcjZ8y+o+bmLltCCUSETeccQG8qwsOlu9zDg4nbAfPrDe3lE9wqq 3+Y9IM52fXAhCClHNqC0FyeT0sP+sKV+f+ccNMBjq1Q/Qi3Njbg3ZYYB84PCLxgMjdhOD4 A0nn/bX2R1wY6ZtGerzhhqY9QR9QF8zd+99p8Dbc2VyBiLKrQjYv090d5c37Q/jijqkAfe vh7BP0dK8NIbf3o0FZavZSLQYQfIptOUOwFtsxjoG8bTEU1T48XoCyTnnL00BFhGqkSZdS 56UH+EkDN2gkkSdSuSHAP0TTK4n5LIEP6Zvj5ZHp4xCDiV17qCzOkMZlQGSBew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1696499973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iEcmtjaXtVKR/FAZlgMVJnQNS9IPw4/oTIf2c1S/O20=; b=abLGdVaH0yzo6cqfyNu5ZsAouwNArtrKeFG6Q7ZvHAlTPC1QCqsr1s4nq0TEkdUzmt2oko ptyMBJM0puVgO6Dg== To: linux-kernel@vger.kernel.org Cc: linux-clk@vger.kernel.org, Maxime Ripard , Stephen Boyd , Michael Turquette , Dinh Nguyen Subject: [PATCH 1/1] clk: socfpga: gate: Fix of by factor 2 for serial console Date: Thu, 5 Oct 2023 11:59:27 +0200 Message-ID: <20231005095927.12398-2-b.spranger@linutronix.de> In-Reply-To: <20231005095927.12398-1-b.spranger@linutronix.de> References: <20231005095927.12398-1-b.spranger@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 06:59:28 -0700 (PDT) Commit 9607beb917df ("clk: socfpga: gate: Add a determine_rate hook") introduce a specific determine_rate hook. As a result the calculated clock for the serial IP is off by factor 2 after that i.e. if the system configures a baudrate of 115200 it is set physicaly to 57600. Change the determine_rate hook to the reparent variant __clk_mux_determine_rate() to fix the issue. Cc: stable@vger.kernel.org Fixes: 9607beb917df ("clk: socfpga: gate: Add a determine_rate hook") Signed-off-by: Benedikt Spranger --- drivers/clk/socfpga/clk-gate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c index 8dd601bd8538..47500976f987 100644 --- a/drivers/clk/socfpga/clk-gate.c +++ b/drivers/clk/socfpga/clk-gate.c @@ -110,7 +110,7 @@ static unsigned long socfpga_clk_recalc_rate(struct clk_hw *hwclk, static struct clk_ops gateclk_ops = { .recalc_rate = socfpga_clk_recalc_rate, - .determine_rate = clk_hw_determine_rate_no_reparent, + .determine_rate = __clk_mux_determine_rate, .get_parent = socfpga_clk_get_parent, .set_parent = socfpga_clk_set_parent, }; -- 2.42.0