Lines Matching +full:0 +full:x03c00000
35 #define ESDHC_CTRL_D3CD 0x08
38 #define ESDHC_VENDOR_SPEC 0xc0
42 #define ESDHC_DEBUG_SEL_AND_STATUS_REG 0xc2
43 #define ESDHC_DEBUG_SEL_REG 0xc3
44 #define ESDHC_DEBUG_SEL_MASK 0xf
52 #define ESDHC_WTMK_LVL 0x44
53 #define ESDHC_WTMK_DEFAULT_VAL 0x10401040
54 #define ESDHC_WTMK_LVL_RD_WML_MASK 0x000000FF
55 #define ESDHC_WTMK_LVL_RD_WML_SHIFT 0
56 #define ESDHC_WTMK_LVL_WR_WML_MASK 0x00FF0000
60 #define ESDHC_MIX_CTRL 0x48
70 #define ESDHC_MIX_CTRL_SDHCI_MASK 0xb7
72 #define ESDHC_MIX_CTRL_TUNING_MASK 0x03c00000
75 #define ESDHC_DLL_CTRL 0x60
80 #define ESDHC_TUNE_CTRL_STATUS 0x68
82 #define ESDHC_TUNE_CTRL_MIN 0
86 #define ESDHC_STROBE_DLL_CTRL 0x70
87 #define ESDHC_STROBE_DLL_CTRL_ENABLE (1 << 0)
89 #define ESDHC_STROBE_DLL_CTRL_SLV_DLY_TARGET_DEFAULT 0x7
93 #define ESDHC_STROBE_DLL_STATUS 0x74
95 #define ESDHC_STROBE_DLL_STS_SLV_LOCK 0x1
97 #define ESDHC_VEND_SPEC2 0xc8
100 #define ESDHC_VEND_SPEC2_AUTO_TUNE_4BIT_EN (0 << 4)
105 #define ESDHC_TUNING_CTRL 0xcc
108 #define ESDHC_TUNING_START_TAP_DEFAULT 0x1
109 #define ESDHC_TUNING_START_TAP_MASK 0x7f
111 #define ESDHC_TUNING_STEP_DEFAULT 0x1
112 #define ESDHC_TUNING_STEP_MASK 0x00070000
122 #define ESDHC_CTRL_4BITBUS (0x1 << 1)
123 #define ESDHC_CTRL_8BITBUS (0x2 << 1)
124 #define ESDHC_CTRL_BUSWIDTH_MASK (0x3 << 1)
136 #define ESDHC_CQHCI_ADDR_OFFSET 0x100
139 * The CMDTYPE of the CMD register (offset 0xE) should be set to
191 * In ADMA mode, it only use the 16 bit block count of the register 0x4
254 .flags = 0,
407 void __iomem *base = host->ioaddr + (reg & ~0x3); in esdhc_clrset_le()
408 u32 shift = (reg & 0x3) * 8; in esdhc_clrset_le()
430 for (i = 0; i < 7; i++) { in esdhc_dump_debug_regs()
433 ESDHC_IMX_DUMP("%s: 0x%04x\n", debug_status[i], in esdhc_dump_debug_regs()
437 esdhc_clrset_le(host, ESDHC_DEBUG_SEL_MASK, 0, ESDHC_DEBUG_SEL_REG); in esdhc_dump_debug_regs()
482 * device, config the auto tuning circuit only check DAT[0] and CMD in usdhc_auto_tuning_mode_sel_and_en()
506 val = fsl_prss & 0x000FFFFF; in esdhc_readl_le()
507 /* move dat[0-3] bits */ in esdhc_readl_le()
508 val |= (fsl_prss & 0x0F000000) >> 4; in esdhc_readl_le()
510 val |= (fsl_prss & 0x00800000) << 1; in esdhc_readl_le()
514 /* ignore bit[0-15] as it stores cap_1 register val for mx6sl */ in esdhc_readl_le()
516 val &= 0xffff0000; in esdhc_readl_le()
534 val = readl(host->ioaddr + SDHCI_CAPABILITIES) & 0xFFFF; in esdhc_readl_le()
555 val = 0; in esdhc_readl_le()
556 val |= FIELD_PREP(SDHCI_MAX_CURRENT_330_MASK, 0xFF); in esdhc_readl_le()
557 val |= FIELD_PREP(SDHCI_MAX_CURRENT_300_MASK, 0xFF); in esdhc_readl_le()
558 val |= FIELD_PREP(SDHCI_MAX_CURRENT_180_MASK, 0xFF); in esdhc_readl_le()
638 u16 ret = 0; in esdhc_readw_le()
698 u32 new_val = 0; in esdhc_writew_le()
813 val &= ~SDHCI_MAKE_BLKSZ(0x7, 0); in esdhc_writew_le()
816 esdhc_clrset_le(host, 0xffff, val, reg); in esdhc_writew_le()
842 u32 new_val = 0; in esdhc_writeb_le()
869 mask = 0xffff & ~(ESDHC_CTRL_BUSWIDTH_MASK | ESDHC_CTRL_D3CD); in esdhc_writeb_le()
878 esdhc_clrset_le(host, 0xff, val, reg); in esdhc_writeb_le()
886 * register bits [0..2] during the software reset. This in esdhc_writeb_le()
891 esdhc_clrset_le(host, 0x7, 0x7, ESDHC_SYSTEM_CONTROL); in esdhc_writeb_le()
903 imx_data->is_ddr = 0; in esdhc_writeb_le()
911 esdhc_clrset_le(host, 0xff, new_val, in esdhc_writeb_le()
950 if (clock == 0) { in esdhc_pltfm_set_clock()
951 host->mmc->actual_clock = 0; in esdhc_pltfm_set_clock()
955 /* For i.MX53 eSDHCv3, SYSCTL.SDCLKFS may not be set to 0. */ in esdhc_pltfm_set_clock()
1048 ctrl = 0; in esdhc_pltfm_set_bus_width()
1071 writel(0, host->ioaddr + ESDHC_TUNE_CTRL_STATUS); in esdhc_reset_tuning()
1115 return 0; in usdhc_execute_tuning()
1141 esdhc_clrset_le(host, 0xff, SDHCI_RESET_ALL, SDHCI_SOFTWARE_RESET); in esdhc_prepare_tuning()
1154 "tuning with delay 0x%x ESDHC_TUNE_CTRL_STATUS 0x%x\n", in esdhc_prepare_tuning()
1178 target_win_length = 0; in esdhc_executing_tuning()
1217 dev_dbg(mmc_dev(host->mmc), "tuning %s at 0x%x ret %d\n", in esdhc_executing_tuning()
1295 writel(0, host->ioaddr + ESDHC_STROBE_DLL_CTRL); in esdhc_set_strobe_dll()
1328 imx_data->is_ddr = 0; in esdhc_set_uhs_signaling()
1395 esdhc_is_usdhc(imx_data) ? 0xF0000 : 0xE0000, in esdhc_set_timeout()
1401 int cmd_error = 0; in esdhc_cqhci_irq()
1402 int data_error = 0; in esdhc_cqhci_irq()
1409 return 0; in esdhc_cqhci_irq()
1414 esdhc_clrset_le(host, ESDHC_SYS_CTRL_IPP_RST_N, 0, ESDHC_SYSTEM_CONTROL); in esdhc_hw_reset()
1486 writel(readl(host->ioaddr + 0x6c) & ~BIT(7), in sdhci_esdhc_imx_hwinit()
1487 host->ioaddr + 0x6c); in sdhci_esdhc_imx_hwinit()
1491 writel(0x0, host->ioaddr + ESDHC_DLL_CTRL); in sdhci_esdhc_imx_hwinit()
1588 if (count-- == 0) { in esdhc_cqe_enable()
1614 cqhci_writel(cq_host, 0, CQHCI_CTL); in esdhc_cqe_enable()
1664 boarddata->delay_line = 0; in sdhci_esdhc_imx_probe_dt()
1684 if (mmc_gpio_get_cd(host->mmc) >= 0) in sdhci_esdhc_imx_probe_dt()
1687 return 0; in sdhci_esdhc_imx_probe_dt()
1711 cpu_latency_qos_add_request(&imx_data->pm_qos_req, 0); in sdhci_esdhc_imx_probe()
1765 writel(0x0, host->ioaddr + ESDHC_MIX_CTRL); in sdhci_esdhc_imx_probe()
1766 writel(0x0, host->ioaddr + SDHCI_AUTO_CMD_STATUS); in sdhci_esdhc_imx_probe()
1767 writel(0x0, host->ioaddr + ESDHC_TUNE_CTRL_STATUS); in sdhci_esdhc_imx_probe()
1841 return 0; in sdhci_esdhc_imx_probe()
1864 dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff); in sdhci_esdhc_imx_remove()
1964 esdhc_pltfm_set_clock(host, 0); in sdhci_esdhc_runtime_suspend()
1983 cpu_latency_qos_add_request(&imx_data->pm_qos_req, 0); in sdhci_esdhc_runtime_resume()
2002 err = sdhci_runtime_resume_host(host, 0); in sdhci_esdhc_runtime_resume()