sdhc_acpi.c (63a8bc5d) | sdhc_acpi.c (c6293583) |
---|---|
1/* $OpenBSD: sdhc_acpi.c,v 1.7 2016/04/26 19:10:10 kettenis Exp $ */ | 1/* $OpenBSD: sdhc_acpi.c,v 1.8 2016/04/30 11:32:23 kettenis Exp $ */ |
2/* 3 * Copyright (c) 2016 Mark Kettenis 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 14 unchanged lines hidden (view full) --- 24#include <dev/acpi/acpidev.h> 25#include <dev/acpi/amltypes.h> 26#include <dev/acpi/dsdt.h> 27#undef DEVNAME 28#include <dev/sdmmc/sdhcreg.h> 29#include <dev/sdmmc/sdhcvar.h> 30#include <dev/sdmmc/sdmmcvar.h> 31 | 2/* 3 * Copyright (c) 2016 Mark Kettenis 4 * 5 * Permission to use, copy, modify, and distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 14 unchanged lines hidden (view full) --- 24#include <dev/acpi/acpidev.h> 25#include <dev/acpi/amltypes.h> 26#include <dev/acpi/dsdt.h> 27#undef DEVNAME 28#include <dev/sdmmc/sdhcreg.h> 29#include <dev/sdmmc/sdhcvar.h> 30#include <dev/sdmmc/sdmmcvar.h> 31 |
32extern struct bus_dma_tag pci_bus_dma_tag; 33 |
|
32struct sdhc_acpi_softc { 33 struct sdhc_softc sc; 34 struct acpi_softc *sc_acpi; 35 struct aml_node *sc_node; 36 37 bus_space_tag_t sc_memt; 38 bus_space_handle_t sc_memh; 39 bus_addr_t sc_addr; --- 89 unchanged lines hidden (view full) --- 129 130 gpio->intr_establish(gpio->cookie, sc->sc_gpio_int_pin, 131 sc->sc_gpio_int_flags, sdhc_acpi_card_detect_intr, sc); 132 } 133 134 printf("\n"); 135 136 sc->sc.sc_host = &sc->sc_host; | 34struct sdhc_acpi_softc { 35 struct sdhc_softc sc; 36 struct acpi_softc *sc_acpi; 37 struct aml_node *sc_node; 38 39 bus_space_tag_t sc_memt; 40 bus_space_handle_t sc_memh; 41 bus_addr_t sc_addr; --- 89 unchanged lines hidden (view full) --- 131 132 gpio->intr_establish(gpio->cookie, sc->sc_gpio_int_pin, 133 sc->sc_gpio_int_flags, sdhc_acpi_card_detect_intr, sc); 134 } 135 136 printf("\n"); 137 138 sc->sc.sc_host = &sc->sc_host; |
137 sdhc_host_found(&sc->sc, sc->sc_memt, sc->sc_memh, sc->sc_size, 0, 0); | 139 sc->sc.sc_dmat = &pci_bus_dma_tag; 140 sdhc_host_found(&sc->sc, sc->sc_memt, sc->sc_memh, sc->sc_size, 1, 0); |
138} 139 140int 141sdhc_acpi_parse_resources(union acpi_resource *crs, void *arg) 142{ 143 struct sdhc_acpi_softc *sc = arg; 144 int type = AML_CRSTYPE(crs); 145 struct aml_node *node; --- 48 unchanged lines hidden --- | 141} 142 143int 144sdhc_acpi_parse_resources(union acpi_resource *crs, void *arg) 145{ 146 struct sdhc_acpi_softc *sc = arg; 147 int type = AML_CRSTYPE(crs); 148 struct aml_node *node; --- 48 unchanged lines hidden --- |