[{"id":3344175,"web_url":"http://patchwork.ozlabs.org/comment/3344175/","msgid":"<cb7a69949c08be858b107a2b8184d1da92d794a0.camel@physik.fu-berlin.de>","list_archive_url":null,"date":"2024-07-11T12:57:18","subject":"Re: [DO NOT MERGE v8 20/36] serial: sh-sci: fix SH4 OF support.","submitter":{"id":4003,"url":"http://patchwork.ozlabs.org/api/people/4003/","name":"John Paul Adrian Glaubitz","email":"glaubitz@physik.fu-berlin.de"},"content":"Hi Yoshinori,\n\nOn Wed, 2024-05-29 at 17:01 +0900, Yoshinori Sato wrote:\n> - Separated RZ's earlycon initialization from normal SCIF.\n> - fix earlyprintk hung (NULL pointer reference).\n> - fix SERIAL_SH_SCI_EARLYCON enablement\n\nI feel like this could actually be split into three patches.\n\nAdrian\n\n> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>\n> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>\n> ---\n>  drivers/tty/serial/Kconfig  | 2 +-\n>  drivers/tty/serial/sh-sci.c | 6 +++---\n>  2 files changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig\n> index 4fdd7857ef4d..eeb22b582470 100644\n> --- a/drivers/tty/serial/Kconfig\n> +++ b/drivers/tty/serial/Kconfig\n> @@ -664,7 +664,7 @@ config SERIAL_SH_SCI_EARLYCON\n>  \tdepends on SERIAL_SH_SCI=y\n>  \tselect SERIAL_CORE_CONSOLE\n>  \tselect SERIAL_EARLYCON\n> -\tdefault ARCH_RENESAS\n> +\tdefault ARCH_RENESAS || SUPERH\n>  \n>  config SERIAL_SH_SCI_DMA\n>  \tbool \"DMA support\" if EXPERT\n> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c\n> index f738980a8b2c..068f483401e3 100644\n> --- a/drivers/tty/serial/sh-sci.c\n> +++ b/drivers/tty/serial/sh-sci.c\n> @@ -2723,7 +2723,7 @@ static int sci_remap_port(struct uart_port *port)\n>  \tif (port->membase)\n>  \t\treturn 0;\n>  \n> -\tif (port->dev->of_node || (port->flags & UPF_IOREMAP)) {\n> +\tif (dev_of_node(port->dev) || (port->flags & UPF_IOREMAP)) {\n>  \t\tport->membase = ioremap(port->mapbase, sport->reg_size);\n>  \t\tif (unlikely(!port->membase)) {\n>  \t\t\tdev_err(port->dev, \"can't remap port#%d\\n\", port->line);\n> @@ -3551,8 +3551,8 @@ static int __init hscif_early_console_setup(struct earlycon_device *device,\n>  \n>  OF_EARLYCON_DECLARE(sci, \"renesas,sci\", sci_early_console_setup);\n>  OF_EARLYCON_DECLARE(scif, \"renesas,scif\", scif_early_console_setup);\n> -OF_EARLYCON_DECLARE(scif, \"renesas,scif-r7s9210\", rzscifa_early_console_setup);\n> -OF_EARLYCON_DECLARE(scif, \"renesas,scif-r9a07g044\", rzscifa_early_console_setup);\n> +OF_EARLYCON_DECLARE(rzscifa, \"renesas,scif-r7s9210\", rzscifa_early_console_setup);\n> +OF_EARLYCON_DECLARE(rzscifa, \"renesas,scif-r9a07g044\", rzscifa_early_console_setup);\n>  OF_EARLYCON_DECLARE(scifa, \"renesas,scifa\", scifa_early_console_setup);\n>  OF_EARLYCON_DECLARE(scifb, \"renesas,scifb\", scifb_early_console_setup);\n>  OF_EARLYCON_DECLARE(hscif, \"renesas,hscif\", hscif_early_console_setup);","headers":{"Return-Path":"\n <linux-pci+bounces-10154-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=fu-berlin.de header.i=@fu-berlin.de header.a=rsa-sha256\n header.s=fub01 header.b=ZagcQCku;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org;\n envelope-from=linux-pci+bounces-10154-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key)\n header.d=fu-berlin.de header.i=@fu-berlin.de header.b=\"ZagcQCku\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=130.133.4.66","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=physik.fu-berlin.de","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=zedat.fu-berlin.de"],"Received":["from sv.mirrors.kernel.org (sv.mirrors.kernel.org\n [IPv6:2604:1380:45e3:2400::1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4WKZWr3GJQz1xqc\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 11 Jul 2024 22:57:44 +1000 (AEST)","from smtp.subspace.kernel.org (wormhole.subspace.kernel.org\n [52.25.139.140])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby sv.mirrors.kernel.org (Postfix) with ESMTPS id C786C282732\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 11 Jul 2024 12:57:42 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B9DD315E5AB;\n\tThu, 11 Jul 2024 12:57:36 +0000 (UTC)","from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de\n [130.133.4.66])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D9B4155C95;\n\tThu, 11 Jul 2024 12:57:30 +0000 (UTC)","from inpost2.zedat.fu-berlin.de ([130.133.4.69])\n          by outpost.zedat.fu-berlin.de (Exim 4.98)\n          with esmtps (TLS1.3)\n          tls TLS_AES_256_GCM_SHA384\n          (envelope-from <glaubitz@zedat.fu-berlin.de>)\n          id 1sRtMO-00000003KGI-40qJ; Thu, 11 Jul 2024 14:57:20 +0200","from p5b13a475.dip0.t-ipconnect.de ([91.19.164.117]\n helo=[192.168.178.20])\n          by inpost2.zedat.fu-berlin.de (Exim 4.98)\n          with esmtpsa (TLS1.3)\n          tls TLS_AES_256_GCM_SHA384\n          (envelope-from <glaubitz@physik.fu-berlin.de>)\n          id 1sRtMO-00000001SHj-2Zok; Thu, 11 Jul 2024 14:57:20 +0200"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1720702656; cv=none;\n b=WKtQ+JRPLK9SRYGEC/0d7SEwuFLq+Zlf5lOpMdYx+e4CndtOrh5giu4mNC2KU5xj6BU63V2kSFAhi1euqgfLKecsteyjIKXbkgQjStyvk24GNmHucBrzpF5xgZwf17wLra6zOUfjuTCldCvoKcghzwV7JI0b863ICxxXswSzxgQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1720702656; c=relaxed/simple;\n\tbh=IgnTnnjkD8FFGi6ivzy/g9+noQ1C0Ks2nR19HopGtQc=;\n\th=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=Ltwn991fJJKAYGT0cT3egnR3ibbLQSTXiS2UBElbGmIaHUi2Pkb7FPgWmkf2OtjaWqdw8Tw8c6X1cku8fhdPemGE2Hgy5zSoRouiBunLc9PLofXWV26kPpug14DxQmK1AKtqdTd/LzgBHzZaNu3eWPNNi0HCG1cGAnFdcD1NR6I=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=physik.fu-berlin.de;\n spf=pass smtp.mailfrom=zedat.fu-berlin.de;\n dkim=pass (2048-bit key) header.d=fu-berlin.de header.i=@fu-berlin.de\n header.b=ZagcQCku; arc=none smtp.client-ip=130.133.4.66","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=fu-berlin.de; s=fub01; h=MIME-Version:Content-Transfer-Encoding:\n\tContent-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender\n\t:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:\n\tList-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=UP29LTmvlHTs/OoBfoU8insLR5ShRbL+0hC3P+TNI/s=; t=1720702652; x=1721307452;\n\tb=ZagcQCkubL7WN9c6ifIlQ7V4f1nvNypRwbpsOr6yNJz/zLKkc5CVkwSmdVykIAiceMjcd+tlFhi\n\tZ6esyr52TZWMGkYUYwtfh4H7TJxIH53oxLXtYWkJqIjS35ZZHJ2g53M3oeryf9QNQolTvtRVjoF6O\n\tu+FRxbjhG18U6NMR7SiNrhLOGniHRXNrKp+vU+UWbYbCUI9ApaVeOTAiS/WjNP3zByje+XK+Sk3YG\n\tKclf0XoiA/XnE0aNwqxLeSwyjkoa6HNjucmI1UC1H5o1HeWUMK9OZsjmHNhQVuyvxZtxcmS/Z4ZIG\n\tfwhQz6fKZeF1nxzzy9c4NHDkCvz66FCT+fvg==;","Message-ID":"\n <cb7a69949c08be858b107a2b8184d1da92d794a0.camel@physik.fu-berlin.de>","Subject":"Re: [DO NOT MERGE v8 20/36] serial: sh-sci: fix SH4 OF support.","From":"John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>","To":"Yoshinori Sato <ysato@users.sourceforge.jp>, linux-sh@vger.kernel.org","Cc":"Damien Le Moal <dlemoal@kernel.org>, Niklas Cassel <cassel@kernel.org>,\n  Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>,\n Conor Dooley <conor+dt@kernel.org>,\n  Geert Uytterhoeven <geert+renesas@glider.be>,\n Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>,\n  David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,\n Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,\n Maxime Ripard <mripard@kernel.org>,  Thomas Zimmermann <tzimmermann@suse.de>,\n Thomas Gleixner <tglx@linutronix.de>, Bjorn Helgaas <bhelgaas@google.com>,\n  Lorenzo Pieralisi <lpieralisi@kernel.org>, Krzysztof =?utf-8?q?Wilczy?=\n\t=?utf-8?q?=C5=84ski?= <kw@linux.com>,\n Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n Jiri Slaby <jirislaby@kernel.org>, Magnus Damm <magnus.damm@gmail.com>,\n Daniel Lezcano <daniel.lezcano@linaro.org>, Rich Felker <dalias@libc.org>,\n Lee Jones <lee@kernel.org>, Helge Deller <deller@gmx.de>,\n Heiko Stuebner <heiko.stuebner@cherry.de>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Chris Morgan <macromorgan@hotmail.com>, Sebastian Reichel <sre@kernel.org>,\n Linus Walleij <linus.walleij@linaro.org>, Arnd Bergmann <arnd@arndb.de>,\n Masahiro Yamada <masahiroy@kernel.org>, Baoquan He <bhe@redhat.com>,\n Andrew Morton <akpm@linux-foundation.org>,\n Guenter Roeck <linux@roeck-us.net>, Kefeng Wang <wangkefeng.wang@huawei.com>,\n Stephen Rothwell <sfr@canb.auug.org.au>,\n Azeem Shaikh <azeemshaikh38@gmail.com>, Guo Ren <guoren@kernel.org>,\n Max Filippov <jcmvbkbc@gmail.com>,\n  Jernej Skrabec <jernej.skrabec@gmail.com>,\n Herve Codina <herve.codina@bootlin.com>,\n Andy Shevchenko <andriy.shevchenko@linux.intel.com>,\n Anup Patel <apatel@ventanamicro.com>,  Jacky Huang <ychuang3@nuvoton.com>,\n Hugo Villeneuve <hvilleneuve@dimonoff.com>, Jonathan Corbet <corbet@lwn.net>,\n Wolfram Sang <wsa+renesas@sang-engineering.com>, Uwe =?iso-8859-1?q?Kleine-?=\n\t=?iso-8859-1?q?K=F6nig?= <u.kleine-koenig@pengutronix.de>,\n Christophe JAILLET <christophe.jaillet@wanadoo.fr>,\n Sam Ravnborg <sam@ravnborg.org>,\n Javier Martinez Canillas <javierm@redhat.com>,\n Sergey Shtylyov <s.shtylyov@omp.ru>,\n Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,\n linux-ide@vger.kernel.org,  devicetree@vger.kernel.org,\n linux-kernel@vger.kernel.org,  linux-renesas-soc@vger.kernel.org,\n linux-clk@vger.kernel.org,  dri-devel@lists.freedesktop.org,\n linux-pci@vger.kernel.org,  linux-serial@vger.kernel.org,\n linux-fbdev@vger.kernel.org","Date":"Thu, 11 Jul 2024 14:57:18 +0200","In-Reply-To":"\n <57525900a4876323467612d73eded183315c1680.1716965617.git.ysato@users.sourceforge.jp>","References":"<cover.1716965617.git.ysato@users.sourceforge.jp>\n\t <57525900a4876323467612d73eded183315c1680.1716965617.git.ysato@users.sourceforge.jp>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.52.3 ","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-Original-Sender":"glaubitz@physik.fu-berlin.de","X-ZEDAT-Hint":"PO"}}]