Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp59686lqe; Wed, 3 Apr 2024 22:24:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUoDnDDf1njkMEFjt2aWKiBT+x/rkSvD1ZlMFC21ZmZ7Ovbby0LgSoVGrMLPhIGyl5Lr4o3+iDaRxVRWr65Z2XlEYn4f3kbO4NnAHCdlw== X-Google-Smtp-Source: AGHT+IH16uXzJe2947tkcY6UnEA+JWjZ3jhcSvEJiSc7PRbi9QeL9/qgdMBigp9ahYWYZsrnulHQ X-Received: by 2002:a05:6402:27cd:b0:56c:d1b:588 with SMTP id c13-20020a05640227cd00b0056c0d1b0588mr1770890ede.14.1712208254804; Wed, 03 Apr 2024 22:24:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712208254; cv=pass; d=google.com; s=arc-20160816; b=EDPLgsvxPd3v0t7D1fjHhCCgk57GYRqZ46Mc1b5ik/E8p8MskmBpQF+2z1RAWoxG8a PG2Q453eHHHwMM/+vmqf+EBADo7JDCzkBR/fEa43LddinjKlYMeRTz4XKLnggGHZi3+k qg2gNhF3VZyDS8AHMQDv2q3latAO6uhZLe0c0sKOC4eFbB7UgVsWvz+n3mWMh8faceQf ZNfwd1IjrQfcE4yJukB2VAt4vR61d5qA04nimI4Tiu6OikLdGFCoFqLLgOdjVehQRXmQ yrRIn0jKbq3+2xecMJArD13yGuMvPTJRO9JA/EABp3leMqwx1LuslXy3DosZZKBeS7eW eY7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=5ELs3gD7B7wmnO+1Dd2jY/9JYlYbKugHocMo1EZ4ZaI=; fh=v4XjIS8ZnkfRSzpdvZ0kX2qBiNaW+cViNlbs+XMLZ44=; b=YaxzcNm2GMgJV2Q7HkenrZGWukOx1QJdNG/Hzbsz7+IJSPvjJPnOMc8UbsrNASyFD+ wxzFVWg7QpvN0yxv6BHPf/4lJtUkS5BjXf7Fp4GSNn2u5D9J2RReyZO8sBnmmZFH47nA nZGnEfCeaWJXzOpB8ci1Cm8HrYUmkI20notYNn2iewuOVJMVDdx5LsttDc5s3RTKpdan 3KMvZ8LvTmFzWtHOezhmNADAap6Rh6++xpnBrDNzk2qB41h+DIGxrXX/kF8KSUj2Lo7B ISDpjcxDcWUyYtYosH0p1Pji/sNadU4YucgZ3C3jBjhcAkd3c7vr6CV8Nw9I7+D3HM95 pOQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-130931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130931-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r16-20020a056402235000b0056e1018b59esi690564eda.106.2024.04.03.22.24.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 22:24:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-130931-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130931-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7EF7E1F23DBA for ; Thu, 4 Apr 2024 05:24:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AE3D127B47; Thu, 4 Apr 2024 05:15:35 +0000 (UTC) Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D87C8662A; Thu, 4 Apr 2024 05:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=153.127.30.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712207734; cv=none; b=FotAleyCsQ7j5yiix5VQBxAdkpkfCQ20YDJFmyh7pYfyDetsZpsCmFhei0YrvyfgHgNm1ixYcL0WGLPm3bO/PtA0mIp3IHPZqZZZsgnba0T2O6dB33a4n/3T6OOoeZ4QTtjL0R8sS7j+q86mw1X21wQKgZ1XdiMiIvKSE/fDlX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712207734; c=relaxed/simple; bh=/SVwW82/qqoafDX5rrWInlnHjQYhzm2Ysf1xX40RPDI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=p/kGHjN/8D0Ra1ZstV6hBOD6ZPLUFlrjVP1Xd8h9TDR5IS1BQJlcV7mMvLWQvcBiDdY/eVkAtBBjXBYJuaW4qVWuvAQjAZaOl9m2mWJ3PO9UntLtEmbCGOfdD615askx/KN8Dh7y/bhEauO2+7OKGN8/ayJjOt9Bzo/cwhNI40w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=users.sourceforge.jp; spf=fail smtp.mailfrom=users.sourceforge.jp; arc=none smtp.client-ip=153.127.30.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=users.sourceforge.jp Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=users.sourceforge.jp Received: from SIOS1075.ysato.name (al128006.dynamic.ppp.asahi-net.or.jp [111.234.128.6]) by sakura.ysato.name (Postfix) with ESMTPSA id A1CCF1C0FFA; Thu, 4 Apr 2024 14:15:30 +0900 (JST) From: Yoshinori Sato To: linux-sh@vger.kernel.org Cc: Yoshinori Sato , Damien Le Moal , Niklas Cassel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Michael Turquette , Stephen Boyd , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Thomas Gleixner , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Greg Kroah-Hartman , Jiri Slaby , Magnus Damm , Daniel Lezcano , Rich Felker , John Paul Adrian Glaubitz , Lee Jones , Helge Deller , Heiko Stuebner , Shawn Guo , Sebastian Reichel , Chris Morgan , Linus Walleij , Arnd Bergmann , David Rientjes , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Vlastimil Babka , Baoquan He , Andrew Morton , Guenter Roeck , Kefeng Wang , Stephen Rothwell , Javier Martinez Canillas , Guo Ren , Azeem Shaikh , Max Filippov , Jonathan Corbet , Jacky Huang , Herve Codina , Manikanta Guntupalli , Anup Patel , Biju Das , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Sam Ravnborg , Sergey Shtylyov , Laurent Pinchart , linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [RESEND v7 20/37] serial: sh-sci: fix SH4 OF support. Date: Thu, 4 Apr 2024 14:14:31 +0900 Message-Id: <38f5834918e7e9dff023e8db970bc3c0160583ec.1712207606.git.ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit - fix earlycon name. - fix earlyprintk hung (NULL pointer reference). - fix SERIAL_SH_SCI_EARLYCON enablement Signed-off-by: Yoshinori Sato Reviewed-by: Geert Uytterhoeven --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/sh-sci.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index ffcf4882b25f..dfe5fd436816 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -661,7 +661,7 @@ config SERIAL_SH_SCI_EARLYCON depends on SERIAL_SH_SCI=y select SERIAL_CORE_CONSOLE select SERIAL_EARLYCON - default ARCH_RENESAS + default ARCH_RENESAS || SUPERH config SERIAL_SH_SCI_DMA bool "DMA support" if EXPERT diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index e512eaa57ed5..46466fb5a637 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2717,7 +2717,7 @@ static int sci_remap_port(struct uart_port *port) if (port->membase) return 0; - if (port->dev->of_node || (port->flags & UPF_IOREMAP)) { + if ((port->dev && port->dev->of_node) || (port->flags & UPF_IOREMAP)) { port->membase = ioremap(port->mapbase, sport->reg_size); if (unlikely(!port->membase)) { dev_err(port->dev, "can't remap port#%d\n", port->line); @@ -3545,8 +3545,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(rzscifa, "renesas,scif-r7s9210", rzscifa_early_console_setup); +OF_EARLYCON_DECLARE(rzscifa, "renesas,scif-r9a07g044", rzscifa_early_console_setup); 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); -- 2.39.2