sdhci_pci.c (292180) | sdhci_pci.c (296135) |
---|---|
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: head/sys/dev/sdhci/sdhci_pci.c 292180 2015-12-14 01:09:25Z ian $"); | 27__FBSDID("$FreeBSD: head/sys/dev/sdhci/sdhci_pci.c 296135 2016-02-27 03:34:01Z jhibbits $"); |
28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/conf.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> 35#include <sys/module.h> --- 289 unchanged lines hidden (view full) --- 325 return (ENOMEM); 326 } 327 /* Scan all slots. */ 328 for (i = 0; i < slots; i++) { 329 struct sdhci_slot *slot = &sc->slots[sc->num_slots]; 330 331 /* Allocate memory. */ 332 rid = PCIR_BAR(bar + i); | 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/bus.h> 32#include <sys/conf.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> 35#include <sys/module.h> --- 289 unchanged lines hidden (view full) --- 325 return (ENOMEM); 326 } 327 /* Scan all slots. */ 328 for (i = 0; i < slots; i++) { 329 struct sdhci_slot *slot = &sc->slots[sc->num_slots]; 330 331 /* Allocate memory. */ 332 rid = PCIR_BAR(bar + i); |
333 sc->mem_res[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, 334 &rid, 0ul, ~0ul, 0x100, RF_ACTIVE); | 333 sc->mem_res[i] = bus_alloc_resource_any(dev, SYS_RES_MEMORY, 334 &rid, RF_ACTIVE); |
335 if (sc->mem_res[i] == NULL) { 336 device_printf(dev, "Can't allocate memory for slot %d\n", i); 337 continue; 338 } 339 340 slot->quirks = sc->quirks; 341 342 if (sdhci_init_slot(dev, slot, i) != 0) --- 135 unchanged lines hidden --- | 335 if (sc->mem_res[i] == NULL) { 336 device_printf(dev, "Can't allocate memory for slot %d\n", i); 337 continue; 338 } 339 340 slot->quirks = sc->quirks; 341 342 if (sdhci_init_slot(dev, slot, i) != 0) --- 135 unchanged lines hidden --- |