Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2221525yba; Fri, 10 May 2019 08:06:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1/ozb/9QDL2bGBGuHljLSyf/G1frIeajTqeLvvTZNy1a9vaYIrLZymwD/CCeu63f6gHRA X-Received: by 2002:a62:2687:: with SMTP id m129mr15207633pfm.204.1557500808163; Fri, 10 May 2019 08:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557500808; cv=none; d=google.com; s=arc-20160816; b=dxY/k4UNcp3V6tDnIJudv12EA0KlLSrAafuk9oPoRdw8mNlBDdaIyF4Db5NXmd/ZlT M84uXoJVT6w9MjJ189acX11/os1uTm9qA8Xr54agQOpBCmWPKFRsrUWh8Y+KMnkgBu/L NXgiZ8JNwRHxgVQoK+Z+1Uvp2R20NRYYNKuVO9Zij3zsjhR+Hr6JO3GEh8NFTPLZm5io xiOYS3fJYFrkJmir588MTDmuMttEvN1EO4blESzk6kBWh0Qe5W8eahPJnAoZBgzyJlOQ V3aqHsFq0iGWNR5SAvFeFCLgrzRMLnfZvC/ucMqQ/l0b6y1PydIL8Zbw2K/3mnDo4AUq sh9Q== 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=lKyNfPMxjeNEOTVeoxdaJaRQWuSGzvXAvpttJx+3BqI=; b=cQ+Z+R/VY+f8/i5EXQfuIkMBqF8Jpdep0zk41DIQP1J7LLPhwQiT57pkRq1fGoVbnk EBg+nTmAxl2IFyiQWFRuEEjqcp0ZDKJU/y5vk/+Az1K41ZSyANfBC8eQZbfic8BLWUBx gK4kg7xbCDo/TkStbFyNjdDf6cvv5FTGZJxHj6HDEAY4QkWrzX9J0PoWWhh4VeVWAK4A 3DD3KGOwaZ6Pnx6C0rjHUgm6RViL+64fwIdlo7pHi4qw0zJo8RgIBo2WQ9f7xJ/U15+X /0yKReACIypv75UzZJumwZUFcpwBTUWSIGq27Ps560kBb1TZNYtjwFl4c3GEdEGsjPCD 97XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=HTxwKAv4; 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 p5si7841086pgs.254.2019.05.10.08.06.30; Fri, 10 May 2019 08:06:48 -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=HTxwKAv4; 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 S1727663AbfEJPDp (ORCPT + 99 others); Fri, 10 May 2019 11:03:45 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:39152 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727346AbfEJPDo (ORCPT ); Fri, 10 May 2019 11:03:44 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4AF1SGw024827; Fri, 10 May 2019 17:03:08 +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=lKyNfPMxjeNEOTVeoxdaJaRQWuSGzvXAvpttJx+3BqI=; b=HTxwKAv4ORkCmeJ8x744pOg4vmUsTyoACZLbIgTRRUc7FzQJHUSPs60riHvLjRNHtGyp vs/ubWMTnxeEg72laGrlehF8r/D0BZoWqfXz7Cn6bAzxCYdJlSHuVbK2277dZhWyry6z KjnQB8TmYjDtLgD5nUT3yfC5g/6b+Q/PRrTw2F3wTjzyXyAnevFJeMAP3Dqqf9h+cb7D rXj9Y4vWHsLFOjD6gZZZNfLUpDL+2d0qGVTE+DDUmnn8y43i6Gu7UlFtOgyghHkVKcSo wrvTkyvwu2cp0kgIQAjPdmgw6ZfFPlGkO/C9ZI7kP/O0txxUkMjdpvb5L++XxBiBcZod pA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2scdjp9rnq-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 10 May 2019 17:03:08 +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 401CE34; Fri, 10 May 2019 15:03:07 +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 191F92ABA; Fri, 10 May 2019 15:03:07 +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, 10 May 2019 17:03:06 +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, 10 May 2019 17:03:06 +0200 From: Arnaud Pouliquen To: Ohad Ben-Cohen , Bjorn Andersson , Greg Kroah-Hartman , Jiri Slaby , xiang xiao , , CC: , Fabien DESSENNE Subject: [PATCH v2 0/2] TTY: add rpmsg tty driver Date: Fri, 10 May 2019 17:02:55 +0200 Message-ID: <1557500577-22366-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-09_02:,, 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: -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