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 C47C5E784AC for ; Mon, 2 Oct 2023 12:56:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237192AbjJBM4s convert rfc822-to-8bit (ORCPT ); Mon, 2 Oct 2023 08:56:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237186AbjJBM4q (ORCPT ); Mon, 2 Oct 2023 08:56:46 -0400 Received: from hsmtpd-def.xspmail.jp (hsmtpd-def.xspmail.jp [202.238.198.239]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96B04B4 for ; Mon, 2 Oct 2023 05:56:41 -0700 (PDT) X-Country-Code: JP Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) by hsmtpd-out-0.asahinet.cluster.xspmail.jp (Halon) with ESMTPA id 22f361e4-4b73-4186-9266-bd06340dfd16; Mon, 02 Oct 2023 21:56:39 +0900 (JST) Received: from SIOS1075.ysato.ml (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id A65361C01AA; Mon, 2 Oct 2023 21:56:37 +0900 (JST) Date: Mon, 02 Oct 2023 21:56:37 +0900 Message-ID: <87edidtc6y.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Geert Uytterhoeven Cc: linux-sh@vger.kernel.org, glaubitz@physik.fu-berlin.de Subject: Re: [RFC PATCH v2 19/30] drivers/tty: sh-sci fix SH4 OF support. In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org On Tue, 19 Sep 2023 21:25:06 +0900, Geert Uytterhoeven wrote: > > Hi Sato-san, > > Thanks for your patch! > > On Wed, Sep 13, 2023 at 11:26 AM Yoshinori Sato > wrote: > > - fix earlycon name. > > I guess you mean earlyprintk? > > "Earlyprintk expects that all names used in OF_EARLYCON_DECLARE() > are unique". > > > - fix earlyprintk hung (NULL pointer reference). > > - clocks property support. > > > > Signed-off-by: Yoshinori Sato > > > --- a/drivers/tty/serial/sh-sci.c > > +++ b/drivers/tty/serial/sh-sci.c > > > @@ -2842,6 +2842,8 @@ static int sci_init_clocks(struct sci_port *sci_port, struct device *dev) > > * global "peripheral_clk" clock. > > */ > > clk = devm_clk_get(dev, "peripheral_clk"); > > + if (IS_ERR(clk)) > > + clk = devm_clk_get(dev, NULL); > > This should not be needed. > I guess this is a workaround for the lack of > > clock-names = "fck"; > > in arch/sh/boot/dts/sh7751.dtsi? > > "make dtbs_check > DT_SCHEMA_FILES=Documentation/devicetree/bindings/serial/renesas,scif.yaml" > would have told you ;-) > > serial@ffe80000: 'clock-names' is a required property > > > if (IS_ERR(clk)) > > return dev_err_probe(dev, PTR_ERR(clk), > > "failed to get %s\n", > > @@ -3555,8 +3557,8 @@ static int __init hscif_early_console_setup(struct earlycon_device *device, > > > > OF_EARLYCON_DECLARE(sci, "renesas,sci", sci_early_console_setup); > > OF_EARLYCON_DECLARE(scif, "renesas,scif", scif_early_console_setup); > > -OF_EARLYCON_DECLARE(scif, "renesas,scif-r7s9210", rzscifa_early_console_setup); > > -OF_EARLYCON_DECLARE(scif, "renesas,scif-r9a07g044", rzscifa_early_console_setup); > > +OF_EARLYCON_DECLARE(rzscif, "renesas,scif-r7s9210", rzscifa_early_console_setup); > > +OF_EARLYCON_DECLARE(rzscif, "renesas,scif-r9a07g044", rzscifa_early_console_setup); > > Perhaps "rzscifa", to match the setup function prefix? With this change, specifying "earlycon=rzscif,0xe8007000" in the boot parameter will call rzscifa_early_console_setup. But it would be confusing if the names were not unified, so use "rzscifa" I'll make it. > > OF_EARLYCON_DECLARE(scifa, "renesas,scifa", scifa_early_console_setup); > > OF_EARLYCON_DECLARE(scifb, "renesas,scifb", scifb_early_console_setup); > > OF_EARLYCON_DECLARE(hscif, "renesas,hscif", hscif_early_console_setup); > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds -- Yosinori Sato