Lines Matching refs:base
54 USDHC_Type *base; member
163 static void imx_usdhc_select_1_8v(USDHC_Type *base, bool enable_1_8v) in imx_usdhc_select_1_8v() argument
167 UDSHC_SelectVoltage(base, enable_1_8v); in imx_usdhc_select_1_8v()
209 uint32_t status = USDHC_GetPresentStatusFlags(cfg->base); in imx_usdhc_error_recovery()
213 USDHC_Reset(cfg->base, kUSDHC_ResetCommand, 100U); in imx_usdhc_error_recovery()
216 (USDHC_GetAdmaErrorStatusFlags(cfg->base) != 0U)) { in imx_usdhc_error_recovery()
218 USDHC_Reset(cfg->base, kUSDHC_DataInhibitFlag, 100U); in imx_usdhc_error_recovery()
239 USDHC_GetCapability(cfg->base, &caps); in imx_usdhc_init_host_props()
268 imx_usdhc_select_1_8v(cfg->base, false); in imx_usdhc_reset()
269 USDHC_EnableDDRMode(cfg->base, false, 0U); in imx_usdhc_reset()
271 USDHC_EnableStandardTuning(cfg->base, 0, 0, false); in imx_usdhc_reset()
272 USDHC_EnableAutoTuning(cfg->base, false); in imx_usdhc_reset()
277 USDHC_EnableHS400Mode(cfg->base, false); in imx_usdhc_reset()
279 USDHC_EnableStrobeDLL(cfg->base, false); in imx_usdhc_reset()
283 return USDHC_Reset(cfg->base, kUSDHC_ResetAll, 1000U) == true ? 0 : -ETIMEDOUT; in imx_usdhc_reset()
317 bus_clk = USDHC_SetSdClock(cfg->base, src_clk_hz, ios->clock); in imx_usdhc_set_io()
331 USDHC_SetDataBusWidth(cfg->base, kUSDHC_DataBusWidth1Bit); in imx_usdhc_set_io()
334 USDHC_SetDataBusWidth(cfg->base, kUSDHC_DataBusWidth4Bit); in imx_usdhc_set_io()
337 USDHC_SetDataBusWidth(cfg->base, kUSDHC_DataBusWidth8Bit); in imx_usdhc_set_io()
350 imx_usdhc_select_1_8v(cfg->base, false); in imx_usdhc_set_io()
364 imx_usdhc_select_1_8v(cfg->base, true); in imx_usdhc_set_io()
368 USDHC_ForceClockOn(cfg->base, true); in imx_usdhc_set_io()
372 USDHC_ForceClockOn(cfg->base, false); in imx_usdhc_set_io()
400 USDHC_EnableDDRMode(cfg->base, true, 0); in imx_usdhc_set_io()
411 USDHC_EnableHS400Mode(cfg->base, true); in imx_usdhc_set_io()
412 USDHC_EnableDDRMode(cfg->base, true, 0U); in imx_usdhc_set_io()
413 USDHC_ConfigStrobeDLL(cfg->base, 7U, 4U); in imx_usdhc_set_io()
414 USDHC_EnableStrobeDLL(cfg->base, true); in imx_usdhc_set_io()
458 error = USDHC_TransferNonBlocking(cfg->base, &dev_data->transfer_handle, in imx_usdhc_transfer()
461 error = USDHC_TransferNonBlocking(cfg->base, &dev_data->transfer_handle, in imx_usdhc_transfer()
521 return (USDHC_GetPresentStatusFlags(cfg->base) in imx_usdhc_card_busy()
566 USDHC_Reset(cfg->base, kUSDHC_ResetTuning, 100U); in imx_usdhc_execute_tuning()
568 USDHC_EnableStandardTuning(cfg->base, IMX_USDHC_STANDARD_TUNING_START, in imx_usdhc_execute_tuning()
570 USDHC_ForceClockOn(cfg->base, true); in imx_usdhc_execute_tuning()
576 USDHC_SetStandardTuningCounter(cfg->base, IMX_USDHC_STANDARD_TUNING_COUNTER); in imx_usdhc_execute_tuning()
578 USDHC_EnableStandardTuning(cfg->base, IMX_USDHC_STANDARD_TUNING_START, in imx_usdhc_execute_tuning()
594 if (USDHC_GetExecuteStdTuningStatus(cfg->base) != 0) { in imx_usdhc_execute_tuning()
598 if ((USDHC_CheckTuningError(cfg->base) != 0U) && retry_tuning) { in imx_usdhc_execute_tuning()
601 USDHC_EnableStandardTuning(cfg->base, in imx_usdhc_execute_tuning()
604 USDHC_SetTuningDelay(cfg->base, in imx_usdhc_execute_tuning()
612 if (USDHC_CheckStdTuningResult(cfg->base) == 0) { in imx_usdhc_execute_tuning()
615 USDHC_ForceClockOn(cfg->base, false); in imx_usdhc_execute_tuning()
618 USDHC_EnableAutoTuning(cfg->base, true); in imx_usdhc_execute_tuning()
639 USDHC_SetCardActive(cfg->base, 0xFFFF); in imx_usdhc_request()
733 USDHC_DisableInterruptSignal(cfg->base, kUSDHC_CommandFlag | in imx_usdhc_request()
735 USDHC_ClearInterruptStatusFlags(cfg->base, kUSDHC_CommandFlag | in imx_usdhc_request()
805 USDHC_CardDetectByData3(cfg->base, true); in imx_usdhc_get_card_present()
808 data->card_present = USDHC_DetectCardInsert(cfg->base); in imx_usdhc_get_card_present()
811 USDHC_CardDetectByData3(cfg->base, false); in imx_usdhc_get_card_present()
818 data->card_present = USDHC_DetectCardInsert(cfg->base); in imx_usdhc_get_card_present()
857 USDHC_DisableInterruptStatus(cfg->base, kUSDHC_CardInterruptFlag); in imx_usdhc_enable_interrupt()
858 USDHC_DisableInterruptSignal(cfg->base, kUSDHC_CardInterruptFlag); in imx_usdhc_enable_interrupt()
866 USDHC_DisableInterruptSignal(cfg->base, kUSDHC_CardInsertionFlag); in imx_usdhc_enable_interrupt()
867 USDHC_DisableInterruptStatus(cfg->base, kUSDHC_CardInsertionFlag); in imx_usdhc_enable_interrupt()
868 USDHC_DisableInterruptSignal(cfg->base, kUSDHC_CardRemovalFlag); in imx_usdhc_enable_interrupt()
869 USDHC_DisableInterruptStatus(cfg->base, kUSDHC_CardRemovalFlag); in imx_usdhc_enable_interrupt()
874 USDHC_EnableInterruptStatus(cfg->base, kUSDHC_CardInterruptFlag); in imx_usdhc_enable_interrupt()
875 USDHC_EnableInterruptSignal(cfg->base, kUSDHC_CardInterruptFlag); in imx_usdhc_enable_interrupt()
887 USDHC_EnableInterruptStatus(cfg->base, in imx_usdhc_enable_interrupt()
889 USDHC_EnableInterruptSignal(cfg->base, in imx_usdhc_enable_interrupt()
903 USDHC_EnableInterruptStatus(cfg->base, in imx_usdhc_enable_interrupt()
905 USDHC_EnableInterruptSignal(cfg->base, in imx_usdhc_enable_interrupt()
922 USDHC_DisableInterruptStatus(cfg->base, kUSDHC_CardInterruptFlag); in imx_usdhc_disable_interrupt()
923 USDHC_DisableInterruptSignal(cfg->base, kUSDHC_CardInterruptFlag); in imx_usdhc_disable_interrupt()
934 USDHC_DisableInterruptStatus(cfg->base, in imx_usdhc_disable_interrupt()
936 USDHC_DisableInterruptSignal(cfg->base, in imx_usdhc_disable_interrupt()
949 USDHC_DisableInterruptStatus(cfg->base, in imx_usdhc_disable_interrupt()
951 USDHC_DisableInterruptSignal(cfg->base, in imx_usdhc_disable_interrupt()
957 if ((USDHC_GetEnabledInterruptStatusFlags(cfg->base) & in imx_usdhc_disable_interrupt()
972 USDHC_TransferHandleIRQ(cfg->base, &data->transfer_handle); in imx_usdhc_isr()
1001 USDHC_TransferCreateHandle(cfg->base, &data->transfer_handle, in imx_usdhc_init()
1010 USDHC_Init(cfg->base, &host_config); in imx_usdhc_init()
1093 .base = (USDHC_Type *) DT_INST_REG_ADDR(n), \