Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp442276pxb; Thu, 30 Sep 2021 09:14:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWgTw1SSgh/AXR1tSQ3teDu9vE7MEJQGv4jfneupGZUbY5Bg0b7rLLyygU6j4zkdPaUnAk X-Received: by 2002:a63:235f:: with SMTP id u31mr5751283pgm.248.1633018495633; Thu, 30 Sep 2021 09:14:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633018495; cv=none; d=google.com; s=arc-20160816; b=tERmyqPNXM1NdHt01TUvxzSA077NhfJtDOP6hbWzcJIXXot+0K8qfJ008t79ZMlLuR Fvz5iBTQznYhPd08eq1Hk++7LeOju7GFMPrk9q2FLPRxVi4zd2ZGLqgCpJysMXHd+gyc kLLv4o9PG1zYxabiG3AzPifhyKYeZlJRJi6owxrUQhN285jr8T4td4Qn7N00NQasKOTm SGPShTOr2WMlShUPYCBBeGUKE/kutC7LoRvyYePGt0+hXq4K5p5YpAF998SWrlPS0b3u N6w7nZYGLAuIW69AghB3vT0YRmoMUX3cOSeH7vbf+BjW2DQPLrtVUM5kFbLxM5f+zdte ebEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=WA2LajeF8VZdGihemfmP2b2B7HQnkua+zsIiBEQnIes=; b=U6gK9oH79yX1tOteGoe2uoIs4tRaaQlmWoqZyEKYQHzDNb7E1c6oJ/gStO6aFgPeX5 qgKV9lVHFz0thAgJqg2VwlV7Iltq61t9cfMut14M/bIM1dUp6h3msM3uQxdBvT/sZsa8 WDtydjL9EuDQw0tULT0lJGF1b00/7xjf8CTlCYYTLV55c4JCXIyDpsgo0yhGmE+WXqPT BFv+eGlAQ07bLa0E7ZkLjiyVs8BSahJZhCvIggqKjCO6cVFXY/n9Zo7JKsgZZklShKJo kQooJUR97McAows3n4nYdy75Sfpyw2aSiWZ5Ufrx7eneHWWIxPy1t7cUuwx8Rlgmz8H/ neJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=jqCwMr8h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d66si3724846pgc.536.2021.09.30.09.14.41; Thu, 30 Sep 2021 09:14:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=jqCwMr8h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349133AbhI3QPO (ORCPT + 99 others); Thu, 30 Sep 2021 12:15:14 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:42636 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1349136AbhI3QPF (ORCPT ); Thu, 30 Sep 2021 12:15:05 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18UDFMr6004359; Thu, 30 Sep 2021 18:13:07 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=selector1; bh=WA2LajeF8VZdGihemfmP2b2B7HQnkua+zsIiBEQnIes=; b=jqCwMr8hAUj3QE0DQ/lUL/U+cP3lJQ0ZpoEDXf/glIsUxSueryOwxbypgVlcZPoMxYi1 cJQsVNEsurgQ+PGYqC/JHkBGurU/lK1bds2p6l9Suiw8fO79K5SLMdiP+rcfPRKX7Tz4 8im7SSjQdCYjOPIXEPdQEdBz6OE7U8zL6bW5fBzUKg5guI/DE3ruuk5kTOJiwP+t8Tg2 x4Zm352KZ6Kp9sFX+3DwkBKiq66krZ+HlPRO3d6teICQ3Rx0sZ1ySfbxZWrQJoBqWgsq FLzz/cdEqMIItXvVeDU50DDEKJ75bfwISVTIwt9l9ihVlZqz559PX1G1Sy+WYDV2ljNo Rw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 3bddy9rymu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 18:13:07 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0952E10002A; Thu, 30 Sep 2021 18:13:05 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id EF521238687; Thu, 30 Sep 2021 18:13:04 +0200 (CEST) Received: from localhost (10.75.127.46) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 30 Sep 2021 18:13:04 +0200 From: Arnaud Pouliquen To: Ohad Ben-Cohen , Bjorn Andersson , Jonathan Corbet , Mathieu Poirier CC: Greg Kroah-Hartman , Jiri Slaby , , Suman Anna , , , , Subject: [PATCH v8 0/2] Add rpmsg tty driver Date: Thu, 30 Sep 2021 18:05:18 +0200 Message-ID: <20210930160520.19678-1-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.46] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-30_05,2021-09-30_01,2020-04-07_01 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This new revision reopens subject started a long time ago. Previous revision discussions available here [1]. This patchset introduces a TTY console on top of the RPMsg framework which enables the following use cases: - Provide a console to communicate easily with the remote processor application. - Provide an interface to get the remote processor log traces without ring buffer limitation. - Ease the migration from MPU + MCU processors to multi core processors (MPU and MCU integrated in one processor) by offering a virtual serial link. An alternative of this proposed solution would consist in using the virtio console: The drawback with that solution is that it requires a specific virtio buffer (in addition to the one already used for RPMsg) which does not fit with remote processors with little memory. The proposed solution allows to multiplex the console with the other rpmsg services, optimizing the memory. The first patch adds an API to the rpmsg framework ('get max transmission unit') and the second one is the rpmsg tty driver itself. Update vs previous revision [1]: - simplify the patch by removing the control part(CTS) to keep only the stream part. - rebase on kernel V5.15-rc1 - take into account v7 review comments. Notice that I kept the Acked-by and Reviewed-by in "rpmsg: core: add API to get MTU" commit even though I'm not sure if it's still relevant after such a long period... [1] https://lkml.org/lkml/2020/3/24/1394 Arnaud Pouliquen (2): rpmsg: core: add API to get MTU tty: add rpmsg driver Documentation/serial/tty_rpmsg.rst | 15 ++ drivers/rpmsg/rpmsg_core.c | 21 +++ drivers/rpmsg/rpmsg_internal.h | 2 + drivers/rpmsg/virtio_rpmsg_bus.c | 10 ++ drivers/tty/Kconfig | 9 + drivers/tty/Makefile | 1 + drivers/tty/rpmsg_tty.c | 275 +++++++++++++++++++++++++++++ include/linux/rpmsg.h | 10 ++ 8 files changed, 343 insertions(+) create mode 100644 Documentation/serial/tty_rpmsg.rst create mode 100644 drivers/tty/rpmsg_tty.c -- 2.17.1