diff options
author | Shelley Chen <shchen@google.com> | 2023-01-30 14:46:38 -0800 |
---|---|---|
committer | Shelley Chen <shchen@google.com> | 2023-02-08 16:59:28 +0000 |
commit | 8c692d7dfaede453d8c974819c3f3bec67b24e55 (patch) | |
tree | 6ae39906a9978eeab260dc4e1c19ee3b8b97b708 /src/commonlib/include | |
parent | 3ecf377e305e1a026ddfa66adf800a28993f4075 (diff) |
commonlib/storage: Add attach callback to sdhci_ctrlr
Adding a attach callback function pointer in case a platform needs
to execute anything before the standard initialization of the sdhci
mem controller.
BUG=b:254092907
BRANCH=None
TEST=emerge-herobrine coreboot
Change-Id: I0f37ec09d083922cad5ecd3c47b184cf3311fe2d
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Diffstat (limited to 'src/commonlib/include')
-rw-r--r-- | src/commonlib/include/commonlib/sdhci.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/commonlib/include/commonlib/sdhci.h b/src/commonlib/include/commonlib/sdhci.h index f9a47b3832..e261c94932 100644 --- a/src/commonlib/include/commonlib/sdhci.h +++ b/src/commonlib/include/commonlib/sdhci.h @@ -46,6 +46,12 @@ struct sdhci_ctrlr { /* Number of ADMA descriptors currently in the array. */ int adma_desc_count; + + /* + * Point to function to run before running initialization. + * This would include anything non-standard. + */ + int (*attach)(struct sdhci_ctrlr *ctrlr); }; int add_sdhci(struct sdhci_ctrlr *sdhci_ctrlr); @@ -57,6 +63,7 @@ void sdhci_display_setup(struct sdhci_ctrlr *sdhci_ctrlr); struct sd_mmc_ctrlr *new_pci_sdhci_controller(uint32_t dev); /* Add SDHCI controller with memory address */ -struct sd_mmc_ctrlr *new_mem_sdhci_controller(void *ioaddr); +struct sd_mmc_ctrlr *new_mem_sdhci_controller(void *ioaddr, + int (*pre_init_func)(struct sdhci_ctrlr *host)); #endif /* __COMMONLIB_SDHCI_H__ */ |