diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2023-09-23 16:56:26 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2023-10-05 15:34:38 +0000 |
commit | b69c49d106325a9ceb06ca0d5b827d1dbcc8a54c (patch) | |
tree | 8f3e4121ce2f2a2fc1f011cab7f4929d4c61b689 | |
parent | f4bb6ea5212b05445e1e7f01d9023714c83344cb (diff) | |
download | src-b69c49d106325a9ceb06ca0d5b827d1dbcc8a54c.tar.gz src-b69c49d106325a9ceb06ca0d5b827d1dbcc8a54c.zip |
dwc: Add support for aal
snps,aal is used to indicate that the DMA engine should
use Address-Aligned Beats.
-rw-r--r-- | sys/dev/dwc/if_dwc.c | 5 | ||||
-rw-r--r-- | sys/dev/dwc/if_dwc.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/dwc/if_dwc.c b/sys/dev/dwc/if_dwc.c index 7acb70457a24..7b9cd936681d 100644 --- a/sys/dev/dwc/if_dwc.c +++ b/sys/dev/dwc/if_dwc.c @@ -1610,6 +1610,7 @@ dwc_attach(device_t dev) bool nopblx8 = false; bool fixed_burst = false; bool mixed_burst = false; + bool aal = false; sc = device_get_softc(dev); sc->dev = dev; @@ -1650,6 +1651,8 @@ dwc_attach(device_t dev) fixed_burst = true; if (OF_hasprop(sc->node, "snps,mixed-burst") == 1) mixed_burst = true; + if (OF_hasprop(sc->node, "snps,aal") == 1) + aal = true; if (IF_DWC_INIT(dev) != 0) return (ENXIO); @@ -1697,6 +1700,8 @@ dwc_attach(device_t dev) reg |= BUS_MODE_FIXEDBURST; if (mixed_burst) reg |= BUS_MODE_MIXEDBURST; + if (aal) + reg |= BUS_MODE_AAL; WRITE4(sc, BUS_MODE, reg); diff --git a/sys/dev/dwc/if_dwc.h b/sys/dev/dwc/if_dwc.h index 113477818e4b..be27b189e4e8 100644 --- a/sys/dev/dwc/if_dwc.h +++ b/sys/dev/dwc/if_dwc.h @@ -220,6 +220,7 @@ /* DMA */ #define BUS_MODE 0x1000 #define BUS_MODE_MIXEDBURST (1 << 26) +#define BUS_MODE_AAL (1 << 25) #define BUS_MODE_EIGHTXPBL (1 << 24) /* Multiplies PBL by 8 */ #define BUS_MODE_USP (1 << 23) #define BUS_MODE_RPBL_SHIFT 17 /* Single block transfer size */ |