summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2016-04-30 11:32:24 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2016-04-30 11:32:24 +0000
commit8b7825f07a90ab9de5e477caf9c60a0a426d5b66 (patch)
tree850893dd63ff9eeeb3102bbc7eba53e48336513b /sys/dev/acpi
parentecef7a2ce61bca18b808b58acff08fc034626f37 (diff)
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')
-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