/* SPDX-License-Identifier: GPL-2.0-only */ #include #include #include #include #include #include #include #include int qc_emmc_early_init(void) { struct sd_mmc_ctrlr *ctrlr; struct storage_media media = {0}; ctrlr = new_sdhci_msm_host((void *)(uintptr_t)SDC1_HC_BASE); if (ctrlr == NULL) return -1; media.ctrlr = ctrlr; SET_BUS_WIDTH(ctrlr, 1); SET_CLOCK(ctrlr, 384 * 1000); /* Send CMD1 */ return mmc_send_cmd1(&media); }