Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp53582lqe; Wed, 3 Apr 2024 22:05:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXEKWwMHr6qiu/eINQbIYPBKvXRs2SseawdH2sLBRRuD/Ih9gPPTV/Kb3KV5OQjp97I2pI//Hbip/J9q5I7zjz0jB2TfzFxwYJta5M5Ug== X-Google-Smtp-Source: AGHT+IGjupu+7IvHk2jTr7RpFKAl7xR62qQ4IBSLjtd+bnG5tkHzGP8EUnV5yfhie9YeVlTlWstd X-Received: by 2002:a50:8e17:0:b0:56a:2b6b:42cd with SMTP id 23-20020a508e17000000b0056a2b6b42cdmr835030edw.3.1712207107959; Wed, 03 Apr 2024 22:05:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712207107; cv=pass; d=google.com; s=arc-20160816; b=tLHQ3Dt/xcot5vcLVxC2B0a/tbW2mv/sNrfEiMSt9Q+YGdyoLGAanymtX09mW3iEqa l0/r/g00Yb32NiMZ43URLxSXQjYA/LvHXOpN19ZKtAuFdCV500zSUUQJS5X9XK6zAS9p XiVH+rE/jbueAJBXMzTJD5lMNcEAiHGWPMQ+Ul+O76rCNfKz7qYT9IgcYKR/N0iuSQeG yn1OkBLlW5kHPr1Q8kc3OUhyqBnYnuPtMviTZHNTeT5qOHJsoa2s9HdX2ITKQSGKzvjL uSZ7wkyNgCe9EkIlZUJf2mzlZCd1J9oY0ukpqvcvVB55IYktbRwklmzfwrRhoTaH+fjd 3LvA== 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=vRuY1l65UKcn3N39iOJmUxv+inGuRZy7IPmDYHpceQ9t6yltbwpD80+O45T1M5A4Mm 1S6HsNXhfLt02B5DqJjlo9M5SNobbJYN2pRB1fWNmoamrch+xQbIxJEnTD3KanJN+vcL XWPf7CdJyi9bDtCzBQPMB5VOGJ5QT3XP3RDbnxS5iwFeEUvWp7k8gQ7P7nUFzNgEJd0I nesinjCf8/vJ91kIbjuRHHB/m+n0kSzWpoFUsGi1fwiarA0oA/ry/PBQQCm3B9ZNvb2/ 3hTGdJmmjeZsmJFkFZd45zEN/Jgs61N5+7/ecO2uTEf7CGDy9QoNu8ZzBGHxBpb2dXR5 6WOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-130887-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130887-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 c14-20020a05640227ce00b0056c09072522si7731171ede.475.2024.04.03.22.05.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 22:05:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130887-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-130887-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130887-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 A51E01F2389D for ; Thu, 4 Apr 2024 05:05:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7724145C18; Thu, 4 Apr 2024 05:01:17 +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 0994271B3A; Thu, 4 Apr 2024 05:01:15 +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=1712206876; cv=none; b=hOG2f4F/UPclLmUVWmqQ4IXYfuIgWJsQ3wtsJmoSaJb/OGH3f4o0I84quprjm3Y9GZ+o47YZgXRA6FwQCynd3rzBcC1u/1VEMEZtsvaKOqbcKCVEWx4DkPZSjiB8Yo9u3e02RLAgl+Gz3cBkrfkJ8I9TK11OVrZLBI9L/dnsPL0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712206876; c=relaxed/simple; bh=/SVwW82/qqoafDX5rrWInlnHjQYhzm2Ysf1xX40RPDI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RQQDSsGf1/97msUaQegSIGueU7qQZK2DFPIG2zsfOJkAi6YuHwPIS88UyzSZmamz6qXYHqSjmeiiKyj+6SsLU7sz+L9qPXMUdRzYpYPD0tdyalV2/Qu+bwy9QKO9g62KIQCYNuv6E34B8Lgbmpwf1yiJtV4+zG3uwFkfTFosQ7c= 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 0E9AD1C0B23; Thu, 4 Apr 2024 14:01:13 +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: [PATCH v7 20/37] serial: sh-sci: fix SH4 OF support. Date: Thu, 4 Apr 2024 13:59:57 +0900 Message-Id: <38f5834918e7e9dff023e8db970bc3c0160583ec.1712205900.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