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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82826CD4F43 for ; Fri, 22 Sep 2023 09:41:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbjIVJl1 (ORCPT ); Fri, 22 Sep 2023 05:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjIVJlZ (ORCPT ); Fri, 22 Sep 2023 05:41:25 -0400 Received: from imap4.hz.codethink.co.uk (imap4.hz.codethink.co.uk [188.40.203.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DA1394; Fri, 22 Sep 2023 02:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=codethink.co.uk; s=imap4-20230908; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lu0ragu9njIWkwjYInfzfJMShGYH9itXl0arckB59I4=; b=AVK3i7Gnj8vrP3ODfaNSbz2/iT 5N97Ep3ypZjTKYMj/YOuCPzp1aR+ZtoydUkZ2cBWb9tG34RjTfBlDjMeNV1odS1j6F2GEkQ+VpcS7 WG7iunBRr5njaBq1AG069VWZtFakknKyAZUTzDghq9xkxcN37LDKioxDSBdENkiQhTKsJvbj4F0ty 8rwaVproLUfX+QCmlY3/2NUIgEYPJV77ZHnsftrsnUK39FUzOoQxYEyntAimHYTluJXWwX2sk5BlL r1qFnUOX4vW9zdKS4zw3As2kyabk2A7mY7KHtaWjMVplRsG7Gcp6NQStaKOSHnnA+WV45VVbNeKE7 joMqH99A==; Received: from [134.238.52.102] (helo=[10.8.4.124]) by imap4.hz.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1qjcep-00CYxl-Di; Fri, 22 Sep 2023 10:41:07 +0100 Message-ID: Date: Fri, 22 Sep 2023 10:41:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 08/11] serial: 8250_dw: Add Sophgo SG2042 support Content-Language: en-GB To: Chen Wang , aou@eecs.berkeley.edu, chao.wei@sophgo.com, conor@kernel.org, devicetree@vger.kernel.org, emil.renner.berthing@canonical.com, guoren@kernel.org, jszhang@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org, xiaoguang.xing@sophgo.com Cc: Chen Wang References: <888d57a2d5e62affb8e29e0098402e428facd969.1695189879.git.wangchen20@iscas.ac.cn> From: Ben Dooks Organization: Codethink Limited. In-Reply-To: <888d57a2d5e62affb8e29e0098402e428facd969.1695189879.git.wangchen20@iscas.ac.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/09/2023 07:40, Chen Wang wrote: > From: Emil Renner Berthing > > Add quirk to skip setting the input clock rate for the uarts on the > Sophgo SG2042 SoC similar to the StarFive JH7100. I'd love an actual explanation of why this is necessary here. > > Signed-off-by: Emil Renner Berthing > Signed-off-by: Chen Wang > --- > 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 f4cafca1a7da..6c344877a07f 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,sg2042-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); -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html