From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380162; b=35HlTfH/R8/m8v65CEKIiwRPc9Sjy2BPGLeH2Bp4CpcpUFQiHPpA2fhfNhZS8H9fbLS/ bDv4M1PWalesHoLpZ4ckaxSHbpHnV3M4KLiHjwdQLlsyLvpTQ6k4G1gdqPe4M6iGgyxtO e/kJhDFOMy3mDJLJWPvFW4O5bFUo/lTcZ809ikuzDnGm2DrbUBNqcsUKakrK3esQWOtE0 4jeasUVSWse86tMzPKSVnl/aElQnWC9Ek5qybURKImY+KjJ1CuJoTLo4MVGJvbMFH4tkB PxQNzlg6r1pH3TdHQPpFEBVcqY4gLJPCkJ+NWxEn0TIcj7VsuTVz4PCU2AaVBV3eMdQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380162; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:Date:Subject: MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id: References:In-Reply-To:To:Cc:X-Mailer; bh=b9iM+6Y+Mu0g+e6w972qhOI7cq5MptWMdd6r3zlJgoQ=; b=rlwB/wxhiXUPXH+2xqa1D1/eQYp7yWrjWurOYQeBprKBRxx0RXCEQXi/bEq8IkzdtyKB ZbkJZZzTlKShEZ6gdeFxeAPBXr9yfA1mDziqXfI6XlB20DWTs3TM0R6zPGb9IJC5d+YUW XDtlBv9EqFAvDPcxSaMAWABzVjvzGzH6NEieRQRhPBkBSBzxV8WyeFDoTbRWz9n4FFCpm H5SXGavyW5QTngMlWfwllddZhxlBuUJXxu+g/AvjunEZghPBe5Bz/MSK6mjBWoTYfAn1V 9nlhWZgi+whdRzeAUI35jW1wg7EWpXhYjU/eeGZYjqkNE+NeZZFFI6p1oCA+0pu8u3A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=QyCu6aXH; arc=none smtp.remote-ip=209.85.210.46 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F80360A2639 for ; Fri, 4 Dec 2026 10:29:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4F80360A2639 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=QyCu6aXH Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-862b090e3c3so413818a34.2 for ; Fri, 04 Dec 2026 02:29:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796380161; x=1796984961; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=b9iM+6Y+Mu0g+e6w972qhOI7cq5MptWMdd6r3zlJgoQ=; b=QyCu6aXHclPWh0cNaI5dktER8EsaSLam4RjwDWEw2H5LmCk0tIZPFjlUhMVhRX9Oi/ e3//VvBASKSGBRdXoi+at13ru8e2c7w2YK7v5rWaVNxuN9g3OB5Iei12w9xa/nmsuXbo wPrHYRUUkgbYKjIMHWh5a7aCOqt0sJY0XgzxOFavKM4aK7/uwyEd9TNieIRwixLtFi/+ KGGBQwwQwKaavRfLI+koi0y2anyRp4qP08CtcEuMWdNPSYRkHWDGt1GFgAuO7fXm/g9Y wcXmhM1UZQYxpDWiP/hTwIZMpGKMBuCFJSQlP/jnvXVvXhya08DCcmPyImLuyM3EsSul Y6WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796380161; x=1796984961; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=b9iM+6Y+Mu0g+e6w972qhOI7cq5MptWMdd6r3zlJgoQ=; b=WyQDOHSzCyikjLZd6IqVvtfQNfyjn0zqQ9gLjEk7Na8DkPy5sXgtQwOBe9LqqrmppS LsC4LI9hYn9fHUVntoQ2/fF56+HlD1bPmc6BxPm8FYDlnJb4tGL4a5S4MNTwR41ChDgP G0r0t8/rqQ6l3mwSpa7nUFN4q7TiqZeJ95wREL/gL4HqAx9DRouBmIw7RrNWHzA4OgSs x6SDU18fAM7rNFNNU/XR0DIySah+SAyGYDUWoWqs9pJCFspFXotfnORxbuhX2uvuHCTN zDgP6MYB57Zv66ihUcCr8wAb4RwpUeJkKVavhWIrJ7F+d4/S80XwZxR5TEtvTioITI92 Jf5g== X-Gm-Message-State: APuU4Z+9mA7i3v1bdKmaaUzZxuL36NKWC/FW0w11R1dwWM6OCZIrXw9q DD8I9iq0rJHorlfmqa9hU5ROjprx/yovnyX5ZPN1XEcXflsA4AUAWzWI X-Gm-Gg: AZFdTZc9jNnqDCeiaOsAdLin7thM+/ISw4y7MtxBBlvVuYyK5vW62Z3OCB0r0o5wMCs ClIXk5CdA9dpE9DFspCA8RDqJn2HGG1Rvmx/N8Yefwgi0GjoRaphAQ8PRrL6Zvl0tSHNWhfBR0T 3YKRciq3lmT6BACdmU1poCh++nDuLqka6OpK//cxjY8ShoNb9Eszxokdmj7CjBKXP3I14XA6Pdt YYCCBbuW4+FFqdjg/WdmckTE8vLzIYoBhqb5XQq/WX8S/RG01tukDfmu/yV71KHwKanvyK9wdFD 8NxTAwhlE2JtMTUN5Kk72yzFDreDjCIk3RDi5FuQ6DArKH6iM9BPei2LCNB/fK4aJ4EIZSv2VyL cF1WlBAjLuQLV8SIgORWtAiR1/xwDkxKi+RAH0J03ryJOAkFNGZ+mD5fD7h5/DBmfmZw19r9hc+ 1YrlhY9gQhAJMDRunVFofLb31rbIYP1y/t6fTt2eFTTjE/gXMMNq7I9ge+puZbK04gDSLWvWoCE RA1+N/KoPebyMk7Xf4n74WCAbz+cUYZxb290Dum0k9lqO3luYSXFLt05Iq3Xzm2+PgPuhrlG9hC Qg+w1GLomJty51b8WPL8F6qJMdpMnZD/+0CgIdNKf9IzP0c1RQUQ3Hnzu1eSArH4aCHe5eJAulu oTqpYT6erU3VG5Ks6srnjoZcHxFi5USToYgwgSgLSmUDc07758bUlR0FOXSo21KJ+e8JON3jQjr E8fTQi1fHN1tDrj1YFCrPT7GW2pK5kVQV6yyxePMKF+zwx78fVX0dU1Q== X-Received: by 2002:a05:6820:c608:10b0:71a:fcbf:2472 with SMTP id 006d021491bc7-71bf1ad714dmr894890eaf.13.1796380161514; Fri, 04 Dec 2026 02:29:21 -0800 (PST) Received: from [127.0.1.1] (174-29-20-82.hlrn.qwest.net. [174.29.20.82]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863f81fad14sm1747533a34.9.2026.12.04.02.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 02:29:21 -0800 (PST) From: James Hilliard Date: Fri, 04 Dec 2026 03:28:56 -0700 Subject: [PATCH v10 11/11] serial: 8250_dw: configure RX trigger thresholds for Octeon X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261204-submit-h616-uart-fifo-v1-v10-11-1a9fb4f79635@gmail.com> References: <20261204-submit-h616-uart-fifo-v1-v10-0-1a9fb4f79635@gmail.com> In-Reply-To: <20261204-submit-h616-uart-fifo-v1-v10-0-1a9fb4f79635@gmail.com> To: Andy Shevchenko , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, James Hilliard X-Mailer: b4 0.17-dev Octeon uses the DesignWare receive-trigger mapping with a 64-byte FIFO, giving thresholds of 1, 16, 32 and 62 bytes. Its setup bypasses dw8250_setup_port(), so it does not install the common trigger callbacks. PORT_OCTEON also has no static trigger table, so rx_trig_bytes is not exposed. Supply the fixed depth from platform data when firmware has not provided one and initialize the common trigger table before port registration. This makes rx_trig_bytes available while preserving the Octeon port type and register accessors. Select DMA before filling in the default depth, as before when the 8250 core supplied that default during registration. Thus the new trigger setup preserves which ports attach DMA and their existing burst sizes. Signed-off-by: James Hilliard --- drivers/tty/serial/8250/8250_dw.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 466fafa0bddb..3ca5567a707b 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c @@ -663,6 +663,21 @@ static int dw8250_setup(struct uart_port *p) return dw8250_setup_dma(p); } +static int dw8250_octeon_setup(struct uart_port *p) +{ + struct dw8250_data *data = to_dw8250_data(p->private_data); + int ret; + + /* Preserve DMA selection before supplying the fixed FIFO depth */ + ret = dw8250_setup_dma(p); + if (ret) + return ret; + + p->fifosize = p->fifosize ?: data->pdata->fifo_size; + + return dw8250_setup_rxtrig(p); +} + static int dw8250_sunxi_setup(struct uart_port *p) { struct dw8250_data *data = to_dw8250_data(p->private_data); @@ -934,8 +949,9 @@ static const struct dw8250_platform_data dw8250_a523_data = { static const struct dw8250_platform_data dw8250_octeon_3860_data = { .usr_reg = OCTEON_UART_USR, + .fifo_size = 64, .quirks = DW_UART_QUIRK_OCTEON, - .setup = dw8250_setup_dma, + .setup = dw8250_octeon_setup, }; static const struct dw8250_platform_data dw8250_armada_38x_data = { -- 2.53.0