Message ID | 20231211111430.3910049-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6969004vqy; Mon, 11 Dec 2023 03:14:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpCUvKd1X8b0XQV4Max5aXQiItkb3Ya+jqaScmxKjdTTwjxLQETDKenBHVmHf9XrRPTsLr X-Received: by 2002:a05:6a00:1acc:b0:6ce:55b1:caf2 with SMTP id f12-20020a056a001acc00b006ce55b1caf2mr2321764pfv.3.1702293293227; Mon, 11 Dec 2023 03:14:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702293293; cv=none; d=google.com; s=arc-20160816; b=cNnobkpnT21cnkq1III48xk+xFPvPfWtOgEzuY2QMDGvl3ALblY5PFUyK4NBBqEMev 0b3uHHed+FlWybG1Y6/D7NW6KYshh/VkV/LU2Pu9plQtapL7Ui1MMolaXf3M+Nc9cZ6F 5G51S0AkyttM/S6FKY/eaf+mM80YXmJRioFdsRH0TI+s2eHoIQc2+DYHtZEQpE9Lz3J0 oNV+pTYX6Ap5hItOdBioWYl/PGnTRcFPQwevEDEpv0SL/uldKVAR4qAV+iaQtYqhl/cu slIj3t0ywmAPfh5MVpUrBOq04CYne1wG8niGvs8dQ5st81oIVkeyXuSf4E4jogCVOTV0 P3tg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=cHDqGT1H6dIw1kaBxsSjY5xYSmlhvWiTdPZ9BltvP+w=; fh=/2HWyl8GiBKCX0C+MpWV32uiksUj0fkRQ0jXFxmsgBQ=; b=gQUicxXarItnTpbk3KGgtf3KV8J6j1wBUqbpWsF3SCMz8b3m+uDzwnYnDM75YQ+Qfi TDw3ipDpX3ZXXSOA+5W5r0ZgqwM58TfXPGhxdKnypK2zV4eY/b1Z8AcIzcAvNyQqyDed NYWPs8l6HP7qdJkwWfk3OBy9LCUabJ/NOVMU7qr3TWyLimHrC4Z6SZsfB3tlFyRM8kwk oZrot4h69ztqoitGtci/2c6Slha2dQRhzynBHMGY+LmVb0AWwQrTUP05/gHlOEgAvyEK t0ff3OpFbUSf9IE+Xn+qMYEgnSiVQiBgZNRs7M9QWbkqzyshV8WcjWgyIOoycd+yPjMd ihZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QoGV9h0P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id fc23-20020a056a002e1700b006c4e73af9ebsi5961437pfb.176.2023.12.11.03.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 03:14:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QoGV9h0P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BD4C08065ED2; Mon, 11 Dec 2023 03:14:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234483AbjLKLOf (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Mon, 11 Dec 2023 06:14:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjLKLOe (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 11 Dec 2023 06:14:34 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48784B0; Mon, 11 Dec 2023 03:14:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702293280; x=1733829280; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OipROKW5VBxxm71BUaF5x+0BsRhlCsdbu7scxfSZVNo=; b=QoGV9h0PA0mtNDQBlR/+N1UoJfmuaWqhaH1vBUglW3lspQE5Mr7EuWig TUI30+QqvS1dGWjjq66i6ne6x+DCQ0qwOwP9WkrVkaGoJHCyhKXw0mOLD M9+G/sF/GUwqOTvQsI+vC3KJKC3tkRms62hzF0T2u/JHJry7YA0wk5p+r mGVM2AwBc9NWbXeF5cBxmevKd2+bGckJ5/3QnM+hSZnBXU/Tf5M4znrVP 0bqLhZSxPibALHfwx1jaLTiHfFcq1IdVncmZiRbUjbYpuxy/vLyqnwMxz ZRZ48Ecr1FU5UDqrKlb8AMA7/Y+QvfAXQJWQQ5RmAAVmiRG4+Al4BeCSO Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10920"; a="16184459" X-IronPort-AV: E=Sophos;i="6.04,267,1695711600"; d="scan'208";a="16184459" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 03:14:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10920"; a="863731599" X-IronPort-AV: E=Sophos;i="6.04,267,1695711600"; d="scan'208";a="863731599" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 11 Dec 2023 03:14:37 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id C518630D; Mon, 11 Dec 2023 13:14:36 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, Raag Jadav <raag.jadav@intel.com>, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Alex Vinarskis <alex.vinarskis@gmail.com> Subject: [PATCH v1 1/1] ACPI: LPSS: Fix the fractional clock divider flags Date: Mon, 11 Dec 2023 13:14:29 +0200 Message-ID: <20231211111430.3910049-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 11 Dec 2023 03:14:50 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784983892559136847 X-GMAIL-MSGID: 1784983892559136847 |
Series |
[v1,1/1] ACPI: LPSS: Fix the fractional clock divider flags
|
|
Commit Message
Andy Shevchenko
Dec. 11, 2023, 11:14 a.m. UTC
The conversion to CLK_FRAC_DIVIDER_POWER_OF_TWO_PS uses wrong flags
in the parameters and hence miscalculates the values in the clock
divider. Fix this by applying the flag to the proper parameter.
Fixes: 82f53f9ee577 ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag")
Reported-by: Alex Vinarskis <alex.vinarskis@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/acpi/acpi_lpss.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Mon, Dec 11, 2023 at 12:14 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > The conversion to CLK_FRAC_DIVIDER_POWER_OF_TWO_PS uses wrong flags > in the parameters and hence miscalculates the values in the clock > divider. Fix this by applying the flag to the proper parameter. > > Fixes: 82f53f9ee577 ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag") > Reported-by: Alex Vinarskis <alex.vinarskis@gmail.com> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/acpi/acpi_lpss.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c > index 79f4fc7d6871..6f454f61a432 100644 > --- a/drivers/acpi/acpi_lpss.c > +++ b/drivers/acpi/acpi_lpss.c > @@ -453,8 +453,9 @@ static int register_device_clock(struct acpi_device *adev, > if (!clk_name) > return -ENOMEM; > clk = clk_register_fractional_divider(NULL, clk_name, parent, > + 0, prv_base, 1, 15, 16, 15, > CLK_FRAC_DIVIDER_POWER_OF_TWO_PS, > - prv_base, 1, 15, 16, 15, 0, NULL); > + NULL); > parent = clk_name; > > clk_name = kasprintf(GFP_KERNEL, "%s-update", devname); > -- Applied as 6.8 material, thanks!
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 79f4fc7d6871..6f454f61a432 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -453,8 +453,9 @@ static int register_device_clock(struct acpi_device *adev, if (!clk_name) return -ENOMEM; clk = clk_register_fractional_divider(NULL, clk_name, parent, + 0, prv_base, 1, 15, 16, 15, CLK_FRAC_DIVIDER_POWER_OF_TWO_PS, - prv_base, 1, 15, 16, 15, 0, NULL); + NULL); parent = clk_name; clk_name = kasprintf(GFP_KERNEL, "%s-update", devname);