summaryrefslogtreecommitdiff
path: root/src/commonlib
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-09-26 22:33:51 +0300
committerPatrick Georgi <pgeorgi@google.com>2019-09-30 11:07:46 +0000
commite088721f715602df84503c960deb562064af5718 (patch)
tree9a18a999885cdbe7f5355bf8cdd73f8d03062162 /src/commonlib
parent1463a2a04d4ffcf7afbb7870502bf65d4ebcdca1 (diff)
downloadcoreboot-e088721f715602df84503c960deb562064af5718.tar.xz
device,drivers/: Drop some __SIMPLE_DEVICE__ use
The simple PCI config accessors are always available under names pci_s_[read|write]_configX. Change-Id: Ic1b67695b7f72e4f1fa29e2d56698276b15024e1 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35669 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/commonlib')
-rw-r--r--src/commonlib/storage/pci_sdhci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/commonlib/storage/pci_sdhci.c b/src/commonlib/storage/pci_sdhci.c
index de248b7720..abc093f777 100644
--- a/src/commonlib/storage/pci_sdhci.c
+++ b/src/commonlib/storage/pci_sdhci.c
@@ -12,10 +12,6 @@
* GNU General Public License for more details.
*/
-#if ENV_RAMSTAGE
-#define __SIMPLE_DEVICE__ 1
-#endif
-
#include <arch/early_variables.h>
#include <commonlib/sdhci.h>
#include <device/pci.h>
@@ -54,11 +50,11 @@ struct sd_mmc_ctrlr *new_mem_sdhci_controller(void *ioaddr)
return car_get_var_ptr(&sdhci_ctrlr.sd_mmc_ctrlr);
}
-struct sd_mmc_ctrlr *new_pci_sdhci_controller(uint32_t dev)
+struct sd_mmc_ctrlr *new_pci_sdhci_controller(pci_devfn_t dev)
{
uint32_t addr;
- addr = pci_read_config32(dev, PCI_BASE_ADDRESS_0);
+ addr = pci_s_read_config32(dev, PCI_BASE_ADDRESS_0);
if (addr == ((uint32_t)~0)) {
sdhc_error("Error: PCI SDHCI not found\n");
return NULL;