Lines Matching defs:cntlr

446 static bool SdhciCardPlugged(struct MmcCntlr *cntlr)
450 if ((cntlr == NULL) || (cntlr->priv == NULL)) {
454 if (cntlr->devType == MMC_DEV_SDIO || cntlr->devType == MMC_DEV_EMMC) {
458 host = (struct SdhciHost *)cntlr->priv;
541 static int32_t SdhciDoRequest(struct MmcCntlr *cntlr, struct MmcCmd *cmd)
543 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
888 static int32_t SdhciSetClock(struct MmcCntlr *cntlr, uint32_t clock)
890 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
920 if (cntlr->caps.bits.nonremovable == 0) {
1019 static int32_t SdhciSetPowerMode(struct MmcCntlr *cntlr, enum MmcPowerMode mode)
1021 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1046 static int32_t SdhciSetBusWidth(struct MmcCntlr *cntlr, enum MmcBusWidth width)
1048 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1095 static int32_t SdhciSetBusTiming(struct MmcCntlr *cntlr, enum MmcBusTiming timing)
1097 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1123 (void)SdhciSetClock(cntlr, host->clock);
1133 (void)SdhciSetClock(cntlr, host->clock);
1137 static int32_t SdhciSetSdioIrq(struct MmcCntlr *cntlr, bool enable)
1139 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1158 static int32_t SdhciHardwareReset(struct MmcCntlr *cntlr)
1160 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1170 static int32_t SdhciSystemInit(struct MmcCntlr *cntlr)
1174 if (cntlr == NULL) {
1178 host = (struct SdhciHost *)cntlr->priv;
1184 static int32_t SdhciSetEnhanceStrobe(struct MmcCntlr *cntlr, bool enable)
1186 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1207 static int32_t SdhciSwitchVoltage(struct MmcCntlr *cntlr, enum MmcVolt volt)
1210 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1212 if (cntlr->devType == MMC_DEV_EMMC) {
1230 static bool SdhciDevReadOnly(struct MmcCntlr *cntlr)
1234 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1249 static bool SdhciDevBusy(struct MmcCntlr *cntlr)
1251 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1438 static int32_t SdhciTune(struct MmcCntlr *cntlr, uint32_t cmdCode)
1440 struct SdhciHost *host = (struct SdhciHost *)cntlr->priv;
1454 err = MmcSendTuning(cntlr, cmdCode, true);
1490 static int32_t SdhciRescanSdioDev(struct MmcCntlr *cntlr)
1494 if ((cntlr == NULL) || (cntlr->priv == NULL)) {
1498 host = (struct SdhciHost *)cntlr->priv;
1503 return MmcCntlrAddSdioRescanMsgToQueue(cntlr);
1526 struct MmcCntlr *cntlr = NULL;
1532 cntlr = host->mmc;
1533 if (cntlr != NULL) {
1534 if (cntlr->curDev != NULL) {
1535 MmcDeviceRemove(cntlr->curDev);
1536 OsalMemFree(cntlr->curDev);
1537 cntlr->curDev = NULL;
1539 MmcCntlrRemove(cntlr);
1540 cntlr->hdfDevObj = NULL;
1541 cntlr->priv = NULL;
1542 cntlr->ops = NULL;
1543 OsalMemFree(cntlr);
1967 static int32_t SdhciHostInit(struct SdhciHost *host, struct MmcCntlr *cntlr)
1973 host->hostId = (uint32_t)cntlr->index;
2016 struct MmcCntlr *cntlr = NULL;
2024 cntlr = (struct MmcCntlr *)OsalMemCalloc(sizeof(struct MmcCntlr));
2025 if (cntlr == NULL) {
2032 OsalMemFree(cntlr);
2036 host->mmc = cntlr;
2037 cntlr->priv = (void *)host;
2038 cntlr->ops = &g_sdhciHostOps;
2039 cntlr->hdfDevObj = obj;
2040 obj->service = &cntlr->service;
2041 /* init cntlr. */
2042 ret = MmcCntlrParse(cntlr, obj);
2050 ret = SdhciHostInit(host, cntlr);
2054 ret = MmcCntlrAdd(cntlr, true);
2059 (void)MmcCntlrAddDetectMsgToQueue(cntlr);
2085 struct MmcCntlr *cntlr = NULL;
2092 cntlr = (struct MmcCntlr *)obj->service;
2093 if (cntlr == NULL) {
2096 SdhciDeleteHost((struct SdhciHost *)cntlr->priv);