]>
git.ipfire.org Git - people/ms/u-boot.git/blob - drivers/mmc/pci_mmc.c
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
)
16 struct sdhci_host
*mmc_host
;
24 ret
= pci_find_device_id(mmc_supported
, i
, &dev
);
27 mmc_host
= malloc(sizeof(struct sdhci_host
));
31 mmc_host
->name
= name
;
32 dm_pci_read_config32(dev
, PCI_BASE_ADDRESS_0
, &iobase
);
33 mmc_host
->ioaddr
= (void *)(ulong
)iobase
;
35 mmc_host
->max_clk
= 0;
36 ret
= add_sdhci(mmc_host
, 0, 0);