Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2004073yba; Fri, 17 May 2019 08:52:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXU4iHrK3OyDCk/V343Std2C5crjQYV4f8HlFNDo/TS2tW6u+prrZKSOWpfglWm3sXjhhL X-Received: by 2002:a63:fa4a:: with SMTP id g10mr57752861pgk.147.1558108364914; Fri, 17 May 2019 08:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558108364; cv=none; d=google.com; s=arc-20160816; b=lYMtkUa1yP+uPI2yZt0EarBoSFRt3er+LzZOyYJ/xo1lYXEzI+Ve6U7gfW98ZHgCEU d7tIEz9AA3+z1u+Rtrg6crwzHYrpNfVrrNcSWPuvrZxsL9mHfAI/SrU9A2E67DL7uSg7 9RxLjjyQYPyHT7/laEStmGpHioSPaBWtd1XBVIofv2sMNPNpx18sU0bN2thNXCdo5KmB SUWTAiO3zawNr6LstWjADUY9X9SIj/SLQcnXl9tFztgxJ2PpqPt9dZPWRdu6XHR9VID2 HtKqpwBXesWCv2Xs12Wlrxf/wOr63K1htDCAHIHfMsZAuZxVqfY/5W/L4fFkD9hmJ0ZH uUdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=PHl9sPgHer9rFMqdEvzOj0lO4FTuuyduSnOabIiiXhw=; b=OCO977PNBZFzyM+WNohIE/WwLTCkuG7V1VeyxApKKOFxBIMePfZ01hDT7w7RtrLeFE dFkkyy+jisFNpzvrgfSIG/li3n/2OtXXab6BKP21XJETOwob19TIBEU5+0m32vcqmoAG 4NCc4dED9CopUUrfQZKfcwr7ExFuKAG0LH8T2rpnKypsGdxRamYBloJ7A9zBd0AZgMR5 M2Al4QRUbKnQQn757UgO4xoUM4mX5j6WS1c9YjQeQquvzLP/dGGYlk+CcUzE8N4WCqrn W1TYpjVWieS663HtOQDiXqs6gk9+Vi8SgCp0kxkkbGstTtO5ldBGY1fYl72+YZkKpQTk EZfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=p5t1gmwq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 76si9025566pfv.233.2019.05.17.08.52.19; Fri, 17 May 2019 08:52:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=p5t1gmwq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729100AbfEQO2K (ORCPT + 99 others); Fri, 17 May 2019 10:28:10 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:37066 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728692AbfEQO2K (ORCPT ); Fri, 17 May 2019 10:28:10 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4HERpQb031441; Fri, 17 May 2019 16:27:57 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=PHl9sPgHer9rFMqdEvzOj0lO4FTuuyduSnOabIiiXhw=; b=p5t1gmwqmGxokQhFfCkrI7yiriG0RYbcNo5rx3HMUGvFayKfcjfgd1p7piaE4dmB7St1 672RfK5+QYYksRFpt0IT7oKXoQ3XRc+coG4Zi0WPbxiNADvigpVhP62/7EcPxqWc04xl R0CAF9++5wW0CefUZZLO0MBvqXkHqQ3ksQzqUv0vH23VT+J+DR8K1geM0xYs/QCmCHnW hqxAxjYMtCFoWd/Y/aZb6ieD95kMdoalFUU4d3hVK99SD3Ppus5RdODqhk/yWCWT5I2S kL6xugwNFjI0Ehd2Ly5aSPeu9v3ZVn2tcxX1Y3kQpK2yoE3jr2FaSj4qy6siDNXc719K xQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sdn9get5c-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 17 May 2019 16:27:57 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D12A23A; Fri, 17 May 2019 14:27:56 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AA5792C9F; Fri, 17 May 2019 14:27:56 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 May 2019 16:27:56 +0200 Received: from localhost (10.48.0.131) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 May 2019 16:27:56 +0200 From: Arnaud Pouliquen To: Ohad Ben-Cohen , Bjorn Andersson , Greg Kroah-Hartman , Jiri Slaby , xiang xiao , CC: , Fabien DESSENNE , , Alan Cox Subject: [PATCH v3 0/2] TTY: add rpmsg tty driver Date: Fri, 17 May 2019 16:27:44 +0200 Message-ID: <1558103266-1613-1-git-send-email-arnaud.pouliquen@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.48.0.131] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-17_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set 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) 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 buffer size') and the second one is the rpmsg tty driver itself. History: -V2 to V3: - suppress error return on rpmsg callback as not tested in rpmsg framework - change some flow messages level to debug - add missing out of memory checks -V1 to V2: - modify message structure to allow to data transmission but also flow control - add documentation file to describe message structure for remote implementation - add dtr/rts management - disable termios modes that generates non optimized behavior on RPMsg transfers - replace rpmsg_send by rpmsg_trysend to not block the write - suppress useless spinlock on read - miscellaneous fixes to improve robustness Arnaud Pouliquen (2): rpmsg: core: add possibility to get message payload length tty: add rpmsg driver Documentation/serial/tty_rpmsg.txt | 38 +++ drivers/rpmsg/rpmsg_core.c | 20 ++ drivers/rpmsg/rpmsg_internal.h | 2 + drivers/rpmsg/virtio_rpmsg_bus.c | 11 + drivers/tty/Kconfig | 9 + drivers/tty/Makefile | 1 + drivers/tty/rpmsg_tty.c | 479 +++++++++++++++++++++++++++++++++++++ include/linux/rpmsg.h | 10 + 8 files changed, 570 insertions(+) create mode 100644 Documentation/serial/tty_rpmsg.txt create mode 100644 drivers/tty/rpmsg_tty.c -- 2.7.4