From nobody Thu Oct 05 15:35:13 2023 X-Original-To: dev-commits-src-all@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 4S1bGp5vfkz4vnP1; Thu, 5 Oct 2023 15:35:14 +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 4S1bGp1ny0z4dqr; Thu, 5 Oct 2023 15:35:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520114; 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=V6ih19D3QBtOVksL6MXu3NjhtpNj/4MjAsVgDMf2WY0=; b=K1Q7fFSFpOfrZyxE+bXMErhG5CyY8Tzob7eoO5WwJjzn6oYoOl19gQ7PM/c8nG1lxgc5Vf 0YNCfxQSjSN61Q0hXr8IGAf6AyyBuzs9E5I1giy8B1jjk4B8dQIQ60JNTPb53sTQRDEkGa /hUbFeJtZJjyijCYJUGleKDXDVlhg3wQkPeOhCjTir7Am1xglUFKUjArD/5WbhIDz6uwiy wjmBJohmgiUrdHA2faCLCQc1jZFw37nt6j6tb8ZWYaE9KU8IzcHZ6WnOT9tGOB4+HBoWWa Parlue+yHsZ8orkz/iKS3KcbFfvR8hvzUY6o9RhNOPilnaqJbrYULZGmqFkdvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696520114; a=rsa-sha256; cv=none; b=TI0vFP4VVALXRVHseKAs8gFDzdFhZK+YtM+3csBPDOq222q9bP2p/mBytVHfIiGw1gkpTV 0dpPQU1FaacIcPXUQwpLX3u1cKXnzPCsDjJVf1Ij9Kl4GeaDy36b7AYfeP/4gIOfDzezF9 mPaxXbZTQeJ/WYd1lM/7GcakJ4SQqHN2hSFoRj5LqZYDy0w/kE4PLjKgCo+htZCAtfezvK EssP+EzwTt8YUyKAQ5uxhVxR9hdw6F85pOtao96f5g5MBVp+2fuNrQKHFRLMrdhJNqTijo M83gINgjqBTzPr9DsQI07WDSwoWm0MbuD2UO6THqJnEGTKKHtBGB15R9joOh0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696520114; 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=V6ih19D3QBtOVksL6MXu3NjhtpNj/4MjAsVgDMf2WY0=; b=ZeqdNsdboRU3sDFCe0tTtbezMgf2b1BMSwipJwxz/bippzs0c+11gN2NRxxl8Fo9FmLDCj j4Gwt++cCjQCqnuOU7KVIdtElDvVrT7ZIxB6J043lhRzNf5WdTXWLrvGLYlXNy5hL/NT+O MM5M/5VAoAanXrXNm9JbqDAXTX8JsBdJ3Ng4SEuNKBbs+XknYTE6gq0jQrp5KmxIE/QSYO bFHXc0ppn0iv9bfddg3m2R376z3Snoeb75CmRD4h7G4mvRD6EVY/yevRM//nCJQw5S/WKI 5Pj02fiLYqRYryQu9NvaPTJq4BlvLOO/90RmhO4GvXJnGGI6JDrs/DkT5m7PNw== 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 4S1bGp0rbyz1QJl; Thu, 5 Oct 2023 15:35:14 +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 395FZDMh013042; Thu, 5 Oct 2023 15:35:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 395FZDRH013039; Thu, 5 Oct 2023 15:35:13 GMT (envelope-from git) Date: Thu, 5 Oct 2023 15:35:13 GMT Message-Id: <202310051535.395FZDRH013039@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: cef444d068ff - main - dwc: Move BUS_MODE_DEFAULT_PBL; in if_dwcvar.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cef444d068ff95e51d2b1c60a60cde632764c7b3 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=cef444d068ff95e51d2b1c60a60cde632764c7b3 commit cef444d068ff95e51d2b1c60a60cde632764c7b3 Author: Emmanuel Vadot AuthorDate: 2023-10-04 18:21:24 +0000 Commit: Emmanuel Vadot CommitDate: 2023-10-05 15:34:40 +0000 dwc: Move BUS_MODE_DEFAULT_PBL; in if_dwcvar.h And rename it to DMA_DEFAULT_PBL, this is the default for all (most ?) dma engine that dwc should support. While here stop including dwc1000_reg.h in if_dwc.c, we don't need it anymore. No functional changes intended. --- sys/dev/dwc/dwc1000_reg.h | 1 - sys/dev/dwc/if_dwc.c | 3 +-- sys/dev/dwc/if_dwcvar.h | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/dwc/dwc1000_reg.h b/sys/dev/dwc/dwc1000_reg.h index 40ba8156ea5d..768da530bf7c 100644 --- a/sys/dev/dwc/dwc1000_reg.h +++ b/sys/dev/dwc/dwc1000_reg.h @@ -226,7 +226,6 @@ #define BUS_MODE_PRIORXTX_11 0 #define BUS_MODE_PBL_SHIFT 8 /* Single block transfer size */ #define BUS_MODE_SWR (1 << 0) /* Reset */ -#define BUS_MODE_DEFAULT_PBL 8 #define TRANSMIT_POLL_DEMAND 0x1004 #define RECEIVE_POLL_DEMAND 0x1008 #define RX_DESCR_LIST_ADDR 0x100C diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 58e4d3cd5a6b..9e17d67d434d 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -70,7 +70,6 @@ #include #include -#include #include #include @@ -524,7 +523,7 @@ dwc_attach(device_t dev) } if (OF_getencprop(sc->node, "snps,pbl", &pbl, sizeof(uint32_t)) <= 0) - pbl = BUS_MODE_DEFAULT_PBL; + pbl = DMA_DEFAULT_PBL; if (OF_getencprop(sc->node, "snps,txpbl", &sc->txpbl, sizeof(uint32_t)) <= 0) sc->txpbl = pbl; if (OF_getencprop(sc->node, "snps,rxpbl", &sc->rxpbl, sizeof(uint32_t)) <= 0) diff --git a/sys/dev/dwc/if_dwcvar.h b/sys/dev/dwc/if_dwcvar.h index 2481b5c220bf..ca0a91d6bf12 100644 --- a/sys/dev/dwc/if_dwcvar.h +++ b/sys/dev/dwc/if_dwcvar.h @@ -48,6 +48,8 @@ #define TX_DESC_SIZE (sizeof(struct dwc_hwdesc) * TX_DESC_COUNT) #define TX_MAP_MAX_SEGS 32 +#define DMA_DEFAULT_PBL 8 + struct dwc_bufmap { bus_dmamap_t map; struct mbuf *mbuf;