Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp803162imm; Mon, 2 Jul 2018 23:41:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeK7urCgYptUAtrbygVL4KlvFgOtymt9bZtJAwQigfOg5jaVlvyfcWBgqwK8hnfxD/1h9n4 X-Received: by 2002:a17:902:a60b:: with SMTP id u11-v6mr3376714plq.158.1530600085324; Mon, 02 Jul 2018 23:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530600085; cv=none; d=google.com; s=arc-20160816; b=PfpSSQzX0dq+PcwrrS0j7t1Tlyjw8VSdf3EH7BLJ3KBO4ySpaG4GfKtUdHGD/NXR3Z 5oW4G9gpYkcj8HXwJupYzJ0rWT9qRpC0UQbwQaZetLiVyXaKQzJg4rMxFT8OCbqTqvoG AZpl1kvI7hMP2hcfHfUtfPCtaHipasvQ5YNxA/eUINY8fNS0IqJYESdQ4PKmArl+3Tuh SYTzf0YSfkYFYvRKTu6tePEbM/UNyMQwBudvomoCsizREZTN+1yJs1sQ8jDq4m57dBex BuQJe/c9acLmthe8PkpdyY9gmxG+TDFd5p2sKGRIWAh6zT/hkwGXU7Y+c8bgdsV9ByfB pJzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=6gQPuDh45c4y3cZ4OJoFFboGXYHkRhrnzaKLZcDS/Ww=; b=wctRTovQdb6FoyHaC0h2nHw10uDqdn55l3CtgB5Uhjf13lkKvigVU5GRFxldr4IQrU tYZimNOp6dMh5ISXohNl76Imw2YZI7CECOWBmizXIyakvJiV+nUFHRpyOkmhdvTl34LK pT1ewBRwjrFuW0lb3XHpPm7jA3Dkpci7XGqwVVNRPB52LIhOOKhxhCQ8A5dvgnOXyGZN N+3kWevMUVvzre/qkg+V4nR2KeHLt8HVJvZRAivuFy9e1yaZkcoWauqLkihNCDl47CXO V8/FgBoq6MbtvzUPw01R3MoiRjK/ClpSarf8F3N46sb2w8OWmdjuYePoTJ5kHeN1jWoK dtXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kapsi.fi header.s=20161220 header.b=biac48P9; 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 w5-v6si426154plq.112.2018.07.02.23.41.10; Mon, 02 Jul 2018 23:41:25 -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=@kapsi.fi header.s=20161220 header.b=biac48P9; 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 S1753781AbeGCGk2 (ORCPT + 99 others); Tue, 3 Jul 2018 02:40:28 -0400 Received: from mail.kapsi.fi ([91.232.154.25]:60413 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753661AbeGCGkX (ORCPT ); Tue, 3 Jul 2018 02:40:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kapsi.fi; s=20161220; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=6gQPuDh45c4y3cZ4OJoFFboGXYHkRhrnzaKLZcDS/Ww=; b=biac48P9Dpo7nxYBw5IxrZijQ2xK5omf1hz8iyb1LHvii7veTm1aZKzKIHW8ja5yLzpqufxpzWXrkTGpz9Ffdp7Jky5X3eMkmRP4Q0LtNUECC3xxyimg822MEe8clILZ/ZgHBYUAal5iFPsqwMldKKsP4G2O5BIsnHNEbW8C7kp49lN4BPNeqBvS8hKXPIxoChWOfzBfhaj5Ffq8xgLhPMtDBrWdrj1r2DaH0jLmVWuhkZH438LXgmnFPOKaNE4Uynj5mbae8ALS08SOmv2rbBmY/SVQRM7ktBc7EyhNCDoyxCwdxFV+iEsFq0CrLgdLvCqElxYy1y5D/1Jd+poGDQ==; Received: from [193.209.96.43] (helo=[10.21.26.144]) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1faEz3-0002of-5K; Tue, 03 Jul 2018 09:40:17 +0300 Subject: Re: [PATCH v3 6/8] serial: Add Tegra Combined UART driver To: Thierry Reding Cc: Mikko Perttunen , devicetree@vger.kernel.org, gregkh@linuxfoundation.org, jassisinghbrar@gmail.com, linux-kernel@vger.kernel.org, jonathanh@nvidia.com, linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20180702114033.15654-1-mperttunen@nvidia.com> <20180702114033.15654-7-mperttunen@nvidia.com> <20180702131851.GH13096@ulmo> <50c4702b-3d59-e443-5075-c888f83a2615@kapsi.fi> <20180702134731.GI13096@ulmo> From: Mikko Perttunen Message-ID: <02120216-e305-5968-3567-d7174c2a8b13@kapsi.fi> Date: Tue, 3 Jul 2018 09:40:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180702134731.GI13096@ulmo> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 193.209.96.43 X-SA-Exim-Mail-From: cyndis@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.07.2018 16:47, Thierry Reding wrote: > On Mon, Jul 02, 2018 at 04:30:07PM +0300, Mikko Perttunen wrote: >> On 02.07.2018 16:18, Thierry Reding wrote: >>> On Mon, Jul 02, 2018 at 02:40:31PM +0300, Mikko Perttunen wrote: >>>> The Tegra Combined UART (TCU) is a mailbox-based mechanism that allows >>>> multiplexing multiple "virtual UARTs" into a single hardware serial >>>> port. The TCU is the primary serial port on Tegra194 devices. >>>> >>>> Add a TCU driver utilizing the mailbox framework, as the used mailboxes >>>> are part of Tegra HSP blocks that are already controlled by the Tegra >>>> HSP mailbox driver. >>>> >>>> Signed-off-by: Mikko Perttunen >>>> --- >>>> >>>> Notes: >>>> v2: >>>> - Removed (void) casts for unused variables. >>>> - Changed the uart_set_options() call to be on one line, even if its >>>> over 80 characters. >>>> - Added defines for magic numbers. >>>> - Style fixes. >>>> - Changed Kconfig entry to depend on the Tegra HSP driver instead of >>>> just the mailbox framework. >>>> v3: >>>> - Removed FLUSH bit, as it's unnecessary and slows down printing >>>> - Removed call to uart_set_options >>>> - Added mbox_free_channel calls to remove() >>>> >>>> drivers/tty/serial/Kconfig | 9 ++ >>>> drivers/tty/serial/Makefile | 1 + >>>> drivers/tty/serial/tegra-tcu.c | 291 +++++++++++++++++++++++++++++++++++++++ >>>> include/uapi/linux/serial_core.h | 3 + >>>> 4 files changed, 304 insertions(+) >>>> create mode 100644 drivers/tty/serial/tegra-tcu.c >>> >>> The driver looks good to me. But for my own understanding, is there some >>> way we can make use of the multiplexing? That is, could we add a >>> mechanism to have the driver filter out only a specific stream? Could we >>> also specify which stream to send data back to? What happens by default? >>> Which stream is data sent to? >> >> There is no multiplexing on the producer/device side (i.e. what this driver >> does). The mailbox specified in device tree specifies the stream we send >> stuff to. The mailboxes are per-CPU (we use the CCPLEX mailbox here), so it >> cannot really be changed. > > Oh, I see, so there is one stream per pair of mailboxes? That is, the > mailboxes we specify in the DT define which stream we receive from and > send to? Correct. Mikko > > Thierry >