Message ID | 20230915072558.118325-1-wangchen20@iscas.ac.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1003532vqi; Fri, 15 Sep 2023 05:24:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/pcxu1JIdipIAkCMiDUNLNzE/N6qMFbuWXYDJ2snAHosfudzEtuGa5ePrMsvodBPllXTY X-Received: by 2002:a05:6a21:7988:b0:14d:5580:8ff0 with SMTP id bh8-20020a056a21798800b0014d55808ff0mr1389278pzc.25.1694780683169; Fri, 15 Sep 2023 05:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694780683; cv=none; d=google.com; s=arc-20160816; b=EDuwYQblBkyswi2buvI5mYIj8+iigu2RqNk4W9Lktiuqny8DCysOnzfWIJQoASG6G5 YYiLW+3A5BgVZGh32AlZxyLs2+GCrZ7bfVuhjfMDOhtFdWwXw5CCWp504K6DlblgWwZZ TlCX+nIM83m9e0G5m+GhGt39qLJC8xhoiaDs5TcVuG8uKSjMB7A29JOjPU09PAkA+kp2 RmyQRTIxxaw7DTG/u/t/p6Gs8UGoGaZAdE3gCPJhFE3JvxKty7/VSHQJMQue4EZjFOdJ OHFjYSZ19ubq2jFDcU1TZ4h4oVey09kt+z7+7ZJU+n7zPoh9MOCyyBhzsudYkl+KQbNR uvFQ== 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=L2LlgryffFXqAnsB0AaplLotGa39fDQAXZM7QJ4rjkg=; fh=qcStU/cXmyi6QQmh2OH0Y187/PpiTFL4etZ28pI2hrA=; b=sesw9VTSDsp5j1hrhM2ZFwIh9ET4LAeLF3kwd8b2J/vF67//NxpJ+eaQzsA+MibA6K 17mCntjceHArVR+yvNIbSM3EtxMITyLmM1UVeLdKpTPl69ySuVqau88Pg1Di37s3BD85 vdsuoB6avjAmFur0dgVZm5R5nyKuRUm1DyzDGigIeZdZnAprcgwvgvc1P8fTEGVlq5kj tHJ/+FyM+NTaEihSZkZUr7r3mZRkdRshxtCPIF7mrzcQTPvBbEYLR15hwnl512fybZpm JspXMhLWKYXKf0JIvWpDtU4RK4e0GyWsPlxuDGMjWVMJ0zHIvXRCgI7lUFUH/nFcq2cR bkbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Snl9Y5XH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id f20-20020a631014000000b00565f4fb0999si3076474pgl.610.2023.09.15.05.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 05:24:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Snl9Y5XH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0C66D81BB4DD; Fri, 15 Sep 2023 00:26:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232125AbjIOH01 (ORCPT <rfc822;pwkd43@gmail.com> + 33 others); Fri, 15 Sep 2023 03:26:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232830AbjIOH0X (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 03:26:23 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66C1319A5; Fri, 15 Sep 2023 00:26:14 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1bf55a81eeaso14698665ad.0; Fri, 15 Sep 2023 00:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694762774; x=1695367574; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=L2LlgryffFXqAnsB0AaplLotGa39fDQAXZM7QJ4rjkg=; b=Snl9Y5XHaZKMjP5OADSAZuSBJ5RqTWFsYoPiVOdg7FvjIMo/mBJ3IsMWEyrfU7OE0i xDrzBxwRF2+iO7kh8MzGFkb/nzlh4Yyp3oqweDxiH8iMyByup/5pjXrmUjcKNpNco2N+ Jjej64Kqdrhe5beAa28R0pYgMBvd9Ujqo1ItGG4JGqMMIba14cIJaojHKwNNvN/XKW9J FXHWjwrrx3wbX5HRXxhS+6Tug18rmgXxYEh8xNfSOEnbIFUf8I7xDhRPR1afz7ZgyVQi V8D+Bvgj6D4Ooax9YhYABvAYoJH6kiA/wCUIAW3qXy8KToFM9wi3hItOvfqp76Zzkyfm +9pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694762774; x=1695367574; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=L2LlgryffFXqAnsB0AaplLotGa39fDQAXZM7QJ4rjkg=; b=cwrS2KtgMe6vjY8iquiolgKk3d+rId7hg8qnEGA+01gZwIgsByFC7Gjnp5nR6nDe4B kmEy8FbLvzUJCJSylraSafg5bBL0vmdOr4Y5mqyMg/72jfEKL3QN63D5z00pVrcUmf95 I1vEhRhkDoZrdqatplRvXaRFVkl4B4ykaRaoRSZczV45gkL6bskZFU21M4LSHCViMiEd XEZ03oeuL7jjQz38FwsE3RBGX+zYGS34nJxFYrLyXk/dbjchv9aG2fE6EBXmLTEpRbyz QcmW6huQwxIVdfmR5taNZKjAg/fZbjmyRO9X2khRjMCLQcMiPjhs/Ygj6018Qe1TgYhD ORZw== X-Gm-Message-State: AOJu0YxjYeUODBHfsU2ZzN/6uJJugpOhKNffnL928uH8K0fCzDyTZZiK 2wgX6TPH2UOV4FMuL9aObnI= X-Received: by 2002:a17:902:6903:b0:1bb:b855:db3c with SMTP id j3-20020a170902690300b001bbb855db3cmr667277plk.41.1694762773826; Fri, 15 Sep 2023 00:26:13 -0700 (PDT) Received: from localhost.localdomain ([222.95.63.58]) by smtp.gmail.com with ESMTPSA id m2-20020a170902768200b001acae9734c0sm2752110pll.266.2023.09.15.00.26.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 00:26:13 -0700 (PDT) From: Wang Chen <unicornxw@gmail.com> X-Google-Original-From: Wang Chen <wangchen20@iscas.ac.cn> To: linux-riscv@lists.infradead.org, conor@kernel.org, aou@eecs.berkeley.edu, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, jszhang@kernel.org, guoren@kernel.org, chao.wei@sophgo.com, xiaoguang.xing@sophgo.com, Emil Renner Berthing <emil.renner.berthing@canonical.com> Subject: [PATCH 10/12] serial: 8250_dw: Add Sophgo SG2042 support Date: Fri, 15 Sep 2023 15:25:58 +0800 Message-Id: <20230915072558.118325-1-wangchen20@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 15 Sep 2023 00:26:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777093180903742809 X-GMAIL-MSGID: 1777106349289964284 |
Series |
[01/12] riscv: Add SOPHGO SOC family Kconfig support
|
|
Commit Message
Chen Wang
Sept. 15, 2023, 7:25 a.m. UTC
From: Emil Renner Berthing <emil.renner.berthing@canonical.com> Add quirk to skip setting the input clock rate for the uarts on the Sophgo SG2042 SoC similar to the StarFive JH7100. Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> --- drivers/tty/serial/8250/8250_dw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Comments
Krzysztof Kozlowski wrote: > On 15/09/2023 09:25, Wang Chen wrote: > > From: Emil Renner Berthing <emil.renner.berthing@canonical.com> > > > > Add quirk to skip setting the input clock rate for the uarts on the > > Sophgo SG2042 SoC similar to the StarFive JH7100. > > > > Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> > > Missing SoB. > > > --- > > 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 = { > > Why? What is wrong with old name? > > > .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 }, > > So devices are fully compatible? Then use compatibility and drop this > patch entirely. I'm fine with this, but these are two different companies and SoCs that just happens to have both implemented the Designware UART with an inflexible input clock. So if fx. a real quirk is found on the JH7110 then we'd need to either change the compatible on an unrelated SoC or change compatible on the JH7110 to something like "starfive,jh7100-uart-with-quirk" and "starfive,jh7100-uart" will forever be a quirky way to spell "dw8250 with inflexible input clock". Is that how device trees are supposed to work? /Emil > > Best regards, > Krzysztof > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On 15/09/2023 12:02, Emil Renner Berthing wrote: > Krzysztof Kozlowski wrote: >> On 15/09/2023 09:25, Wang Chen wrote: >>> From: Emil Renner Berthing <emil.renner.berthing@canonical.com> >>> >>> Add quirk to skip setting the input clock rate for the uarts on the >>> Sophgo SG2042 SoC similar to the StarFive JH7100. >>> >>> Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> >> >> Missing SoB. >> >>> --- >>> 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 = { >> >> Why? What is wrong with old name? >> >>> .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 }, >> >> So devices are fully compatible? Then use compatibility and drop this >> patch entirely. > > I'm fine with this, but these are two different companies and SoCs that just > happens to have both implemented the Designware UART with an inflexible input > clock. So if fx. a real quirk is found on the JH7110 then we'd need to either > change the compatible on an unrelated SoC or change compatible on the JH7110 to Wait, why? The compatible is still there, so you just add here proper entry, if ever needed. > something like "starfive,jh7100-uart-with-quirk" and "starfive,jh7100-uart" will > forever be a quirky way to spell "dw8250 with inflexible input clock". > Is that how device trees are supposed to work? I don't get this part. But anyway if the blocks are really designed or done independently and there is no shared part, except the DWC block, then indeed the compatibility might be just a coincidence... Best regards, Krzysztof
Krzysztof Kozlowski wrote: > On 15/09/2023 12:02, Emil Renner Berthing wrote: > > Krzysztof Kozlowski wrote: > >> On 15/09/2023 09:25, Wang Chen wrote: > >>> From: Emil Renner Berthing <emil.renner.berthing@canonical.com> > >>> > >>> Add quirk to skip setting the input clock rate for the uarts on the > >>> Sophgo SG2042 SoC similar to the StarFive JH7100. > >>> > >>> Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> > >> > >> Missing SoB. > >> > >>> --- > >>> 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 = { > >> > >> Why? What is wrong with old name? > >> > >>> .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 }, > >> > >> So devices are fully compatible? Then use compatibility and drop this > >> patch entirely. > > > > I'm fine with this, but these are two different companies and SoCs that just > > happens to have both implemented the Designware UART with an inflexible input > > clock. So if fx. a real quirk is found on the JH7110 then we'd need to either > > change the compatible on an unrelated SoC or change compatible on the JH7110 to > > Wait, why? The compatible is still there, so you just add here proper > entry, if ever needed. Sorry, I messed up my example by writing JH7110 where I meant JH7100 > > something like "starfive,jh7100-uart-with-quirk" and "starfive,jh7100-uart" will > > forever be a quirky way to spell "dw8250 with inflexible input clock". > > Is that how device trees are supposed to work? > > I don't get this part. But anyway if the blocks are really designed or > done independently and there is no shared part, except the DWC block, > then indeed the compatibility might be just a coincidence... > It is. Sophgo and StarFive are not the same company. Sophgo are using RISC-V cores from T-Head and StarFive are using cores from SiFive. They just happen to both use the Designware UART in the same way. /Emil
Ben Dooks wrote: > On 15/09/2023 11:23, Emil Renner Berthing wrote: > > Krzysztof Kozlowski wrote: > >> On 15/09/2023 12:02, Emil Renner Berthing wrote: > >>> Krzysztof Kozlowski wrote: > >>>> On 15/09/2023 09:25, Wang Chen wrote: > >>>>> From: Emil Renner Berthing <emil.renner.berthing@canonical.com> > >>>>> > >>>>> Add quirk to skip setting the input clock rate for the uarts on the > >>>>> Sophgo SG2042 SoC similar to the StarFive JH7100. > >>>>> > >>>>> Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> > >>>> > >>>> Missing SoB. > >>>> > >>>>> --- > >>>>> 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 = { > >>>> > >>>> Why? What is wrong with old name? > >>>> > >>>>> .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 }, > >>>> > >>>> So devices are fully compatible? Then use compatibility and drop this > >>>> patch entirely. > >>> > >>> I'm fine with this, but these are two different companies and SoCs that just > >>> happens to have both implemented the Designware UART with an inflexible input > >>> clock. So if fx. a real quirk is found on the JH7110 then we'd need to either > >>> change the compatible on an unrelated SoC or change compatible on the JH7110 to > >> > >> Wait, why? The compatible is still there, so you just add here proper > >> entry, if ever needed. > > > > Sorry, I messed up my example by writing JH7110 where I meant JH7100 > > > >>> something like "starfive,jh7100-uart-with-quirk" and "starfive,jh7100-uart" will > >>> forever be a quirky way to spell "dw8250 with inflexible input clock". > >>> Is that how device trees are supposed to work? > >> > >> I don't get this part. But anyway if the blocks are really designed or > >> done independently and there is no shared part, except the DWC block, > >> then indeed the compatibility might be just a coincidence... > >> > > > > It is. Sophgo and StarFive are not the same company. Sophgo are using RISC-V > > cores from T-Head and StarFive are using cores from SiFive. They just happen to > > both use the Designware UART in the same way. > > Out of interest, what's the issue with just providing an fixed clock in > the device tree for these machines? You mean adding a "fake" fixed clock to the device tree and specify that in the uart nodes? That would break the clock dependency, so then you'd need to add some other way to tell the clock framework not to shut down the real clock. /Emil
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);