From patchwork Tue Jul 4 13:59:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 115804 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1243446vqx; Tue, 4 Jul 2023 07:02:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlGRSzgIMPmdHDHrzNtdtYWDjz0mQwgIlGLuqtpHX25e16QpFkSkndZb7K7woV4KeMzFCkDH X-Received: by 2002:a17:902:b682:b0:1b8:10aa:d2fa with SMTP id c2-20020a170902b68200b001b810aad2famr10372833pls.48.1688479354190; Tue, 04 Jul 2023 07:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688479354; cv=none; d=google.com; s=arc-20160816; b=QER6AtLLMMPN0aGOOBfLZYpBxh0HPSVOosMQS0aNnPPpv7vpKzJBy+nSgX5HcEb/Ft glxe24Ih0dBck/PW6x04wI3bezCNa6/NGZ8cARz7BdaP/kyoTsytx1OCa2bHo9T3CCuN 1XEZQPwG38gsN9qfAJpKGcmFX75XrfxSYSOMZG9DL7fZ6vKoX20V1B5A53pjPhPMCp8U dg/X8e/xHMa6tD8FAvPWkKjuZcsb/49frzEH07j188e+u7r+Ux3KEeUqeDdpoXr9DTS4 HxNuVWE5ASzTd61PiWkMGEZbW2D5sFeWI2uiX/i//8+kpSecDJBHtlbETLLyjEE9Orya iMXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=EtvSf+vqP9FOlSRxzL4nhak0b5LMcwi8O2nGQTCTz7k=; fh=WJqZePI8VHr7PwehuKfE5Na7FLIpnW3ROa7as0MZyQE=; b=Jaws03LpspTcZfqYzj/MruNm4pCBYVFh+eC4jOE+PzHU30ZpztmcayfIjRID7s5FhJ B+8DiWutcJ9NR2Y5EIrIGWj86J96dI2eevyPjKcUgJKelzoDS1N+zth/GkNn8Dvpq3vV mQ3cdaP1kOXOVBuTadApA0S7CXZqBuPjDiL3+BJTWhoT2hLunDihV8WQ/B2+TnNlp853 6/A0982Mxscpb0r0pC/djxcN4oAqTH+uf3VLijS3Dnu/6XsAdVXvdw14DRKYZNeD1unc JE62xsx0zfPcLz4NyVZXr3O3ejzHfHrA0d9PFAbfr1hmhythwhFabBnX29G9x0B69ZK0 0GfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=J4rBARU+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a170902e54400b001b8a8f359fcsi760362plf.208.2023.07.04.07.02.20; Tue, 04 Jul 2023 07:02:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=J4rBARU+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231616AbjGDN7v (ORCPT + 99 others); Tue, 4 Jul 2023 09:59:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231510AbjGDN7t (ORCPT ); Tue, 4 Jul 2023 09:59:49 -0400 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 486FBE6D; Tue, 4 Jul 2023 06:59:47 -0700 (PDT) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 3F940100069; Tue, 4 Jul 2023 16:59:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 3F940100069 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1688479185; bh=EtvSf+vqP9FOlSRxzL4nhak0b5LMcwi8O2nGQTCTz7k=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=J4rBARU+YHzxAYxCtemsaSPS7Qar6wgSlFeS9x+sW9lzyNv+/gfusSvbh8iOIIBB7 cp2zHKoeEa83SVYZvdZp62+eOZ04w5pWKhbja1VwV/o6yZC7aM/zA4tt5eDCjNIHWk A70LYMY8abl6YmXHZ1kc4q0Yo7fqep+l8fhlLnNKsUvyXOE9zTJ6ANR01/hUKqglb5 yRKdvJReN2SAHui+ETNrl553nLXThajwBG++2nCRRN0sPNWOPOFKdFiJ6T+hahIToT XyxS0khkyAHENfhxVv6nPULaaSyQ3Y0wDzmkk/mCDom31bExyy60MwW707PjMUsT4u VbOVMOKeswFxw== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 4 Jul 2023 16:59:45 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 4 Jul 2023 16:59:34 +0300 From: Dmitry Rokosov To: , , , , , , , , CC: , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 1/5] tty: serial: meson: use dev_err_probe Date: Tue, 4 Jul 2023 16:59:32 +0300 Message-ID: <20230704135936.14697-2-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230704135936.14697-1-ddrokosov@sberdevices.ru> References: <20230704135936.14697-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178420 [Jul 04 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: DDRokosov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 520 520 ccb018a655251011855942a2571029252d3d69a2, {Tracking_from_domain_doesnt_match_to}, p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;sberdevices.ru:5.0.1,7.1.1, FromAlignment: s, {Tracking_white_helo}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/04 05:54:00 #21559896 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770498927113869866?= X-GMAIL-MSGID: =?utf-8?q?1770498927113869866?= Use dev_err_probe() helper for error checking and standard logging. It makes the driver's probe() function a little bit shorter. Signed-off-by: Dmitry Rokosov --- drivers/tty/serial/meson_uart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 2501db5a7aaf..169f028956ae 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -726,8 +726,8 @@ static int meson_uart_probe(struct platform_device *pdev) of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize); if (meson_ports[pdev->id]) { - dev_err(&pdev->dev, "port %d already allocated\n", pdev->id); - return -EBUSY; + return dev_err_probe(&pdev->dev, -EBUSY, + "port %d already allocated\n", pdev->id); } port = devm_kzalloc(&pdev->dev, sizeof(struct uart_port), GFP_KERNEL); From patchwork Tue Jul 4 13:59:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 115809 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1247434vqx; Tue, 4 Jul 2023 07:06:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEWlE5bGPm/IAtcfEaHoCAaMuB8Oa2quUxXlQEV76U3S1TrkfF6gyyfpyaZeIe+2Bi6OzhN X-Received: by 2002:a05:6359:c02:b0:134:c984:ab74 with SMTP id gn2-20020a0563590c0200b00134c984ab74mr8983039rwb.9.1688479608603; Tue, 04 Jul 2023 07:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688479608; cv=none; d=google.com; s=arc-20160816; b=aYmoGqRdedtzikW9s28mdmWcG/zsX/zSwm22odRSqXvph6EZMPPpmIMTXbBJhkfXj+ gJCuDjJQPTMao9zsXReO5CIAyA4cgtEsc2P/LujWjNH6nR9ZhMpAykPawuvTmZSzxC2I dwjPrwQNbWzm9Qdt4PlELtrqSQtn2pZo3PIphdBSXhP472g2uJDYwjbRx/BoasE0mSo6 DIn8AyrgTzquTVSGbU5R/ZkeV/NqGmGRP3pji0f1tjiigLkkV/Q6O9QvAtu7M+tCf97v /ru3stRgJud8CdDRHtj+udGsZnxY5w6ObUssq5gNom0WvLvlM0iy56ebZAMEEGbLR+va XeRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=jyNhnxKH/UkER4UD50pKQEq3o+4wK8IJLUssC80nzYw=; fh=WJqZePI8VHr7PwehuKfE5Na7FLIpnW3ROa7as0MZyQE=; b=Q2bBzO1VeLkvkpBNUVNBWGlW+kwiQteGp1QL7biPHorY2IXb27Z74karZNFhBZhrzd 96XYjsNr0Aq1ev4LMbqqdSFJCSPYaLcUcwdGBbl//rFaaXcUv8EEXhNmlSz9O3eDuXr+ eKSN3ZfhP009OylqT18YfVqriw0T1Fp0IX3N6ga2p18KmOdwffL/YgTzXvOPYcqbfLRB +2Mix8UaH2UT9Fcq2dB/8xqcp/6p7d8OGU2xW8qUydu4gmJegoeqJhgFvWXcer9qqi0i 8aiW+cAbyDoy8GeB8jhOrDvCKK4znAViQan2KihWN3B5KtTp3f7MWA76a8xfYRnrBBkT UUXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=UTq3Amm3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id az9-20020a056a02004900b0055b731aa9adsi8693356pgb.562.2023.07.04.07.06.34; Tue, 04 Jul 2023 07:06:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=UTq3Amm3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231579AbjGDN75 (ORCPT + 99 others); Tue, 4 Jul 2023 09:59:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231328AbjGDN7t (ORCPT ); Tue, 4 Jul 2023 09:59:49 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CD1E10A; Tue, 4 Jul 2023 06:59:47 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 1C595120056; Tue, 4 Jul 2023 16:59:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 1C595120056 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1688479186; bh=jyNhnxKH/UkER4UD50pKQEq3o+4wK8IJLUssC80nzYw=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=UTq3Amm3cVwxraek/UFhC9YTJANjYGkb52Ov4xtwFSfn1nSEZTg0TKDfNfoPPDPyf 4FlyItqYgp7zNo4IhecNpDExGfeTU+iziwCGY+2OYIX38VuC/LEA9uSS/9ZnR7DR6F qcfgxxzz8tGxdC7mThxBzUylcfqpoZiLrTdxcJjnjgZBlqRk+BpgBdHUUhNSGfYOAG let0sVMfHu/NnUzSf/paxLiYpvgEAkFVNR0ZzNkehlXrqu62jt2Tm07lEiiuTIGcpR ixHBxDDxuQYSkAqMVBmjkdcIXHy5Pcr3qDRp3LYtAhT92+iDAonnVmdNX2/NPD+AJB OWos1QKEfSN2g== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 4 Jul 2023 16:59:45 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 4 Jul 2023 16:59:35 +0300 From: Dmitry Rokosov To: , , , , , , , , CC: , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 2/5] tty: serial: meson: redesign the module to platform_driver Date: Tue, 4 Jul 2023 16:59:33 +0300 Message-ID: <20230704135936.14697-3-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230704135936.14697-1-ddrokosov@sberdevices.ru> References: <20230704135936.14697-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178421 [Jul 04 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: DDRokosov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 520 520 ccb018a655251011855942a2571029252d3d69a2, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;sberdevices.ru:5.0.1,7.1.1, FromAlignment: s, {Tracking_white_helo}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/04 05:54:00 #21559896 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770499194231998289?= X-GMAIL-MSGID: =?utf-8?q?1770499194231998289?= Actually, the meson_uart module is already a platform_driver, but it is currently registered manually and the uart core registration is run outside the probe() scope, which results in some restrictions. For instance, it is not possible to communicate with the OF subsystem because it requires an initialized device object. To address this issue, apply module_platform_driver() instead of direct module init/exit routines. Additionally, move uart_register_driver() to the driver probe(), and destroy manual console registration because it's already run in the uart_register_driver() flow. Signed-off-by: Dmitry Rokosov --- drivers/tty/serial/meson_uart.c | 46 +++++++-------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 169f028956ae..87c0eb5f2dba 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -621,12 +621,6 @@ static struct console meson_serial_console = { .data = &meson_uart_driver, }; -static int __init meson_serial_console_init(void) -{ - register_console(&meson_serial_console); - return 0; -} - static void meson_serial_early_console_write(struct console *co, const char *s, u_int count) @@ -652,9 +646,6 @@ OF_EARLYCON_DECLARE(meson, "amlogic,meson-ao-uart", #define MESON_SERIAL_CONSOLE (&meson_serial_console) #else -static int __init meson_serial_console_init(void) { - return 0; -} #define MESON_SERIAL_CONSOLE NULL #endif @@ -738,6 +729,13 @@ static int meson_uart_probe(struct platform_device *pdev) if (ret) return ret; + if (!meson_uart_driver.state) { + ret = uart_register_driver(&meson_uart_driver); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to register meson-uart driver\n"); + } + port->iotype = UPIO_MEM; port->mapbase = res_mem->start; port->mapsize = resource_size(res_mem); @@ -776,6 +774,8 @@ static int meson_uart_remove(struct platform_device *pdev) uart_remove_one_port(&meson_uart_driver, port); meson_ports[pdev->id] = NULL; + uart_unregister_driver(&meson_uart_driver); + return 0; } @@ -809,33 +809,7 @@ static struct platform_driver meson_uart_platform_driver = { }, }; -static int __init meson_uart_init(void) -{ - int ret; - - ret = meson_serial_console_init(); - if (ret) - return ret; - - ret = uart_register_driver(&meson_uart_driver); - if (ret) - return ret; - - ret = platform_driver_register(&meson_uart_platform_driver); - if (ret) - uart_unregister_driver(&meson_uart_driver); - - return ret; -} - -static void __exit meson_uart_exit(void) -{ - platform_driver_unregister(&meson_uart_platform_driver); - uart_unregister_driver(&meson_uart_driver); -} - -module_init(meson_uart_init); -module_exit(meson_uart_exit); +module_platform_driver(meson_uart_platform_driver); MODULE_AUTHOR("Carlo Caione "); MODULE_DESCRIPTION("Amlogic Meson serial port driver"); From patchwork Tue Jul 4 13:59:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 115805 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1243594vqx; Tue, 4 Jul 2023 07:02:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5UHJHFLrSvWoTxstALvNHVrhyvQ8L2S2uQGy5HC1ys4HyEeyWjbQ/+dgb1oX9vgk0SzJSP X-Received: by 2002:a05:6808:1456:b0:39e:d59a:8275 with SMTP id x22-20020a056808145600b0039ed59a8275mr17870429oiv.25.1688479363832; Tue, 04 Jul 2023 07:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688479363; cv=none; d=google.com; s=arc-20160816; b=WBkeOXymMAbTOOKYlq3uizZ/jS60qh1abyvUPQ4ILByrI3tHZaW6+zPOcc151yd/Iv fEjDXu2NBeWCz8tQJ6AUPX/hp1vqKUka7XbrPddepfneHR2tjSMXnvitEeP0zIBySzwC E9IIXpn4R2u1CBYfvEKuD76nGLep45oU5jz5NpxbTZf9VvdHNCdR+6Z7XRpahyqWcwVT SoVEUHdhFPCFHuzoIJF+kBzlxA+jewMU/H+nnriTE4qnqmsJPt1lzhBFnK/Fw8pIU8An QBliwR5zszguTOpbGN8X69xhrEAWV26M3HmE8UvljMF2+I/7jNNSAQ9wby7QM/7J99DL gAGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=GqJ6v9rct7JIpD7/9y+mD3WCzkd0bTZ9Ye0iVwHILeo=; fh=WJqZePI8VHr7PwehuKfE5Na7FLIpnW3ROa7as0MZyQE=; b=q2CUuuFzCPdnyfRCA4ieynlj0BQkJedhtSmM1UOSxdcuG+MUMNSovNJ9hSizg0cMP2 H8mxsYg7ETXT9CLgTN/1b/nke6fgpTIN/hzDxmtguerJHAjqq90NbldbagFow3pOumbJ 2C3sBm7m3MDlZuaPatWR4NLoTlwh6Pr5wo5KGxDWxfw4WpDR/OjIhrIyvztO7ULpU+FY xlbYERupz0TsSX255cV9do0TKvdQv/wgFJRr1D+fDNZlpB1Pm1kIK6uK1sm1nlQ34cHC 1afCpa6vv1y36ypvTI/IAGXTP5bh2iXgfEWn2tdcuRA1od98TfLoaF+ZSlcetnva6J+Q SdoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=N9VJ12ll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k190-20020a6384c7000000b0052cbf501db2si21584506pgd.68.2023.07.04.07.02.29; Tue, 04 Jul 2023 07:02:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=N9VJ12ll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231695AbjGDN77 (ORCPT + 99 others); Tue, 4 Jul 2023 09:59:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbjGDN7u (ORCPT ); Tue, 4 Jul 2023 09:59:50 -0400 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7811010D3; Tue, 4 Jul 2023 06:59:48 -0700 (PDT) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id E3802100073; Tue, 4 Jul 2023 16:59:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru E3802100073 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1688479186; bh=GqJ6v9rct7JIpD7/9y+mD3WCzkd0bTZ9Ye0iVwHILeo=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=N9VJ12llQT5RpBSAc88lGVNKEk2wT1IkruyT6FVw6om14zJEWsAs6Vr/UlcLnrQMN YfzmQ5e7xOWTIwMsmfs1eAfC+9ZeCMkECYUOFDbxdOs50hsFkNb56RXU00PLOI5VF2 5WwaEkuY2f9FihDnwI/DpzJdwqColZOohyVhrZNRsNQmWX6YbsRhs678taYiZQoRFv VTyndBzDrF+II1feGs5G9ZvbKjeFfCRylj/ml1S72VzV78vVtDX+oowgKQPJtqRpPr CTiUB/gRRFLoH/pUnwtt/5jWHUmZp9/VOaMB524WO/NNKesqlsS7W369hoMcQMKLb4 kC6zVLWSjip8w== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 4 Jul 2023 16:59:46 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 4 Jul 2023 16:59:36 +0300 From: Dmitry Rokosov To: , , , , , , , , CC: , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 3/5] tty: serial: meson: apply ttyS devname instead of ttyAML for new SoCs Date: Tue, 4 Jul 2023 16:59:34 +0300 Message-ID: <20230704135936.14697-4-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230704135936.14697-1-ddrokosov@sberdevices.ru> References: <20230704135936.14697-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178420 [Jul 04 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: DDRokosov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 520 520 ccb018a655251011855942a2571029252d3d69a2, {Tracking_uf_ne_domains}, {Tracking_from_domain_doesnt_match_to}, libera.irclog.whitequark.org:7.1.1;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;sberdevices.ru:5.0.1,7.1.1, FromAlignment: s, {Tracking_white_helo}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean, bases: 2023/07/04 08:48:00 X-KSMG-LinksScanning: Clean, bases: 2023/07/04 08:48:00 X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/04 05:54:00 #21559896 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770498937215491354?= X-GMAIL-MSGID: =?utf-8?q?1770498937215491354?= It is worth noting that the devname ttyS is a widely recognized tty name and is commonly used by many uart device drivers. Given the established usage and compatibility concerns, it may not be feasible to change the devname for older SoCs. However, for new definitions, it is acceptable and even recommended to use a new devname to help ensure clarity and avoid any potential conflicts on lower or upper software levels. In addition, modify the meson_uart_dt match data for g12a, a1, and s4 to their appropriate values to ensure proper devname values and functionality. For more information please refer to IRC discussion at [1]. Links: [1]: https://libera.irclog.whitequark.org/linux-amlogic/2023-07-03 Signed-off-by: Dmitry Rokosov --- drivers/tty/serial/meson_uart.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 87c0eb5f2dba..361f9326b527 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -82,6 +82,7 @@ static struct uart_driver meson_uart_driver; static struct uart_port *meson_ports[AML_UART_PORT_NUM]; struct meson_uart_data { + const char *dev_name; bool has_xtal_div2; }; @@ -683,6 +684,7 @@ static int meson_uart_probe_clocks(struct platform_device *pdev, static int meson_uart_probe(struct platform_device *pdev) { + const struct meson_uart_data *priv_data; struct resource *res_mem; struct uart_port *port; u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */ @@ -729,6 +731,18 @@ static int meson_uart_probe(struct platform_device *pdev) if (ret) return ret; + priv_data = device_get_match_data(&pdev->dev); + + if (priv_data) { + struct console *cons = meson_uart_driver.cons; + + meson_uart_driver.dev_name = priv_data->dev_name; + + if (cons) + strscpy(cons->name, priv_data->dev_name, + sizeof(cons->name)); + } + if (!meson_uart_driver.state) { ret = uart_register_driver(&meson_uart_driver); if (ret) @@ -748,7 +762,7 @@ static int meson_uart_probe(struct platform_device *pdev) port->x_char = 0; port->ops = &meson_uart_ops; port->fifosize = fifosize; - port->private_data = (void *)device_get_match_data(&pdev->dev); + port->private_data = (void *)priv_data; meson_ports[pdev->id] = port; platform_set_drvdata(pdev, port); @@ -780,6 +794,17 @@ static int meson_uart_remove(struct platform_device *pdev) } static struct meson_uart_data meson_g12a_uart_data = { + .dev_name = "ttyAML", + .has_xtal_div2 = true, +}; + +static struct meson_uart_data meson_a1_uart_data = { + .dev_name = "ttyS", + .has_xtal_div2 = false, +}; + +static struct meson_uart_data meson_s4_uart_data = { + .dev_name = "ttyS", .has_xtal_div2 = true, }; @@ -794,7 +819,11 @@ static const struct of_device_id meson_uart_dt_match[] = { }, { .compatible = "amlogic,meson-s4-uart", - .data = (void *)&meson_g12a_uart_data, + .data = (void *)&meson_s4_uart_data, + }, + { + .compatible = "amlogic,meson-a1-uart", + .data = (void *)&meson_a1_uart_data, }, { /* sentinel */ }, }; From patchwork Tue Jul 4 13:59:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 115810 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1249257vqx; Tue, 4 Jul 2023 07:08:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7JeSK+xf/xGpeK+bghcFXKmyaxO/Jm83lKuQEn4vbGiiIKUTcZXQTYVvZYsLg7gV6oYs/z X-Received: by 2002:a05:6870:a107:b0:1ad:376c:4d7a with SMTP id m7-20020a056870a10700b001ad376c4d7amr12734845oae.58.1688479726355; Tue, 04 Jul 2023 07:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688479726; cv=none; d=google.com; s=arc-20160816; b=Q8ovaRB2ZOvHU+vqq0gfDUZtTf3PldsxESC0u01U3znCy37weeOpKFuSgseVsHNOTB 4/ZGbtoQYHhO2qJT0gj8JCz0Pn6ZNDgGDeVCzrOOUO7o1Pg5UzJnDUUsqi6s/wDjhypj FB/bMhUC8QHu87q6imPUFI8vxAGUIKmRDkyCEy2umwfPxR0kIoS0CAUoZwtb61KAy66u OejeR/YNearoRCPmMtM/ZCVoyGF02PhOsxosjRMfrPt84a/6Hm+o0yW5x44NDv/cpvsZ 3JBMJ1jaFKYMWr/VrrhGCNuA5WBfikfLY2wyOqba6Na7PHT7JFt52z45EH5jzC1vBtTD Z/Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=dFRSuVZiYwDdVCYDf8lScbiLvLEgKBhX1VHxXBr3arc=; fh=WJqZePI8VHr7PwehuKfE5Na7FLIpnW3ROa7as0MZyQE=; b=JBaGnCrtwsFmdM1lyxwxh6PPaN6/KxShwvhAqYeXOndY7Pu0Yd9T9CsV1SDt/Lxjzj O5YZcb9Rk3LBflDpgb9IF4yhBCZh05fnKRKZQSisrMfAVdLb/W2lfEAiC4ewZrUlW/m1 qrFEqbhRXcCUTvCzX/5wY3gEAyQ3q5Guh1U3FKvyoaqYqF1qYQBgjhwvVRZHonEVLGKd yrBeEiqv84p4zJ3epPNEmfa4vHKN79ES/z3+rnP9IZelF49Db7qVrs5JzDQY2SxvphcY R5tkHIJCBy+FCe/Z6BziZDkCvbU1zb5Mx9PoP/0QAXkF4FCXnG4aT09P0AZQbV0kh+dm Ldcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=ekq5lJlv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z18-20020a056871015200b001b3d54dcec8si491360oab.329.2023.07.04.07.08.32; Tue, 04 Jul 2023 07:08:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=ekq5lJlv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231583AbjGDOAD (ORCPT + 99 others); Tue, 4 Jul 2023 10:00:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231575AbjGDN7v (ORCPT ); Tue, 4 Jul 2023 09:59:51 -0400 Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0280CFC; Tue, 4 Jul 2023 06:59:49 -0700 (PDT) Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 8DB43120057; Tue, 4 Jul 2023 16:59:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 8DB43120057 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1688479187; bh=dFRSuVZiYwDdVCYDf8lScbiLvLEgKBhX1VHxXBr3arc=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=ekq5lJlvAsHhy+CKVhKLRmP+q+WLr5QnM0MLp2XTsDK0tMMsATY+xaxnjZtjvxVAK f01ABm9qC1I5Mrnn4RVxuVkVg83vxviqTT47XQfLLa98u6oofFxxcPL7t0w3OvBz4u tVwQ3ngRpR+zCeZIiIgA9rHu3GBdpdYzP+sREWgaW+i8mciwOPVYylHiMRbrIXsu/x AYA2n8wgtYgWDADXS7ShFIMzzJggr3TiltkSiFKFvPI/SsiEF10HxE8RU7uKQXvw7l /c6/Xnoz9bOXXVCAUJBeKPw6DEfXk8oRVaWMdyTnaIYiXoLP79ohUgkzlgv9PTMqPQ nmt3eAslXWGqw== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 4 Jul 2023 16:59:47 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 4 Jul 2023 16:59:37 +0300 From: Dmitry Rokosov To: , , , , , , , , CC: , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 4/5] dt-bindings: serial: amlogic,meson-uart: support Amlogic A1 Date: Tue, 4 Jul 2023 16:59:35 +0300 Message-ID: <20230704135936.14697-5-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230704135936.14697-1-ddrokosov@sberdevices.ru> References: <20230704135936.14697-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178421 [Jul 04 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: DDRokosov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 520 520 ccb018a655251011855942a2571029252d3d69a2, {Tracking_from_domain_doesnt_match_to}, d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;sberdevices.ru:5.0.1,7.1.1, FromAlignment: s, {Tracking_white_helo}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/04 05:54:00 #21559896 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770499317744865320?= X-GMAIL-MSGID: =?utf-8?q?1770499317744865320?= Introduce meson uart serial bindings for A1 SoC family. Signed-off-by: Dmitry Rokosov Acked-by: Rob Herring --- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml index 01ec45b3b406..f1ae8c4934d9 100644 --- a/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +++ b/Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml @@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-a1-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items: @@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-a1-uart - description: Everything-Else power domain UART controller on G12A SoCs items: - const: amlogic,meson-g12a-uart From patchwork Tue Jul 4 13:59:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Rokosov X-Patchwork-Id: 115806 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1244219vqx; Tue, 4 Jul 2023 07:03:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlHmb2R2M8RUraQ7oAmJUeqtg3DzUEIB5+H75WZEaYhrC0rLwPHonw8tFDNvvk9g3SsVlwu+ X-Received: by 2002:a17:902:b288:b0:1b0:f8:9b2d with SMTP id u8-20020a170902b28800b001b000f89b2dmr14776112plr.29.1688479403354; Tue, 04 Jul 2023 07:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688479403; cv=none; d=google.com; s=arc-20160816; b=trTm1mB4MbLHSEGI1dbcJ8uX5PuwYrr6IsPSCDvWfwO9qsGH/z+4vuHWF6iop4mWKC 5i0oNtL8C96aK+0MX0t/m87bGRDRBF94ep4FZr4L6HlyeDNVh5G9/kucnlkRKZyqp4DE pcKCkYI23H4ZKQbMeZAKHDQspSU+GZ8HoBzXSlpoTxqE46dgolo2yX7zj+wfy+HuJGJv nChf+dY+scwIlwZqvSqPzYE5B+nbebl3ytZm7TbFb26p1SB3DEQlzJZZVyybswtE+Cvs 1/5Uom0TB+M9Ts9HUmisvo6CHL5J3YIHhriXCihNRB1hE3U1thAuCSy4twJF7iQbydFI SOmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=SVqe3A4FxeAdixEi7Nd7L65hAuANY8HEBhEw2Kj2u+8=; fh=WJqZePI8VHr7PwehuKfE5Na7FLIpnW3ROa7as0MZyQE=; b=ew4adGZFnJSiD1fcJZBJtNPWrxxGUidneLKPC4S+XCPjq0ZiAoIw9i2PRvTayuFiog nihiL9uFqPSLzGlU9j5LQdGt2pfgPiWiGPgPzILhyfaR5C7q6XCj+g2ByckZDOJLFBSj 9P9l2lp020wnNceVnHRZiNYq48WYYg+r1CPSRmT093yuJ1IaQ8UXVww80/8XRvPwwN+h GPstq6YHiY1YVlFhoeJ/AeLClGUtzRKVCQtQZp1ByzrvUFKlUt8gkJ/xAdcnKsUXALcW Oxgl/O60AihqdP9nkFqgz6IK/TQdC5oqVlSmq7H0qmyukD+IJ9XBz4BTmZMYudrh+pKP Ao8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=hdI4Yxhi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n4-20020a170902e54400b001b8a8f359fcsi760362plf.208.2023.07.04.07.02.59; Tue, 04 Jul 2023 07:03:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sberdevices.ru header.s=mail header.b=hdI4Yxhi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=sberdevices.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbjGDOAF (ORCPT + 99 others); Tue, 4 Jul 2023 10:00:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231613AbjGDN7v (ORCPT ); Tue, 4 Jul 2023 09:59:51 -0400 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D049B10A; Tue, 4 Jul 2023 06:59:49 -0700 (PDT) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 603AF100074; Tue, 4 Jul 2023 16:59:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 603AF100074 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1688479188; bh=SVqe3A4FxeAdixEi7Nd7L65hAuANY8HEBhEw2Kj2u+8=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=hdI4YxhiDCn0Fjei1lunh5UUBQXuv/PWPY2Kut7+DpZ0ni/LsAdxxFbNd/oRE5AZQ X4ewv+LTy1ULSMm+7vKncmJZtqDj7Vthlv2QOzLjJydEYDtRK/FbqsBbfGTELOQ7Eb d68zYkSrZaQFr/DdOTf1u4mSor/RTYvzcAWNrvKwrytLiUj2cEaetKmDP3ovRC7+P4 WMjtgY7aD64RHo1YqoDaZ7ULCp7BDsMAHAK9AQvDEhq4AqB1sWf0/WE8TIe059STdv kzkwrRPf7LF69vzZih+ciEVZWBg7xTn9Cu+tx/QzQgndsqEnR5eOxhxVG2tnD6BXnC Ng+PnNHdji7rw== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Tue, 4 Jul 2023 16:59:48 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 4 Jul 2023 16:59:37 +0300 From: Dmitry Rokosov To: , , , , , , , , CC: , , , , , , , , , Dmitry Rokosov Subject: [PATCH v1 5/5] arm64: dts: meson: a1: change uart compatible string Date: Tue, 4 Jul 2023 16:59:36 +0300 Message-ID: <20230704135936.14697-6-ddrokosov@sberdevices.ru> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20230704135936.14697-1-ddrokosov@sberdevices.ru> References: <20230704135936.14697-1-ddrokosov@sberdevices.ru> MIME-Version: 1.0 X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 178420 [Jul 04 2023] X-KSMG-AntiSpam-Version: 5.9.59.0 X-KSMG-AntiSpam-Envelope-From: DDRokosov@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 520 520 ccb018a655251011855942a2571029252d3d69a2, {Tracking_from_domain_doesnt_match_to}, p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;100.64.160.123:7.1.2;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;sberdevices.ru:5.0.1,7.1.1, FromAlignment: s, {Tracking_white_helo}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/07/04 05:54:00 #21559896 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770498978846621906?= X-GMAIL-MSGID: =?utf-8?q?1770498978846621906?= In the current implementation, the meson-a1 configuration incorporates a unique compatibility tag "amlogic,meson-a1-uart' within the meson-uart driver due to its usage of the new console device name "ttyS". Consequently, the previous compatibility tag designated for the 'amlogic,meson-gx-uart' configuration has become obsolete and is no longer relevant to the current setup. Signed-off-by: Dmitry Rokosov --- arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi index c5567031ba12..6273b9c862b3 100644 --- a/arch/arm64/boot/dts/amlogic/meson-a1.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-a1.dtsi @@ -344,7 +344,7 @@ mux { }; uart_AO: serial@1c00 { - compatible = "amlogic,meson-gx-uart", + compatible = "amlogic,meson-a1-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x1c00 0x0 0x18>; interrupts = ; @@ -354,7 +354,7 @@ uart_AO: serial@1c00 { }; uart_AO_B: serial@2000 { - compatible = "amlogic,meson-gx-uart", + compatible = "amlogic,meson-a1-uart", "amlogic,meson-ao-uart"; reg = <0x0 0x2000 0x0 0x18>; interrupts = ;