summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpi/sdhc_acpi.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2016-04-30 11:32:23 +0000
committerkettenis <kettenis@openbsd.org>2016-04-30 11:32:23 +0000
commitc629358393c8a795b47887f55d8060b3a5e61ce6 (patch)
treef5deb0b094fbb351361d01f3a60dcf9acfae3d9e /sys/dev/acpi/sdhc_acpi.c
parenttweak previous; (diff)
downloadwireguard-openbsd-c629358393c8a795b47887f55d8060b3a5e61ce6.tar.xz
wireguard-openbsd-c629358393c8a795b47887f55d8060b3a5e61ce6.zip
Implement DMA support. Bits and pieces taken from NetBSD, but we only
support ADMA2. The older SDMA mode has too many limitations to be really usable. Gives us only moderate speed improvements, bus reduces the CPU load considerably. We will reap the full benefits once we implement wider bus widths and high speed modes. There is a remining issue with simultanious use of eMMC and external SD card on (some) Intel Bay Trail hardware. Still under investigation. ok patrick@, stsp@, deraadt@
Diffstat (limited to 'sys/dev/acpi/sdhc_acpi.c')
-rw-r--r--sys/dev/acpi/sdhc_acpi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/acpi/sdhc_acpi.c b/sys/dev/acpi/sdhc_acpi.c
index 421c73fd716..f141cd628fd 100644
--- a/sys/dev/acpi/sdhc_acpi.c
+++ b/sys/dev/acpi/sdhc_acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc_acpi.c,v 1.7 2016/04/26 19:10:10 kettenis Exp $ */
+/* $OpenBSD: sdhc_acpi.c,v 1.8 2016/04/30 11:32:23 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
@@ -29,6 +29,8 @@
#include <dev/sdmmc/sdhcvar.h>
#include <dev/sdmmc/sdmmcvar.h>
+extern struct bus_dma_tag pci_bus_dma_tag;
+
struct sdhc_acpi_softc {
struct sdhc_softc sc;
struct acpi_softc *sc_acpi;
@@ -134,7 +136,8 @@ sdhc_acpi_attach(struct device *parent, struct device *self, void *aux)
printf("\n");
sc->sc.sc_host = &sc->sc_host;
- sdhc_host_found(&sc->sc, sc->sc_memt, sc->sc_memh, sc->sc_size, 0, 0);
+ sc->sc.sc_dmat = &pci_bus_dma_tag;
+ sdhc_host_found(&sc->sc, sc->sc_memt, sc->sc_memh, sc->sc_size, 1, 0);
}
int