From nobody Tue Feb 10 01:35:30 2026 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0EC231328F for ; Fri, 14 Nov 2025 10:52:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763117536; cv=none; b=VnHuMvIOZiBobkQQZWpM2ZCW+pGyOnWu6x45ooOzxykbqwnCEKOXp08maV/DPrUccJD8myLFeONqKOztNuNY6fTYP3yQtc68nLtb8occIbQER1x/Dqg0ticytYqw2FgMm6jY9jsXnj6X7ctwyfxeQX1yFH8i2YH0onjxaxQ8DL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763117536; c=relaxed/simple; bh=kZoNkXgOK5bPCHyxt2VA23mgi202ylSEj8OjJso4u5A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=um/d0xy9K5p1lJ77r18IMM8k2neNA/Pvzk8uKNQQ0K0U0h/qv3iJrc5oYSwYCz7kfhsqzR5kenE8N6QJCKtDnE0s4auwoDoaLPt5J7OXTtlDTv3oZr/87zulqiXGpJNh/GI/Ga8kyhhwMWuooY8ZzmWAJBLZAlNkpNCSnzI2Ux0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iW+hYQiM; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iW+hYQiM" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-42b312a089fso1053072f8f.2 for ; Fri, 14 Nov 2025 02:52:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763117532; x=1763722332; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2f1hrtdOgHB+cZ58s64lvGyaNvO528/Gm1Zm08fZHhY=; b=iW+hYQiM0VI29XaBpOdWMOjjdcEz7jbe7ITD1MRjo2et6SSiE5VcApPT11nzxiQujJ Gi6GDWPY4NicawZw+SrbzfYJRC2ORwdLDiVSQ4vDwCYJVe/OD4W9MS6kVsvqRSas9kL3 WcJg07tmQIguelcnNeOfHZYLrPQV3gbyypbCNfRd7GCvHtPk75Dooc3SLKTVTZETHc+s g6gOU2CGAvsKY3aJ8FrrhDq2HIXc7TB8ohhnCCrQcTHXGdxaUXI7IoubgrCBKOju0d7+ S0nZPqpqI86UbAAGO29qnBVHabth7kbjXBZmTIdvtIyn2UNjaKvKP3R55QHd7+e6j6It QbPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763117532; x=1763722332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2f1hrtdOgHB+cZ58s64lvGyaNvO528/Gm1Zm08fZHhY=; b=EDpTjZ/bn0QPrCgHzGk0NLK/HJ7h9B7A34j4uBz50jv8vdpsmvWurN0wvJG+vYDifN J7xuPVQMJB1MAnUfJgkjwwg/1eZZVv67wrLc4CLNbvgpf2dITVne26RbdJbhLQlkLiIF D00iFtspYrhr3HARw+RvrPRZk3tdyxoaY8TnmJILmXnnupy9K4Y3MvLTD5BQo+mjq3M4 5Bm+IOqrolJEEvLY0s2uvHw5blj24VftTlBUz4ONjjGAnOcZgm2WvRbszKI5a4tvOce6 dNX0il2HhP6bv9ZNsemULLSSYzj5xO4QhQ1TbBcL28a3G/6gg0CYg4QvPo3BXEUk5kWc yZgg== X-Forwarded-Encrypted: i=1; AJvYcCUzhedr5hnipquaHG9sBIteAbuFnmSCdAc5zMd5Euw7QkOFfccABQWtZ0HHxBcYPrW/0vlHtghLph89uQQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyqfYOT5NLxemmdFkshC7wSRhanBAxn1ZvtUqkgVmhXthMCT9NZ 5R13vvbHGveAIiYUuU81ztFF+AoRZ+5uZPcc4py8bAP7sgrfEhSb9Rol X-Gm-Gg: ASbGnctCcfm/cUMa70wRA26vP8mvAOtAO1QEI7JTlhMhea9kfkbgqxdb94UAuCFCaGT kp1YhHfvftrote2g/aYYD5G7fb0cqPoIRh1mIFT6CZBs+1/CCP6ga8g4vd9kqwBtIxppfLs15xw 3i4f6dCCWOY9jmAuHTTTyiarPlhgWOx0aYrEIlC9BlHOw2c8A/oWEv09HqPyD5O3PU8rC5v4ccF qGRCS5CUOLEGV93OoRRfABlmnAFo0QftLPpCQpodlogUhcT9Z5/mJOIR0+mbFm0w2761qnjDu5G wQG82A6aFPb5RaK0qi1im99t9z2zh9Hoi87CrSYUj3mtya1YwSV1ABOZtAbvlvLZAAdgefjULvZ Ly0V/62cfgWxI6yiILQ/nHy7KqBRCtEnu01ofwzYSxJjO4im8yjPxj18JssbXvDtwduDa5Yp/vP /Bk/U1tqq8N7N8NQUgu+YxyQwNlmZN/ZkGf73fymftYX9prQz2hBpSh8oRBQcIvRoIK8mHbRM5W RyGjlgMD4cPmBpF X-Google-Smtp-Source: AGHT+IHc+3zQOPHYh27ICavvHRoLPV7fV5gAdj66PKngODYp6s5toJxSvaZhvEzRDtYaUaQmY4XPGQ== X-Received: by 2002:a05:6000:288e:b0:42b:3b55:8927 with SMTP id ffacd0b85a97d-42b5933919dmr2175294f8f.21.1763117531526; Fri, 14 Nov 2025 02:52:11 -0800 (PST) Received: from localhost.localdomain (host86-162-200-138.range86-162.btcentralplus.com. [86.162.200.138]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-42b53f17cbfsm9031255f8f.35.2025.11.14.02.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Nov 2025 02:52:11 -0800 (PST) From: Biju X-Google-Original-From: Biju To: Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Magnus Damm Cc: Biju Das , Wolfram Sang , Lad Prabhakar , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das Subject: [PATCH v3 11/13] serial: sh-sci: Add finish_console_write() callback Date: Fri, 14 Nov 2025 10:51:20 +0000 Message-ID: <20251114105201.107406-12-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251114105201.107406-1-biju.das.jz@bp.renesas.com> References: <20251114105201.107406-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Biju Das Add finish_console_write() callback as RZ/G3E RSCI IP needs special handling compared to other SoCs. Signed-off-by: Biju Das --- v2->v3: * No change. v1->v2: * No change. --- drivers/tty/serial/sh-sci-common.h | 1 + drivers/tty/serial/sh-sci.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/sh-sci-common.h b/drivers/tty/serial/sh-sci= -common.h index 41a437440dfa..4e6fee828243 100644 --- a/drivers/tty/serial/sh-sci-common.h +++ b/drivers/tty/serial/sh-sci-common.h @@ -94,6 +94,7 @@ struct sci_port_ops { void (*shutdown_complete)(struct uart_port *port); =20 void (*prepare_console_write)(struct uart_port *port, u32 ctrl); + void (*finish_console_write)(struct uart_port *port, u32 ctrl); void (*console_save)(struct uart_port *port); void (*console_restore)(struct uart_port *port); size_t (*suspend_regs_size)(void); diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index c7f8a9b470fe..e269f4f9edd0 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -3436,7 +3436,10 @@ static void serial_console_write(struct console *co,= const char *s, cpu_relax(); =20 /* restore the SCSCR */ - sci_port->ops->write_reg(port, regs->control, ctrl); + if (sci_port->ops->finish_console_write) + sci_port->ops->finish_console_write(port, ctrl); + else + sci_port->ops->write_reg(port, regs->control, ctrl); =20 if (locked) uart_port_unlock_irqrestore(port, flags); --=20 2.43.0