diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-06-26 06:52:59 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2018-06-26 06:52:59 +0000 |
commit | 4e56e8a81bca30de564f45d25f0142ccad9cd74c (patch) | |
tree | 660d0fec30b944b92611cd832a2f10a989e65cca /sys | |
parent | 8e0b53c2e9765fe540ac779f0ab3ac2a3039d2c5 (diff) |
Let acpi(4) pass down the bus dma tag.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 | ||||
-rw-r--r-- | sys/dev/acpi/acpivar.h | 8 | ||||
-rw-r--r-- | sys/dev/acpi/sdhc_acpi.c | 6 |
3 files changed, 8 insertions, 10 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 4b60b233f27..4acdf770548 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.345 2018/06/25 22:33:24 kettenis Exp $ */ +/* $OpenBSD: acpi.c,v 1.346 2018/06/26 06:52:58 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -240,6 +240,7 @@ acpi_attach(struct device *parent, struct device *self, void *aux) sc->sc_iot = ba->ba_iot; sc->sc_memt = ba->ba_memt; + sc->sc_dmat = &pci_bus_dma_tag; acpi_attach_common(sc, ba->ba_acpipbase); } @@ -3006,6 +3007,7 @@ acpi_foundhid(struct aml_node *node, void *arg) memset(&aaa, 0, sizeof(aaa)); aaa.aaa_iot = sc->sc_iot; aaa.aaa_memt = sc->sc_memt; + aaa.aaa_dmat = sc->sc_dmat; aaa.aaa_node = node->parent; aaa.aaa_dev = dev; diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index 451bb10c7f1..8d4ffc47ef0 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.91 2018/06/25 22:33:24 kettenis Exp $ */ +/* $OpenBSD: acpivar.h,v 1.92 2018/06/26 06:52:58 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -57,6 +57,7 @@ struct acpi_attach_args { char *aaa_name; bus_space_tag_t aaa_iot; bus_space_tag_t aaa_memt; + bus_dma_tag_t aaa_dmat; void *aaa_table; struct aml_node *aaa_node; const char *aaa_dev; @@ -204,10 +205,7 @@ struct acpi_softc { bus_space_tag_t sc_iot; bus_space_tag_t sc_memt; -#if 0 - bus_space_tag_t sc_pcit; - bus_space_tag_t sc_smbust; -#endif + bus_dma_tag_t sc_dmat; /* * First-level ACPI tables diff --git a/sys/dev/acpi/sdhc_acpi.c b/sys/dev/acpi/sdhc_acpi.c index d11355780e3..92445cc4716 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.11 2018/05/22 21:17:13 kettenis Exp $ */ +/* $OpenBSD: sdhc_acpi.c,v 1.12 2018/06/26 06:52:58 kettenis Exp $ */ /* * Copyright (c) 2016 Mark Kettenis * @@ -29,8 +29,6 @@ #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; @@ -142,7 +140,7 @@ sdhc_acpi_attach(struct device *parent, struct device *self, void *aux) sdhc_acpi_explore(sc); sc->sc.sc_host = &sc->sc_host; - sc->sc.sc_dmat = &pci_bus_dma_tag; + sc->sc.sc_dmat = aaa->aaa_dmat; sdhc_host_found(&sc->sc, sc->sc_memt, sc->sc_memh, sc->sc_size, 1, 0); } |