From owner-svn-src-stable-11@freebsd.org Mon Jan 20 18:54:20 2020 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E655B22348C; Mon, 20 Jan 2020 18:54:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 481gnS22Hdz4qlR; Mon, 20 Jan 2020 18:54:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 40DB01C3; Mon, 20 Jan 2020 18:54:20 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00KIsK7N048221; Mon, 20 Jan 2020 18:54:20 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00KIsJoo048219; Mon, 20 Jan 2020 18:54:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <202001201854.00KIsJoo048219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 20 Jan 2020 18:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r356923 - stable/11/sys/dev/uart X-SVN-Group: stable-11 X-SVN-Commit-Author: loos X-SVN-Commit-Paths: stable/11/sys/dev/uart X-SVN-Commit-Revision: 356923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2020 18:54:21 -0000 Author: loos Date: Mon Jan 20 18:54:19 2020 New Revision: 356923 URL: https://svnweb.freebsd.org/changeset/base/356923 Log: MFC r336623 by mmacy: Fixes the interrupt storm in UART during the boot on ARMADA38X. The missing attribution of ns8250->busy_detect breaks the UART support. Original commit log: Add busy detect quirk to list of console options This change allows one to set the busy_detect flag required by the synopsys UART at the loader prompt. This is needed by the EPYC 3000 SoC. This will give users a working console up to the point where getty is required: hw.uart.console="mm:0xfedc9000,rs:2,bd:1" Sponsored by: Rubicon Communications, LLC (Netgate) Modified: stable/11/sys/dev/uart/uart_dev_ns8250.c stable/11/sys/dev/uart/uart_subr.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- stable/11/sys/dev/uart/uart_dev_ns8250.c Mon Jan 20 18:43:10 2020 (r356922) +++ stable/11/sys/dev/uart/uart_dev_ns8250.c Mon Jan 20 18:54:19 2020 (r356923) @@ -479,6 +479,7 @@ ns8250_bus_attach(struct uart_softc *sc) bas = &sc->sc_bas; + ns8250->busy_detect = bas->busy_detect; ns8250->mcr = uart_getreg(bas, REG_MCR); ns8250->fcr = FCR_ENABLE; if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", Modified: stable/11/sys/dev/uart/uart_subr.c ============================================================================== --- stable/11/sys/dev/uart/uart_subr.c Mon Jan 20 18:43:10 2020 (r356922) +++ stable/11/sys/dev/uart/uart_subr.c Mon Jan 20 18:54:19 2020 (r356923) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #define UART_TAG_RS 7 #define UART_TAG_SB 8 #define UART_TAG_XO 9 +#define UART_TAG_BD 10 static struct uart_class *uart_classes[] = { &uart_ns8250_class, @@ -122,6 +123,10 @@ uart_parse_tag(const char **p) { int tag; + if ((*p)[0] == 'b' && (*p)[1] == 'd') { + tag = UART_TAG_BD; + goto out; + } if ((*p)[0] == 'b' && (*p)[1] == 'r') { tag = UART_TAG_BR; goto out; @@ -177,6 +182,7 @@ out: * separated by commas. Each attribute is a tag-value pair with the tag and * value separated by a colon. Supported tags are: * + * bd = Busy Detect * br = Baudrate * ch = Channel * db = Data bits @@ -240,6 +246,9 @@ uart_getenv(int devtype, struct uart_devinfo *di, stru spec = cp; for (;;) { switch (uart_parse_tag(&spec)) { + case UART_TAG_BD: + di->bas.busy_detect = uart_parse_long(&spec); + break; case UART_TAG_BR: di->baudrate = uart_parse_long(&spec); break;