From patchwork Mon Feb 27 11:41:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 658072 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 66C12C64ED8 for ; Mon, 27 Feb 2023 11:42:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229540AbjB0LmM (ORCPT ); Mon, 27 Feb 2023 06:42:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbjB0LmF (ORCPT ); Mon, 27 Feb 2023 06:42:05 -0500 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 08943166C2; Mon, 27 Feb 2023 03:42:02 -0800 (PST) X-IronPort-AV: E=Sophos;i="5.97,331,1669042800"; d="scan'208";a="154220829" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 27 Feb 2023 20:42:02 +0900 Received: from localhost.localdomain (unknown [10.226.93.185]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 01CBB422D85C; Mon, 27 Feb 2023 20:41:59 +0900 (JST) From: Biju Das To: Greg Kroah-Hartman Cc: Biju Das , Jiri Slaby , linux-serial@vger.kernel.org, Geert Uytterhoeven , =?utf-8?q?Niklas_S=C3=B6derlund?= , Fabrizio Castro , linux-renesas-soc@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v5 1/7] serial: 8250_em: Fix UART port type Date: Mon, 27 Feb 2023 11:41:46 +0000 Message-Id: <20230227114152.22265-2-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227114152.22265-1-biju.das.jz@bp.renesas.com> References: <20230227114152.22265-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org As per HW manual for EMEV2 "R19UH0040EJ0400 Rev.4.00", the UART IP found on EMMA mobile SoC is Register-compatible with the general-purpose 16750 UART chip. Fix UART port type as 16750 and enable 64-bytes fifo support. Fixes: 22886ee96895 ("serial8250-em: Emma Mobile UART driver V2") Cc: stable@vger.kernel.org Signed-off-by: Biju Das --- v4->v5: * Added fixes tag * Updated commit header and description * Removed UPF_BOOT_AUTOCONF from flags. * Reordered the patch (from patch#4 to patch#1) to make it easier for applying it to stable branches. v3->v4: * Both {RZ/V2M, EMMA mobile} SoC is Register-compatible with the general-purpose 16750 UART chip. So started using generic compatible and removed struct serial8250_em_hw_info. * Removed Rb tag from Ilpo as it is new change. v2->v3: * Replaced of_device_get_match_data()->device_get_match_data(). * Replaced of_device.h->property.h * Dropped struct serial8250_em_hw_info *info from priv and started using a local variable info in probe(). * Retained Rb tag from Ilpo as changes are trivial. v2: * New patch --- drivers/tty/serial/8250/8250_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_em.c b/drivers/tty/serial/8250/8250_em.c index f8e99995eee9..d94c3811a8f7 100644 --- a/drivers/tty/serial/8250/8250_em.c +++ b/drivers/tty/serial/8250/8250_em.c @@ -106,8 +106,8 @@ static int serial8250_em_probe(struct platform_device *pdev) memset(&up, 0, sizeof(up)); up.port.mapbase = regs->start; up.port.irq = irq; - up.port.type = PORT_UNKNOWN; - up.port.flags = UPF_BOOT_AUTOCONF | UPF_FIXED_PORT | UPF_IOREMAP; + up.port.type = PORT_16750; + up.port.flags = UPF_FIXED_PORT | UPF_IOREMAP | UPF_FIXED_TYPE; up.port.dev = &pdev->dev; up.port.private_data = priv;