From patchwork Tue May 18 07:58:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12264041 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 734E1C43460 for ; Tue, 18 May 2021 08:01:15 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 051AA61285 for ; Tue, 18 May 2021 08:01:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 051AA61285 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TKy4YsesYbp8oljK2oJf9PBiJnIO3Qn1fV7OHx+HULU=; b=IhxF04KHBdPOkODJss6oullD2 GJ6OEcZl39S+ylqjGHhcMloQRkJNrsnnHJDHpTPy2NwcHNkpFWhXCFbITber72gMcSmBR1I4NzlLP 3H8aygAqBS27PbRun+ACV2nS0dLQHwR4WZG1s09d/Sk28Qn+Rgig5CW7dCHg/VtFCTqjHXJb+LsOp tUf+v9jG2C5qfrQ9T2OLG1ghjOxu/5KxPdp9aw4CfwtIjFBivHt38YtBaewdKj341CG4DlZIpQexw HV4YcqKRVhmCT8B/k5+QMtEnhXjoCkMGSBLx3dZgb8yeq52NLx33zHIYEqJ0hNAKGh+WaQUCvH27P RLFNV/ekg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liudI-00HU4p-Bx; Tue, 18 May 2021 07:59:16 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liucq-00HTyA-T9 for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 07:58:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=mHKyhnmvKk11GFq9mc3k0CCB5T2Yy23YqL5vTU1rIHM=; b=lEYab3eCY1Pf87n8ZNiFrmLGkB FCeMR85yFGeNlFPeQDvxiOvvTwkhPpdymeCfjfyHxbIM7zI6q4S4O2hMGhj295VbgIcVbk//K9lBb tYIORoxuJJZvY0dFBXtKKGO+d2Qp5wLfy66kS1JllyDIIy3hJjbn3oceekojkbTPksoLNs9x1TnJ+ swxClpTGKWd32pCnu+tWL8JkTbE+l8c00K3kgmAX4NG4/erfLec4TpDRVcPfGw0SYTXJZAM4kmIxd WqH43LzbbBpftXXfFiNYIrIm7jkZkG2Ywkb/BVEP7HhRFN2Mgq2FIIPqRxinjXro3wfE+Vcggh4GS ndUfm45A==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liuco-00ERF1-6g for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 07:58:47 +0000 Received: by mail-wm1-x334.google.com with SMTP id 62so3846275wmb.3 for ; Tue, 18 May 2021 00:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mHKyhnmvKk11GFq9mc3k0CCB5T2Yy23YqL5vTU1rIHM=; b=TLzVMRaU60Ry1jl2TTo02UAb+xMSS4f1u7+jzg+ygsfwvJE5Bh/NW1LW0cTasWyxOb 3XhMx0Cr3ufsX9oWrbxxqzE/UzMpnlExQuMvv+nFH91wqpXYwLRmsxos3omvkWO4ekEL TnxH3FwZOYqQkEboz/d2UU6zCT7aSRIFotUlfI1R3jum6CgTh9TPUXqqntnA4PYyVPYQ 6XofKqconWPPcPgyX/jomdi0ES/9rJbLgfsij9uj3qRSOGhsjfWM51r975BGdgAGylTJ Sa9gxjFLMKdLV3ctIERAQ+ekJHaPW7hCS0Q1bfbGA7N+zdmllqXjfPBQ09QPWzDzduJ5 eFhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mHKyhnmvKk11GFq9mc3k0CCB5T2Yy23YqL5vTU1rIHM=; b=Bx81l2g5PPplFd33zw6M4GUQECdST6Zsfa+ktivspYUFieq9NZg08XHxK6QxBXNvtv skdI9q3UId8+ILWewMpV2orpvovTEqcvrsyIqG+ZhFUsQy6WJQJhTDTXDqhXayYVDOJj UePNOKmylpHngjJLNijOG+VSL2VySg6/dHqSbLU1UNQbRuRyyv38UkTfohBg55vGyJHa vvuG4jp38VgU9ppBjv21C2Szss3sYfWbc6ahtx3o0wNPQxux73HTpeHz9fnZCTTTc0B2 dGzePMvPo6hrEZc8mUfCZP6IqWwU03zss+TtVGMMAkQsZizs+ifbeG/NI4VGb07OhNJc xpMA== X-Gm-Message-State: AOAM532Aj7hwZAqcR+rKRNIRKBxT2oxnkC9ecbjT9D4pcheH9n1M3axH ALuLjF8AFCch6YKgeuzYGdOs4Q== X-Google-Smtp-Source: ABdhPJxvxIvNsm1JFAqKsBRZuZmJ3qDWkvq6GK0i82QVya6OwYocA4vbi1aiTE7jdaPnG0jVMyxHRg== X-Received: by 2002:a05:600c:4ec9:: with SMTP id g9mr3821136wmq.173.1621324724424; Tue, 18 May 2021 00:58:44 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:90c:e290:842:2d82:a1ae:1a91]) by smtp.gmail.com with ESMTPSA id v16sm735448wml.6.2021.05.18.00.58.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 00:58:43 -0700 (PDT) From: Neil Armstrong To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong , Kevin Hilman Subject: [PATCH 2/3] tty: serial: meson: retrieve port FIFO size from DT Date: Tue, 18 May 2021 09:58:32 +0200 Message-Id: <20210518075833.3736038-3-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210518075833.3736038-1-narmstrong@baylibre.com> References: <20210518075833.3736038-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_005846_268736_B0E6A0B0 X-CRM114-Status: GOOD ( 16.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now the DT bindings has a property to get the FIFO size for a particular port, retrieve it and use to setup the FIFO interrupts threshold. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman --- drivers/tty/serial/meson_uart.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index 529cd0289056..10bb29202e43 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -715,6 +715,7 @@ static int meson_uart_probe(struct platform_device *pdev) { struct resource *res_mem, *res_irq; struct uart_port *port; + u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */ int ret = 0; int id = -1; @@ -741,6 +742,8 @@ static int meson_uart_probe(struct platform_device *pdev) if (!res_irq) return -ENODEV; + of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize); + if (meson_ports[pdev->id]) { dev_err(&pdev->dev, "port %d already allocated\n", pdev->id); return -EBUSY; @@ -770,7 +773,7 @@ static int meson_uart_probe(struct platform_device *pdev) port->type = PORT_MESON; port->x_char = 0; port->ops = &meson_uart_ops; - port->fifosize = 64; + port->fifosize = fifosize; meson_ports[pdev->id] = port; platform_set_drvdata(pdev, port);