git: cef444d068ff - main - dwc: Move BUS_MODE_DEFAULT_PBL; in if_dwcvar.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 05 Oct 2023 15:35:13 UTC
The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=cef444d068ff95e51d2b1c60a60cde632764c7b3 commit cef444d068ff95e51d2b1c60a60cde632764c7b3 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2023-10-04 18:21:24 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> 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 <dev/mii/mii_fdt.h> #include <dev/dwc/if_dwcvar.h> -#include <dev/dwc/dwc1000_reg.h> #include <dev/dwc/dwc1000_core.h> #include <dev/dwc/dwc1000_dma.h> @@ -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;