2 * Copyright (C) 2015, Google, Inc
3 * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
5 * SPDX-License-Identifier: GPL-2.0+
14 int pci_mmc_init(const char *name, struct pci_device_id *mmc_supported,
17 struct sdhci_host *mmc_host;
23 for (i = 0; i < num_ids; i++) {
24 devbusfn = pci_find_devices(mmc_supported, i);
28 mmc_host = malloc(sizeof(struct sdhci_host));
32 mmc_host->name = (char *)name;
33 pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, &iobase);
34 mmc_host->ioaddr = (void *)iobase;
36 ret = add_sdhci(mmc_host, 0, 0);