From patchwork Mon Sep 3 13:10:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 10585827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77CDA112B for ; Mon, 3 Sep 2018 13:11:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65F5C29785 for ; Mon, 3 Sep 2018 13:11:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59BC92979D; Mon, 3 Sep 2018 13:11:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD56729785 for ; Mon, 3 Sep 2018 13:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=o3I9GiidufYPAlXbads6L/lPDHsEaeeLdvrbtNfvE0c=; b=Eja fLbyD4JL6zELD1ydQosaO0qH75iUprVixZqZXbn12M0fd2GmHRsxm2AAjfqkVFf+fiFucDgpbqq6g RDUGtm0zsZfivaTYOJihLhoZHRseVpjfp97c8Lc+/mTu3dUGvvVf/Lx9AQeiXeeWMwk5zlo9YDgUQ xsZPZCxwiNNX6NyyLZEVcTl1hips28QbvomdOagjHbE7eCoaRlbtwLPI9etuMcsQL0/R8/3e8FWTb S28ImjbGY0Vp032xZFIec4575E/Aj2ZL666hj/fUBv69SqxxPFtYnrIVzLY55H44lem73mZaANwii iWMLqbbrxFOnNCu6lNabuBT10wVRgjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwodR-0000tm-O4; Mon, 03 Sep 2018 13:11:17 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwodN-0000pC-4W for linux-arm-kernel@lists.infradead.org; Mon, 03 Sep 2018 13:11:15 +0000 Received: by mail-wr1-x442.google.com with SMTP id k5-v6so591542wre.10 for ; Mon, 03 Sep 2018 06:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=4WVnoiYRWEOhjySy4R4z9P5GLpLL/Ls1N/7A+nFVhVo=; b=Z9WcaUszwLZ5a/sizpFi7xSe91u5D0S42uHKrTArETJt+s1iSYKA9jlY6sTAyN3Meo ZG8hVpBNTNDvAeQR+MAU7ZlxDn0GWi39q6IubminlQJ8rpfvzwwfH24YMP9TfQ8BffoE CKwIV5hyzh9wjS+4EebKTuHdxyMCqd1e7k+hbhSeVUH9Sbdgn+EKGrzJ65IHNj9bQ1O/ EwHItMU1aHFS1Z/YIU8njzAqaUItT4RzkU003e6oUBcwskvqA7CyAluiEf8i3sMEfvvz pZLHf89qmzpljubV40Ez6iGCXyFgWrO5+z1NHgY/xTpgYZ+yDKdDPXclgPam5xi0vDBo hmoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=4WVnoiYRWEOhjySy4R4z9P5GLpLL/Ls1N/7A+nFVhVo=; b=jGWtOiXXQRUv0zrUPyB5353JEaSj0kPsk7kPvY2zuixe99ooZ1s+8CKRJh6anWQKdB 78lBgc2O6S93cEN/w8Ar4cQZcgZiX59VsGETOQUTSBAS0nMRmEq+BBSuuTYvN5eRu3Qc Tyb41PYddrwmG4Ac//3QKi2UALKJ90NU9y6sF+QGeR3z9Y0R9aSEXwNSwY/rlfu+1vIU gS9Nz33dIfPvt/XUVhb8Xk+Ga9xmGVOxvTVUqw58dQt8He0MbYDXHkc+L8MoM+Jbzjb2 8C4RDfh+bEkQVF9x+Ctfz3ZI1i0U+JMQoxbaFwKBHBVR6FCD/1z3Kjl5AM2yBsyYqHAa U8Hg== X-Gm-Message-State: APzg51DGLIZCP1zHuqKTNyW7MI5/H5wrgvsgnWruagyovVKeNwqVZ0hW j9wq6yO6W0RrwX2EAONoRt6bJQ== X-Google-Smtp-Source: ANB0VdbIlboY10dFbv7OS9Vo9tvOuklL7uLZ21fm/1wyu1JJh2l9OXg6AMeKKLVrDynszthlBS4pmw== X-Received: by 2002:adf:ef51:: with SMTP id c17-v6mr17927992wrp.182.1535980259979; Mon, 03 Sep 2018 06:10:59 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id o6-v6sm9248943wmc.15.2018.09.03.06.10.59 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 03 Sep 2018 06:10:59 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu, gnomes@lxorguk.ukuu.org.uk, Alexander Graf , shubhraj@xilinx.com, robh@kernel.org Subject: [PATCH v3 00/10] serial: uartps: Add run time support for more IPs than hardcoded 2 Date: Mon, 3 Sep 2018 15:10:48 +0200 Message-Id: X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180903_061113_209992_F468AE0F X-CRM114-Status: GOOD ( 11.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Jiri Slaby MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, this series is trying to address discussion I had with Alan in past https://patchwork.kernel.org/patch/9738445/ and also with Rob in v1 https://lkml.org/lkml/2018/4/26/551. These patches are doing preparation to enable dynamic ID port allocation which is capable to create devices with higher IDs. For example this is how it works. uart0 on higher alias serial0 = &uart1; serial30 = &uart0; ~# ls -la /dev/ttyPS* crw------- 1 root root 252, 0 Jun 6 12:19 /dev/ttyPS0 crw--w---- 1 root root 253, 100 Jan 1 1970 /dev/ttyPS30 Thanks, Michal Changes in v3: - New patch found by testing - New patch - can be sent separately but there is dependency that's why sent in this series - Fix uart_unregister_driver() in error path or when driver is removed. - Change commit message - s/,/;/ in filling structure - get cdns_uart_uart_driver out of PS_UART_CONSOLE ifdefs - New patch in series - Rebase on the top of previous broken patch - Change patch subject ("was serial: uartps: Remove CDNS_UART_NR_PORTS macro") - Keep CDNS_UART_NR_PORTS in this patch and remove it in next one and align commit message to reflect this - Allocate struct console dynamically too to be unique for every instance - Cleanup error path - New patch in series Changes in v2: - new patch - it can be sent separately too - new patch - it can be sent separately too - new patch - it can be sent separately too - Remove nr field logic - new patch - it can be sent separately too - Register one uart_driver with unique minor at probe time Michal Simek (9): serial: uartps: console_setup() can't be placed to init section serial: uartps: Do not initialize field to zero again serial: uartps: Do not use static struct uart_driver out of probe() serial: uartps: Move alias reading higher in probe() serial: uartps: Move register to probe based on run time detection serial: uartps: Fill struct uart_driver in probe() serial: uartps: Change logic how console_port is setup serial: uartps: Register own uart console and driver structures serial: uartps: Move Port ID to device data structure Nava kishore Manne (1): serial: uartps: Fix suspend functionality drivers/tty/serial/xilinx_uartps.c | 203 +++++++++++++++++++------------------ 1 file changed, 107 insertions(+), 96 deletions(-)