diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2019-11-20 22:13:02 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-29 09:23:31 +0000 |
commit | eb501f054390aa21c90d6e0cf7afcd9e31f827d1 (patch) | |
tree | 03163de3cac08d021d9a41987e0f09ee6dcc2ece /src/commonlib | |
parent | 5d709789202e305b058fc34b9a65fbd2f2aac1b6 (diff) |
commonlib/storage/pci_sdhci.c: Drop CAR_GLOBAL_MIGRATION support
Change-Id: Idfbc0cf24000c361c9272fe0f61797de999c9277
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37052
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/commonlib')
-rw-r--r-- | src/commonlib/storage/pci_sdhci.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/commonlib/storage/pci_sdhci.c b/src/commonlib/storage/pci_sdhci.c index abc093f777..380f2db557 100644 --- a/src/commonlib/storage/pci_sdhci.c +++ b/src/commonlib/storage/pci_sdhci.c @@ -12,7 +12,6 @@ * GNU General Public License for more details. */ -#include <arch/early_variables.h> #include <commonlib/sdhci.h> #include <device/pci.h> #include <device/pci_ops.h> @@ -32,22 +31,22 @@ int sdhci_controller_init(struct sdhci_ctrlr *sdhci_ctrlr, void *ioaddr) struct sd_mmc_ctrlr *new_mem_sdhci_controller(void *ioaddr) { - static bool sdhci_init_done CAR_GLOBAL; - static struct sdhci_ctrlr sdhci_ctrlr CAR_GLOBAL; + static bool sdhci_init_done; + static struct sdhci_ctrlr sdhci_ctrlr; - if (car_get_var(sdhci_init_done) == true) { + if (sdhci_init_done == true) { sdhc_error("Error: SDHCI is already initialized.\n"); return NULL; } - if (sdhci_controller_init(car_get_var_ptr(&sdhci_ctrlr), ioaddr)) { + if (sdhci_controller_init(&sdhci_ctrlr, ioaddr)) { sdhc_error("Error: SDHCI initialization failed.\n"); return NULL; } - car_set_var(sdhci_init_done, true); + sdhci_init_done = true; - return car_get_var_ptr(&sdhci_ctrlr.sd_mmc_ctrlr); + return &sdhci_ctrlr.sd_mmc_ctrlr; } struct sd_mmc_ctrlr *new_pci_sdhci_controller(pci_devfn_t dev) |