-/* $OpenBSD: dwmshc.c,v 1.3 2023/04/19 01:41:12 dlg Exp $ */
+/* $OpenBSD: dwmshc.c,v 1.4 2023/04/19 02:01:02 dlg Exp $ */
/*
* Copyright (c) 2023 David Gwynne <dlg@openbsd.org>
sdhc->sc_host = &sc->sc_host;
sdhc->sc_dmat = faa->fa_dmat;
+ sdhc->sc_dma_boundary = 128 * 1024 * 1024;
sdhc->sc_bus_clock_pre = dwmshc_clock_pre;
sdhc->sc_bus_clock_post = dwmshc_clock_post;
-/* $OpenBSD: sdhc.c,v 1.74 2023/04/11 00:45:09 jsg Exp $ */
+/* $OpenBSD: sdhc.c,v 1.75 2023/04/19 02:01:02 dlg Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
saa.sch = hp;
saa.caps = SMC_CAPS_4BIT_MODE;
saa.dmat = sc->sc_dmat;
+ saa.dma_boundary = sc->sc_dma_boundary;
if (ISSET(hp->flags, SHF_USE_DMA))
saa.caps |= SMC_CAPS_DMA;
-/* $OpenBSD: sdhcvar.h,v 1.16 2022/01/18 11:36:21 patrick Exp $ */
+/* $OpenBSD: sdhcvar.h,v 1.17 2023/04/19 02:01:02 dlg Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
u_int sc_clkbase;
bus_dma_tag_t sc_dmat;
+ bus_size_t sc_dma_boundary;
void (*sc_bus_clock_pre)(struct sdhc_softc *, int, int);
void (*sc_bus_clock_post)(struct sdhc_softc *, int, int);
-/* $OpenBSD: sdmmc.c,v 1.60 2022/09/03 15:29:43 kettenis Exp $ */
+/* $OpenBSD: sdmmc.c,v 1.61 2023/04/19 02:01:02 dlg Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
if (ISSET(sc->sc_caps, SMC_CAPS_DMA) && sc->sc_dmap == NULL) {
error = bus_dmamap_create(sc->sc_dmat, MAXPHYS, SDMMC_MAXNSEGS,
- sc->sc_max_seg, 0, BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW,
+ sc->sc_max_seg, saa->dma_boundary,
+ BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW,
&sc->sc_dmap);
if (error) {
printf("%s: can't create DMA map\n", DEVNAME(sc));
-/* $OpenBSD: sdmmcchip.h,v 1.14 2020/08/14 14:49:04 kettenis Exp $ */
+/* $OpenBSD: sdmmcchip.h,v 1.15 2023/04/19 02:01:02 dlg Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
int caps;
long max_seg;
long max_xfer;
+ bus_size_t dma_boundary;
void *cookies[SDMMC_MAX_FUNCTIONS];
};