From nobody Wed Nov 08 08:06:04 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SQHhr2kXKz50R1j; Wed, 8 Nov 2023 08:06:04 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SQHhr2Frcz4Pys; Wed, 8 Nov 2023 08:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699430764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kpUHEelAsAYAa8LFMDFMnqHtAUkuI3z9/4mx9VcTxGw=; b=i42pGPY0WGW/QpLSdXAqKxScxi/vZf3b0c1lF/4paIzV/NfmGQIRBiWRkxkm2Jegi+PsSU S9JyhGQPTdOoq6SSyPMBrnoX3RHVTG5P7iT7G+/mysFH6g9fp/OX6RHNaccGwL1XOU3YD5 KeL/k/0tYZVzgUKcXbFF/8Dg8lpnvo55CBnLPjlIKcBQgpb2LaPladi0RcoUrQFwkwBpUd yf/XAoXydk9fLlIveMz0Zf2epQ541iGBSeHCqgrYK3V4Mm70B/mPIauIfdNE9SCZ45O1ef vcYCpTDvTX7zILL7+dCxZG1XzvQWZtqF0rqp9cj3hY6NZcnVlQmjXOmDvbeG0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699430764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kpUHEelAsAYAa8LFMDFMnqHtAUkuI3z9/4mx9VcTxGw=; b=OOyZ/zsyqiF2+Lrlt7C2FFowpd7blhtZwCk9CygKl/ZySxb1tvkrcwRhdD8FTV1gx93vtF wtrlm2ngVmqEKXzbgQrCv0Ail5CzARGsEWCtxRjK9IKqSFrKN7u+ZWYu5UZrJ6MrTbECso xn4RP2wUfHsEgqssmIbweQseleZFOesep8MPRJm8vRU7Ihs/VONh7irHt1v/r2wlojyiGH ojEWOpjlQ8fOLaE9IpTtx2iPBNq6ACx9VvgoumhoH2lH47i6rC2oRcH+EIm4BSTdoyPPU5 iK3VOCi6OuczZqcBuby3fDEDpbk2wxPVf8P8btStnFKQtM9RUc/IQ5KXKTbSlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699430764; a=rsa-sha256; cv=none; b=wn309UCuGRIBnD8W+AIv5IJMnzCe6VvDzIdhGutw5af4VpClaBVQpN1vCrQnU2vM3XYl9K 4XuYKIQ5r9azrAKpt21KbV+zXZkIwoYN1FXOkNE+6OlBV9xzaRT6alKZxOvnQQtlqavO3e KEk876mGCyPDXQHPcKw7D+ev2mY+LDxGxd3BVEZ5MoqGx7FHkX00TbhPwclqGE090nnoMq aJd0cdB2MyFoFSIaZ3E7RXuQ/bh+65snBIHXd8dvHxP8AWXi1O0iaHB1QHT4lOFONu88XP PdpdA+TJ08UUSTdt2R2Vp8TrKx867SmOMAItN9o4KytR7pad9UmH1q6oI4hYoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SQHhr1JbYz9kS; Wed, 8 Nov 2023 08:06:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3A8864FD007817; Wed, 8 Nov 2023 08:06:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A8864ML007814; Wed, 8 Nov 2023 08:06:04 GMT (envelope-from git) Date: Wed, 8 Nov 2023 08:06:04 GMT Message-Id: <202311080806.3A8864ML007814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: f25b0d6dd75d - main - UART: Remove ingenic xburst (mips) code from ns8250 driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f25b0d6dd75d41cbb27d1cc40bb53185672281e0 Auto-Submitted: auto-generated The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=f25b0d6dd75d41cbb27d1cc40bb53185672281e0 commit f25b0d6dd75d41cbb27d1cc40bb53185672281e0 Author: Oskar Holmlund AuthorDate: 2023-11-08 08:03:55 +0000 Commit: Oskar Holmlund CommitDate: 2023-11-08 08:03:55 +0000 UART: Remove ingenic xburst (mips) code from ns8250 driver Since ingenic JZ4780 SOC support has been removed there is no need to support ingenic quirks in the UART driver. Invert of commit b192bae67ea835b7e431225bad375b5d5fe4297f Reviewed by: imp, manu Approved by: imp, manu (mentor) Differential Revision: https://reviews.freebsd.org/D42497 --- sys/dev/ic/ns16550.h | 3 --- sys/dev/uart/uart_dev_ns8250.c | 43 ++++++------------------------------------ 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/sys/dev/ic/ns16550.h b/sys/dev/ic/ns16550.h index 76a680a410b9..290a55ca7346 100644 --- a/sys/dev/ic/ns16550.h +++ b/sys/dev/ic/ns16550.h @@ -162,9 +162,6 @@ #define FIFO_XMT_RST FCR_XMT_RST #define FCR_DMA 0x08 #define FIFO_DMA_MODE FCR_DMA -#ifdef CPU_XBURST -#define FCR_UART_ON 0x10 -#endif #define FCR_RX_LOW 0x00 #define FIFO_RX_LOW FCR_RX_LOW #define FCR_RX_MEDL 0x40 diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 3787c6ed4c9b..96062fe759d3 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -233,9 +233,6 @@ ns8250_flush(struct uart_bas *bas, int what) int drain = 0; fcr = FCR_ENABLE; -#ifdef CPU_XBURST - fcr |= FCR_UART_ON; -#endif if (what & UART_FLUSH_TRANSMITTER) fcr |= FCR_XMT_RST; if (what & UART_FLUSH_RECEIVER) @@ -327,10 +324,6 @@ ns8250_probe(struct uart_bas *bas) { u_char val; -#ifdef CPU_XBURST - uart_setreg(bas, REG_FCR, FCR_UART_ON); -#endif - /* Check known 0 bits that don't depend on DLAB. */ val = uart_getreg(bas, REG_IIR); if (val & 0x30) @@ -352,7 +345,7 @@ static void ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { - u_char ier, val; + u_char ier; if (bas->rclk == 0) bas->rclk = DEFAULT_RCLK; @@ -369,11 +362,7 @@ ns8250_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, uart_barrier(bas); /* Disable the FIFO (if present). */ - val = 0; -#ifdef CPU_XBURST - val |= FCR_UART_ON; -#endif - uart_setreg(bas, REG_FCR, val); + uart_setreg(bas, REG_FCR, 0); uart_barrier(bas); /* Set RTS & DTR. */ @@ -552,9 +541,6 @@ ns8250_bus_attach(struct uart_softc *sc) ns8250->busy_detect = bas->busy_detect; ns8250->mcr = uart_getreg(bas, REG_MCR); ns8250->fcr = FCR_ENABLE; -#ifdef CPU_XBURST - ns8250->fcr |= FCR_UART_ON; -#endif if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", &ivar)) { if (UART_FLAGS_FCR_RX_LOW(ivar)) @@ -847,7 +833,6 @@ ns8250_bus_probe(struct uart_softc *sc) struct uart_bas *bas; int count, delay, error, limit; uint8_t lsr, mcr, ier; - uint8_t val; bas = &sc->sc_bas; @@ -880,11 +865,7 @@ ns8250_bus_probe(struct uart_softc *sc) * done. Since this is the first time we enable the FIFOs, we reset * them. */ - val = FCR_ENABLE; -#ifdef CPU_XBURST - val |= FCR_UART_ON; -#endif - uart_setreg(bas, REG_FCR, val); + uart_setreg(bas, REG_FCR, FCR_ENABLE); uart_barrier(bas); if (!(uart_getreg(bas, REG_IIR) & IIR_FIFO_MASK)) { /* @@ -898,11 +879,7 @@ ns8250_bus_probe(struct uart_softc *sc) return (0); } - val = FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST; -#ifdef CPU_XBURST - val |= FCR_UART_ON; -#endif - uart_setreg(bas, REG_FCR, val); + uart_setreg(bas, REG_FCR, FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST); uart_barrier(bas); count = 0; @@ -912,11 +889,7 @@ ns8250_bus_probe(struct uart_softc *sc) error = ns8250_drain(bas, UART_DRAIN_RECEIVER|UART_DRAIN_TRANSMITTER); if (error) { uart_setreg(bas, REG_MCR, mcr); - val = 0; -#ifdef CPU_XBURST - val |= FCR_UART_ON; -#endif - uart_setreg(bas, REG_FCR, val); + uart_setreg(bas, REG_FCR, 0); uart_barrier(bas); goto describe; } @@ -947,11 +920,7 @@ ns8250_bus_probe(struct uart_softc *sc) ier = uart_getreg(bas, REG_IER) & 0xe0; uart_setreg(bas, REG_IER, ier); uart_setreg(bas, REG_MCR, mcr); - val = 0; -#ifdef CPU_XBURST - val |= FCR_UART_ON; -#endif - uart_setreg(bas, REG_FCR, val); + uart_setreg(bas, REG_FCR, 0); uart_barrier(bas); count = 0; goto describe;