Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5055329ybb; Tue, 24 Mar 2020 10:08:08 -0700 (PDT) X-Google-Smtp-Source: ADFU+vv01EpXu+MIOQE9Tet2TcWPgCMngEhpC7Iv+sMcddjOCk3gIebliU1+8/4m4HwLbo+u0rnc X-Received: by 2002:a05:6830:23ba:: with SMTP id m26mr16304418ots.133.1585069688127; Tue, 24 Mar 2020 10:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585069688; cv=none; d=google.com; s=arc-20160816; b=HwQ7krInvtf7bM2GVNxOHY9X3ozSAatECftSX9gJIRITvPtsBbAviHp+zEJCiktXud Q1ziCV/ua2oWsNrOtcbHOJM1+ey0A8OJ74atuZIKv+/oR9iK9RfX1jynGR1hIIHy1GAt 14LWGkrF7rZeCT9Devpvm7aZR651fiexi59CUzLlYIsJJroI73kS6XZgoXr1cTS9vw7x XOd0eNNMnEYhnt04+MuNXBCwdhtQUr8cW3N1dNuVtdpgGtuTjt5H6hgU6zv1R0yqiqtW b5ZJ5DkBmcTdEdaf51hDfCU/DC0jdRpPPWbGUIcvsTjD+5u6GLLkvr6+67yKya2SL8KH jXng== 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=AMCtPG8q5sasMVUMMcu5hxbwZnpMXqy+87NMHQ6HtMc=; b=xZQMgDKoalhOjWvcupEJUgOKunR05f1IfkU0FXK5r6ILtGZhceD4VeM+hSxlrLB9yP WyNhH7agJXJ3If8tOysz8AEsCJqZTjGBwxgQThmfDQH8gGcSeeCpRnCp0oLJf31uztKh dQ9yZxaOrgWoBc3he+S+trgpEXRFQAy4gNZrjWkKzVFdmlpBxTlu4weX/yCGly6UWbWx Mzi7JnrWpGi61/ILMufcdibO/hfIhnH3FxIB0HuJuF92D6zYfHD/3cyvcrZZKriWnWoq n2sRpy8gzKji1OOaFXo47Ig/YC/YNo10JPX7g14RSFX2IrXLAH9J4aiJTyfu4KA7S5Is VNrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b="TFbdkIj/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l131si9208686oih.10.2020.03.24.10.07.52; Tue, 24 Mar 2020 10:08:08 -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="TFbdkIj/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727320AbgCXRHP (ORCPT + 99 others); Tue, 24 Mar 2020 13:07:15 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:20784 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726962AbgCXRHP (ORCPT ); Tue, 24 Mar 2020 13:07:15 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02OH3jR9026290; Tue, 24 Mar 2020 18:04:59 +0100 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=AMCtPG8q5sasMVUMMcu5hxbwZnpMXqy+87NMHQ6HtMc=; b=TFbdkIj/oir8wIc3oJ4N0mKD4OLm15n0J+VIEdPEpBP492raYFUzY+o7hV3wHD4p7uGG MRX1QNBsGgBk1QoPSSIp+0GCrREPMJxKnxrOwe5mlXrRsmPqWKAvqe56946hxvObo1r0 yJRXnmm/leXXkIvF+G9q3QKfluC/t1i3wLn+KQ/7LvE9Ctj1xctS80A8GFu78OhEk2nd 2/wKTngb9oDvk6kEn8dzkxHGWcLSVKXgW/RKtLIrwADiAM2fgnnRAzr4pesZLpFbU9Zy e3bymWj6K8F0bPFivdBS1vIN6nw40BeiVtHi3dJw9h5FYGIP4HLGBXfkQyHS3PDg8+4T hw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2yw995gsvq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Mar 2020 18:04:59 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 214A610002A; Tue, 24 Mar 2020 18:04:57 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0B43F2BE24B; Tue, 24 Mar 2020 18:04:57 +0100 (CET) Received: from localhost (10.75.127.46) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 24 Mar 2020 18:04:55 +0100 From: Arnaud Pouliquen To: Ohad Ben-Cohen , Bjorn Andersson , Greg Kroah-Hartman , Jiri Slaby , , , Mathieu Poirier CC: , Suman Anna , Fabien DESSENNE , , Alan Cox , xiang xiao Subject: [PATCH v7 0/2] Add rpmsg tty driver Date: Tue, 24 Mar 2020 18:04:05 +0100 Message-ID: <20200324170407.16470-1-arnaud.pouliquen@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: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-24_05:2020-03-23,2020-03-24 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) 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. Previous revision: - the patch 1/2 ("rpmsg: core: add API to get MTU) has been discussed in a separate thread on remoteproc mailing list: https://patchwork.kernel.org/patch/11333509/ - Previous version of the patch 2/2 (tty: add rpmsg driver) available here: https://patchwork.kernel.org/cover/11130213/ Main delta vs v6: - Pack the rpmsg_tty_ctrl struct. - MTU API acked by Suman Anna from Texas Intruments company. Arnaud Pouliquen (2): rpmsg: core: add API to get MTU tty: add rpmsg driver Documentation/serial/tty_rpmsg.rst | 45 ++++ 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 | 417 +++++++++++++++++++++++++++++ include/linux/rpmsg.h | 10 + 8 files changed, 515 insertions(+) create mode 100644 Documentation/serial/tty_rpmsg.rst create mode 100644 drivers/tty/rpmsg_tty.c -- 2.17.1