Deleted Added
full compact
sdhci_pci.c (318494) sdhci_pci.c (318496)
1/*-
2 * Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 10 unchanged lines hidden (view full) ---

19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: stable/11/sys/dev/sdhci/sdhci_pci.c 318494 2017-05-18 20:46:20Z marius $");
27__FBSDID("$FreeBSD: stable/11/sys/dev/sdhci/sdhci_pci.c 318496 2017-05-18 21:00:50Z marius $");
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/bus.h>
32#include <sys/kernel.h>
33#include <sys/lock.h>
34#include <sys/module.h>
35#include <sys/mutex.h>

--- 91 unchanged lines hidden (view full) ---

127 SDHCI_QUIRK_WAIT_WHILE_BUSY |
128 SDHCI_QUIRK_MMC_DDR52 |
129 SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 |
130 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
131 { 0x22968086, 0xffff, "Intel Braswell SDXC Controller",
132 SDHCI_QUIRK_WAIT_WHILE_BUSY |
133 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
134 { 0x5aca8086, 0xffff, "Intel Apollo Lake SDXC Controller",
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/bus.h>
32#include <sys/kernel.h>
33#include <sys/lock.h>
34#include <sys/module.h>
35#include <sys/mutex.h>

--- 91 unchanged lines hidden (view full) ---

127 SDHCI_QUIRK_WAIT_WHILE_BUSY |
128 SDHCI_QUIRK_MMC_DDR52 |
129 SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 |
130 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
131 { 0x22968086, 0xffff, "Intel Braswell SDXC Controller",
132 SDHCI_QUIRK_WAIT_WHILE_BUSY |
133 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
134 { 0x5aca8086, 0xffff, "Intel Apollo Lake SDXC Controller",
135 SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */
135 SDHCI_QUIRK_WAIT_WHILE_BUSY |
136 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
137 { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller",
136 SDHCI_QUIRK_WAIT_WHILE_BUSY |
137 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
138 { 0x5acc8086, 0xffff, "Intel Apollo Lake eMMC 5.0 Controller",
139 SDHCI_QUIRK_BROKEN_DMA | /* APL18 erratum */
138 SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE |
139 SDHCI_QUIRK_INTEL_POWER_UP_RESET |
140 SDHCI_QUIRK_WAIT_WHILE_BUSY |
141 SDHCI_QUIRK_MMC_DDR52 |
142 SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 |
143 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
144 { 0, 0xffff, NULL,
145 0 }

--- 189 unchanged lines hidden (view full) ---

335 (sdhci_devices[i].subvendor == 0xffff ||
336 sdhci_devices[i].subvendor == subvendor)) {
337 sc->quirks = sdhci_devices[i].quirks;
338 break;
339 }
340 }
341 sc->quirks &= ~sdhci_quirk_clear;
342 sc->quirks |= sdhci_quirk_set;
140 SDHCI_QUIRK_ALL_SLOTS_NON_REMOVABLE |
141 SDHCI_QUIRK_INTEL_POWER_UP_RESET |
142 SDHCI_QUIRK_WAIT_WHILE_BUSY |
143 SDHCI_QUIRK_MMC_DDR52 |
144 SDHCI_QUIRK_CAPS_BIT63_FOR_MMC_HS400 |
145 SDHCI_QUIRK_PRESET_VALUE_BROKEN },
146 { 0, 0xffff, NULL,
147 0 }

--- 189 unchanged lines hidden (view full) ---

337 (sdhci_devices[i].subvendor == 0xffff ||
338 sdhci_devices[i].subvendor == subvendor)) {
339 sc->quirks = sdhci_devices[i].quirks;
340 break;
341 }
342 }
343 sc->quirks &= ~sdhci_quirk_clear;
344 sc->quirks |= sdhci_quirk_set;
345
343 /* Some controllers need to be bumped into the right mode. */
344 if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY)
345 sdhci_lower_frequency(dev);
346 /* Read slots info from PCI registers. */
347 slots = pci_read_config(dev, PCI_SLOT_INFO, 1);
348 bar = PCI_SLOT_INFO_FIRST_BAR(slots);
349 slots = PCI_SLOT_INFO_SLOTS(slots);
350 if (slots > 6 || bar > 5) {

--- 168 unchanged lines hidden ---
346 /* Some controllers need to be bumped into the right mode. */
347 if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY)
348 sdhci_lower_frequency(dev);
349 /* Read slots info from PCI registers. */
350 slots = pci_read_config(dev, PCI_SLOT_INFO, 1);
351 bar = PCI_SLOT_INFO_FIRST_BAR(slots);
352 slots = PCI_SLOT_INFO_SLOTS(slots);
353 if (slots > 6 || bar > 5) {

--- 168 unchanged lines hidden ---