From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C64E2241F5A; Thu, 12 Dec 2024 16:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734021396; cv=none; b=lpe0d1OKW2iIohnLYQWsL0Xm6wQerhNq1fasENGBziQ/iTqDjuoAgcUj+MfSqKW3qabvWaVMpo/3c3Xnh89nFsk+9k9J/OrR3xbEs1hAvaqcsF+eFzMW0Q9udiaRPIrKH9dAipeIreAF+aMrK8xS9Bb+ua0dLLpc3pmeGCc9nP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734021396; c=relaxed/simple; bh=5prq6jdG3w6aousIoKPjqeem1tYaNbRW4+rG+miwwJg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u6hwJi2lU/Rl4ms8guZOK8hIYzWf+7Xw4RGE4TZbwpc71gleA0BFIC/SHK2DKptjj3zYnJKGXtBCTStMxYdf8k9mT2ahqeGAcNROO5g98P3g7PVi5ABOxmRRui7XG4knXVVQ17LB8jtgzx4jr7Sl49uk0m85HglBgRKMPjDErKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WleH77fP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WleH77fP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B227C4CECE; Thu, 12 Dec 2024 16:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734021396; bh=5prq6jdG3w6aousIoKPjqeem1tYaNbRW4+rG+miwwJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WleH77fPad3jbZNe+QxZxGMVYn0NL4SnrdyEdznNhsAhW2Afg8S9ULoQT7OTWTWn0 DMBefhRftL6CuIBmTV74guGhrYNpHz1ZxCJnOJCJCWjb9ZBPlcOcmgnb40lAjGwefM gvJfgSk+VQDvXVT9kGchqa9J3ifoZzFDMhtKjw8s= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andy Shevchenko , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Inochi Amaoto , Sasha Levin Subject: [PATCH 6.1 727/772] serial: 8250_dw: Add Sophgo SG2044 quirk Date: Thu, 12 Dec 2024 16:01:12 +0100 Message-ID: <20241212144419.932717083@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144349.797589255@linuxfoundation.org> References: <20241212144349.797589255@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Inochi Amaoto [ Upstream commit cad4dda82c7eedcfc22597267e710ccbcf39d572 ] SG2044 relys on an internal divisor when calculating bitrate, which means a wrong clock for the most common bitrates. So add a quirk for this uart device to skip the set rate call and only relys on the internal UART divisor. Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Signed-off-by: Inochi Amaoto Link: https://lore.kernel.org/r/20241024062105.782330-4-inochiama@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/serial/8250/8250_dw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index a1f2259cc9a98..72f9aab75ab12 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -770,7 +770,7 @@ static const struct dw8250_platform_data dw8250_renesas_rzn1_data = { .quirks = DW_UART_QUIRK_IS_DMA_FC, }; -static const struct dw8250_platform_data dw8250_starfive_jh7100_data = { +static const struct dw8250_platform_data dw8250_skip_set_rate_data = { .usr_reg = DW_UART_USR, .quirks = DW_UART_QUIRK_SKIP_SET_RATE, }; @@ -780,7 +780,8 @@ static const struct of_device_id dw8250_of_match[] = { { .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data }, { .compatible = "marvell,armada-38x-uart", .data = &dw8250_armada_38x_data }, { .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data }, - { .compatible = "starfive,jh7100-uart", .data = &dw8250_starfive_jh7100_data }, + { .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data }, + { .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data }, { /* Sentinel */ } }; MODULE_DEVICE_TABLE(of, dw8250_of_match); -- 2.43.0