Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83921C43331 for ; Fri, 3 Apr 2020 15:49:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C86F2077D for ; Fri, 3 Apr 2020 15:49:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="b6nooLiz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C86F2077D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vanmierlo.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=beptpiYQfZXoiUTolkOZAVA+W+KqxRZMe9SKAljsUQM=; b=b6nooLizzC03rEFZpp1a8L6BE neLyr0AY/Y0cXBVdHBD38lYxOwzDi2kR0ZOIgVgUJQNoK4N8z4zwPHiJ+ra//HIRcNGmrmq0pOBd4 VP/5WoQQL++29ZIs9/ux3ZY828xzt6oG+vZE/3Q42vo07XLfx4lwo0Y9GFwJa4YwOb+mSoFASFyIP UIRjHqXf9rW4bPCFWeC/gHfZacWJtiZjGSJcUew8NkuNmJXesho8ci+4r+KfDyzoHHKfFFbRi1kAi gQUk7CdPOUpG+TDTL6GcIAt6Ydk9YN870PnRDCV2NDiLiZhZdhqJX10rCT0yWeYCRyaDMsCtnCiCt Cjoj6nGBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jKOZ5-000397-JX; Fri, 03 Apr 2020 15:49:03 +0000 Received: from fieber.vanmierlo.com ([84.243.197.177] helo=kerio9.vanmierlo.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jKOZ1-00037s-RJ for linux-arm-kernel@lists.infradead.org; Fri, 03 Apr 2020 15:49:01 +0000 X-Footer: dmFubWllcmxvLmNvbQ== Received: from roundcube.vanmierlo.com ([192.168.37.37]) (authenticated user m.brock@vanmierlo.com) by kerio9.vanmierlo.com (Kerio Connect 9.2.11 beta 1) with ESMTPA; Fri, 3 Apr 2020 17:48:42 +0200 MIME-Version: 1.0 Date: Fri, 03 Apr 2020 17:48:42 +0200 From: Maarten Brock To: Michal Simek Subject: Re: [PATCH 0/7] serial: uartps: Revert dynamic port allocation In-Reply-To: <2983dbe2-16e6-4b7b-73a6-49d8c3d70510@xilinx.com> References: <20200403093216.GA3746303@kroah.com> <20200403094427.GA3754220@kroah.com> <2983dbe2-16e6-4b7b-73a6-49d8c3d70510@xilinx.com> Message-ID: <211f564d5594994fc677d3fea4222997@vanmierlo.com> X-Sender: m.brock@vanmierlo.com User-Agent: Roundcube Webmail/1.3.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200403_084900_029597_FD4E4967 X-CRM114-Status: UNSURE ( 7.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: monstr@monstr.eu, linux-serial-owner@vger.kernel.org, Greg KH , johan@kernel.org, linux-kernel@vger.kernel.org, git@xilinx.com, linux-serial@vger.kernel.org, Jiri Slaby , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-04-03 11:51, Michal Simek wrote: > > Thanks. I am definitely interested to hear more how this could be done > differently because that hardcoded limits are painful. > On FPGAs you can have a lot of uarts for whatever reason and users are > using DT aliases to have consistent naming. > Specifically on Xilinx devices we are using uartps which is ttyPS, > uartlite which is ttyUL, ns16500 which is ttyS and also pl011 which is > ttyAMA. > Only ttyAMA or ttyPS on one chip are possible. > > And right now you can't have serial0 alias pointed ttyPS0 and another > serial0 pointed to ttyUL0 or ttyS0. That's why others are shifted and > we > can reach that hardcoded NR_UART limit easily. > And this was the reason why I have done these patches in past to remove > any limit from these drivers and if user asks for serial100 alias you > simply get ttyPS100 node. I would argue that the trouble originates from every uart driver using its own naming scheme and thereby creating separate namespaces. If all uarts would register as /dev/ttySnn then the serialN alias method would work. These non-overlapping namespaces is something the linux kernel driver community has allowed to happen. If the namespaces are not abandoned and disallowed, then the serialN alias method must no longer be used for any driver that does not create /dev/ttySnn devices. Every namespace will require its own alias base. Or forget about deriving the number from an alias and set the number in a property in the device tree node itself. The latter has my preference. Maarten _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel